/* VS Code Themes: live theme preview in the portfolio catalog.
   Theme colors arrive as CSS variables set inline on .vsc by VSCodeThemes.tsx. */

.vsc { --mono:ui-monospace,"SF Mono",SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace; --swap:.45s cubic-bezier(.2,.8,.2,1); margin-top:40px; }
.vsc :is(.vsc-window,.vsc-window *) { transition:background-color var(--swap),color var(--swap),border-color var(--swap),box-shadow var(--swap); }

/* Theme picker */
.vsc-picker { display:flex; flex-wrap:wrap; gap:10px; margin:0 0 30px; contain:inline-size; }
.vsc-chip { position:relative; display:inline-flex; align-items:center; gap:10px; min-height:48px; padding:8px 16px 8px 9px; border:1px solid var(--line); border-radius:999px; background:rgba(255,255,255,.55); color:var(--ink); font:700 .74rem Arial,Helvetica,sans-serif; letter-spacing:.02em; cursor:pointer; overflow:hidden; transition:transform .22s cubic-bezier(.2,.8,.2,1),box-shadow .22s ease,border-color .22s ease,background .22s ease; }
.vsc-chip img { width:30px; height:30px; border-radius:9px; flex:none; }
.vsc-chip i { position:absolute; left:0; right:0; bottom:0; height:3px; background:linear-gradient(90deg,var(--chip-a) 0 25%,var(--chip-b) 25% 50%,var(--chip-c) 50% 75%,var(--chip-d) 75%); opacity:.9; }
.vsc-chip[aria-checked="true"] { border-color:var(--ink); background:#fff; box-shadow:4px 5px 0 rgba(148,114,194,.3); }
.vsc-chip:focus-visible { outline:2px solid var(--ink); outline-offset:3px; }
@media (hover:hover) and (pointer:fine) { .vsc-chip:hover { transform:translateY(-2px); background:#fff; } }
.vsc-chip:active { transform:translateY(1px) scale(.98); }

/* Stage: window + info */
.vsc-stage { display:grid; grid-template-columns:minmax(0,1.75fr) minmax(250px,.85fr); contain:inline-size; gap:clamp(24px,4vw,56px); align-items:start; }
.vsc-window-wrap { position:relative; isolation:isolate; min-width:0; }
.vsc-window-wrap::before { content:""; position:absolute; inset:8% 6% -4%; z-index:-1; border-radius:40px; background:var(--status-bg); filter:blur(48px); opacity:.42; transition:background-color var(--swap); }
.vsc[data-dark] .vsc-window-wrap::before { background:var(--tab-accent); opacity:.3; }

.vsc-window { margin:0; display:flex; flex-direction:column; border:1px solid var(--frame); border-radius:14px; overflow:hidden; background:var(--e-bg); color:var(--e-fg); box-shadow:0 30px 70px rgba(54,42,76,.2),0 2px 0 rgba(255,255,255,.4) inset; font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif; font-size:12px; }
.vsc-title { position:relative; display:flex; align-items:center; justify-content:center; height:36px; padding:0 14px; background:var(--title-bg); color:var(--title-fg); font-size:12px; border-bottom:1px solid var(--panel-border); }
.vsc-lights { position:absolute; left:14px; display:flex; gap:7px; }
.vsc-lights i { width:11px; height:11px; border-radius:50%; background:#ff5f57; }
.vsc-lights i:nth-child(2) { background:#febc2e; }.vsc-lights i:nth-child(3) { background:#28c840; }

.vsc-body { display:grid; grid-template-columns:44px 168px minmax(0,1fr); min-height:0; }
.vsc-activity { display:flex; justify-content:center; align-items:flex-start; padding-top:12px; background:var(--act-bg); color:var(--act-dim); border-right:1px solid var(--panel-border); }
.vsc-activity svg { width:22px; height:auto; }
.vsc-activity .on { color:var(--act-fg); stroke:var(--act-fg); }
.vsc-side { background:var(--side-bg); color:var(--side-fg); border-right:1px solid var(--panel-border); padding:10px 0; }
.vsc-side-title { margin:0 0 8px; padding:0 14px; font-size:10px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--side-title); }
.vsc-side ul { list-style:none; margin:0; padding:0; }
.vsc-side li { padding:4px 14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.vsc-side .vsc-folder { font-weight:700; }
.vsc-side .vsc-in { padding-left:26px; }.vsc-side .vsc-in2 { padding-left:38px; }
.vsc-side .vsc-on { background:var(--list-bg); color:var(--list-fg); }

.vsc-main { display:flex; flex-direction:column; min-width:0; background:var(--e-bg); }
.vsc-tabs { display:flex; background:var(--tabs-bg); }
.vsc-tabs span { padding:10px 16px 9px; color:var(--tab-dim); border-top:2px solid transparent; white-space:nowrap; }
.vsc-tabs .vsc-tab-on { background:var(--tab-bg); color:var(--tab-fg); border-top-color:var(--tab-accent); }
.vsc-crumbs { padding:6px 18px 2px; font-size:11px; color:var(--e-ln); }

.vsc-code { margin:0; padding:8px 0 14px; overflow-x:auto; font:12.5px/1.68 var(--mono); color:var(--e-fg); background:var(--e-bg); tab-size:2; scrollbar-width:thin; }
.vsc-code:focus-visible { outline:2px solid var(--tab-accent); outline-offset:-2px; }
.vsc-code code { display:block; min-width:max-content; font:inherit; }
.vsc-line { display:flex; padding-right:18px; }
.vsc-line-on { background:var(--e-line); }
.vsc-ln { flex:none; width:44px; padding-right:16px; text-align:right; color:var(--e-ln); user-select:none; }
.vsc-line-on .vsc-ln { color:var(--e-ln-active); }
.vsc-src { white-space:pre; }
.vsc-cursor { display:inline-block; width:2px; height:1.2em; margin-left:1px; vertical-align:-.22em; background:var(--tab-accent); animation:vsc-blink 1.1s steps(1) infinite; }

.vsc-code [class^="t-"] { transition:color var(--swap); }
.t-comment { color:var(--comment); font-weight:var(--comment-w); font-style:var(--comment-st); }
.t-keyword { color:var(--keyword); font-weight:var(--keyword-w); font-style:var(--keyword-st); }
.t-function { color:var(--function); font-weight:var(--function-w); font-style:var(--function-st); }
.t-type { color:var(--type); font-weight:var(--type-w); font-style:var(--type-st); }
.t-primitive { color:var(--primitive); font-weight:var(--primitive-w); font-style:var(--primitive-st); }
.t-string { color:var(--string); font-weight:var(--string-w); font-style:var(--string-st); }
.t-number { color:var(--number); font-weight:var(--number-w); font-style:var(--number-st); }
.t-constant { color:var(--constant); font-weight:var(--constant-w); font-style:var(--constant-st); }
.t-param { color:var(--param); font-weight:var(--param-w); font-style:var(--param-st); }
.t-variable { color:var(--variable); font-weight:var(--variable-w); font-style:var(--variable-st); }
.t-property { color:var(--property); font-weight:var(--property-w); font-style:var(--property-st); }
.t-punct { color:var(--punct); font-weight:var(--punct-w); font-style:var(--punct-st); }
.t-tag { color:var(--tag); font-weight:var(--tag-w); font-style:var(--tag-st); }
.t-attr { color:var(--attr); font-weight:var(--attr-w); font-style:var(--attr-st); }
.t-operator { color:var(--operator); font-weight:var(--operator-w); font-style:var(--operator-st); }

.vsc-panel { margin-top:auto; background:var(--panel-bg); border-top:1px solid var(--panel-border); color:var(--term-fg); }
.vsc-panel-tabs { display:flex; gap:18px; padding:8px 18px 0; font-size:10px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; opacity:.7; }
.vsc-panel-tabs .vsc-panel-on { opacity:1; padding-bottom:5px; border-bottom:1px solid currentColor; }
.vsc-term { padding:8px 18px 14px; font:11.5px/1.65 var(--mono); }
.vsc-term p { margin:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.vsc-prompt { color:var(--term-prompt); font-weight:700; }
.vsc-ok { color:var(--term-ok); font-weight:700; }
.vsc-typed { display:inline-block; vertical-align:bottom; overflow:hidden; white-space:nowrap; max-width:calc(var(--n) * 1ch); }

.vsc-status { display:flex; gap:16px; align-items:center; height:24px; padding:0 12px; background:var(--status-bg); color:var(--status-fg); font-size:11px; white-space:nowrap; overflow:hidden; }
.vsc-status-right { margin-left:auto; overflow:hidden; text-overflow:ellipsis; }

/* Info column */
.vsc-info { position:sticky; top:180px; min-width:0; }
.vsc-meta { display:flex; flex-wrap:wrap; gap:8px; margin:0; }
.vsc-meta span { padding:5px 9px; border:1px solid var(--line); border-radius:99px; font-size:.62rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; background:rgba(255,255,255,.5); }
.vsc-info h3 { margin:22px 0 12px; font-size:clamp(2.2rem,3.6vw,3.6rem); line-height:.92; letter-spacing:-.065em; }
.vsc-tagline { margin:0 0 26px; font:italic 1.1rem/1.45 Georgia,serif; color:rgba(37,34,57,.8); }
.vsc-swatch-hint { margin:0 0 10px; font-size:.62rem; font-weight:700; letter-spacing:.09em; text-transform:uppercase; color:rgba(37,34,57,.6); }
.vsc-swatches { list-style:none; margin:0 0 26px; padding:0; border-top:1px solid var(--line); }
.vsc-swatches button { width:100%; display:grid; grid-template-columns:22px 1fr auto; gap:12px; align-items:center; padding:9px 2px; border:0; border-bottom:1px solid var(--line); background:none; color:var(--ink); font:inherit; font-size:.8rem; text-align:left; cursor:copy; transition:background .2s ease,padding .2s ease; }
.vsc-swatches button:hover,.vsc-swatches button:focus-visible { background:rgba(255,255,255,.6); padding-left:8px; }
.vsc-swatches button:focus-visible { outline:2px solid var(--ink); outline-offset:-2px; }
.vsc-swatches i { width:22px; height:22px; border-radius:7px; box-shadow:inset 0 0 0 1px rgba(37,34,57,.18); transition:background-color var(--swap); }
.vsc-swatches small { font-size:.68rem; color:rgba(37,34,57,.55); font-style:italic; }
.vsc-swatches code { font:.72rem var(--mono); letter-spacing:.02em; }
.vsc-actions { gap:10px; }
.vsc .card-actions button { display:inline-flex; align-items:center; justify-content:center; min-height:42px; border:1px solid currentColor; border-radius:999px; padding:9px 15px; background:none; color:var(--ink); font:700 .72rem Arial,Helvetica,sans-serif; letter-spacing:.06em; text-transform:uppercase; cursor:zoom-in; transition:background .25s ease,color .25s ease,transform .25s ease,box-shadow .25s ease; }
.vsc .card-actions button:hover { background:var(--ink); color:var(--paper); transform:translateY(-2px); box-shadow:0 9px 22px rgba(54,42,76,.14); }
.vsc .card-actions button:focus-visible { outline:2px solid var(--ink); outline-offset:4px; }
.vsc-actions a:first-child { background:var(--ink); color:var(--paper); border-color:var(--ink); }
.vsc-actions a:first-child:hover { background:#3d3558; }

/* Install guide */
.vsc-install { margin-top:clamp(50px,7vw,90px); padding:clamp(26px,4vw,48px); border:1px solid var(--line); background:radial-gradient(circle at 92% 8%,rgba(255,186,211,.55),transparent 32%),radial-gradient(circle at 6% 96%,rgba(183,241,221,.6),transparent 34%),linear-gradient(135deg,#fff8e6,#f3ecff 55%,#eafaf3); }
.vsc-install-head h3 { margin:16px 0 0; font-size:clamp(1.8rem,3.4vw,3.2rem); line-height:.98; letter-spacing:-.06em; }
.vsc-install-head h3 em { font-family:Georgia,serif; font-weight:400; letter-spacing:-.04em; color:#8c528e; }
.vsc-install ol { list-style:none; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin:36px 0 26px; padding:0; }
.vsc-install li { min-width:0; padding:22px; border:1px solid rgba(37,34,57,.14); background:rgba(255,255,255,.62); box-shadow:0 14px 34px rgba(69,53,93,.07); }
.vsc-step { display:inline-grid; place-items:center; width:38px; height:38px; border-radius:50%; background:var(--ink); color:var(--acid); font:italic 1rem Georgia,serif; }
.vsc-install h4 { margin:20px 0 10px; font-size:1.15rem; letter-spacing:-.03em; }
.vsc-install li p { margin:0 0 12px; font-size:.88rem; line-height:1.6; }
.vsc-install kbd { display:inline-block; min-width:1.7em; margin:0 1px; padding:1px 6px; border:1px solid rgba(37,34,57,.25); border-bottom-width:2px; border-radius:6px; background:#fff; font:700 .72rem var(--mono); text-align:center; line-height:1.6; }
.vsc-copy { display:grid; grid-template-columns:1fr auto; align-items:center; gap:4px 8px; margin-top:10px; padding:10px 10px 10px 12px; border-radius:10px; background:#252239; color:#f6f1ff; }
.vsc-copy-label { grid-column:1/-1; font-size:.58rem; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:#d9f3a7; }
.vsc-copy code { min-width:0; overflow-wrap:anywhere; font:.74rem/1.5 var(--mono); }
.vsc-copy button { padding:6px 10px; border:1px solid rgba(246,241,255,.35); border-radius:99px; background:none; color:inherit; font:700 .62rem Arial,Helvetica,sans-serif; letter-spacing:.06em; text-transform:uppercase; cursor:pointer; white-space:nowrap; transition:background .2s ease,color .2s ease; }
.vsc-copy button:hover { background:#f6f1ff; color:#252239; }
.vsc-copy button:focus-visible { outline:2px solid #d9f3a7; outline-offset:2px; }
.vsc-footnote { max-width:820px; margin:0 0 22px; font-size:.82rem; line-height:1.6; color:rgba(37,34,57,.75); }
.vsc-footnote a { text-decoration:underline; text-underline-offset:3px; }
.vsc-footnote code { font:.78rem var(--mono); }

@keyframes vsc-blink { 50% { opacity:0; } }
@keyframes vsc-type { from { max-width:0; } }
@keyframes vsc-rise { from { opacity:0; transform:translateY(4px); } }

@media (prefers-reduced-motion:no-preference) {
  .vsc-typed { animation:vsc-type .9s steps(40,end) .15s both; }
  .vsc-term-out { animation:vsc-rise .35s ease 1.15s both; }
}
@media (prefers-reduced-motion:reduce) {
  .vsc-cursor { animation:none; }
  .vsc :is(.vsc-window,.vsc-window *),.vsc-chip,.vsc-swatches button,.vsc-window-wrap::before { transition:none; }
}

@media (max-width:1180px) {
  .vsc-stage { grid-template-columns:minmax(0,1fr); }
  .vsc-info { position:static; display:grid; grid-template-columns:1fr 1fr; gap:0 40px; }
  .vsc-info>.vsc-meta { grid-area:1/1; }
  .vsc-info>h3 { grid-area:2/1; }
  .vsc-info>.vsc-tagline { grid-area:3/1; }
  .vsc-info>.vsc-actions { grid-area:4/1; align-self:start; }
  .vsc-info>.vsc-swatch-hint { grid-area:1/2; align-self:end; }
  .vsc-info>.vsc-swatches { grid-area:2/2/6/3; }
  .vsc-install ol { grid-template-columns:1fr; }
}
@media (max-width:740px) {
  .vsc { margin-top:30px; }
  .vsc-picker { flex-wrap:nowrap; overflow-x:auto; margin:0 -24px 24px; padding:4px 24px 10px; scrollbar-width:none; }
  .vsc-picker::-webkit-scrollbar { display:none; }
  .vsc-chip { flex:none; }
  .vsc-body { grid-template-columns:38px minmax(0,1fr); }
  .vsc-side { display:none; }
  .vsc-code { font-size:11px; }
  .vsc-ln { width:34px; padding-right:12px; }
  .vsc-status-right { display:none; }
  .vsc-term p { white-space:normal; overflow-wrap:anywhere; }
  .vsc .vsc-typed { display:inline; max-width:none; white-space:normal; animation:none; }
  .vsc-info { display:block; }
  .vsc-install { padding:24px 18px; }
}
