
:root {
    --ink: #0e0e12;
    --paper: #f5f2eb;
    --cream: #ede9df;
    --red: #c8392b;
    --red-dark: #9b2a1e;
    --gold: #c9a84c;
    --muted: #7a756a;
    --border: #d4cfc4;
    --card: #ffffff;
    --input-bg: #faf9f6;
    --section-w: 860px;
}

/* ── PROGRESS BAR ─────────────────────────────────────────── */
.progress-bar-wrap {
    background: var(--ink);
    border-top: 1px solid #222;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.progress-inner {
    max-width: var(--section-w);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 0;
}

.progress-track {
    flex: 1;
    height: 3px;
    background: #333;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gold);
    border-radius: 2px;
    width: 0%;
    transition: width 0.4s ease;
}

.progress-label {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    color: #666;
    white-space: nowrap;
}

.progress-count {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    color: var(--gold);
    white-space: nowrap;
}

/* ── MAIN FORM ────────────────────────────────────────────── */
main {
    max-width: var(--section-w);
    margin: 0 auto;
    padding: 48px 32px 80px;
}

.intro-strip {
    background: var(--cream);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 20px 24px;
    margin-bottom: 48px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.intro-strip svg { flex-shrink: 0; margin-top: 2px; }

.intro-strip p {
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.65;
    font-family: 'DM Mono', monospace;
}

.intro-strip strong { color: var(--ink); }

/* ── SECTION CARD ─────────────────────────────────────────── */
.section-card {
    margin-bottom: 40px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.section-header {
    background: var(--ink);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    user-select: none;
}

.section-header .section-num {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    color: var(--gold);
    letter-spacing: 0.1em;
    background: rgba(201,168,76,0.12);
    border: 1px solid rgba(201,168,76,0.3);
    border-radius: 2px;
    padding: 2px 7px;
    flex-shrink: 0;
}

.section-header h2 {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: var(--paper);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    flex: 1;
}

.section-header .section-sub {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    color: #666;
}

.chevron {
    color: #666;
    transition: transform 0.3s;
    flex-shrink: 0;
}

.section-card.open .chevron { transform: rotate(180deg); }

.section-body {
    padding: 28px 24px;
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.section-card.open .section-body { display: grid; }

.section-body.full-width { grid-template-columns: 1fr; }

/* ── FIELD GROUP ──────────────────────────────────────────── */
.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field.span-2 { grid-column: 1 / -1; }

.field label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    font-family: 'DM Mono', monospace;
    display: flex;
    align-items: center;
    gap: 6px;
}

.field label .req { color: var(--red); font-size: 10px; }
.field label .opt { color: #bbb; font-weight: 400; font-size: 10px; }

.field input,
.field select,
.field textarea {
    background: var(--input-bg);
    border: 1.5px solid var(--border);
    border-radius: 4px;
    padding: 10px 13px;
    font-family: 'Syne', sans-serif;
    font-size: 14px;
    color: var(--ink);
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    outline: none;
    -webkit-appearance: none;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201,168,76,0.12);
}

.field input.filled,
.field textarea.filled {
    border-color: rgba(201,168,76,0.5);
    background: #fffef9;
}

.field textarea { resize: vertical; min-height: 90px; line-height: 1.5; }

.field .hint {
    font-size: 11px;
    color: var(--muted);
    font-family: 'DM Mono', monospace;
    line-height: 1.5;
}

/* ── CHECKBOXES (variant selection) ──────────────────────── */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.variant-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    background: var(--input-bg);
}

.variant-check:hover { border-color: var(--gold); }
.variant-check input[type="checkbox"] { margin-top: 2px; accent-color: var(--red); width: 15px; height: 15px; flex-shrink: 0; }
.variant-check.checked { border-color: var(--gold); background: #fffef7; }

.variant-check .vc-title {
    font-weight: 700;
    font-size: 12px;
    display: block;
    line-height: 1.3;
    margin-bottom: 2px;
}

.variant-check .vc-sub {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    color: var(--muted);
    line-height: 1.4;
}

/* ── SUBMIT ZONE ──────────────────────────────────────────── */
.submit-zone {
    background: var(--ink);
    border-radius: 6px;
    padding: 40px 36px;
    margin-top: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.submit-zone::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 200px; height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201,168,76,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.submit-zone h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.8rem;
    color: var(--paper);
    font-weight: 400;
    line-height: 1.2;
}

.submit-zone p {
    font-family: 'DM Mono', monospace;
    font-size: 12px;
    color: #666;
    max-width: 500px;
    line-height: 1.7;
}

.btn-generate {
    background: var(--red);
    color: white;
    border: none;
    padding: 16px 44px;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.btn-generate:hover { background: var(--red-dark); transform: translateY(-1px); }
.btn-generate:active { transform: translateY(0); }

.btn-generate .btn-icon { font-size: 18px; }

/* ── LOADING / RESULT ─────────────────────────────────────── */
#result {
    display: none;
    margin-top: 24px;
    padding: 20px 24px;
    border-radius: 4px;
    font-family: 'DM Mono', monospace;
    font-size: 13px;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

#result.success {
    display: block;
    background: #f0faf4;
    border: 1.5px solid #34a85a;
    color: #1a6b38;
}

#result.error {
    display: block;
    background: #fff0f0;
    border: 1.5px solid var(--red);
    color: var(--red-dark);
}

#result a {
    color: var(--red);
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 8px 18px;
    border: 1.5px solid currentColor;
    border-radius: 3px;
    transition: background 0.2s;
}

#result a:hover { background: rgba(200,57,43,0.06); }

.spinner {
    display: none;
    width: 22px; height: 22px;
    border: 2.5px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── FOOTER ────────────────────────────────────────────────── */
footer {
    text-align: center;
    padding: 32px;
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    color: #bbb;
    border-top: 1px solid var(--border);
}

/* ── MOBILE ─────────────────────────────────────────────── */
@media (max-width: 620px) {
    .header-inner { grid-template-columns: 1fr; }
    .section-body { grid-template-columns: 1fr; }
    .field.span-2 { grid-column: 1; }
    main { padding: 32px 16px 60px; }
}
