*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{
  --bg:#0f1117;--bg-surface:#1a1d27;--bg-elevated:#22263a;--bg-input:#141722;
  --border:#2a2e3e;--border-light:#3a3f55;
  --text:#e2e4ed;--text-muted:#8b8fa3;--text-dim:#5c6078;
  --accent:#6366f1;--accent-hover:#818cf8;--accent-subtle:#6366f120;
  --green:#34d399;--green-subtle:#34d39920;
  --amber:#fbbf24;--amber-subtle:#fbbf2420;
  --red:#f87171;--red-subtle:#f8717120;
  --sky:#38bdf8;--sky-subtle:#38bdf820;
  --radius:10px;--radius-sm:6px;
  --font:ui-sans-serif,system-ui,-apple-system,sans-serif;
  --font-mono:ui-monospace,SFMono-Regular,'SF Mono',Menlo,Consolas,monospace;
  --shadow:0 1px 3px #00000040,0 4px 12px #00000060;
  --max-width:1200px;
}
html{scroll-behavior:smooth}
body{font-family:var(--font);background:var(--bg);color:var(--text);line-height:1.6;-webkit-font-smoothing:antialiased}
img,svg{max-width:100%;height:auto}
a{color:var(--accent-hover);text-decoration:none}
a:hover{text-decoration:underline}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Header */
.site-header{border-bottom:1px solid var(--border);background:var(--bg-surface);position:sticky;top:0;z-index:100;backdrop-filter:blur(8px)}
.header-inner{max-width:var(--max-width);margin:0 auto;padding:0 24px;display:flex;align-items:center;justify-content:space-between;height:56px}
.logo{display:flex;align-items:center;gap:8px;color:var(--text);font-weight:700;font-size:1.1rem}
.logo:hover{text-decoration:none}
.logo-icon{flex-shrink:0}
.site-nav{display:flex;gap:20px}
.site-nav a{color:var(--text-muted);font-size:.9rem;font-weight:500}
.site-nav a:hover{color:var(--text);text-decoration:none}

/* Hero */
.hero{padding:80px 24px 60px;text-align:center;background:linear-gradient(180deg,var(--bg-surface) 0%,var(--bg) 100%)}
.hero-inner{max-width:680px;margin:0 auto}
.hero-eyebrow{display:inline-block;font-size:.8rem;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--accent);background:var(--accent-subtle);padding:4px 12px;border-radius:999px;margin-bottom:20px}
.hero h1{font-size:clamp(1.8rem,4vw,2.8rem);font-weight:800;line-height:1.2;margin-bottom:16px;background:linear-gradient(135deg,var(--text) 0%,var(--accent-hover) 100%);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}
.hero-sub{font-size:1.1rem;color:var(--text-muted);margin-bottom:32px;max-width:560px;margin-left:auto;margin-right:auto}
.hero-actions{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}

