 *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  :root {
    --bg: #0f1117;
    --bg2: #161b27;
    --bg3: #1c2333;
    --bg4: #222840;
    --border: rgba(255,255,255,0.08);
    --border2: rgba(255,255,255,0.14);
    --text: #e8eaf0;
    --text2: #8b91a8;
    --text3: #555d75;
    --accent: #4f8ef7;
    --accent2: #3d7aef;
    --green: #3dd68c;
    --green2: #2ab87a;
    --amber: #f5a623;
    --red: #f56565;
    --mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    --sans: 'Inter', system-ui, -apple-system, sans-serif;
    --radius: 10px;
    --radius-sm: 6px;
  }

  body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
  }

  /* ── Layout ── */
  .app { max-width: 820px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }

  /* ── Header ── */
  .header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 0.5px solid var(--border);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
  }
  .header-left {}
  .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
  }
  .logo-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--accent), #7c5cfc);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
  }
  .logo-icon svg { width: 18px; height: 18px; color: white; }
  .logo h1 { font-size: 20px; font-weight: 600; letter-spacing: -0.3px; }
  .logo h1 span { color: var(--accent); }
  .header p { font-size: 13px; color: var(--text2); }
  .badge-static {
    font-size: 10px; font-weight: 500; padding: 3px 8px;
    background: rgba(61,214,140,0.12); color: var(--green);
    border: 0.5px solid rgba(61,214,140,0.25);
    border-radius: 20px; white-space: nowrap; align-self: flex-start;
    margin-top: 4px;
  }

  /* ── Cards ── */
  .card {
    background: var(--bg2);
    border: 0.5px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
  }
  .card-title {
    font-size: 11px; font-weight: 600; letter-spacing: 0.09em;
    text-transform: uppercase; color: var(--text3);
    display: flex; align-items: center; gap: 7px;
    margin-bottom: 1rem;
  }
  .card-title svg { width: 13px; height: 13px; }

  /* ── Grid ── */
  .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
  .grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
  @media (max-width: 600px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
  }

  /* ── Form ── */
  .field { display: flex; flex-direction: column; gap: 5px; }
  .field label {
    font-size: 12px; font-weight: 500; color: var(--text2);
    display: flex; align-items: center; gap: 6px;
  }
  .field input, .field select, .field textarea {
    font-family: var(--sans);
    font-size: 13px;
    background: var(--bg3);
    border: 0.5px solid var(--border2);
    border-radius: var(--radius-sm);
    color: var(--text);
    padding: 8px 11px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    width: 100%;
  }
  .field input::placeholder, .field textarea::placeholder { color: var(--text3); }
  .field input:focus, .field select:focus, .field textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(79,142,247,0.12);
  }
  .field input.error { border-color: var(--red); }
  .field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b91a8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; }
  .field option { background: var(--bg3); }
  .hint { font-size: 11px; color: var(--text3); margin-top: 2px; }

  .badge-req { font-size: 10px; padding: 1px 6px; background: rgba(79,142,247,0.15); color: var(--accent); border-radius: 20px; font-weight: 500; }
  .badge-opt { font-size: 10px; padding: 1px 6px; background: var(--bg4); color: var(--text3); border-radius: 20px; font-weight: 500; }

  /* ── Toggle ── */
  .toggle-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 0;
    border-top: 0.5px solid var(--border);
    margin-top: 8px;
    gap: 1rem;
  }
  .toggle-label { }
  .toggle-label strong { font-size: 13px; font-weight: 500; display: block; }
  .toggle-label small { font-size: 11px; color: var(--text3); }
  .toggle-wrap { position: relative; width: 40px; height: 22px; flex-shrink: 0; }
  .toggle-wrap input { opacity: 0; width: 0; height: 0; position: absolute; }
  .toggle-track {
    position: absolute; inset: 0;
    background: var(--bg4); border-radius: 22px; cursor: pointer;
    border: 0.5px solid var(--border2);
    transition: background 0.2s;
  }
  .toggle-track::before {
    content: ''; position: absolute;
    width: 16px; height: 16px; left: 3px; top: 3px;
    background: var(--text2); border-radius: 50%;
    transition: transform 0.2s, background 0.2s;
  }
  .toggle-wrap input:checked + .toggle-track { background: var(--green2); border-color: var(--green2); }
  .toggle-wrap input:checked + .toggle-track::before { transform: translateX(18px); background: white; }

  /* ── SAN entries ── */
  .san-entry { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
  .san-entry select { width: 80px; flex-shrink: 0; }
  .san-entry input { flex: 1; }
  .rm-btn {
    background: none; border: 0.5px solid var(--border2);
    border-radius: var(--radius-sm); padding: 6px 9px;
    color: var(--text3); cursor: pointer; flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
  }
  .rm-btn:hover { background: rgba(245,101,101,0.1); color: var(--red); border-color: rgba(245,101,101,0.3); }
  .add-san-btn {
    width: 100%; background: none; border: 0.5px dashed var(--border2);
    border-radius: var(--radius-sm); padding: 8px;
    color: var(--text3); cursor: pointer; font-size: 12px;
    transition: background 0.15s, color 0.15s; margin-top: 4px;
  }
  .add-san-btn:hover { background: var(--bg3); color: var(--text); }

  /* ── Generate button ── */
  .gen-btn {
    width: 100%; margin-top: 1.25rem;
    background: var(--accent); color: white;
    border: none; border-radius: var(--radius);
    padding: 12px; font-size: 14px; font-weight: 600;
    cursor: pointer; display: flex; align-items: center;
    justify-content: center; gap: 8px;
    transition: background 0.15s, transform 0.1s;
    letter-spacing: -0.1px;
  }
  .gen-btn:hover { background: var(--accent2); }
  .gen-btn:active { transform: scale(0.99); }
  .gen-btn svg { width: 16px; height: 16px; }

  /* ── Output ── */
  .output-section { margin-top: 1.5rem; }
  .tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
  .tab {
    padding: 6px 14px; border-radius: 20px;
    font-size: 12px; font-weight: 500;
    border: 0.5px solid var(--border2);
    background: var(--bg2); color: var(--text2);
    cursor: pointer; transition: all 0.15s;
  }
  .tab:hover { background: var(--bg3); color: var(--text); }
  .tab.active { background: var(--accent); color: white; border-color: var(--accent); }

  .cmd-card {
    background: var(--bg2);
    border: 0.5px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
  }
  .cmd-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg3);
    border-bottom: 0.5px solid var(--border);
  }
  .cmd-label { font-size: 11px; font-weight: 500; color: var(--text3); display: flex; align-items: center; gap: 6px; }
  .cmd-label svg { width: 12px; height: 12px; }
  .cmd-actions { display: flex; gap: 6px; }
  .copy-btn, .dl-btn {
    background: var(--bg4); border: 0.5px solid var(--border2);
    border-radius: var(--radius-sm); padding: 4px 10px;
    font-size: 11px; font-weight: 500; color: var(--text2);
    cursor: pointer; display: flex; align-items: center; gap: 5px;
    transition: background 0.15s, color 0.15s;
  }
  .copy-btn:hover { background: rgba(79,142,247,0.15); color: var(--accent); }
  .dl-btn:hover { background: rgba(61,214,140,0.12); color: var(--green); }
  .copy-btn.ok { background: rgba(61,214,140,0.12); color: var(--green); border-color: rgba(61,214,140,0.3); }
  .copy-btn svg, .dl-btn svg { width: 12px; height: 12px; }

  pre.cmd {
    font-family: var(--mono); font-size: 12.5px; line-height: 1.75;
    padding: 1.1rem 1.25rem; color: var(--text);
    white-space: pre-wrap; word-break: break-all;
    overflow-x: auto;
  }
  pre.cmd .kw { color: #7c9ef8; }
  pre.cmd .sub { color: #a78bfa; }
  pre.cmd .flag { color: var(--green); }
  pre.cmd .val { color: #f9a72b; }
  pre.cmd .sep { color: var(--text3); }

  /* ── Note box ── */
  .note {
    margin-top: 10px;
    background: rgba(79,142,247,0.07);
    border: 0.5px solid rgba(79,142,247,0.2);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 12px; color: var(--text2); line-height: 1.6;
  }
  .note strong { color: var(--accent); font-weight: 500; }

  /* ── Divider ── */
  hr { border: none; border-top: 0.5px solid var(--border); margin: 1rem 0; }

  /* ── FAQ ── */
  .faq-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 0.5px solid var(--border);
  }
  .faq-heading {
    font-size: 14px; font-weight: 600; color: var(--text2);
    letter-spacing: 0.04em; text-transform: uppercase;
    margin-bottom: 1.25rem;
  }
  .faq-item {
    padding: 1rem 0;
    border-bottom: 0.5px solid var(--border);
  }
  .faq-item:last-child { border-bottom: none; }
  .faq-q {
    font-size: 14px; font-weight: 500; color: var(--text);
    margin-bottom: 6px; line-height: 1.5;
  }
  .faq-a {
    font-size: 13px; color: var(--text2); line-height: 1.7;
  }
  .faq-a code {
    font-family: var(--mono); font-size: 12px;
    background: var(--bg3); color: var(--accent);
    padding: 1px 5px; border-radius: 4px;
    border: 0.5px solid var(--border2);
  }

  /* ── Footer ── */
  .site-footer {
    margin-top: 2.5rem;
    padding: 1.5rem 0 0;
    border-top: 0.5px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 8px;
    font-size: 12px; color: var(--text3);
  }
  .site-footer a {
    color: var(--text3); text-decoration: none;
    transition: color 0.15s;
  }
  .site-footer a:hover { color: var(--accent); }

  /* ── Scrollbar ── */
  ::-webkit-scrollbar { width: 6px; height: 6px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }