/* ==========================================================================
   Draw Anything — Landing site styles
   Brand: bold ink outlines, saturated poster colours, paper-white ground.
   ========================================================================== */

:root {
  --ink:        #101014;
  --ink-soft:   #43434f;
  --ink-faint:  #6f6f7d;
  --paper:      #ffffff;
  --ground:     #f2f1f6;
  --ground-2:   #e8e7ef;
  --line:       #101014;

  --magenta:    #ff00ff;
  --lime:       #9ee34a;
  --blue:       #1a1aea;
  --yellow:     #ffd400;
  --orange:     #ff8a00;
  --red:        #ec1c24;
  --green:      #17993f;

  --radius:     18px;
  --radius-lg:  28px;
  --shadow:     0 2px 0 var(--line);
  --shadow-lg:  6px 6px 0 var(--line);

  --wrap:       1180px;
  --pad:        clamp(20px, 5vw, 40px);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* height:auto is essential — every <img> carries intrinsic width/height
   attributes (good for layout stability), and without this the height attribute
   survives the max-width clamp and stretches the image vertically. */
img { max-width: 100%; height: auto; display: block; }

a { color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--blue); }

h1, h2, h3, h4 {
  line-height: 1.06;
  letter-spacing: -0.033em;
  margin: 0 0 .5em;
  font-weight: 860;
}

h1 { font-size: clamp(2.5rem, 6.4vw, 4.4rem); }
h2 { font-size: clamp(1.95rem, 4.4vw, 3rem); }
h3 { font-size: clamp(1.2rem, 2.4vw, 1.55rem); letter-spacing: -0.02em; }

p { margin: 0 0 1.1em; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }
.wrap-narrow { max-width: 780px; }

section { padding-block: clamp(60px, 9vw, 116px); }

.center { text-align: center; }
.lede { font-size: clamp(1.06rem, 1.9vw, 1.28rem); color: var(--ink-soft); max-width: 62ch; }
.center .lede { margin-inline: auto; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .8rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  background: var(--paper); border: 2px solid var(--line);
  border-radius: 999px; padding: .4rem .95rem; margin-bottom: 1.4rem;
  box-shadow: 3px 3px 0 var(--line);
}
.eyebrow .dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--lime); border: 1.5px solid var(--line); }

/* ---------- Buttons ---------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  font: inherit; font-weight: 800; font-size: 1.02rem;
  padding: .95rem 1.7rem;
  border: 2.5px solid var(--line);
  border-radius: 999px;
  background: var(--paper); color: var(--ink);
  text-decoration: none; cursor: pointer;
  box-shadow: 4px 4px 0 var(--line);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  white-space: nowrap;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--line); color: var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--line); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; color: #fff; }
.btn-accent { background: var(--lime); }
.btn-magenta { background: var(--magenta); color: #fff; }
.btn-sm { padding: .6rem 1.15rem; font-size: .92rem; box-shadow: 3px 3px 0 var(--line); }
.btn svg { flex: none; }

.btn-row { display: flex; flex-wrap: wrap; gap: .9rem; align-items: center; }
.center .btn-row { justify-content: center; }

/* ---------- Official store badges -------------------------------------- */
/* Both badges are trimmed flush to their artwork, so a shared height lines
   them up. Apple's is 2.99:1, Google's 3.36:1 — the widths differ slightly by
   design and should not be forced to match. */
