/* The build fee and the "Coming soon" gate in front of it.
 *
 * Its own file (pulled into application.css by require_tree) rather than
 * appended to app/assets/tailwind/application.css, so this branch adds a file
 * instead of editing the end of one other branches are also appending to.
 * Plain CSS over the custom properties the shells already set (--brand-*,
 * --ink, --line, --surface), so it wears whichever shell it is rendered in.
 */

/* ── Coming soon (fan side, onboarding shell) ─────────────────────────── */

.coming-soon-form { display: grid; gap: 0.6rem; }

.coming-soon-flash {
  margin: 1rem auto 0;
  max-width: 20rem;
  font-size: 0.85rem;
  font-weight: 550;
  line-height: 1.4;
  color: var(--brand-lift, var(--brand-primary));
}

.coming-soon-flash.is-alert { color: #FCA5A5; }

/* ── Studio: the second button beside "Preview the app" ───────────────── */

.studio-preview-cta { gap: 0.6rem; flex-wrap: wrap; align-items: center; }

/* .wt-frame-btn-wide centres a lone button with auto margins; with a second
   item beside it those margins push the two to opposite ends, so the row's
   justify-content does the centring instead. */
.studio-preview-cta .wt-frame-btn-wide { margin: 0; }

.build-fee-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: 9999px;
  border: 1px solid rgba(74, 222, 128, 0.35);
  background: rgba(74, 222, 128, 0.08);
  color: #BBF7D0;
  font-size: 0.85rem;
  font-weight: 600;
}

.build-fee-status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: #4ADE80;
}

.build-fee-status.is-test {
  border-color: rgba(250, 204, 21, 0.4);
  background: rgba(250, 204, 21, 0.08);
  color: #FEF08A;
}