/* Buttons */
.btn{display:inline-flex;align-items:center;gap:6px;padding:10px 20px;border-radius:var(--radius-sm);font-size:.9rem;font-weight:600;cursor:pointer;border:1px solid transparent;transition:all .15s;font-family:var(--font);white-space:nowrap}
.btn-primary{background:var(--accent);color:#fff}
.btn-primary:hover{background:var(--accent-hover);text-decoration:none}
.btn-ghost{background:transparent;color:var(--text);border-color:var(--border-light)}
.btn-ghost:hover{background:var(--bg-elevated);text-decoration:none}
.btn-sm{padding:6px 14px;font-size:.8rem}
.btn-danger-subtle{background:var(--red-subtle);color:var(--red);border-color:transparent}
.btn-danger-subtle:hover{background:#f8717130}

/* Workspace */
.workspace{max-width:var(--max-width);margin:0 auto;padding:48px 24px}
.workspace-header{text-align:center;margin-bottom:32px}
.workspace-header h2{font-size:1.6rem;font-weight:700;margin-bottom:6px}
.workspace-sub{color:var(--text-muted);font-size:.95rem}
.workspace-layout{display:grid;grid-template-columns:1fr 1fr;gap:24px;align-items:start}
@media(max-width:860px){.workspace-layout{grid-template-columns:1fr}}

/* Panels */
.panel{background:var(--bg-surface);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;display:flex;flex-direction:column}
.panel-toolbar{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid var(--border);gap:12px;flex-wrap:wrap;background:var(--bg-elevated)}
.toolbar-left,.toolbar-right{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.panel-title{font-size:.95rem;font-weight:600}
.panel-body{padding:16px;display:flex;flex-direction:column;gap:16px}
.panel-label{font-size:.85rem;font-weight:600;color:var(--text-muted)}
.hint{font-weight:400;color:var(--text-dim);font-size:.8rem}

/* Inputs */
.input-project-name,.input-version,.select-preset,.select-format,.select-tone{background:var(--bg-input);border:1px solid var(--border);color:var(--text);padding:6px 10px;border-radius:var(--radius-sm);font-size:.85rem;font-family:var(--font);outline:none}
.input-project-name:focus,.input-version:focus,.select-preset:focus,.textarea-raw:focus,.select-format:focus,.select-tone:focus{border-color:var(--accent)}
.input-project-name{width:160px}
.input-version{width:90px}
.textarea-raw{width:100%;background:var(--bg-input);border:1px solid var(--border);color:var(--text);padding:12px;border-radius:var(--radius-sm);font-family:var(--font-mono);font-size:.82rem;line-height:1.6;resize:vertical;outline:none;min-height:160px}

/* Tag controls */
.tag-controls{border-top:1px solid var(--border);padding-top:12px}
.tag-controls-label{font-size:.8rem;color:var(--text-dim);margin-bottom:8px}
.tag-buttons{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.tag-btn{display:inline-flex;align-items:center;gap:5px;padding:5px 12px;border-radius:999px;font-size:.8rem;font-weight:500;cursor:pointer;border:1px solid var(--border-light);background:var(--bg-elevated);color:var(--text-muted);transition:all .15s;font-family:var(--font)}
.tag-btn:hover{border-color:var(--text-dim)}
.tag-btn.active-feature{background:var(--green-subtle);border-color:var(--green);color:var(--green)}
.tag-btn.active-fix{background:var(--sky-subtle);border-color:var(--sky);color:var(--sky)}
.tag-btn.active-breaking{background:var(--red-subtle);border-color:var(--red);color:var(--red)}
.tag-btn.active-other{background:var(--amber-subtle);border-color:var(--amber);color:var(--amber)}
.tag-dot{width:7px;height:7px;border-radius:50%;display:inline-block}
.tag-dot--feature{background:var(--green)}
.tag-dot--fix{background:var(--sky)}
.tag-dot--breaking{background:var(--red)}
.tag-dot--other{background:var(--amber)}

/* Items list */
.items-list{display:flex;flex-direction:column;gap:4px;max-height:280px;overflow-y:auto;padding-right:4px}
.items-list::-webkit-scrollbar{width:4px}
.items-list::-webkit-scrollbar-thumb{background:var(--border-light);border-radius:4px}
.item-row{display:flex;align-items:center;gap:8px;padding:6px 10px;border-radius:var(--radius-sm);background:var(--bg-input);font-size:.82rem}
.item-row .item-tag{width:70px;flex-shrink:0;font-size:.7rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em;padding:2px 8px;border-radius:999px;text-align:center;cursor:pointer;border:none;font-family:var(--font)}
.item-tag--feature{background:var(--green-subtle);color:var(--green)}
.item-tag--fix{background:var(--sky-subtle);color:var(--sky)}
.item-tag--breaking{background:var(--red-subtle);color:var(--red)}
.item-tag--other{background:var(--amber-subtle);color:var(--amber)}
.item-tag--untagged{background:var(--bg-elevated);color:var(--text-dim)}
.item-row .item-text{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--text)}
.item-row .item-remove{background:none;border:none;color:var(--text-dim);cursor:pointer;font-size:1rem;padding:0 4px;line-height:1;border-radius:3px}
.item-row .item-remove:hover{color:var(--red);background:var(--red-subtle)}
.empty-state{color:var(--text-dim);font-size:.85rem;text-align:center;padding:24px 0;font-style:italic}

/* Output */
.output-options{display:flex;gap:16px;flex-wrap:wrap}
.checkbox-label{display:flex;align-items:center;gap:6px;font-size:.82rem;color:var(--text-muted);cursor:pointer;font-family:var(--font)}
.checkbox-label input{accent-color:var(--accent)}
.output-preview{background:var(--bg-input);border:1px solid var(--border);border-radius:var(--radius-sm);padding:16px;font-family:var(--font-mono);font-size:.82rem;line-height:1.7;white-space:pre-wrap;word-break:break-word;max-height:400px;overflow-y:auto;color:var(--text);margin:0}
.output-preview::-webkit-scrollbar{width:4px}
.output-preview::-webkit-scrollbar-thumb{background:var(--border-light);border-radius:4px}
.output-actions{display:flex;gap:8px;flex-wrap:wrap}
.copy-feedback{font-size:.8rem;color:var(--green);min-height:1.2em}

/* Examples */
.examples{max-width:var(--max-width);margin:0 auto;padding:48px 24px;border-top:1px solid var(--border)}
.section-header{text-align:center;margin-bottom:32px}
.section-header h2{font-size:1.5rem;font-weight:700;margin-bottom:6px}
.section-header p{color:var(--text-muted);font-size:.95rem}
.example-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:20px}
.example-card{background:var(--bg-surface);border:1px solid var(--border);border-radius:var(--radius);padding:20px}
.example-card h3{font-size:.95rem;font-weight:600;margin-bottom:12px;color:var(--accent-hover)}
.example-pre{background:var(--bg-input);border-radius:var(--radius-sm);padding:14px;font-family:var(--font-mono);font-size:.78rem;line-height:1.6;color:var(--text-muted);white-space:pre-wrap;overflow-x:auto}

/* Guide */
.guide{max-width:var(--max-width);margin:0 auto;padding:48px 24px;border-top:1px solid var(--border)}
.guide-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:20px;margin-bottom:40px}
.guide-block{background:var(--bg-surface);border:1px solid var(--border);border-radius:var(--radius);padding:20px}
.guide-block h3{font-size:.95rem;font-weight:600;margin-bottom:8px}
.guide-block p,.guide-block li{font-size:.88rem;color:var(--text-muted);line-height:1.7}
.guide-block ul{padding-left:18px;display:flex;flex-direction:column;gap:4px}
.guide-faq{max-width:680px;margin:0 auto}
.guide-faq h3{font-size:1.1rem;font-weight:600;margin-bottom:16px}
.guide-faq details{border:1px solid var(--border);border-radius:var(--radius-sm);margin-bottom:8px;overflow:hidden}
.guide-faq summary{padding:12px 16px;cursor:pointer;font-size:.9rem;font-weight:500;color:var(--text);list-style:none;display:flex;align-items:center;justify-content:space-between}
.guide-faq summary::-webkit-details-marker{display:none}
.guide-faq summary::after{content:'+';font-size:1.1rem;color:var(--text-dim);transition:transform .2s}
.guide-faq details[open] summary::after{content:'−'}
.guide-faq details[open] summary{border-bottom:1px solid var(--border)}
.guide-faq details p{padding:12px 16px;font-size:.88rem;color:var(--text-muted);line-height:1.7}

/* Modal */
.modal[hidden]{display:none}
.modal{position:fixed;inset:0;z-index:200;display:flex;align-items:center;justify-content:center}
.modal-overlay{position:absolute;inset:0;background:#00000080}
.modal-content{position:relative;background:var(--bg-surface);border:1px solid var(--border);border-radius:var(--radius);padding:24px;max-width:480px;width:90%;max-height:70vh;overflow-y:auto;box-shadow:var(--shadow)}
.modal-content h3{font-size:1rem;font-weight:600;margin-bottom:16px}
.saved-item{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;border:1px solid var(--border);border-radius:var(--radius-sm);margin-bottom:8px;font-size:.85rem}
.saved-item .saved-name{font-weight:500}
.saved-item .saved-date{color:var(--text-dim);font-size:.75rem}
.saved-item .saved-actions{display:flex;gap:6px}

/* Footer */
.site-footer{border-top:1px solid var(--border);margin-top:48px;padding:32px 24px;background:var(--bg-surface)}
.footer-inner{max-width:var(--max-width);margin:0 auto;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:16px}
.footer-brand .logo-text{font-weight:700;font-size:1rem}
.footer-brand p{font-size:.8rem;color:var(--text-dim);margin-top:4px}
.footer-nav{display:flex;gap:16px}
.footer-nav a{font-size:.82rem;color:var(--text-muted)}
.footer-nav a:hover{color:var(--text)}
.footer-meta{font-size:.78rem;color:var(--text-dim)}

/* Responsive */
@media(max-width:600px){
  .header-inner{padding:0 16px}
  .site-nav{gap:12px}
  .site-nav a{font-size:.82rem}
  .hero{padding:48px 16px 40px}
  .workspace,.examples,.guide{padding:32px 16px}
  .panel-toolbar{padding:8px 12px}
  .toolbar-left,.toolbar-right{gap:6px}
  .input-project-name{width:120px}
  .footer-inner{flex-direction:column;align-items:flex-start}
}
@media print{
  .site-header,.site-footer,.hero,.examples,.guide,.output-actions,.tag-controls,.panel-toolbar,.btn{display:none!important}
  .workspace-layout{grid-template-columns:1fr}
  .output-preview{max-height:none;border:none;padding:0}
  body{background:#fff;color:#000}
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