.store-badges { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.center .store-badges, .store-badges.center { justify-content: center; }
.store-badges a {
  display: inline-block; line-height: 0;
  border-radius: 8px;
  transition: transform .13s ease, opacity .13s ease;
}
.store-badges a:hover { transform: translateY(-2px); opacity: .88; }
.store-badges a:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.store-badges img { height: 52px; width: auto; display: block; }
@media (max-width: 420px) { .store-badges img { height: 46px; } }

/* ---------- Header ----------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(242,241,246,.88);
  backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 2px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 1.2rem;
  min-height: 68px;
}
.brand { display: flex; align-items: center; gap: .65rem; font-weight: 880; font-size: 1.06rem; text-decoration: none; letter-spacing: -.02em; }
.brand img { width: 36px; height: 36px; border-radius: 9px; border: 2px solid var(--line); }
.nav { margin-left: auto; display: flex; align-items: center; gap: 1.5rem; }
/* :not(.btn) so these never out-specify the button's own colour rules. */
.nav a:not(.btn) { font-weight: 650; font-size: .95rem; text-decoration: none; color: var(--ink-soft); }
.nav a:not(.btn):hover { color: var(--ink); }
.nav a.btn-primary,
.nav a.btn-primary:hover { color: #fff; }
@media (max-width: 900px) { .nav .nav-link { display: none; } }

/* ---------- Hero ------------------------------------------------------- */

.hero {
  position: relative;
  padding-block: clamp(44px, 7vw, 78px) clamp(28px, 4vw, 44px);
  background:
    radial-gradient(60rem 30rem at 78% -10%, rgba(158,227,74,.30), transparent 62%),
    radial-gradient(48rem 26rem at 8% 8%, rgba(255,0,255,.10), transparent 60%);
  text-align: center;
}
.hero h1 { max-width: 17ch; margin-inline: auto; }
.hero h1 .ink-blue { color: var(--blue); }
.hero h1 .ink-magenta { color: var(--magenta); }
.hero .lede { margin-bottom: 1.8rem; }

.trust {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .55rem 1.5rem;
  margin-top: 1.7rem; font-size: .9rem; font-weight: 650; color: var(--ink-soft);
}
.trust span { display: inline-flex; align-items: center; gap: .42rem; }
.stars { color: var(--orange); letter-spacing: -1px; }

/* ---------- Studio ----------------------------------------------------- */

.studio-section { padding-top: clamp(18px, 3vw, 34px); }

.studio {
  background: var(--paper);
  border: 3px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.studio-head {
  display: flex; align-items: center; gap: .8rem; flex-wrap: wrap;
  padding: .8rem 1.1rem;
  border-bottom: 2.5px solid var(--line);
  background: linear-gradient(90deg, rgba(158,227,74,.22), rgba(255,0,255,.10));
}
.studio-title { font-weight: 860; font-size: 1.02rem; letter-spacing: -.02em; display: flex; align-items: center; gap: .5rem; }
.studio-title .live { width: .55rem; height: .55rem; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px rgba(236,28,36,.22); }
.studio-hint { font-size: .88rem; color: var(--ink-soft); font-weight: 620; }
.studio-head .spacer { margin-left: auto; }

/* toolbar rows */
.studio-bar {
  display: flex; align-items: center; gap: .55rem; flex-wrap: wrap;
  padding: .7rem .9rem;
  background: var(--paper);
}
.studio-bar + .studio-bar { border-top: 2px dashed var(--ground-2); }
.bar-group { display: flex; align-items: center; gap: .4rem; }
.bar-label { font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); margin-right: .15rem; }
.bar-sep { width: 2px; align-self: stretch; background: var(--ground-2); margin-inline: .35rem; border-radius: 2px; }
.bar-spacer { margin-left: auto; }

.tool {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-width: 44px; height: 44px; padding: 0 .7rem;
  border: 2.5px solid var(--line); border-radius: 12px;
  background: var(--paper); color: var(--ink);
  font: inherit; font-size: .88rem; font-weight: 750; cursor: pointer;
  transition: transform .1s ease, background .1s ease, box-shadow .1s ease;
}
.tool:hover { background: var(--ground); }
.tool:active { transform: translateY(2px); }
.tool[aria-pressed="true"] { background: var(--ink); color: #fff; }
.tool[aria-pressed="true"] svg { stroke: #fff; }
.tool svg { width: 20px; height: 20px; stroke: var(--ink); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.tool .label { display: none; }
@media (min-width: 1040px) { .tool .label { display: inline; } }

.tool.is-pro { border-style: dashed; }
.tool.is-pro::after {
  content: "♛";
  position: absolute; top: -8px; right: -7px;
  width: 19px; height: 19px; border-radius: 50%;
  background: var(--yellow); border: 2px solid var(--line);
  font-size: 10px; line-height: 15px; text-align: center; color: var(--ink);
}

/* swatches */
.swatches { display: flex; align-items: center; gap: .34rem; flex-wrap: wrap; }
.swatch {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2.5px solid var(--line); cursor: pointer; padding: 0;
  transition: transform .1s ease;
}
.swatch:hover { transform: scale(1.14); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5.5px var(--ink); }

.size-slider { -webkit-appearance: none; appearance: none; width: 116px; height: 8px; border-radius: 999px; background: var(--ground-2); border: 2px solid var(--line); cursor: pointer; }
.size-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--magenta); border: 2.5px solid var(--line); cursor: grab; }
.size-slider::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--magenta); border: 2.5px solid var(--line); cursor: grab; }
.size-readout { font-size: .82rem; font-weight: 800; min-width: 2.4rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

/* canvas */
.canvas-wrap {
  position: relative;
  border-block: 2.5px solid var(--line);
  background: #fff;
  touch-action: none;
}
#board { display: block; width: 100%; height: clamp(360px, 52vh, 560px); cursor: crosshair; touch-action: none; }

.canvas-nudge {
  position: absolute; inset: 0;
  display: grid; place-content: center; gap: .4rem; text-align: center;
  pointer-events: none;
  transition: opacity .35s ease;
  color: var(--ink-faint);
}
.canvas-nudge.hidden { opacity: 0; }
.canvas-nudge strong { display: block; font-size: clamp(1.3rem, 3.2vw, 1.9rem); font-weight: 860; color: var(--ink); letter-spacing: -.03em; }
.canvas-nudge span { font-size: .96rem; font-weight: 620; }

/* studio footer CTA */
.studio-foot {
  display: flex; align-items: center; gap: .9rem; flex-wrap: wrap;
  padding: .95rem 1.1rem;
  border-top: 2.5px solid var(--line);
  background: var(--ground);
  font-size: .93rem; font-weight: 650; color: var(--ink-soft);
}
.studio-foot .btn { margin-left: auto; }
@media (max-width: 720px) { .studio-foot .btn { margin-left: 0; width: 100%; } }

/* PRO modal */
.modal-back {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(16,16,20,.62);
  display: grid; place-items: center; padding: 1.2rem;
  opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s ease;
}
.modal-back.open { opacity: 1; visibility: visible; }
.modal {
  width: min(460px, 100%);
  background: var(--paper);
  border: 3px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2rem 1.8rem 1.7rem;
  text-align: center;
  transform: translateY(10px); transition: transform .2s ease;
}
.modal-back.open .modal { transform: none; }
.modal .crown { font-size: 2.4rem; line-height: 1; }
.modal h3 { margin-top: .6rem; }
.modal p { color: var(--ink-soft); font-size: .98rem; }
.modal .btn { width: 100%; }
.modal .dismiss { display: inline-block; margin-top: .9rem; font-size: .9rem; font-weight: 700; color: var(--ink-faint); background: none; border: 0; cursor: pointer; text-decoration: underline; }

/* ---------- Generic cards --------------------------------------------- */

.card {
  background: var(--paper);
  border: 2.5px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--line);
  padding: 1.6rem 1.5rem;
}

.grid { display: grid; gap: 1.4rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(272px, 1fr)); }