.build-fee-status.is-test .build-fee-status-dot { background: #FACC15; }

/* ── Studio: /studio/build ────────────────────────────────────────────── */

/* The page sits in .studio-shell-wide so the three phones have room. Up to
   64rem the words keep to a reading column inside it; from 64rem everything
   fills the shell, so header, hero, phones and cards share one left edge.
   Its own --ink-soft, a step lighter than the studio's, for the grey
   secondary lines on this longer read. */
.build-fee {
  --ink-soft: #BDBDC7;
  display: grid;
  gap: 1rem;
}
.build-fee > * { width: 100%; max-width: 46rem; margin-inline: auto; min-width: 0; }

/* The hero card and the phones. Narrow: the card, then the phones under it. */
.build-fee-top { display: grid; gap: 1rem; min-width: 0; }

@media (min-width: 64rem) {
  .build-fee { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .build-fee > * { max-width: none; grid-column: 1 / -1; }
  .build-fee > .build-fee-pair { grid-column: auto; }

  /* Wide: one card, the copy left and the phones right. */
  .build-fee-top {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 1.5rem;
    background:
      radial-gradient(90% 90% at 100% 20%, color-mix(in srgb, var(--app-primary, #7C3AED) 30%, transparent), transparent 65%),
      radial-gradient(70% 70% at 0% 100%, color-mix(in srgb, var(--app-secondary, #A78BFA) 14%, transparent), transparent 60%),
      var(--surface);
  }

  .build-fee-top > .build-fee-hero {
    border: 0;
    border-radius: 0;
    background: none;
    overflow: visible;
    padding: 3.5rem 0 3.5rem 3rem;
  }

  .build-fee-top > .build-mocks-figure { margin: 0; padding: 2.25rem 0 1.75rem; }
}

.build-fee-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  padding: 2rem 1.5rem;
  background:
    radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--app-primary, #7C3AED) 30%, transparent), transparent 60%),
    radial-gradient(90% 70% at 0% 100%, color-mix(in srgb, var(--app-secondary, #A78BFA) 14%, transparent), transparent 60%),
    var(--surface);
}

@media (min-width: 40rem) {
  .build-fee-hero { padding: 2.75rem 2.5rem; }
}

.build-fee-app {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* The app's icon (_app_icon): the coach's photo or initials on the app's
   gradient, everything in proportion to --icon-size so the hero's and the
   home screen's are the same drawing at two sizes. */
.build-app-icon {
  --icon-size: 2.5rem;
  width: var(--icon-size);
  height: var(--icon-size);
  flex: none;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: calc(var(--icon-size) * 0.264);
  background: linear-gradient(135deg, var(--app-primary, #7C3AED), var(--app-secondary, #A78BFA));
}

.build-app-icon img { width: 100%; height: 100%; object-fit: cover; }

.build-app-icon-initials {
  font-size: calc(var(--icon-size) * 0.375);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #FFFFFF;
}

.build-fee-swatch { --icon-size: 2.75rem; box-shadow: 0 10px 24px -14px var(--app-primary, #7C3AED); }

.build-fee-app-name { font-weight: 700; color: var(--ink); }
.build-fee-app-sub { font-size: 0.8rem; color: var(--ink-soft); }

.build-fee-title {
  margin-top: 1.5rem;
  font-size: clamp(1.75rem, 5vw, 2.6rem);
  line-height: 1.1;
  font-weight: 780;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-wrap: balance;
}

.build-fee-title-soft { display: block; color: var(--ink-soft); font-weight: 700; }

.build-fee-lede {
  margin-top: 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.build-fee-price {
  margin-top: 1.25rem;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.build-fee-amount {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.build-fee-terms { font-size: 0.95rem; color: var(--ink-soft); }

.build-fee-hero > .build-fee-actions { margin-top: 1rem; max-width: 24rem; }
.build-fee-final > .build-fee-actions,
.build-fee-mid > .build-fee-actions { max-width: 24rem; margin-inline: auto; }

/* The Pay under the money box: no card, just the button between sections. */
.build-fee-mid { padding: 0.5rem 0; }

.build-fee-actions { display: grid; gap: 0.6rem; }

.build-fee-actions .wt-frame-btn {
  width: 100%;
  padding-block: 0.95rem;
  font-size: 1rem;
}

/* Pay wears the app's own colour, in its contrast-safe fill. */
.build-fee-actions .build-fee-cta {
  background: var(--app-fill, var(--brand-primary));
  color: var(--app-on, #FFFFFF);
  box-shadow: 0 14px 32px -14px var(--app-fill, var(--brand-primary));
}

.build-fee-actions .build-fee-cta:hover { background: color-mix(in srgb, var(--app-fill, var(--brand-primary)) 88%, #FFFFFF); }

/* Disabled reads as off, not as a faded Pay: a neutral grey fill with no
   brand colour or glow, its words muted but still readable (about 6:1). */
.build-fee-actions .wt-frame-btn[disabled] {
  background: #27272A;
  color: #A1A1AA;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
  opacity: 1;
  cursor: not-allowed;
}

/* The Creator Terms box above each Pay, the way Apple's checkouts ask: one
   line, a real checkbox in the app's own colour, the agreement a link away.
   Left-aligned even in the centred final card, because a checkbox reads as
   "this goes with that" only when it sits at the start of its words. An
   unticked Pay is disabled by the rule above; a refused request
   (.has-error) rings the box and says why underneath. See _pay. */
.build-fee-agree {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  text-align: left;
}

.build-fee-agree-box {
  flex-shrink: 0;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0.12rem 0 0;
  accent-color: var(--app-fill, var(--brand-primary));
  cursor: pointer;
}

.build-fee-agree-label {
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--ink, #F4F4F5);
  cursor: pointer;
}

/* A little more air between the box and the button it guards. */
.build-fee-agree + .wt-frame-btn,
.build-fee-agree-error + .wt-frame-btn { margin-top: 0.25rem; }

.build-fee-agree.has-error .build-fee-agree-box { outline: 2px solid #F87171; outline-offset: 2px; border-radius: 0.2rem; }

.build-fee-agree-error {
  margin: -0.2rem 0 0 1.75rem;
  font-size: 0.8125rem;
  color: #FCA5A5;
  text-align: left;
}

.build-fee-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--ink-soft);
  text-align: center;
}

.build-fee-note-icon { width: 0.9rem; height: 0.9rem; }

.build-fee-small {
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--ink-soft);
  text-align: center;
  text-wrap: pretty;
}

.build-fee-note { text-wrap: balance; }

/* Links in the page's own palette rather than the studio's violet: the
   app's light accent, a soft underline that firms up on hover. */
.build-fee-link {
  color: var(--app-lift, #C4B5FD);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, var(--app-lift, #C4B5FD) 45%, transparent);
  text-underline-offset: 0.25em;
  transition: color 0.15s, text-decoration-color 0.15s;
}

.build-fee-link:hover,
.build-fee-link:focus-visible { color: #FFFFFF; text-decoration-color: currentColor; }

.build-fee-back { margin-top: 0.25rem; text-align: center; font-size: 0.9rem; }

/* The layout's 3rem under the shell, halved here: the page ends on a link.
   The safe-area insets are for iPhones, where the studio's viewport-fit=cover
   lets the page run under the status bar and the Dynamic Island at the top
   (in the home-screen app and in Safari's standalone mode) and under the
   home indicator at the bottom; env() is 0 everywhere else, so desktops get
   exactly the old spacing. Phones get a further 3rem at the bottom because
   iOS Safari's address bar now floats over the page as a pill and would
   otherwise sit on the last link or button even when scrolled to the end. */
.studio-outer:has(.build-fee) {
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 39.99rem) {
  .studio-outer:has(.build-fee) { padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px)); }
}

/* ── Paid: what's next ──
   The paid page is three things in the studio's normal column: the hero
   card (no price, no Pay), a "What's next" card of plain steps, and one
   button. Extra air between them, because with the sales sections gone
   there is nothing else competing and the page should feel finished, not
   sparse. The steps reuse .build-fee-step's numbered rows; their links are
   the step's first words so the whole line reads as one instruction. */
.build-fee-paid { gap: 1.5rem; }
.build-fee-next .build-fee-steps { gap: 1.1rem; }
.build-fee-next .build-fee-step span:last-child { color: var(--ink-soft); }
.build-fee-next .build-fee-step .build-fee-link,
.build-fee-next .build-fee-step strong { color: var(--app-lift, #C4B5FD); font-weight: 650; }
.build-fee-next .build-fee-step strong { color: var(--ink); }
.build-fee-done { margin-top: 0.5rem; text-align: center; }

.build-fee-test-label {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.45rem;
  border-radius: 9999px;
  background: rgba(250, 204, 21, 0.15);
  color: #FEF08A;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── The sections ── */

.build-fee-section { padding: 1.5rem; }
.studio-card.build-fee-section + .studio-card { margin-top: 0; }

.build-fee-heading {
  margin-bottom: 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.build-fee-list,
.build-fee-steps,
.build-fee-terms-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.85rem;
}

.build-fee-item,
.build-fee-step {
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  gap: 0.85rem;
  align-items: center;
  font-size: 0.98rem;
  line-height: 1.4;
  color: var(--ink);
}

.build-fee-icon,
.build-fee-step-num {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--app-primary, #7C3AED) 22%, transparent);
  color: var(--app-lift, #C4B5FD);
}

.build-fee-step-num { border-radius: 9999px; font-size: 0.9rem; font-weight: 750; }
.build-fee-step strong { font-weight: 700; }
.build-fee-step span:last-child { color: var(--ink-soft); }
.build-fee-step strong { color: var(--ink); }

/* The money box: the split as the one big number, the rest as plain lines. */
.build-fee-money { border-color: color-mix(in srgb, var(--app-primary, #7C3AED) 35%, var(--line)); }

.build-fee-split {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1.1rem;
  margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
}

.build-fee-split-figure {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--app-lift, #C4B5FD);
}

.build-fee-split-words { font-size: 1rem; font-weight: 650; line-height: 1.4; color: var(--ink); }

.build-fee-terms-list { gap: 0.6rem; }

.build-fee-terms-list li {
  position: relative;
  padding-left: 1.1rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.build-fee-terms-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 9999px;
  background: var(--app-lift, #C4B5FD);
}

/* Questions: native <details>, so they open with no script. */
.build-fee-faqs { display: grid; }

.build-fee-faq { border-top: 1px solid var(--line); }
.build-fee-faq:first-child { border-top: 0; }

.build-fee-faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 0;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.build-fee-faq summary::-webkit-details-marker { display: none; }

.build-fee-faq summary::after {
  content: "+";
  flex: none;
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1;
  color: var(--ink-soft);
  transition: transform 0.15s ease;
}

.build-fee-faq[open] summary::after { transform: rotate(45deg); }

.build-fee-faq p {
  padding-bottom: 1rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.build-fee-final { text-align: center; }

.build-fee-final-title {
  margin-bottom: 1.25rem;
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  font-weight: 760;
  letter-spacing: -0.025em;
  color: var(--ink);
}

/* ── The three phones ──
   Drawn at full app size and shrunk with zoom (which, unlike transform,
   shrinks the space they take too), so everything inside is the app's own
   CSS at its own proportions. Phones and wide screens: a fan, the chat in
   front, the side phones fading out where they pass behind it (their words
   kept clear of that, below). In between (40rem to 64rem): three in a row. */

.build-mocks-figure {
  --mock-zoom: 0.56;
  --mock-side-zoom: 0.4;
  --mock-overlap: -6rem;
  --mock-gap: 0rem;
  margin: 0.5rem 0 0;
  overflow-x: clip;
}

.build-mocks {
  display: flex;
  gap: var(--mock-gap);
  justify-content: center;
  align-items: flex-end;
  padding: 0.5rem 0 0;
}

.build-mocks * { pointer-events: none; }

.build-mock { flex: none; display: flex; flex-direction: column; align-items: center; }
.build-mock-main { zoom: var(--mock-zoom); position: relative; z-index: 2; }
.build-mock-side { zoom: var(--mock-side-zoom); }
.build-mock-page { margin-right: var(--mock-overlap); }
.build-mock-home { margin-left: var(--mock-overlap); }
.build-mock-page .build-mock-phone {
  transform: rotate(-6deg);
  -webkit-mask-image: linear-gradient(to right, #000 56%, transparent 64%);
          mask-image: linear-gradient(to right, #000 56%, transparent 64%);
}
.build-mock-home .build-mock-phone {
  transform: rotate(6deg);
  -webkit-mask-image: linear-gradient(to left, #000 56%, transparent 64%);
          mask-image: linear-gradient(to left, #000 56%, transparent 64%);
}

/* The side phones' words wrap inside the outer 55%, the part the chat phone
   never covers, so no line runs into the fade and stops mid-word. What the
   fade does cover (from 56%) is empty screen and plain home-screen tiles. */
@media (max-width: 39.99rem), (min-width: 64rem) {
  .build-mock-page .studio-preview-phone.phone-shell .ob-splash-inner { padding: 1.25rem 10.5rem 1.25rem 1.25rem; }
  .build-mock-page .ob-dock { padding-right: 8.5rem; }
  .build-mock-page .ob-dock .btn-brand { white-space: nowrap; }
  .build-mock-page .phone-shell.theme-night .welcome-feature { gap: 0.6rem; padding-inline: 0.7rem; font-size: 0.85rem; }
  /* Narrower, the lines run taller: two features fit above the dock, a third would be cut by it. */
  .build-mock-page .welcome-feature:nth-child(n+3) { display: none; }
  .build-mock-home .build-home-clock { padding-left: 7.4rem; }
}

/* Each phone's label, right under it. Sizes are divided by the phone's zoom
   so all three print at the same size, and the row lines the phones up at
   the bottom (align-items: flex-end) so the labels share one baseline. The
   side labels sit toward the outer edge, the part of the side phone the chat
   phone does not cover. */
.build-mock-label {
  --z: var(--mock-side-zoom);
  position: relative; /* paints over its phone's drop shadow, which otherwise greys it */
  margin-top: calc(0.85rem / var(--z));
  font-size: calc(0.66rem / var(--z));
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink-soft);
}

.build-mock-main .build-mock-label { --z: var(--mock-zoom); }
.build-mock-page .build-mock-label { align-self: flex-start; margin-left: calc(0.6rem / var(--z)); }
.build-mock-home .build-mock-label { align-self: flex-end; margin-right: calc(0.6rem / var(--z)); }

.build-mock-phone.studio-preview-phone,
.build-mock-phone {
  width: 20rem;
  max-width: none;
  height: 40rem;
  border-radius: 2.5rem;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 0 0 0.6rem #0B0B0E,
    0 0 0 calc(0.6rem + 1px) rgba(255, 255, 255, 0.12),
    0 40px 80px -20px rgba(0, 0, 0, 0.7),
    0 30px 90px -30px color-mix(in srgb, var(--brand-primary) 60%, transparent);
}

.build-mock-main .build-mock-phone {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 0 0 0.6rem #0B0B0E,
    0 0 0 calc(0.6rem + 1px) rgba(255, 255, 255, 0.14),
    0 50px 100px -20px rgba(0, 0, 0, 0.8),
    0 30px 120px -20px color-mix(in srgb, var(--brand-primary) 75%, transparent);
}

/* The chat sits at the bottom, over the chips, as a real conversation does;
   the chips fade at the right edge instead of being cut. */
.build-mock-messages { justify-content: flex-end; }

.build-mock-phone .chat-chips-row {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, #000 78%, transparent);
          mask-image: linear-gradient(to right, #000 78%, transparent);
}

@media (min-width: 40rem) and (max-width: 63.99rem) {
  .build-mocks-figure { --mock-zoom: 0.8; --mock-side-zoom: 0.72; --mock-gap: 2.5rem; --mock-overlap: 0rem; }
  .build-mocks { padding-top: 1rem; }
  .build-mock-side .build-mock-phone { transform: none; -webkit-mask-image: none; mask-image: none; }
  .build-mock-page .build-mock-label,
  .build-mock-home .build-mock-label { align-self: center; margin-inline: 0; }
}

/* The row's sizes above (three phones at 0.72 to 0.8 with 2.5rem gaps) need
   about 55rem of screen, so between 40rem and 57rem, a tablet held upright
   being the common case (768px), the right-hand phone ran past the edge and
   overflow-x: clip cut it off. Two smaller steps keep all three whole: each
   is the widest row that fits at the bottom of its range (phone 20rem plus
   its 0.6rem bezel ring, times the three zooms, plus the two gaps, inside
   the viewport less the shell's 1rem margins). */
@media (min-width: 40rem) and (max-width: 47.99rem) {
  .build-mocks-figure { --mock-zoom: 0.6; --mock-side-zoom: 0.5; --mock-gap: 1.25rem; }
}

@media (min-width: 48rem) and (max-width: 56.99rem) {
  .build-mocks-figure { --mock-zoom: 0.7; --mock-side-zoom: 0.6; --mock-gap: 1.5rem; }
}

@media (min-width: 64rem) {
  .build-mocks-figure { --mock-zoom: 0.74; --mock-side-zoom: 0.6; --mock-overlap: -7rem; }
}

/* Phones up to 30rem (every iPhone and most Androids held upright): only
   the chat phone. The fan of three needs about 26rem to read, and on a 360
   to 430 pixel screen the chat phone covered most of the two behind it,
   leaving slivers of them and three captions jammed into one line. One
   phone, larger, with its one caption, says the same thing cleanly. The
   other two come back from 30rem.

   Inside it, the suggested questions wrap onto their own lines instead of
   running off the edge under a fade, and only the first one shows, so the
   row is never a cut-off word. That leaves the conversation enough height
   that its first bubble is not pushed up past the header (the messages sit
   at the bottom, so anything that does not fit is lost off the top). */
@media (max-width: 29.99rem) {
  .build-mocks-figure { --mock-zoom: 0.8; }
  .build-mock-side { display: none; }
  .build-mock-phone .chat-chips-row { flex-wrap: wrap; -webkit-mask-image: none; mask-image: none; }
  .build-mock-phone .chat-chips-row .quick-chip { flex-shrink: 1; white-space: normal; text-align: left; }
  .build-mock-phone .chat-chips-row .quick-chip:nth-child(n+2) { display: none; }
}

/* A fan's home screen, drawn: their icon among plain tiles. */
.build-home {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 3.25rem 1.6rem 1.25rem;
  background:
    radial-gradient(120% 70% at 20% 0%, color-mix(in srgb, var(--brand-primary) 70%, #000), transparent 70%),
    radial-gradient(100% 60% at 100% 100%, color-mix(in srgb, var(--brand-secondary) 55%, #000), transparent 70%),
    #0B0B0E;
}

.build-home-clock { text-align: center; color: #FFFFFF; }
.build-home-time { font-size: 4.25rem; font-weight: 300; letter-spacing: -0.03em; line-height: 1; }
.build-home-date { margin-top: 0.4rem; font-size: 0.9rem; font-weight: 600; opacity: 0.8; }

.build-home-grid {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.4rem 1rem;
}

.build-home-app { display: grid; justify-items: center; gap: 0.4rem; }

.build-home-tile {
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  overflow: hidden;
}

.build-home-label {
  width: 2.4rem;
  height: 0.4rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.22);
}

/* .build-home-tile's plain glass comes later in the file than
   .build-app-icon, so theirs restates the gradient. */
.build-home-app.is-theirs .build-home-tile {
  --icon-size: 3.6rem;
  background: linear-gradient(135deg, var(--app-primary, var(--brand-primary)), var(--app-secondary, var(--brand-secondary)));
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9), 0 12px 28px -8px var(--brand-primary);
}

.build-home-name {
  max-width: 4.5rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.72rem;
  font-weight: 600;
  color: #FFFFFF;
}

.build-home-dock {
  margin-top: auto;
  display: flex;
  justify-content: space-around;
  padding: 0.8rem;
  border-radius: 1.6rem;
  background: rgba(255, 255, 255, 0.12);
}
/* The Creator Terms page, /creator-terms. The box a creator ticks to agree
 * lives on the build page, so its styles are in build_fee.css beside the Pay
 * button they belong to.
 *
 * Its own file (pulled into application.css by require_tree), like
 * build_fee.css, so this branch adds a file rather than appending to the end
 * of app/assets/tailwind/application.css that other branches also append to.
 * Plain CSS, unlayered, which is what lets the agreement page's own rules win
 * over the legal frame's Tailwind child selectors ([&_ul]:list-disc and
 * friends) without an !important: Tailwind's utilities sit in a cascade
 * layer, and unlayered styles beat layered ones whatever their specificity.
 *
 * The look is Apple's terms screens: system type, generous line height,
 * quiet grey for everything that is not the point, one filled button.
 */

/* ── /creator-terms ────────────────────────────────────────────────────── */

.ct-summary {
  margin-top: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.25rem;
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.10), rgba(255, 255, 255, 0.03));
  padding: 1.35rem 1.4rem 1.25rem;
}

.ct-summary .ct-summary-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: #FAFAFA;
}

.ct-summary .ct-summary-list {
  margin: 0.85rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.6rem;
}

.ct-summary .ct-summary-list li {
  margin: 0;
  position: relative;
  padding-left: 1.6rem;
  line-height: 1.5;
  color: #E4E4E7;
}

/* A small violet check in a circle rather than a bullet: each line is a
 * thing that is true about the deal, the way Apple lists what is included. */
.ct-summary .ct-summary-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2rem;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 9999px;
  background: rgba(139, 92, 246, 0.22)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-5' fill='none' stroke='%23C4B5FD' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 0.8rem no-repeat;
}

.ct-summary .ct-summary-note {
  margin: 1rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #A1A1AA;
}

.ct-contents {
  margin-top: 2rem;
  border-top: 1px solid #27272A;
  padding-top: 1.25rem;
}

.ct-contents .ct-contents-title {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #A1A1AA;
}

/* Two columns from tablet width up: twenty short names read as a list you
 * scan, not a page you scroll. */
.ct-contents ol {
  margin: 0.75rem 0 0;
  padding-left: 1.4rem;
  list-style: decimal;
  columns: 1;
  column-gap: 2rem;
  font-size: 0.875rem;
}

@media (min-width: 640px) {
  .ct-contents ol { columns: 2; }
}

.ct-contents li { margin: 0 0 0.35rem; break-inside: avoid; color: #71717A; }
.ct-contents a { color: #D4D4D8; text-decoration: none; }
.ct-contents a:hover { color: #FFFFFF; text-decoration: underline; }

.ct-body { margin-top: 1.5rem; border-top: 1px solid #27272A; padding-top: 0.5rem; }

/* Jumping to a clause from the contents should not tuck its heading under
 * the top edge of the viewport. */
.ct-body .ct-heading { scroll-margin-top: 1.5rem; }

.ct-body .ct-n {
  display: inline-block;
  min-width: 2.4rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #A1A1AA;
}

.ct-body .ct-sub { margin-top: 0.5rem; padding-left: 2.4rem; }

.ct-body .ct-defs { margin: 0.75rem 0 0; }
.ct-body .ct-defs dt { margin-top: 0.75rem; font-weight: 600; color: #F4F4F5; }
.ct-body .ct-defs dd { margin: 0.15rem 0 0; }

.ct-body .ct-version { margin-top: 2.5rem; font-size: 0.75rem; color: #71717A; }
/* The Studio's share card: the public page link, its status, and its QR.
 * See studio/dashboard/_share_card. Its own file, pulled in by require_tree,
 * over the shell's custom properties like build_fee.css.
 */

.share-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.25rem;
  align-items: start;
  border-color: color-mix(in srgb, var(--brand-lift, #A78BFA) 40%, var(--line));
}

@media (max-width: 34rem) {
  .share-card { grid-template-columns: 1fr; }
}

.share-card-url {
  margin-top: 0.5rem;
  font-size: 1.5rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.share-card-url a { color: var(--ink); text-decoration: none; }
.share-card-url a:hover { text-decoration: underline; }

.share-card-status {
  margin-top: 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #FCD34D;
}

.share-card-status.is-live { color: #86EFAC; }

.share-card-status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: currentColor;
}

.share-card-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.share-card-actions .wt-frame-btn {
  flex: 0 0 auto;
  padding: 0.6rem 1.1rem;
  font-size: 0.88rem;
}

.share-card-actions .wt-frame-btn[hidden] { display: none; }

.share-card-qr { display: grid; justify-items: center; gap: 0.5rem; }

/* White, always, whatever the shell: a QR scans off a light tile. */
.share-card-qr-tile {
  width: 9.5rem;
  padding: 0.25rem;
  border-radius: 0.9rem;
  background: #FFFFFF;
}

.share-card-qr-svg { display: block; width: 100%; height: auto; }

.share-card-qr-links { font-size: 0.8rem; color: var(--ink-soft); }
.share-card-qr-links a { color: var(--ink); font-weight: 600; }
/* "Use my videos" and the two tabs it shares "Create your own" with.
 *
 * Its own file (pulled into application.css by require_tree), like
 * build_fee.css, so this branch adds a file rather than appending to the end
 * of app/assets/tailwind/application.css. Plain CSS over the studio's custom
 * properties (--ink, --ink-soft, --line, --brand-*).
 */

/* ── The tabs ──────────────────────────────────────────────────────────── */

/* The expanded "Create your own" content starts where its title text does:
 * the row's 0.85rem padding + the 1.15rem radio + the 0.75rem gap (see
 * .studio-voice in application.css), so tabs, labels, inputs and the player
 * share one left edge with "Create your own". Two classes to win over
 * .studio-voice-clone's own padding whatever order the files load in. */
.studio-voice-create .studio-voice-clone { padding-left: 2.75rem; }

/* Short labels and tight padding so both tabs sit whole inside the track
 * even on a 360px phone, where the panel is only ~215px wide. The track
 * hugs the two tabs; labels never truncate. */
.voice-create-tabs {
  display: flex;
  gap: 0.1rem;
  margin: 0 0 1rem;
  padding: 0.15rem;
  border: 1px solid var(--line);
  border-radius: 9999px;
  max-width: 100%;
  width: fit-content;
}

.voice-create-tab {
  flex: 1 1 auto;
  padding: 0.4rem 0.5rem;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  white-space: nowrap;
}

.voice-create-tab:hover { color: var(--ink); }
.voice-create-tab:focus-visible { outline: 2px solid var(--brand-lift); outline-offset: 1px; }

.voice-create-tab[aria-selected="true"] {
  background: var(--brand-primary);
  color: var(--brand-on-primary, #FFFFFF);
}

[role="tabpanel"][hidden] { display: none; }

/* ── Use my videos ─────────────────────────────────────────────────────── */

.voice-videos { display: block; }

.voice-videos-lead {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
}

.voice-videos-locked .studio-hint { margin-top: 0; }
.voice-videos-locked .studio-add-btn { display: inline-block; text-decoration: none; }

.voice-videos-link + .voice-videos-link { margin-top: 0.5rem; }

.voice-videos-start .studio-field:first-of-type { margin-top: 0; }
.voice-videos-start .studio-notice { margin: 0 0 1rem; }
.voice-videos-start > .wt-frame-btn { margin-top: 1rem; }

/* Progress: four steps, done ones ticked, the current one pulsing. */
.voice-videos-steps {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.voice-videos-steps li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.voice-videos-steps li::before {
  content: "";
  flex-shrink: 0;
  width: 0.65rem;
  height: 0.65rem;
  border: 1.5px solid currentColor;
  border-radius: 9999px;
}

.voice-videos-steps li.is-done { color: var(--ink); }
.voice-videos-steps li.is-done::before { background: currentColor; }
.voice-videos-steps li.is-current { color: var(--ink); font-weight: 600; }

.voice-videos-steps li.is-current::before {
  border-color: var(--brand-lift, var(--brand-primary));
  animation: voice-videos-pulse 1.2s ease-in-out infinite;
}

@keyframes voice-videos-pulse {
  50% { background: var(--brand-lift, var(--brand-primary)); }
}

@media (prefers-reduced-motion: reduce) {
  .voice-videos-steps li.is-current::before { animation: none; background: var(--brand-lift, var(--brand-primary)); }
}

/* Review. The browser's own player, in a dark rounded tray: color-scheme
 * dark gets the dark control set instead of a bright grey pill on the dark
 * card. Until .has-duration (voice-videos#playerReady) the time readout is
 * hidden, so an unknown length never shows as a stuck 0:00. */
.voice-videos-player {
  margin: 0.25rem 0 0.75rem;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 9999px;
  background: color-mix(in srgb, #000 35%, var(--surface-muted, #18181B));
}

.voice-videos-player audio {
  display: block;
  width: 100%;
  height: 2.5rem;
  color-scheme: dark;
  border-radius: 9999px;
  background: transparent;
}

.voice-videos-player audio::-webkit-media-controls-enclosure { border-radius: 9999px; background: transparent; }
.voice-videos-player audio::-webkit-media-controls-panel { background: transparent; }

.voice-videos-player:not(.has-duration) audio::-webkit-media-controls-current-time-display,
.voice-videos-player:not(.has-duration) audio::-webkit-media-controls-time-remaining-display { display: none; }

.voice-videos-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin-top: 1rem;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--ink);
  cursor: pointer;
}

.voice-videos-consent input { margin-top: 0.2rem; accent-color: var(--brand-primary); }

.voice-videos-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

/* The button keeps its whole label; "Try different videos" wraps under it
 * on a narrow phone instead of squeezing it to "Create my voi…". */
.voice-videos-actions > .wt-frame-btn { flex: 0 0 auto; }
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
