:root {
    --primary: #004aad;
    --primary-hover: #003380;
    --danger: #dc2626;
    --success: #059669;
    --bg: #f8f9fc;
    --surface: #ffffff;
    --text: #333333;
    --text-light: #64748b;
    --border: #e2e8f0;
}

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

body {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

.tool-header {
    text-align: center;
    padding: 2rem 1rem 1.5rem;
    position: relative;
}

.back-link {
    position: absolute;
    top: 2rem;
    left: 0;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.back-link:hover {
    text-decoration: underline;
}

h1 {
    font-size: 2.2rem;
    color: var(--primary);
    margin: 0 0 0.75rem;
    letter-spacing: -0.02em;
}

.hero-text {
    color: var(--text-light);
    font-size: 1rem;
    max-width: 640px;
    margin: 0 auto 1.25rem;
}

.badge-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    background: #e0f2fe;
    color: #0284c7;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.how-to {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 1.25rem 0 1.5rem;
    flex-wrap: wrap;
}

.step {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.step-num {
    background: var(--primary);
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.step-arrow {
    color: var(--text-light);
    font-size: 1.2rem;
}

.file-drop-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 2rem;
    border: 2px dashed var(--border);
    border-radius: 12px;
    background: var(--surface);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    text-align: center;
    gap: 0.4rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.file-drop-area:hover,
.file-drop-area.drag-over {
    border-color: var(--primary);
    background: #f0f6ff;
}

.file-drop-area.rejected {
    border-color: var(--danger);
    background: #fff5f5;
}

.file-drop-area input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.drop-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.drop-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary);
}

.drop-hint {
    font-size: 0.85rem;
    color: var(--text-light);
}

.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--danger);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    display: none;
    margin-bottom: 1rem;
}

.error-message.visible {
    display: block;
}

.workspace {
    display: none;
}

.workspace.visible {
    display: block;
}

.hidden {
    display: none !important;
}

.btn {
    padding: 10px 22px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s, box-shadow 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:not(:disabled):hover {
    background: var(--primary-hover);
    box-shadow: 0 2px 8px rgba(0, 74, 173, 0.25);
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid var(--border);
}

.btn-secondary:not(:disabled):hover {
    background: #e2e8f0;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:not(:disabled):hover {
    background: #047857;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25);
}

.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 4rem 1rem;
    text-align: center;
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
}

.mission-statement {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.site-main {
    max-width: 1000px;
    margin: -3rem auto 4rem;
    padding: 0 1rem;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.tool-card {
    background: var(--surface);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    border: 1px solid transparent;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.tool-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.tool-card h3 {
    margin: 0 0 0.5rem;
    color: var(--primary);
    font-size: 1.4rem;
}

.tool-card p {
    color: var(--text-light);
    margin: 0 0 1.5rem;
    flex-grow: 1;
}

.tool-action {
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.tool-action::after {
    content: "→";
    transition: margin-left 0.2s;
}

.tool-card:hover .tool-action::after {
    margin-left: 8px;
}

.tool-card-muted {
    opacity: 0.7;
    cursor: default;
    border-style: dashed;
    border-color: #cbd5e1;
}

.site-footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.vibe-callout {
    background: #f1f5f9;
    padding: 2rem;
    border-radius: 12px;
    margin-top: 4rem;
    text-align: center;
}

.vibe-callout h2 {
    margin-top: 0;
    font-size: 1.2rem;
    color: #475569;
}

.vibe-callout p {
    max-width: 700px;
    margin: 0 auto;
    color: var(--text-light);
}

@media (max-width: 640px) {
    h1 {
        font-size: 1.6rem;
    }

    .back-link {
        position: static;
        display: inline-block;
        margin-bottom: 0.75rem;
    }

    .how-to {
        gap: 0.35rem;
    }

    .step-arrow {
        display: none;
    }
}