.badge-num {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 2.5px solid var(--line);
  font-weight: 880; font-size: 1.16rem;
  margin-bottom: .95rem;
}
.c-lime { background: var(--lime); } .c-yellow { background: var(--yellow); }
.c-magenta { background: var(--magenta); color:#fff; } .c-blue { background: var(--blue); color: #fff; }
.c-orange { background: var(--orange); } .c-green { background: var(--green); color: #fff; }

/* ---------- Download --------------------------------------------------- */

.download { background: var(--ink); color: #fff; }
.download h2, .download h3 { color: #fff; }
.download .lede { color: rgba(255,255,255,.76); }
.download-inner { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: clamp(2rem,5vw,4rem); align-items: center; }
@media (max-width: 880px) { .download-inner { grid-template-columns: 1fr; } }
.download-icon {
  width: 132px; height: 132px; border-radius: 30px;
  border: 3px solid #fff; box-shadow: 8px 8px 0 rgba(255,255,255,.2);
  margin-bottom: 1.6rem;
}
.spec-list { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; gap: .7rem; }
.spec-list li { display: flex; gap: .7rem; align-items: baseline; color: rgba(255,255,255,.82); font-size: .97rem; }
.spec-list b { color: #fff; font-weight: 800; min-width: 8.4rem; flex: none; }

/* ---------- Screenshots ------------------------------------------------ */

.shots-rail {
  display: flex; gap: 1.3rem; overflow-x: auto; padding: .6rem .3rem 1.6rem;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.shots-rail::-webkit-scrollbar { height: 10px; }
.shots-rail::-webkit-scrollbar-thumb { background: var(--ink); border-radius: 999px; }
.shots-rail::-webkit-scrollbar-track { background: var(--ground-2); border-radius: 999px; }
/* Landscape screenshots (2778x1284) — wide cards, not phone-shaped ones. */
.shot {
  flex: none; width: min(580px, 86vw); scroll-snap-align: center;
  border: 3px solid var(--line); border-radius: 22px; overflow: hidden;
  background: var(--paper); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
}
.shot img { width: 100%; height: auto; }
.shot figcaption { padding: .85rem 1rem; font-size: .9rem; font-weight: 720; border-top: 2.5px solid var(--line); }

.banner-grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(330px,1fr)); margin-top: 1.4rem; }
.banner { border: 3px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: 4px 4px 0 var(--line); background: var(--paper); }

/* ---------- Guides ----------------------------------------------------- */

.guide-card { display: flex; flex-direction: column; text-decoration: none; }
.guide-card:hover { transform: translate(-3px,-3px); box-shadow: 7px 7px 0 var(--line); color: var(--ink); }
.guide-card { transition: transform .13s ease, box-shadow .13s ease; }
.guide-kicker { font-size: .74rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: .55rem; }
.guide-card h3 { margin-bottom: .45rem; }
.guide-card p { color: var(--ink-soft); font-size: .96rem; margin-bottom: 1rem; }
.guide-more { margin-top: auto; font-weight: 820; font-size: .93rem; display: inline-flex; align-items: center; gap: .4rem; }
.guide-more::after { content: "→"; transition: transform .13s ease; }
.guide-card:hover .guide-more::after { transform: translateX(4px); }

/* ---------- FAQ -------------------------------------------------------- */

.faq { display: grid; gap: .9rem; }
details.qa {
  background: var(--paper); border: 2.5px solid var(--line); border-radius: var(--radius);
  box-shadow: 3px 3px 0 var(--line); overflow: hidden;
}
details.qa summary {
  list-style: none; cursor: pointer;
  padding: 1.15rem 3rem 1.15rem 1.3rem; position: relative;
  font-weight: 800; font-size: 1.04rem; letter-spacing: -.015em;
}
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::after {
  content: "+"; position: absolute; right: 1.2rem; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; font-weight: 700; line-height: 1; color: var(--ink-faint);
}
details.qa[open] summary::after { content: "–"; }
details.qa .qa-body { padding: 0 1.3rem 1.3rem; color: var(--ink-soft); }
details.qa .qa-body p { margin-bottom: .8rem; }
.qa-more { font-weight: 820; font-size: .93rem; display: inline-flex; align-items: center; gap: .35rem; text-decoration: none; border-bottom: 2.5px solid var(--lime); }
.qa-more::after { content: "→"; }
.qa-more:hover { border-bottom-color: var(--blue); }

/* ---------- Final CTA -------------------------------------------------- */

.cta-final {
  background:
    radial-gradient(44rem 24rem at 50% 0%, rgba(255,0,255,.16), transparent 62%),
    var(--lime);
  border-top: 3px solid var(--line);
  border-bottom: 3px solid var(--line);
}

/* ---------- Footer ----------------------------------------------------- */

.site-footer { background: var(--ink); color: rgba(255,255,255,.7); padding-block: clamp(46px,6vw,72px) 2rem; font-size: .93rem; }
.site-footer a { color: rgba(255,255,255,.82); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; gap: 2.4rem; grid-template-columns: 1.6fr repeat(3, 1fr); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer .brand { color: #fff; margin-bottom: .8rem; }
.site-footer h4 { color: #fff; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 1rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.footer-bottom {
  margin-top: 2.8rem; padding-top: 1.6rem; border-top: 1px solid rgba(255,255,255,.16);
  display: flex; flex-wrap: wrap; gap: .8rem 1.5rem; align-items: center; font-size: .87rem;
}
.footer-bottom .spacer { margin-left: auto; }

/* Company mark sits with the copyright line. The source art is white on
   transparency, so it reads correctly on the dark footer without treatment. */
.footer-copy { display: inline-flex; align-items: center; gap: .72rem; }
.footer-copy img {
  height: 22px; width: auto; flex: none;
  opacity: .82; transition: opacity .15s ease;
}
.footer-copy a:hover img { opacity: 1; }

/* ---------- Guide article pages ---------------------------------------- */

.article-hero {
  background: radial-gradient(50rem 26rem at 20% 0%, rgba(158,227,74,.30), transparent 60%);
  padding-block: clamp(44px,6vw,80px) clamp(28px,4vw,44px);
  border-bottom: 2px solid var(--line);
}
.crumbs { font-size: .87rem; font-weight: 680; color: var(--ink-faint); margin-bottom: 1.1rem; }
.crumbs a { text-decoration: none; color: var(--ink-faint); }
.crumbs a:hover { color: var(--ink); }
.article-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.3rem; font-size: .88rem; font-weight: 650; color: var(--ink-soft); margin-top: 1.2rem; }

.prose { max-width: 74ch; }
.prose h2 { margin-top: 2.4em; font-size: clamp(1.6rem, 3.2vw, 2.15rem); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.9em; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1.2em; }
.prose li { margin-bottom: .55em; }
.prose li::marker { font-weight: 800; }
.prose img { border: 3px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); margin-block: 2rem; }

.callout {
  border: 2.5px solid var(--line); border-left-width: 10px; border-radius: var(--radius);
  background: var(--paper); padding: 1.3rem 1.4rem; margin-block: 2rem;
  box-shadow: 3px 3px 0 var(--line);
}
.callout.lime { border-left-color: var(--lime); }
.callout.magenta { border-left-color: var(--magenta); }
.callout.yellow { border-left-color: var(--yellow); }
.callout.blue { border-left-color: var(--blue); }
.callout h3 { margin-top: 0; font-size: 1.12rem; }
.callout p:last-child { margin-bottom: 0; }

.steps { list-style: none; padding: 0; counter-reset: s; display: grid; gap: 1.1rem; margin-block: 1.6rem; }
.steps li { counter-increment: s; position: relative; padding-left: 3.6rem; }
.steps li::before {
  content: counter(s);
  position: absolute; left: 0; top: -.15rem;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--lime); border: 2.5px solid var(--line);
  display: grid; place-items: center; font-weight: 880; font-size: 1.04rem;
}
.steps li b { display: block; font-weight: 820; }

.inline-cta {
  display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap;
  background: var(--ink); color: #fff;
  border: 3px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.6rem 1.7rem; margin-block: 2.6rem;
  box-shadow: var(--shadow-lg);
}
/* Direct child only — this is the app icon. Without the `>` it also hits the
   store badge images and stamps a white border and fixed width onto them. */
.inline-cta > img { width: 62px; height: 62px; border-radius: 15px; border: 2.5px solid #fff; flex: none; }
.inline-cta div { flex: 1 1 240px; }
.inline-cta strong { display: block; font-size: 1.14rem; font-weight: 850; letter-spacing: -.02em; }
.inline-cta span { color: rgba(255,255,255,.72); font-size: .94rem; }
.inline-cta .btn { background: var(--lime); border-color: #fff; box-shadow: 4px 4px 0 rgba(255,255,255,.3); }
.inline-cta .store-badges { flex: none; gap: .6rem; }
.inline-cta .store-badges img { height: 48px; }

/* On a narrow screen the CTA wraps to three stacked rows; tighten it up so it
   doesn't sprawl, and keep the badges a comfortable tap target. */
@media (max-width: 640px) {
  .inline-cta { gap: .85rem; padding: 1.35rem 1.25rem; }
  .inline-cta > img { width: 50px; height: 50px; border-radius: 12px; }
  .inline-cta > div { flex: 1 1 100%; }
  .inline-cta .store-badges { gap: .55rem; }
  .inline-cta .store-badges img { height: 46px; }
}

.related { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); margin-top: 1.4rem; }

.toc { background: var(--paper); border: 2.5px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.5rem; box-shadow: 3px 3px 0 var(--line); margin-bottom: 2.6rem; }
.toc h2 { font-size: .78rem !important; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 .8rem !important; }
.toc ol { margin: 0; padding-left: 1.2rem; display: grid; gap: .42rem; }
.toc a { font-weight: 680; text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* ---------- Utility ---------------------------------------------------- */

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.section-head { margin-bottom: clamp(2rem, 4vw, 3.2rem); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
