/* Figma to Code: real prototype screens and Storybook components, framed by a terminal and a rebuilt prototype environment */
.fsh { position: relative; width: 100%; aspect-ratio: 736 / 668; background: #141616; }
.fsh img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; margin: 0; border-radius: 0; opacity: 0; transition: opacity .28s; }
.fsh img.on { opacity: 1; }
.fsh.is-blank img { opacity: 0; }
.fsh-bad { position: absolute; top: 32%; left: 0; width: 100%; height: 20%; border: 2px solid #ff5470; border-radius: 8px; opacity: 0; transition: opacity .2s; }
.fsh-bad.on { opacity: 1; }
.fsh--full { aspect-ratio: 1160 / 764; }
.fsh--full .fsh-bad { top: 25%; left: 35.500%; width: 59.500%; height: 14.500%; }
/* the terminal is Claude Code's own layout in a mono face, docked under the preview like a panel, not a floating card */
.ft { display: flex; flex-direction: column; background: #0c0c0c; color: #d4d4d4; font: 400 12px/17px 'JetBrains Mono', ui-monospace, monospace; text-align: left; }
.ft p { margin: 0; }
.ft-body { display: flex; flex: 1; flex-direction: column; justify-content: flex-end; min-height: 0; overflow: hidden; padding: 8px 14px 0; }
.ft-body p { flex: none; white-space: pre-wrap; }
.ft-body .cmd { margin-top: 8px; color: #8a8a8a; }
.ft-body .cmd::before { content: "> "; }
.ft-body .do::before { content: "⏺ "; color: #4eba65; }
.ft-body .warn::before { content: "⏺ "; color: #d77757; }
.ft-body .res { color: #8a8a8a; }
.ft-body .res::before { content: "  ⎿ "; }
.ft-busy { flex: none; height: 17px; margin: 4px 14px 0 !important; color: #d77757; }
.ft-in { display: flex; flex: none; gap: 8px; margin: 4px 14px 0; padding: 3px 8px; border: 1px solid #5a5a5a; border-radius: 4px; }
.ft-in span { color: #8a8a8a; }
.ft-in b { font-weight: 400; }
.ft-in u { width: 7px; height: 15px; margin-left: -8px; background: #d4d4d4; text-decoration: none; animation: ft-blink 1.1s steps(1) infinite; }
@keyframes ft-blink { 50% { opacity: 0; } }
.ft-mode { display: flex; flex: none; justify-content: space-between; margin: 3px 14px 7px !important; color: #6a6a6a; font-size: 11px; line-height: 15px; }
.fb { display: flex; flex-direction: column; overflow: hidden; border-radius: 10px; background: #141616; }
.fb-bar { display: none; }
.fb-url { flex: 1; margin-left: 8px; padding: 2px 10px; border-radius: 6px; background: #16181b; color: rgba(255,255,255,.6); font: 400 12px/18px 'Figtree', sans-serif; transition: background-color .25s, color .25s; }
.fb-url.live { background: #173a2a; color: #7bd8a8; }
.fb-view { position: relative; flex: 1; min-height: 0; overflow: hidden; }
/* the cover */
.fc { position: absolute; z-index: 1; inset: 0; overflow: hidden; border-radius: inherit; background: #0f7a4f; opacity: 0; }
.fc.on { opacity: 1; }
.fc-stage { position: absolute; top: 0; left: 0; width: 1000px; height: 524px; overflow: hidden; transform-origin: 0 0; }
.fc-steps { position: absolute; top: 8px; left: 50%; translate: -50% 0; display: flex; gap: 3px; padding: 3px; border-radius: 99px; background: rgba(255,255,255,.2); }
.fc-steps span, .fd-steps span { padding: 3px 12px; border-radius: 99px; color: rgba(255,255,255,.92); font: 500 12px/18px 'Figtree', sans-serif; white-space: nowrap; }
.fc-steps .on, .fd-steps .on { background: #fff; color: #0b6a43; }
.fc-stage .ft { position: absolute; z-index: 2; left: 30px; bottom: 16px; width: 236px; height: 216px; overflow: hidden; border-radius: 10px; box-shadow: 0 16px 36px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.1); font-size: 11px; line-height: 15px; }
.fc-stage .ft-body { padding: 8px 10px 0; }
.fc-stage .ft-busy { height: 15px; margin-inline: 10px !important; white-space: nowrap; }
.fc-stage .ft-in { margin-inline: 10px; }
.fc-stage .ft-mode { margin-inline: 10px !important; font-size: 10px; }
.fc-stage .ft-mode span + span { display: none; }
.fc-stage .fb { position: absolute; top: 46px; left: 66px; width: 868px; height: 560px; }
/* the flows */
.fd { margin: 24px 0 0; }
.fd-panel { position: relative; height: 500px; overflow: hidden; border-radius: 10px; background: #0f7a4f; color: #fff; font: 400 14px/20px 'Figtree', sans-serif; }
.fd-panel--auto { height: auto; padding: 24px; }
.fd-steps { display: flex; justify-content: center; gap: 3px; width: max-content; max-width: calc(100% - 16px); margin: 12px auto; padding: 3px; border-radius: 99px; background: rgba(255,255,255,.2); }
.fd-big { position: relative; height: 100%; margin: 0 32px; overflow: hidden; border-radius: 10px 10px 0 0; background: #141616; }
.fd-panel--spec { height: auto; padding-bottom: 32px; }
.fd-panel--spec .fd-big { height: auto; border-radius: 10px; }
/* the library */
.fsb-stage { background: #262626; }
.fsb-stage img { position: absolute; top: 0; left: 0; display: block; width: 100%; height: auto; margin: 0; border-radius: 0; opacity: 0; transition: opacity .3s; }
.fsb-stage img.on { opacity: 1; }
/* the prototype environment, rebuilt */
.fe { display: grid; grid-template-columns: 196px minmax(0, 1fr); height: 424px; margin: 0 24px; overflow: hidden; border-radius: 10px; background: #17191c; color: #e7e8ea; font-size: 13px; line-height: 18px; }
.fe-side { padding: 14px 10px; border-right: 1px solid rgba(255,255,255,.08); }
.fe-side h6 { margin: 0 8px 10px !important; color: #fff; font: 500 14px/20px 'Figtree', sans-serif; }
.fe-side p { margin: 0 0 8px; padding: 0 8px; color: rgba(255,255,255,.5); font-size: 12px; }
.fe-side span { display: flex; gap: 8px; padding: 5px 8px; border-radius: 6px; color: rgba(255,255,255,.65); transition: background-color .2s, color .2s; }
.fe-side span i { width: 12px; color: rgba(255,255,255,.4); font-style: normal; font-variant-numeric: tabular-nums; }
.fe-side .on { background: #0f7a4f; color: #fff; }
.fe-side .on i { color: rgba(255,255,255,.8); }
.fe-main { display: flex; flex-direction: column; min-width: 0; }
.fe-top { display: flex; flex: none; align-items: center; gap: 12px; height: 44px; padding: 0 14px; border-bottom: 1px solid rgba(255,255,255,.08); }
.fe-top b { flex: 1; min-width: 0; overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.fe-seg { display: flex; padding: 2px; border-radius: 7px; background: rgba(255,255,255,.08); font-size: 12px; }
.fe-seg span { padding: 2px 10px; border-radius: 5px; color: rgba(255,255,255,.7); }
.fe-seg .on { background: #fff; color: #17191c; }
.fe-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #141616; }
.fe-stage > img { position: absolute; top: 0; left: 0; display: block; width: 100%; height: auto; margin: 0; border-radius: 0; opacity: 0; transition: opacity .28s; }
.fe-stage > img.on { opacity: 1; }
.fe-stage > img.fe-mob { left: 50%; width: auto; height: 100%; translate: -50% 0; }
.fe-home { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; gap: 8px; padding: 16px; background: #17191c; opacity: 0; visibility: hidden; transition: opacity .25s, visibility 0s .25s; }
.fe-home.on { opacity: 1; visibility: visible; transition-delay: 0s; }
.fe-home h6 { margin: 0 0 4px !important; color: #fff; font: 500 16px/22px 'Figtree', sans-serif; }
.fe-task { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px 14px; border: 1px solid rgba(255,255,255,.09); border-radius: 8px; background: #202327; transition: border-color .2s, background-color .2s; }
.fe-task i { color: rgba(255,255,255,.5); font-size: 12px; font-style: normal; }
.fe-task b { grid-column: 1; font-weight: 500; }
.fe-task em { grid-column: 2; grid-row: 1 / 3; align-self: center; color: rgba(255,255,255,.6); font-size: 12px; font-style: normal; white-space: nowrap; }
.fe-task.on { border-color: #0f7a4f; background: #1c2a24; }
.fe-pin { position: absolute; z-index: 3; top: 38%; left: 62%; display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-radius: 10px 10px 10px 2px; background: #fff; color: #17191c; font-size: 12px; line-height: 16px; white-space: nowrap; box-shadow: 0 8px 18px rgba(0,0,0,.4); opacity: 0; scale: .9; transform-origin: 0 100%; transition: opacity .2s, scale .2s; }
.fe-pin.on { opacity: 1; scale: 1; }
.fe-pin i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #0f7a4f; color: #fff; font-size: 10px; font-style: normal; font-weight: 500; }
/* the loop, as a map */
.fm-say { min-height: 22px; margin: 0 0 14px; color: #fff; font-size: 15px; font-weight: 500; text-align: center; }
.fm { padding: 14px 16px; border-radius: 10px; background: #111216; }
.fm svg { display: block; width: 100%; height: auto; font-family: 'Figtree', sans-serif; }
.fm-e { fill: none; stroke: rgba(255,255,255,.28); stroke-width: 1.500; }
.fm-e--d { stroke-dasharray: 4 5; }
.fm-run { fill: none; stroke: #3ecf74; stroke-width: 2.500; opacity: 0; }
.fm-run.on { opacity: 1; }
.fm-tip { fill: #3ecf74; opacity: 0; }
.fm-tip.on { opacity: 1; }
.fm-n rect, .fm-side rect { fill: #1b1c21; stroke: rgba(255,255,255,.2); transition: fill .3s, stroke .3s; }
.fm-n--c rect { stroke: #5cc2bb; }
.fm-n--a rect { stroke: #e8df62; }
.fm-k { fill: rgba(255,255,255,.55); font-size: 12px; transition: fill .3s; }
.fm-t { fill: #fff; font-size: 15px; font-weight: 500; transition: fill .3s; }
.fm-s { fill: rgba(255,255,255,.75); font-size: 13px; }
.fm-l { fill: rgba(255,255,255,.5); font-size: 12px; transition: fill .3s; }
.fm-l.on { fill: #7fe3a6; }
.fm-n.done rect { fill: #24252b; }
.fm-n.on rect { fill: #0f7a4f; stroke: #0f7a4f; }
.fm-n.on .fm-k { fill: rgba(255,255,255,.9); }
.fm-side.on rect { stroke: rgba(255,255,255,.55); }
.fm-list { display: none; }
.page .fd figcaption { margin-top: 10px; color: var(--mute); font-size: 13px; }
/* what stays and what moves */
.fl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 24px; }
.fl > div { padding: 18px 20px; border: 1px solid var(--line); border-radius: 6px; background: rgba(23,22,15,.045); font-size: 14px; line-height: 1.5; color: var(--mute); }
:root[data-theme="dark"] .fl > div { background: rgba(242,239,233,.06); }
.fl strong { display: block; margin-bottom: 10px; color: var(--ink); font-size: 16px; font-weight: 500; }
.fl ul { margin: 0; padding: 0; list-style: none; }
.fl li { margin: 0 0 4px; padding: 0; }
.fl li::before { content: none; }
@media (max-width: 760px) {
  .fd-panel { height: 450px; }
  .fd-panel--auto, .fd-panel--spec { height: auto; }
  .fd-big { margin: 0 12px; }
  .fd-panel--spec { padding-bottom: 12px; }
  .fd-steps { display: grid; grid-template-columns: repeat(4, auto); width: fit-content; max-width: calc(100% - 24px); margin-inline: auto; border-radius: 16px; }
  .fd-steps span { padding-inline: 8px; text-align: center; }
  .fe-side { display: none; }
  .fe { grid-template-columns: minmax(0, 1fr); height: 380px; margin: 0 12px; }
  .fe-seg:first-of-type { display: none; }
  .fm { display: none; }
  .fm-say { display: none; }
  .fm-list { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 14px; line-height: 19px; }
  .fm-list li { padding: 7px 10px; border-radius: 8px; background: rgba(255,255,255,.14); }
  .fm-list li.on { background: #fff; color: #17181c; }
  .fd-panel--auto { padding: 12px; }
  .fl { grid-template-columns: minmax(0, 1fr); }
}
/* the proof that this is code: a snippet and the log */
.page code { font: .92em ui-monospace, 'SF Mono', Consolas, monospace; }
.fcode { margin-top: 24px; overflow: hidden; border-radius: 10px; background: #15161b; }
.fcode pre { margin: 0; padding: 16px 18px; color: #d9dbe0; font: 400 13px/21px ui-monospace, 'SF Mono', Consolas, monospace; }
.fcode code { font: inherit; }
.fcode .c { color: rgba(255,255,255,.5); }
.page ul.flog { display: flex; flex-direction: column; gap: 8px; margin: 24px 0 0; padding: 0; list-style: none; }
.page .flog li { display: grid; grid-template-columns: 66px minmax(0, 1fr); gap: 4px 10px; margin: 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: 6px; background: rgba(23,22,15,.045); font-size: 14px; line-height: 1.45; color: var(--mute); }
.page .flog li::before { content: none; }
:root[data-theme="dark"] .flog li { background: rgba(242,239,233,.06); }
.flog i { color: #d9480f; font-style: normal; }
.flog span { color: var(--ink); }
.fl > div { position: relative; }
.page .fl-logo { position: absolute; top: 18px; right: 20px; display: block; width: auto; height: 24px; margin: 0; border-radius: 0; }
.page p code { padding: 2px 6px; border-radius: 5px; background: #15161b; color: #7fe3a6; font-size: .86em; white-space: nowrap; }
.fd-big video { display: block; width: 100%; height: auto; margin: 0; border-radius: 0; }
/* the tabs come in after the postcard has landed, so the card on the home page has none */
.fc-steps { opacity: 0; transition: opacity .4s ease; }
.fc.run .fc-steps { opacity: 1; }
/* tabs on the covers match the tabs in the blocks: a 30px capsule with 12px above and below */
.fc-steps { top: 14.6px; }
.fc-steps { padding: 3.66px; gap: 3.66px; }
.fc-steps span { padding: 3.66px 14.6px; font-size: 14.6px; line-height: 22px; }
.fc-stage .fb { top: 66px; }
/* the prototype running in a frame */
.fv { position: relative; width: 100%; height: 100%; overflow: hidden; background: #0f0f0f; }
.fv iframe { position: absolute; top: 0; left: 0; display: block; border: 0; pointer-events: none; transform-origin: 0 0; transition: opacity .17s; }
.fd-panel--spec .fv { height: auto; aspect-ratio: 1160 / 764; }
.fd-big, .fb { background: #0f0f0f; }
.fe-stage { background: #0f0f0f; }
.fe-stage > .fv { position: absolute; inset: 0; }
.fe-stage > .fv.is-phone { left: 50%; width: 300px; margin-left: -150px; }
.page .fcode + p { margin-top: 24px; }
@media (max-width: 600px) { .fd-panel--spec .fv { aspect-ratio: 430 / 690; } }
/* code wraps instead of scrolling; wrapped lines hang under their own start */
.fcode pre { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 600px) { .fcode pre { padding: 14px; font-size: 12px; line-height: 19px; } }
/* the note on redrawn screens */
.page .fnote { margin: 0 0 40px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 6px; background: rgba(23,22,15,.045); color: var(--ink); font-size: 15px; line-height: 1.5; }
:root[data-theme="dark"] .fnote { background: rgba(242,239,233,.06); }
.fnote b { font-weight: 600; }
