:root {
  color-scheme: dark;
  --ws-bg: #060609;
  --ws-panel: #101015;
  --ws-panel-2: #15151c;
  --ws-line: #292934;
  --ws-text: #f8fafc;
  --ws-muted: #a5adbb;
  --ws-primary: #7250e6;
  --ws-primary-hover: #8062e8;
  --ws-good: #4ade80;
  --ws-bad: #fb7185;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 50% -10rem, rgba(114,80,230,.22), transparent 35rem), var(--ws-bg); color: var(--ws-text); font-family: "Public Sans", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
a { color: inherit; }
.ws-container { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; }
.ws-skip { position: fixed; z-index: 100; top: .8rem; left: .8rem; transform: translateY(-180%); padding: .7rem 1rem; border-radius: .6rem; background: #fff; color: #111; font-weight: 800; }
.ws-skip:focus { transform: none; }
.ws-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.15rem 0; }
.ws-brand { display: inline-flex; align-items: center; gap: .65rem; font-weight: 850; text-decoration: none; }
.ws-brand-mark { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: .75rem; background: var(--ws-primary); box-shadow: 0 10px 35px rgba(114,80,230,.35); }
.ws-nav-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .3rem; }
.ws-nav-links a { padding: .55rem .7rem; border-radius: .55rem; color: var(--ws-muted); font-size: .78rem; font-weight: 700; text-decoration: none; }
.ws-nav-links a:hover, .ws-nav-links a[aria-current="page"] { background: rgba(255,255,255,.065); color: #fff; }
.ws-hero { padding: 4.5rem 0 2.6rem; }
.ws-eyebrow { margin: 0 0 .85rem; color: #b8a9ff; font-size: .7rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.ws-hero h1 { max-width: 850px; margin: 0; font-size: clamp(2.5rem, 7vw, 5rem); line-height: .99; letter-spacing: -.055em; text-wrap: balance; }
.ws-hero > p:not(.ws-eyebrow) { max-width: 720px; margin: 1.25rem 0 0; color: #bcc5d2; font-size: clamp(1rem, 2vw, 1.15rem); line-height: 1.7; }
.ws-notice { display: flex; align-items: flex-start; gap: .7rem; margin: 1.4rem 0 0; max-width: 760px; padding: .85rem 1rem; border: 1px solid rgba(74,222,128,.22); border-radius: .8rem; background: rgba(74,222,128,.055); color: #cbd5df; font-size: .78rem; line-height: 1.55; }
.ws-notice .material-symbols-outlined { color: var(--ws-good); font-size: 1.05rem; }
.ws-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 1rem; padding-bottom: 5rem; }
.ws-sidebar, .ws-panel { border: 1px solid var(--ws-line); border-radius: 1rem; background: rgba(16,16,21,.9); }
.ws-sidebar { align-self: start; position: sticky; top: 1rem; padding: .8rem; }
.ws-panel { padding: clamp(1rem, 3vw, 1.6rem); }
.ws-panel + .ws-panel { margin-top: 1rem; }
.ws-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.ws-panel h2, .ws-panel h3 { margin: 0; letter-spacing: -.025em; }
.ws-panel h2 { font-size: 1.35rem; }
.ws-panel h3 { font-size: 1rem; }
.ws-help { margin: .4rem 0 0; color: var(--ws-muted); font-size: .76rem; line-height: 1.55; }
.ws-toolbar { display: flex; flex-wrap: wrap; gap: .55rem; }
.ws-button { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 42px; padding: .65rem .85rem; border: 1px solid var(--ws-primary); border-radius: .65rem; background: var(--ws-primary); color: #fff; font-size: .78rem; font-weight: 800; text-decoration: none; cursor: pointer; }
.ws-button:hover { background: var(--ws-primary-hover); }
.ws-button.secondary { border-color: var(--ws-line); background: rgba(255,255,255,.045); color: #e3e8ef; }
.ws-button.secondary:hover { background: rgba(255,255,255,.08); }
.ws-button.danger { border-color: rgba(251,113,133,.32); background: rgba(251,113,133,.09); color: #fecdd3; }
.ws-button.small { min-height: 34px; padding: .45rem .65rem; font-size: .7rem; }
.ws-button:disabled { opacity: .46; cursor: not-allowed; }
.ws-button .material-symbols-outlined { font-size: 1.05rem; }
.ws-project-list { display: grid; gap: .4rem; margin-top: .7rem; }
.ws-project-item { width: 100%; padding: .8rem; border: 1px solid transparent; border-radius: .7rem; background: transparent; color: var(--ws-muted); text-align: left; cursor: pointer; }
.ws-project-item:hover, .ws-project-item[aria-current="true"] { border-color: var(--ws-line); background: rgba(255,255,255,.045); color: #fff; }
.ws-project-item strong, .ws-project-item small { display: block; }
.ws-project-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .78rem; }
.ws-project-item small { margin-top: .3rem; color: #798598; font-size: .65rem; }
.ws-empty { padding: 1.1rem; border: 1px dashed var(--ws-line); border-radius: .8rem; color: var(--ws-muted); font-size: .78rem; line-height: 1.6; text-align: center; }
.ws-field { display: grid; gap: .4rem; }
.ws-field label, .ws-field > span:first-child { color: #dce3ec; font-size: .72rem; font-weight: 750; }
.ws-field small { color: #768398; font-size: .65rem; line-height: 1.45; }
.ws-input, .ws-textarea, .ws-select { width: 100%; border: 1px solid var(--ws-line); border-radius: .65rem; outline: 0; background: #0a0a0f; color: #f8fafc; }
.ws-input, .ws-select { min-height: 43px; padding: 0 .75rem; }
.ws-textarea { min-height: 125px; padding: .75rem; resize: vertical; font: 500 .75rem/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; }
.ws-input:focus, .ws-textarea:focus, .ws-select:focus { border-color: #8d73ec; box-shadow: 0 0 0 3px rgba(114,80,230,.18); }
.ws-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.ws-editor-groups { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.ws-group { padding: 1rem; border: 1px solid var(--ws-line); border-radius: .8rem; background: rgba(255,255,255,.022); }
.ws-group h3 { margin-bottom: .75rem; }
.ws-status { min-height: 1.4rem; margin: .7rem 0 0; color: var(--ws-muted); font-size: .72rem; }
.ws-status[data-tone="success"] { color: var(--ws-good); }
.ws-status[data-tone="error"] { color: var(--ws-bad); }
.ws-history { display: grid; gap: .45rem; margin: 0; padding: 0; list-style: none; }
.ws-history li { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid rgba(255,255,255,.06); color: var(--ws-muted); font-size: .7rem; }
.ws-history code { color: #d6ceff; }
.ws-footer { border-top: 1px solid var(--ws-line); padding: 1.8rem 0 2.5rem; color: #788397; font-size: .72rem; }
.ws-footer-inner { display: flex; justify-content: space-between; gap: 1rem; }

/* Brand-to-code */
.ws-stepper { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; margin-bottom: 1rem; }
.ws-step { padding: .8rem; border: 1px solid var(--ws-line); border-radius: .75rem; background: rgba(255,255,255,.025); color: var(--ws-muted); font-size: .68rem; font-weight: 750; text-align: left; cursor: pointer; }
.ws-step span { display: block; margin-bottom: .4rem; color: #8f7aee; font: 700 .62rem/1 ui-monospace, monospace; }
.ws-step[aria-current="step"] { border-color: #7656e3; background: rgba(114,80,230,.12); color: #fff; }
.ws-stage[hidden] { display: none; }
.ws-stage { min-height: 470px; }
.ws-color-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.ws-color-field { display: grid; grid-template-columns: 44px minmax(0,1fr); gap: .65rem; align-items: center; }
.ws-color-field input[type="color"] { width: 44px; height: 44px; padding: 2px; border: 1px solid var(--ws-line); border-radius: .6rem; background: #09090d; }
.ws-color-field .ws-field { gap: .25rem; }
.ws-checks { display: grid; gap: .6rem; }
.ws-check { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem; border: 1px solid var(--ws-line); border-radius: .75rem; }
.ws-check strong, .ws-check small { display: block; }
.ws-check small { margin-top: .25rem; color: var(--ws-muted); font-size: .68rem; }
.ws-badge { flex: 0 0 auto; padding: .35rem .55rem; border-radius: 99px; background: rgba(74,222,128,.1); color: #86efac; font-size: .65rem; font-weight: 850; }
.ws-badge.fail { background: rgba(251,113,133,.1); color: #fda4af; }
.ws-preview { overflow: hidden; border: 1px solid var(--ws-line); border-radius: 1rem; background: var(--preview-bg, #09090b); color: var(--preview-text, #fafafa); }
.ws-preview-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; border-bottom: 1px solid color-mix(in srgb, var(--preview-text) 15%, transparent); }
.ws-preview-body { display: grid; grid-template-columns: 1.1fr .9fr; gap: 1rem; padding: clamp(1rem, 5vw, 2.2rem); }
.ws-preview-copy h3 { margin: 0 0 .7rem; font-family: var(--preview-display, inherit); font-size: clamp(1.7rem, 4vw, 3rem); line-height: 1.05; }
.ws-preview-copy p { color: var(--preview-muted, #a1a1aa); line-height: 1.6; }
.ws-preview-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.ws-preview-primary, .ws-preview-secondary { padding: .7rem .9rem; border: 0; border-radius: var(--preview-radius, .75rem); font-weight: 800; }
.ws-preview-primary { background: var(--preview-primary, #7250e6); color: var(--preview-on-primary, #fff); }
.ws-preview-secondary { background: transparent; color: var(--preview-text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--preview-text) 22%, transparent); }
.ws-preview-card { align-self: center; padding: 1.2rem; border-radius: var(--preview-radius, .75rem); background: var(--preview-surface, #18181b); }
.ws-preview-card p { color: var(--preview-muted, #a1a1aa); font-size: .78rem; line-height: 1.55; }
.ws-export-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; margin: 1rem 0; }
.ws-export-file { padding: .75rem; border: 1px solid var(--ws-line); border-radius: .65rem; background: rgba(255,255,255,.02); font: 600 .68rem/1.3 ui-monospace, monospace; color: #cec5ff; }
.ws-warning { padding: .9rem; border: 1px solid rgba(251,113,133,.28); border-radius: .7rem; background: rgba(251,113,133,.07); color: #fecdd3; font-size: .75rem; line-height: 1.55; }
.ws-warning label { display: flex; gap: .55rem; margin-top: .65rem; font-weight: 700; }

/* Presets */
.ws-preset-controls { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.ws-chip { min-height: 36px; padding: .45rem .7rem; border: 1px solid var(--ws-line); border-radius: 99px; background: rgba(255,255,255,.03); color: var(--ws-muted); font-size: .7rem; font-weight: 750; cursor: pointer; }
.ws-chip[aria-pressed="true"] { border-color: #7656e3; background: rgba(114,80,230,.13); color: #fff; }
.ws-preset-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.ws-preset-card { position: relative; min-height: 220px; padding: 1rem; border: 1px solid var(--ws-line); border-radius: .9rem; background: var(--ws-panel); cursor: pointer; }
.ws-preset-card:hover, .ws-preset-card[aria-current="true"] { border-color: #7656e3; transform: translateY(-2px); }
.ws-preset-visual { height: 95px; border-radius: .65rem; border: 1px solid rgba(255,255,255,.1); background: var(--preset-bg, linear-gradient(135deg,#7250e6,#0ea5e9)); box-shadow: var(--preset-shadow, none); }
.ws-preset-card h2 { margin: .85rem 0 .3rem; font-size: .95rem; }
.ws-preset-card p { margin: 0; color: var(--ws-muted); font-size: .7rem; line-height: 1.45; }
.ws-preset-meta { display: inline-block; margin-top: .65rem; color: #a99af5; font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.ws-preset-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.ws-code { overflow: auto; max-height: 330px; margin: 0; padding: 1rem; border: 1px solid var(--ws-line); border-radius: .75rem; background: #08080c; color: #d8d1ff; font: 500 .72rem/1.65 ui-monospace, monospace; white-space: pre-wrap; word-break: break-word; }
.ws-embed-code { margin-top: .7rem; }
body.ws-embed .ws-nav, body.ws-embed .ws-hero, body.ws-embed .ws-preset-controls, body.ws-embed .ws-preset-grid, body.ws-embed .ws-footer, body.ws-embed .ws-detail-actions, body.ws-embed #preset-editor-wrap { display: none; }
body.ws-embed .ws-preset-detail { display: block; margin: 0; }
body.ws-embed .ws-panel { border: 0; background: transparent; padding: .5rem; }
body.ws-embed .ws-container { width: 100%; }
body.ws-embed #preset-detail-copy { margin-bottom: .8rem; }
body.ws-embed::after { content: "Made with StudioLimb"; display: block; padding: .5rem; color: #8e99aa; font-size: .65rem; text-align: right; }

.ws-toast { position: fixed; z-index: 90; right: 1rem; bottom: 1rem; max-width: min(340px, calc(100% - 2rem)); padding: .8rem 1rem; border: 1px solid var(--ws-line); border-radius: .7rem; background: #17171f; color: #fff; box-shadow: 0 16px 45px rgba(0,0,0,.45); font-size: .75rem; line-height: 1.5; }
.ws-toast[hidden] { display: none; }

@media (max-width: 900px) {
  .ws-layout { grid-template-columns: 1fr; }
  .ws-sidebar { position: static; }
  .ws-stepper { grid-template-columns: 1fr 1fr; }
  .ws-preset-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 650px) {
  .ws-container { width: min(100% - 1.1rem, 1180px); }
  .ws-nav { align-items: flex-start; flex-direction: column; }
  .ws-nav-links { justify-content: flex-start; }
  .ws-hero { padding-top: 3rem; }
  .ws-form-grid, .ws-editor-groups, .ws-color-grid, .ws-preview-body, .ws-preset-grid, .ws-preset-detail { grid-template-columns: 1fr; }
  .ws-export-list { grid-template-columns: 1fr 1fr; }
  .ws-panel-head, .ws-footer-inner { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
