/* ForgeDesk live demo — a faithful, scripted recreation of the app (see demo.js). */

.demo-section { position: relative; padding: clamp(64px, 9vw, 140px) 0 clamp(48px, 7vw, 110px); }
.demo-section .demo-head { max-width: 760px; margin: 0 auto 40px; text-align: center; }
.demo-section .demo-head h2 { font-family: var(--display); font-size: clamp(32px, 4.4vw, 58px); letter-spacing: -0.03em; line-height: 1.04; margin: 10px 0 14px; }
.demo-section .demo-head h2 em { font-style: normal; color: var(--flame); }
.demo-section .demo-head p { color: var(--muted); font-size: 17px; line-height: 1.6; }

.fdd-stage { position: relative; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.fdd-glow { position: absolute; inset: 8% 6% -6%; background: radial-gradient(60% 55% at 50% 60%, rgba(242,118,46,.28), rgba(242,118,46,0) 70%); filter: blur(30px); pointer-events: none; }
.fdd-frame { position: relative; width: 100%; aspect-ratio: 1280 / 780; }
.fdd-scale { position: absolute; left: 0; top: 0; width: 1280px; height: 780px; transform-origin: 0 0; transition: transform .8s cubic-bezier(.45,.05,.25,1); }
@media (max-width: 760px) { .fdd-frame { aspect-ratio: 4 / 3.4; overflow: hidden; border-radius: 12px; } }

/* ---------- the window ---------- */
.fdd {
  --bg: #202020; --side: #1b1b1b; --card: #2b2b2b; --card2: #262626; --stroke: rgba(255,255,255,.08); --stroke2: rgba(255,255,255,.14);
  --t1: #ffffff; --t2: #c8c8c8; --t3: #9a9a9a; --acc: #f2762e; --acct: #ff9a57; --ok: #3fb950; --warn: #d29922; --bad: #f85149; --info: #58a6ff;
  position: absolute; inset: 0; display: grid; grid-template-rows: 44px 1fr 28px; grid-template-columns: 236px 1fr;
  background: var(--bg); color: var(--t1); border: 1px solid var(--stroke2); border-radius: 12px; overflow: hidden;
  font: 13px/1.35 "Segoe UI Variable Text", "Segoe UI", Inter, system-ui, sans-serif; letter-spacing: 0;
  box-shadow: 0 40px 120px rgba(0,0,0,.55), 0 0 0 1px rgba(0,0,0,.4);
  user-select: none; -webkit-font-smoothing: antialiased;
}
.fdd .mono { font-family: "Cascadia Mono", "JetBrains Mono", Consolas, monospace; }
.fdd svg { display: block; }

.fdd-title { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 0 0 0 14px; background: #1b1b1b; border-bottom: 1px solid var(--stroke); }
.fdd-title .logo { width: 18px; height: 18px; }
.fdd-title .name { font-weight: 600; font-size: 12.5px; }
.fdd-search { margin: 0 auto; width: 420px; height: 30px; display: flex; align-items: center; gap: 8px; padding: 0 10px; background: #2a2a2a; border: 1px solid var(--stroke); border-radius: 6px; color: var(--t3); font-size: 12.5px; transform: translateX(-60px); }
.fdd-search .k { margin-left: auto; display: flex; gap: 4px; }
.fdd-kc { display: inline-grid; place-items: center; min-width: 20px; height: 18px; padding: 0 5px; border: 1px solid var(--stroke2); border-bottom-width: 2px; border-radius: 4px; font-size: 10.5px; color: var(--t2); background: #303030; }
.fdd-user { display: flex; align-items: center; gap: 6px; color: var(--t2); font-size: 12.5px; margin-right: 18px; }
.fdd-caps { display: flex; height: 100%; }
.fdd-caps i { width: 46px; display: grid; place-items: center; color: var(--t2); font-style: normal; font-size: 13px; }

.fdd-side { background: var(--side); border-right: 1px solid var(--stroke); padding: 10px 8px; display: flex; flex-direction: column; gap: 2px; }
.fdd-nav { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: 6px; color: var(--t1); }
.fdd-nav.on { background: rgba(255,255,255,.06); }
.fdd-side h6 { margin: 14px 10px 6px; font: 600 11px/1 inherit; color: var(--t3); letter-spacing: .04em; text-transform: uppercase; }
.fdd-proj { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 6px; position: relative; }
.fdd-proj.on { background: rgba(255,255,255,.06); }
.fdd-proj.on::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 2px; background: var(--acc); }
.fdd-av { width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; color: #fff; }
.fdd-proj small { display: block; color: var(--t3); font-size: 11px; }
.fdd-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--info); }
.fdd-dot.ok { background: var(--ok); } .fdd-dot.warn { background: var(--warn); }
.fdd-side .grow { flex: 1; }
.fdd-add { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border: 1px solid var(--stroke); border-radius: 6px; background: #262626; width: max-content; }

.fdd-main { display: grid; grid-template-rows: auto auto 1fr; min-width: 0; min-height: 0; position: relative; }
.fdd-head { display: flex; align-items: center; gap: 14px; padding: 16px 22px 10px; }
.fdd-head .fdd-av { width: 40px; height: 40px; font-size: 15px; border-radius: 8px; }
.fdd-head h3 { font: 600 19px/1.1 "Segoe UI Variable Display", "Segoe UI", Inter, sans-serif; margin: 0; }
.fdd-head small { display: block; color: var(--t2); font-size: 11.5px; margin-top: 3px; }
.fdd-actions { margin-left: auto; display: flex; gap: 8px; }
.fdd-btn { height: 32px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; border: 1px solid var(--stroke); border-radius: 6px; background: #2d2d2d; color: var(--t1); font-size: 12.5px; white-space: nowrap; transition: transform .12s, background .2s, box-shadow .3s; }
.fdd-btn.primary { background: var(--acc); border-color: transparent; color: #1b0d04; font-weight: 600; }
.fdd-btn.press { transform: scale(.96); }
.fdd-btn.hot { box-shadow: 0 0 0 4px rgba(242,118,46,.25), 0 0 28px rgba(242,118,46,.55); }
.fdd-btn .spin { width: 13px; height: 13px; border: 2px solid rgba(0,0,0,.25); border-top-color: #1b0d04; border-radius: 50%; animation: fdd-spin .7s linear infinite; }
@keyframes fdd-spin { to { transform: rotate(360deg); } }

.fdd-tabs { position: relative; display: flex; gap: 2px; padding: 0 16px; border-bottom: 1px solid var(--stroke); }
.fdd-tab { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 10px; color: var(--t2); white-space: nowrap; transition: color .2s; }
.fdd-tab.on { color: var(--t1); }
.fdd-badge { min-width: 18px; height: 16px; padding: 0 5px; border-radius: 8px; background: rgba(255,255,255,.1); color: var(--t1); font-size: 10.5px; display: inline-grid; place-items: center; transition: transform .25s cubic-bezier(.3,1.6,.5,1); }
.fdd-badge.pop { transform: scale(1.35); }
.fdd-ind { position: absolute; bottom: -1px; height: 3px; border-radius: 3px; background: var(--acc); box-shadow: 0 0 12px rgba(242,118,46,.7); transition: left .32s cubic-bezier(.2,.9,.1,1), width .32s cubic-bezier(.2,.9,.1,1); }

.fdd-views { position: relative; min-height: 0; overflow: hidden; }
.fdd-view { position: absolute; inset: 0; padding: 16px 22px; opacity: 0; transform: translateX(12px); transition: opacity .16s ease-out, transform .22s cubic-bezier(.2,.9,.1,1); pointer-events: none; }
.fdd-view.on { opacity: 1; transform: none; }
.fdd-view.left { transform: translateX(-12px); }

.fdd-card { background: var(--card); border: 1px solid var(--stroke); border-radius: 8px; padding: 14px 16px; }
.fdd-card h4 { margin: 0 0 10px; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.fdd-card h4 a { margin-left: auto; color: var(--acct); font-weight: 400; font-size: 12px; }
.stag { opacity: 0; transform: translateY(10px); transition: opacity .3s ease-out, transform .45s cubic-bezier(.2,.9,.1,1); }
.stag.in { opacity: 1; transform: none; }
.fdd-muted { color: var(--t2); } .fdd-dim { color: var(--t3); }

/* overview */
.ov { display: grid; grid-template-columns: 1.25fr 1fr; gap: 12px; }
.ov .wide { grid-column: 1 / -1; }
.lang { display: flex; height: 7px; border-radius: 4px; overflow: hidden; margin: 12px 0 8px; background: #333; }
.lang i { display: block; height: 100%; width: 0; transition: width 1s cubic-bezier(.2,.9,.1,1); }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { padding: 2px 8px; border-radius: 4px; background: #353535; color: var(--t2); font-size: 11.5px; }
.pill.ok { background: rgba(63,185,80,.16); color: #7ee38c; } .pill.run { background: rgba(242,118,46,.16); color: var(--acct); }
.health { display: flex; gap: 14px; align-items: center; }
.ring { position: relative; width: 74px; height: 74px; flex: none; }
.ring svg { width: 74px; height: 74px; transform: rotate(-90deg); }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font: 600 22px/1 "Segoe UI Variable Display", Inter, sans-serif; color: var(--ok); }
.rows { display: grid; gap: 8px; }
.row { display: flex; align-items: center; gap: 10px; }
.row .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* git */
.git { display: grid; grid-template-columns: 330px 1fr; gap: 0; height: 100%; margin: -16px -22px; }
.git .left { border-right: 1px solid var(--stroke); padding: 14px 14px; display: flex; flex-direction: column; min-height: 0; }
.git .seg { display: flex; gap: 4px; margin-bottom: 12px; }
.git .seg span { padding: 5px 10px; border-radius: 6px; color: var(--t2); }
.git .seg span.on { background: rgba(255,255,255,.07); color: var(--t1); box-shadow: inset 0 -2px 0 var(--acc); }
.git h5 { margin: 12px 4px 6px; font: 600 11px/1 inherit; color: var(--t3); letter-spacing: .04em; text-transform: uppercase; display: flex; gap: 6px; }
.file { display: flex; align-items: center; gap: 9px; height: 30px; padding: 0 8px; border-radius: 6px; transition: background .2s, transform .35s cubic-bezier(.2,.9,.1,1), opacity .25s; }
.file.on { background: rgba(255,255,255,.07); }
.st { width: 17px; height: 17px; border-radius: 4px; display: grid; place-items: center; font: 700 10px/1 "Cascadia Mono", monospace; }
.st.m { background: rgba(210,153,34,.2); color: #e3b341; } .st.u { background: rgba(63,185,80,.18); color: #7ee38c; }
.commit { margin-top: auto; display: grid; gap: 8px; }
.input { height: 34px; display: flex; align-items: center; padding: 0 10px; background: #1e1e1e; border: 1px solid var(--stroke2); border-bottom: 2px solid var(--acc); border-radius: 6px; color: var(--t1); }
.input .ph { color: var(--t3); }
.caret { display: inline-block; width: 1px; height: 15px; background: var(--t1); margin-left: 1px; animation: fdd-blink 1s steps(1) infinite; vertical-align: -2px; }
@keyframes fdd-blink { 50% { opacity: 0; } }
.git .right { padding: 14px 0 0; min-width: 0; display: flex; flex-direction: column; }
.diffhead { display: flex; align-items: center; gap: 10px; padding: 0 18px 10px; border-bottom: 1px solid var(--stroke); }
.diff { font: 12.5px/22px "Cascadia Mono", "JetBrains Mono", Consolas, monospace; padding-top: 6px; }
.dl { display: grid; grid-template-columns: 44px 44px 18px 1fr; opacity: 0; transform: translateX(-6px); transition: opacity .25s, transform .35s cubic-bezier(.2,.9,.1,1); white-space: pre; }
.dl.in { opacity: 1; transform: none; }
.dl .n { color: #6e7681; text-align: right; padding-right: 10px; }
.dl.h { background: rgba(88,166,255,.1); color: #9ecbff; grid-template-columns: 1fr; padding-left: 12px; }
.dl.a { background: rgba(46,160,67,.17); } .dl.a .s { color: var(--ok); }
.dl.r { background: rgba(248,81,73,.17); } .dl.r .s { color: var(--bad); }

/* terminal */
.term { height: 100%; margin: -16px -22px; display: flex; flex-direction: column; }
.term .tt { display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-bottom: 1px solid var(--stroke); }
.term .tt span.on { padding: 5px 10px; border-radius: 6px; background: rgba(255,255,255,.07); box-shadow: inset 0 -2px 0 var(--acc); }
.term pre { flex: 1; margin: 0; padding: 14px 18px; background: #0c0c0c; color: #cccccc; font: 13px/1.6 "Cascadia Mono", "JetBrains Mono", Consolas, monospace; overflow: hidden; white-space: pre-wrap; }
.term .g { color: #3fb950; } .term .y { color: #e3b341; } .term .c { color: #58a6ff; } .term .d { color: #6e7681; } .term .o { color: var(--acct); }
.term .cur { display: inline-block; width: 8px; height: 16px; background: var(--acc); vertical-align: -3px; animation: fdd-blink 1s steps(1) infinite; }

/* commands */
.cmds { display: grid; grid-template-columns: 340px 1fr; height: 100%; margin: -16px -22px; }
.cmds .left { border-right: 1px solid var(--stroke); padding: 14px; display: grid; align-content: start; gap: 6px; }
.cmd { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; padding: 9px 10px; border-radius: 6px; }
.cmd.on { background: rgba(255,255,255,.07); }
.cmd code { grid-column: 1; color: var(--t3); font: 11.5px "Cascadia Mono", monospace; }
.cmd .fdd-btn { grid-row: 1 / span 2; grid-column: 2; height: 28px; }
.run { display: flex; flex-direction: column; min-width: 0; }
.runhead { position: relative; display: flex; align-items: center; gap: 10px; padding: 14px 18px 12px; border-bottom: 1px solid var(--stroke); }
.molten { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; overflow: hidden; opacity: 0; transition: opacity .3s; }
.molten.on { opacity: 1; }
.molten i { position: absolute; top: 0; height: 2px; width: 30%; background: linear-gradient(90deg, rgba(201,85,26,0), #f2762e 70%, #ffe2b8 95%, rgba(255,226,184,0)); box-shadow: 0 0 10px #f2762e; animation: fdd-flow 1.3s cubic-bezier(.45,0,.55,1) infinite; }
@keyframes fdd-flow { from { left: -30%; } to { left: 100%; } }
.log { margin: 0; padding: 12px 18px; font: 12.5px/1.65 "Cascadia Mono", "JetBrains Mono", Consolas, monospace; color: #c9d1d9; white-space: pre; }
.log .g { color: var(--ok); } .log .d { color: #6e7681; } .log .y { color: #e3b341; }

/* releases */
.rel { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bump { display: flex; gap: 6px; margin: 4px 0 12px; }
.bump span { padding: 6px 12px; border-radius: 6px; border: 1px solid var(--stroke2); color: var(--t2); transition: all .25s; }
.bump span.on { border-color: var(--acc); color: var(--t1); background: rgba(242,118,46,.14); box-shadow: 0 0 18px rgba(242,118,46,.3); }
.ver { font: 600 30px/1 "Segoe UI Variable Display", Inter, sans-serif; letter-spacing: -.02em; }
.ver em { font-style: normal; color: var(--acct); }
.notes { font: 12.5px/1.75 "Segoe UI", Inter, sans-serif; }
.notes h6 { margin: 8px 0 2px; font-size: 12.5px; color: var(--t1); }
.notes li { list-style: none; color: var(--t2); opacity: 0; transform: translateY(4px); transition: all .3s; }
.notes li.in { opacity: 1; transform: none; }
.notes li::before { content: "•"; color: var(--acc); margin-right: 8px; }

/* palette, toast, cursor, overlay */
.fdd-pal-dim { position: absolute; inset: 44px 0 28px; background: rgba(0,0,0,.35); opacity: 0; transition: opacity .15s; pointer-events: none; }
.fdd-pal-dim.on { opacity: 1; }
.fdd-pal { position: absolute; left: 50%; top: 54px; width: 600px; margin-left: -300px; background: #2a2a2a; border: 1px solid var(--stroke2); border-radius: 10px; box-shadow: 0 30px 80px rgba(0,0,0,.6); opacity: 0; transform: scale(.97) translateY(-6px); transition: opacity .12s, transform .16s cubic-bezier(.2,.9,.1,1); pointer-events: none; overflow: hidden; }
.fdd-pal.on { opacity: 1; transform: none; }
.fdd-pal .q { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; border-bottom: 1px solid var(--stroke); font-size: 14px; }
.fdd-pal .res { padding: 6px; }
.fdd-pal .it { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 6px; color: var(--t1); transition: background .15s, opacity .2s; }
.fdd-pal .it.on { background: rgba(242,118,46,.16); box-shadow: inset 2px 0 0 var(--acc); }
.fdd-pal .it small { color: var(--t3); }
.fdd-pal mark { background: none; color: var(--acct); font-weight: 700; }
.fdd-toast { position: absolute; right: 18px; bottom: 40px; display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #2d2d2d; border: 1px solid var(--stroke2); border-left: 3px solid var(--ok); border-radius: 8px; box-shadow: 0 16px 40px rgba(0,0,0,.5); opacity: 0; transform: translateY(14px); transition: opacity .2s, transform .3s cubic-bezier(.2,.9,.1,1); }
.fdd-toast.on { opacity: 1; transform: none; }
.fdd-keys { position: absolute; left: 50%; bottom: 62px; transform: translateX(-50%) scale(.9); display: flex; gap: 8px; opacity: 0; transition: opacity .15s, transform .2s cubic-bezier(.2,.9,.1,1); }
.fdd-keys.on { opacity: 1; transform: translateX(-50%) scale(1); }
.fdd-keys span { display: grid; place-items: center; min-width: 54px; height: 50px; padding: 0 14px; border-radius: 10px; background: #2f2f2f; border: 1px solid var(--stroke2); border-bottom-width: 4px; font: 600 18px/1 Inter, sans-serif; color: #fff; box-shadow: 0 12px 30px rgba(0,0,0,.5); transition: transform .08s, border-bottom-width .08s; }
.fdd-keys span.down { transform: translateY(3px); border-bottom-width: 1px; border-color: var(--acc); box-shadow: 0 0 24px rgba(242,118,46,.5); }
.fdd-status { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; padding: 0 12px; background: #1b1b1b; border-top: 1px solid var(--stroke); color: var(--t2); font-size: 11.5px; }
.fdd-status .r { margin-left: auto; }
.fdd-sparks { position: absolute; inset: 0; pointer-events: none; }
.fdd-cursor { position: absolute; left: 0; top: 0; width: 22px; height: 22px; pointer-events: none; z-index: 20; transition: transform .7s cubic-bezier(.45,.05,.25,1); filter: drop-shadow(0 2px 3px rgba(0,0,0,.6)); }
.fdd-cursor .ripple { position: absolute; left: -14px; top: -14px; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--acc); opacity: 0; transform: scale(.3); }
.fdd-cursor.click .ripple { animation: fdd-ripple .45s ease-out; }
@keyframes fdd-ripple { 0% { opacity: .9; transform: scale(.3); } 100% { opacity: 0; transform: scale(1.6); } }

/* chapters & caption */
.fdd-chapters { display: flex; justify-content: center; gap: 10px; margin: 26px auto 0; flex-wrap: wrap; max-width: 980px; }
.fdd-chapters button { position: relative; overflow: hidden; display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.03); color: var(--muted); font: 500 14px/1 var(--body); cursor: pointer; transition: color .2s, border-color .2s, background .2s; }
.fdd-chapters button:hover { color: var(--text); border-color: rgba(255,255,255,.24); }
.fdd-chapters button[aria-current="true"] { color: var(--text); border-color: rgba(242,118,46,.6); background: rgba(242,118,46,.08); }
.fdd-chapters button .p { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--ember); box-shadow: 0 0 8px var(--ember); }
.fdd-chapters button:focus-visible { outline: 2px solid var(--flame); outline-offset: 3px; }
.fdd-caption { text-align: center; color: var(--muted); margin-top: 16px; min-height: 26px; font-size: 16px; transition: opacity .25s; }
.fdd-caption b { color: var(--text); font-weight: 600; }

@media (max-width: 760px) {
  .fdd { grid-template-columns: 0 1fr; }
  .fdd-side { visibility: hidden; }
  .fdd-search, .fdd-user { display: none; }
  .fdd-chapters button { padding: 8px 12px; font-size: 13px; }
}
