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

:root {
    --white:      #ffffff;
    --surface:    #f8f7f5;
    --border:     #e8e4df;
    --text:       #1a1714;
    --muted:      #6b6560;
    --accent:     #c47d2e;
    --accent-bg:  #fdf3e7;
    --error-bg:   #fff5f5;
    --error-border:#fecaca;
    --nav-h:      64px;
}

html { scroll-behavior: smooth; }

body {
    background: var(--white);
    color: var(--text);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
}

.nav {
    position: sticky;
    top: 0;
    height: var(--nav-h);
    background: rgba(255,255,255,0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
}

.nav-logo {
    font-family: "DM Serif Display", Georgia, serif;
    font-size: 1.15rem;
    color: var(--text);
    text-decoration: none;
}

.nav-logo span { color: var(--accent); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 7px 14px;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--text); background: var(--surface); }

.nav-user {
    font-size: 0.875rem;
    color: var(--muted);
    padding: 7px 14px;
}

.nav-cta {
    background: var(--text) !important;
    color: var(--white) !important;
    border-radius: 8px !important;
    padding: 8px 18px !important;
    margin-left: 8px;
    font-weight: 600 !important;
}

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    padding: 7px 10px;
    color: var(--text);
}

.nav-drawer {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
}

.nav-drawer.open { display: block; }

.drawer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
}

.drawer-panel {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: min(300px, 82vw);
    background: var(--white);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.drawer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.drawer-brand {
    font-family: "DM Serif Display", Georgia, serif;
    font-size: 1.1rem;
}

.drawer-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted);
}

.drawer-panel a {
    display: block;
    color: var(--text);
    text-decoration: none;
    font-size: 0.975rem;
    font-weight: 500;
    padding: 12px 14px;
    border-radius: 8px;
}

.drawer-panel a:hover { background: var(--surface); }

.drawer-cta {
    margin-top: 12px;
    background: var(--text) !important;
    color: var(--white) !important;
    text-align: center;
    font-weight: 600 !important;
}

.page-main {
    max-width: 720px;
    margin: 0 auto;
    padding: 48px 24px 80px;
}

.page-main.wide {
    max-width: 860px;
}

.page-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-bg);
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 20px;
}

.page-title {
    font-family: "DM Serif Display", Georgia, serif;
    font-size: clamp(2rem, 5vw, 2.8rem);
    line-height: 1.15;
    letter-spacing: -0.025em;
    margin-bottom: 12px;
}

.page-sub {
    color: var(--muted);
    font-size: 1.05rem;
    margin-bottom: 32px;
    max-width: 52ch;
}

.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04), 0 8px 32px rgba(0,0,0,0.06);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.form-group .hint {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 6px;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--white);
    color: var(--text);
    transition: border-color 0.15s;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-textarea {
    min-height: 110px;
    resize: vertical;
}

.upload-zone {
    display: block;
    padding: 36px 24px;
    border: 2px dashed var(--border);
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    background: var(--surface);
    transition: border-color 0.2s, background 0.2s;
    margin-bottom: 4px;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--accent);
    background: var(--accent-bg);
}

.upload-zone input[type="file"] { display: none; }

.upload-zone-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.upload-zone-hint {
    font-size: 0.82rem;
    color: var(--muted);
}

.btn-primary {
    display: block;
    width: 100%;
    padding: 14px 24px;
    background: var(--text);
    color: var(--white);
    font-size: 0.975rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: opacity 0.15s;
}

.btn-primary:hover { opacity: 0.85; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
    display: inline-block;
    padding: 12px 20px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

.alert {
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.alert-error {
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    color: #991b1b;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.form-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 0.875rem;
    color: var(--muted);
}

.form-footer a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.section-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 28px 0;
}

.dashboard-welcome {
    margin-bottom: 28px;
}

.field-optional {
    font-weight: 400;
    color: var(--muted);
    font-size: 0.8rem;
}

#status { display: none; margin-top: 20px; }
.status-label {
    font-size: 0.875rem;
    color: var(--muted);
    margin-bottom: 10px;
    text-align: center;
}
.progress-track {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    height: 6px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: var(--accent);
    width: 0%;
    transition: width 0.4s ease;
}

#result { display: none; margin-top: 24px; }
.result-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px 24px;
    text-align: center;
}
.result-card.error { background: var(--error-bg); border-color: var(--error-border); }
.result-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; }
.result-body { font-size: 0.875rem; color: var(--muted); margin-bottom: 20px; }
.btn-view {
    display: inline-block;
    padding: 11px 28px;
    background: var(--text);
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
}

.footer {
    border-top: 1px solid var(--border);
    padding: 28px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-copy { font-size: 0.8rem; color: var(--muted); }
.footer-links { display: flex; gap: 20px; }
.footer-links a {
    font-size: 0.8rem;
    color: var(--muted);
    text-decoration: none;
}

@media (max-width: 768px) {
    .nav { padding: 0 16px; }
    .nav-links { display: none; }
    .nav-toggle { display: flex; }
    .page-main { padding: 32px 16px 64px; }
    .card { padding: 24px 16px; }
    .footer { padding: 20px 16px; flex-direction: column; align-items: flex-start; }
}
