/* Native Longhand AI Formula styles, scoped and scaled from its 1276px desktop canvas.
   Markup and interactions are reused from /ai-30/program without changing the source page. */
.formula-slide.active { flex-direction: column; align-items: stretch; justify-content: center; gap: 2cqw; }
.formula-slide > .stack { width: 100%; align-items: flex-start; }
.formula-slide .eyebrow { margin: 0; }
.workshop-formula { container-type: inline-size; width: 100%; min-width: 0; font-family: -apple-system, "Segoe UI", "Helvetica Neue", Arial, "Liberation Sans", sans-serif; text-align: left; }
.workshop-formula *, .workshop-formula *::before, .workshop-formula *::after { box-sizing: border-box; margin: 0; padding: 0; }
.workshop-formula .formula-title { font-family: Georgia, serif; font-size: calc(38 * 100cqw / 1276); font-weight: 700; line-height: 1.1; letter-spacing: -.025em; text-transform: none; }
.workshop-formula .formula-title::after { content: ""; display: block; width: calc(64 * 100cqw / 1276); height: calc(4 * 100cqw / 1276); margin-top: calc(16 * 100cqw / 1276); background: currentColor; }
.workshop-formula .formula-mini .s2p-prompt-segment {
          --segment-color: #fff;
          appearance: none;
          display: inline-flex;
          align-items: center;
          padding: .02em .09em .07em;
          border: 0;
          border-bottom: .035em solid color-mix(in srgb, var(--segment-color) 54%, transparent);
          border-radius: .12em;
          background: transparent;
          color: var(--segment-color);
          font: inherit;
          line-height: inherit;
          letter-spacing: inherit;
          cursor: help;
          transition: color 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 220ms ease, transform 220ms cubic-bezier(.2,.8,.2,1);
        }
        .workshop-formula .formula-mini .s2p-prompt-segment[data-tone="orange"] { --segment-color: #FF7420; }
        .workshop-formula .formula-mini .s2p-prompt-segment[data-tone="blue"] { --segment-color: #38BDF8; }
        .workshop-formula .formula-mini .s2p-prompt-segment[data-tone="green"] { --segment-color: #34D399; }
        .workshop-formula .formula-mini .s2p-prompt-segment[data-tone="yellow"] { --segment-color: #FBBF24; }
        .workshop-formula .formula-mini .s2p-prompt-segment:hover,
.workshop-formula .formula-mini .s2p-prompt-segment:focus-visible,
.workshop-formula .formula-mini .s2p-prompt-segment[aria-expanded="true"] {
          outline: none;
          border-color: var(--segment-color);
          background: color-mix(in srgb, var(--segment-color) 13%, transparent);
          box-shadow: 0 .08em .32em color-mix(in srgb, var(--segment-color) 16%, transparent);
          transform: translateY(-.05em);
        }
        .workshop-formula .formula-mini .s2p-prompt-segment:focus-visible {
          box-shadow: 0 0 0 calc(3 * 100cqw / 1276) #020817, 0 0 0 calc(6 * 100cqw / 1276) var(--segment-color), 0 .08em .32em color-mix(in srgb, var(--segment-color) 18%, transparent);
        }
        .workshop-formula .formula-mini .s2p-prompt-detail {
          --detail-color: #fff;
          border: 1px solid color-mix(in srgb, var(--detail-color) 42%, transparent);
          border-left: calc(5 * 100cqw / 1276) solid var(--detail-color);
          background: color-mix(in srgb, var(--detail-color) 9%, rgba(2,8,23,.88));
          box-shadow: 0 calc(12 * 100cqw / 1276) calc(32 * 100cqw / 1276) rgba(0,0,0,.2);
        }
        .workshop-formula .formula-mini .s2p-prompt-detail[data-tone="orange"] { --detail-color: #FF7420; }
        .workshop-formula .formula-mini .s2p-prompt-detail[data-tone="blue"] { --detail-color: #38BDF8; }
        .workshop-formula .formula-mini .s2p-prompt-detail[data-tone="green"] { --detail-color: #34D399; }
        .workshop-formula .formula-mini .s2p-prompt-detail[data-tone="yellow"] { --detail-color: #FBBF24; }
        .workshop-formula .formula-mini .s2p-prompt-detail-label { color: var(--detail-color); }
        .workshop-formula .formula-mini .s2p-prompt-key::before {
          content: "";
          display: inline-block;
          width: .7em;
          height: .7em;
          margin-right: .45em;
          border-radius: calc(999 * 100cqw / 1276);
          background: currentColor;
        }
.workshop-formula .formula-mini{border-radius:calc(16 * 100cqw / 1276);margin-bottom:calc(24 * 100cqw / 1276);padding:clamp(calc(22 * 100cqw / 1276),3vw,calc(38 * 100cqw / 1276));color:white;background-color:#020817;background-image:linear-gradient(rgba(255,255,255,.028) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.028) 1px,transparent 1px),radial-gradient(circle at 82% 20%,rgba(56,189,248,.13),transparent 30%),radial-gradient(circle at 8% 92%,rgba(255,116,32,.14),transparent 30%);background-size:calc(64 * 100cqw / 1276) calc(64 * 100cqw / 1276),calc(64 * 100cqw / 1276) calc(64 * 100cqw / 1276),auto,auto;}
.workshop-formula .formula-title{color:#38BDF8;}
.workshop-formula .formula-segments{display:flex;flex-wrap:wrap;gap:.18em .26em;margin-top:calc(24 * 100cqw / 1276);font:600 clamp(calc(28 * 100cqw / 1276),4vw,calc(54 * 100cqw / 1276))/1.04 Georgia,serif;letter-spacing:-.05em;}
.workshop-formula .formula-explanations{margin-top:calc(24 * 100cqw / 1276);border-top:1px solid #ffffff26;min-height:calc(120 * 100cqw / 1276);padding-top:calc(12 * 100cqw / 1276);}
.workshop-formula .formula-hint{padding:calc(24 * 100cqw / 1276) 0;color:#91A0B6;font-size:calc(15 * 100cqw / 1276);font-weight:600;}
.workshop-formula .formula-detail{display:grid;grid-template-columns:minmax(calc(140 * 100cqw / 1276),.35fr) 1fr;align-items:center;gap:calc(20 * 100cqw / 1276);padding:calc(16 * 100cqw / 1276);border-radius:calc(6 * 100cqw / 1276);}
.workshop-formula .formula-detail[hidden],
.workshop-formula .formula-hint[hidden]{display:none;}
.workshop-formula .formula-detail h3{font:600 calc(28 * 100cqw / 1276)/1.1 Georgia,serif;margin-top:calc(4 * 100cqw / 1276);letter-spacing:-.035em;}
.workshop-formula .formula-detail>p{font-size:calc(15 * 100cqw / 1276);line-height:1.6;color:#D1DBE8;}
.workshop-formula .formula-mini .s2p-prompt-detail-label{font-size:calc(11 * 100cqw / 1276);letter-spacing:.14em;font-weight:800;text-transform:uppercase;}
.workshop-formula .formula-key{display:flex;flex-wrap:wrap;gap:calc(8 * 100cqw / 1276) calc(24 * 100cqw / 1276);margin-top:calc(12 * 100cqw / 1276);font-size:calc(11 * 100cqw / 1276);font-weight:700;letter-spacing:.11em;text-transform:uppercase;}
.workshop-formula .formula-key span:nth-child(1){color:#FF7420}.workshop-formula .formula-key span:nth-child(2){color:#38BDF8}.workshop-formula .formula-key span:nth-child(3){color:#34D399}.workshop-formula .formula-key span:nth-child(4){color:#FBBF24}
@media(max-width:640px){.workshop-formula .formula-detail{grid-template-columns:1fr;gap:calc(10 * 100cqw / 1276)}.workshop-formula .formula-explanations{min-height:calc(195 * 100cqw / 1276)}.workshop-formula .formula-key{font-size:calc(9 * 100cqw / 1276);gap:calc(8 * 100cqw / 1276) calc(12 * 100cqw / 1276)}}
@media(prefers-reduced-motion:reduce){.workshop-formula .formula-mini .s2p-prompt-segment{transition:none;}}

@media screen and (max-width: 760px) {
  .formula-slide.active { gap: 24px; align-items: stretch; }
  .workshop-formula .formula-mini { padding: 22px; margin-bottom: 0; border-radius: 16px; background-size: 64px 64px, 64px 64px, auto, auto; }
  .workshop-formula .formula-title { font-size: 28px; }
  .workshop-formula .formula-title::after { width: 64px; height: 4px; margin-top: 16px; }
  .workshop-formula .formula-segments { margin-top: 24px; font-size: 28px; }
  .workshop-formula .s2p-prompt-segment { min-height: 44px; }
  .workshop-formula .formula-explanations { margin-top: 24px; min-height: 195px; padding-top: 12px; }
  .workshop-formula .formula-hint { padding: 24px 0; font-size: 15px; }
  .workshop-formula .formula-detail { grid-template-columns: 1fr; gap: 10px; padding: 16px; border-radius: 6px; }
  .workshop-formula .formula-detail h3 { margin-top: 4px; font-size: 28px; }
  .workshop-formula .formula-detail > p { font-size: 15px; }
  .workshop-formula .formula-mini .s2p-prompt-detail-label { font-size: 11px; }
  .workshop-formula .formula-mini .s2p-prompt-detail { border-left-width: 5px; box-shadow: 0 12px 32px rgba(0,0,0,.2); }
  .workshop-formula .formula-mini .s2p-prompt-segment:focus-visible { box-shadow: 0 0 0 3px #020817, 0 0 0 6px var(--segment-color), 0 .08em .32em color-mix(in srgb, var(--segment-color) 18%, transparent); }
  .workshop-formula .formula-key { gap: 8px 12px; margin-top: 12px; font-size: 9px; }
}
@media print {
  .workshop-formula .formula-explanations { display: none; }
}
