/* DecideDomain - Refined Dark Theme */
/* Typography: Sora (display) + System (body) + JetBrains Mono (code) */
/* Fonts loaded via preload in HTML for better performance */

/* Accessibility - Skip link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent);
    color: white;
    padding: 8px 16px;
    z-index: 100;
    transition: top 0.3s;
    text-decoration: none;
    border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus {
    top: 0;
}

/* Screen reader only */
.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;
}

:root {
    /* Color Palette - Sophisticated Teal Accent */
    --bg-deep: #050506;
    --bg-primary: #09090b;
    --bg-elevated: #0f0f12;
    --bg-surface: #141418;
    --bg-hover: #1a1a1f;

    --text-primary: #fafafa;
    --text-secondary: #94949c;
    --text-muted: #5c5c66;
    --text-faint: #6a6a72; /* Improved contrast: 4.5:1 ratio */

    --accent: #14b8a6;
    --accent-light: #2dd4bf;
    --accent-muted: rgba(20, 184, 166, 0.15);
    --accent-glow: rgba(20, 184, 166, 0.25);

    --success: #10b981;
    --success-muted: rgba(16, 185, 129, 0.12);
    --error: #f43f5e;
    --error-muted: rgba(244, 63, 94, 0.12);
    --warning: #f59e0b;
    --warning-muted: rgba(245, 158, 11, 0.12);

    --border: rgba(255, 255, 255, 0.06);
    --border-subtle: rgba(255, 255, 255, 0.03);
    --border-accent: rgba(20, 184, 166, 0.3);

    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px var(--accent-glow);

    --font-display: 'Sora', system-ui, sans-serif;
    --font-body: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', monospace;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Accessibility: Focus Visible States (WCAG 2.4.7) */
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible,
[role="button"]:focus-visible,
.wizard-chip:focus-visible,
.toggle:focus-visible,
.page-btn:focus-visible,
.modal-close:focus-visible,
.toast-close:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Accessibility: Screen reader only utility */
.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;
}

/* Accessibility: Skip link for keyboard users */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent);
    color: var(--bg-deep);
    padding: 8px 16px;
    z-index: 10000;
    font-weight: 600;
    border-radius: 0 0 var(--radius-sm) 0;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
}

/* Accessibility: Reduced Motion (WCAG 2.3.3) */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

body {
    font-family: var(--font-body);
    background: var(--bg-deep);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Subtle background texture */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(20, 184, 166, 0.08), transparent),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(20, 184, 166, 0.03), transparent);
    pointer-events: none;
    z-index: -1;
}

/* Container */
.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 48px 24px 10px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 56px;
    animation: fadeInDown 0.6s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 12px;
}

.logo-img {
    height: 44px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(20, 184, 166, 0.2));
}

header h1 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.seo-summary {
    color: var(--text-faint);
    font-size: 0.85rem;
    font-weight: 400;
    max-width: 480px;
    margin: 8px auto 0;
    line-height: 1.5;
}

/* Sections */
section {
    animation: fadeIn 0.4s ease-out;
}

section.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--text-primary);
}

.back-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    font-weight: 500;
}

.back-btn:hover {
    color: var(--text-primary);
    background: var(--bg-surface);
    border-color: var(--border-accent);
}

/* Input Group */
.input-group {
    display: flex;
    align-items: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: 28px;
    transition: all 0.25s ease;
}

.input-group:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-muted), var(--shadow-glow);
}

.input-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.input-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.input-group input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    padding: 14px 16px 14px 0;
    outline: none;
    width: 100%;
}

.input-group input::placeholder {
    color: var(--text-muted);
}

/* Search Options Container */
.search-options {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
}

/* Section Labels */
.section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.label-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* TLD Section */
.tld-section {
    margin-bottom: 16px;
}

.tld-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 8px;
}

.tld-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 8px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: all 0.15s ease;
}

.tld-btn:hover {
    border-color: var(--text-muted);
    color: var(--text-secondary);
    background: var(--bg-hover);
}

.tld-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.tld-btn.active:hover {
    background: var(--accent-light);
    border-color: var(--accent-light);
}

.tld-check {
    display: none;
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

.tld-btn.active .tld-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tld-btn.active .tld-check::before {
    content: '';
    display: block;
    width: 8px;
    height: 5px;
    border-left: 2px solid white;
    border-bottom: 2px solid white;
    transform: rotate(-45deg);
    margin-top: -2px;
}

/* Include Word Section */
.include-word-section {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.include-word-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease;
}

.include-word-toggle:hover {
    color: var(--accent);
}

.include-word-toggle svg {
    transition: transform 0.2s ease;
}

.include-word-toggle.active svg {
    transform: rotate(45deg);
}

.include-word-content {
    margin-top: 12px;
    padding: 16px;
    background: var(--bg-surface);
    border-radius: var(--radius-sm);
    animation: slideDown 0.2s ease;
}

.include-word-content.hidden {
    display: none;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.include-word-input {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: var(--font-mono);
    margin-bottom: 12px;
    transition: border-color 0.2s ease;
}

.include-word-input:focus {
    outline: none;
    border-color: var(--accent);
}

.include-word-input::placeholder {
    color: var(--text-muted);
    font-family: var(--font-body);
}

.position-options {
    display: flex;
    gap: 8px;
}

.position-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.position-option:hover {
    border-color: var(--text-muted);
    color: var(--text-secondary);
}

.position-option input {
    display: none;
}

.position-option:has(input:checked) {
    background: var(--accent-muted);
    border-color: var(--accent);
    color: var(--accent);
}

/* Legacy options-row support */
.options-row {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.options-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Toggle Switch */
.toggle-row {
    display: flex;
    justify-content: center;
    margin-bottom: 28px;
}

.toggle-row.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.toggle-row.disabled .toggle-label {
    text-decoration: line-through;
}

.toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.toggle input {
    display: none;
}

.slider {
    width: 44px;
    height: 24px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    position: relative;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.slider::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: var(--text-muted);
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: all 0.25s ease;
}

.toggle input:checked + .slider {
    background: var(--accent-muted);
    border-color: var(--accent);
}

.toggle input:checked + .slider::after {
    transform: translateX(20px);
    background: var(--accent);
}

.toggle-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Buttons */
.primary-btn {
    width: 100%;
    padding: 16px 28px;
    background: linear-gradient(135deg, var(--accent) 0%, #0d9488 100%);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font-display);
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.primary-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.1) 100%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.primary-btn:hover:not(:disabled)::before {
    opacity: 1;
}

.primary-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow), var(--shadow-md);
}

.primary-btn:active:not(:disabled) {
    transform: translateY(0) scale(0.99);
}

.primary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.secondary-btn {
    padding: 12px 24px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 16px;
}

.secondary-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-accent);
}

.btn-loading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-loading.hidden, .btn-text.hidden {
    display: none;
}

/* Spinner */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Progress */
.progress-container {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 24px;
}

.progress-bar {
    height: 6px;
    background: var(--bg-surface);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 16px;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: 3px;
    transition: width 0.4s ease;
    box-shadow: 0 0 12px var(--accent-glow);
}

.progress-text {
    text-align: center;
    font-size: 0.85rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    margin-bottom: 16px;
}

.progress-stats {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
}

.stat {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.stat strong {
    font-family: var(--font-mono);
    color: var(--text-primary);
}

.stat.available strong {
    color: var(--success);
}

.stat.taken strong {
    color: var(--error);
}

.stat.errors strong {
    color: var(--warning);
}

/* Terminal Log */
.terminal-log {
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    height: 280px;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

/* Stop Anytime Hint */
.stop-hint {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.08) 0%, rgba(20, 184, 166, 0.04) 100%);
    border: 1px solid rgba(20, 184, 166, 0.2);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    animation: hintFadeIn 0.5s ease-out, hintGlow 3s ease-in-out infinite;
}

.stop-hint.hidden {
    display: none;
}

@keyframes hintFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes hintGlow {
    0%, 100% {
        box-shadow: 0 0 0 0 transparent;
    }
    50% {
        box-shadow: 0 0 20px rgba(20, 184, 166, 0.1);
    }
}

.stop-hint-icon {
    width: 22px;
    height: 22px;
    color: var(--accent);
    flex-shrink: 0;
    animation: pausePulse 2s ease-in-out infinite;
}

@keyframes pausePulse {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

.stop-hint-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.stop-hint-text strong {
    color: var(--accent);
    font-weight: 600;
}

@media (max-width: 640px) {
    .stop-hint {
        padding: 12px 14px;
        gap: 10px;
    }

    .stop-hint-icon {
        width: 20px;
        height: 20px;
    }

    .stop-hint-text {
        font-size: 0.85rem;
    }
}

.terminal-log::-webkit-scrollbar {
    width: 6px;
}

.terminal-log::-webkit-scrollbar-track {
    background: transparent;
}

.terminal-log::-webkit-scrollbar-thumb {
    background: var(--bg-surface);
    border-radius: 3px;
}

.log-entry {
    padding: 4px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: logFadeIn 0.15s ease;
}

@keyframes logFadeIn {
    from { opacity: 0; transform: translateX(-4px); }
    to { opacity: 1; transform: translateX(0); }
}

.log-entry.available {
    color: var(--success);
}

.log-entry.taken {
    color: var(--text-faint);
}

.log-entry.error {
    color: var(--warning);
}

.log-entry.info {
    color: var(--text-muted);
}

.log-entry.loading {
    color: var(--accent);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.log-timestamp {
    color: var(--text-faint);
    font-size: 13px;  /* Accessibility: increased from 11px */
    min-width: 60px;
}

.log-icon {
    width: 14px;
    text-align: center;
}

.log-domain {
    flex: 1;
}

.log-score {
    color: var(--accent);
    font-size: 13px;  /* Accessibility: increased from 11px */
}

/* Results Summary */
.results-summary {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 24px;
    margin-bottom: 20px;
    display: flex;
    gap: 28px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Domain List */
.domain-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 420px;
    overflow-y: auto;
    contain: layout paint;
}

.domain-list:empty::after {
    content: 'Domains will appear here...';
    color: var(--text-muted);
    font-style: italic;
    padding: 32px;
    text-align: center;
}

.domain-list::-webkit-scrollbar {
    width: 6px;
}

.domain-list::-webkit-scrollbar-track {
    background: transparent;
}

.domain-list::-webkit-scrollbar-thumb {
    background: var(--bg-surface);
    border-radius: 3px;
}

.domain-item {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--success-muted);
    border: 1px solid rgba(16, 185, 129, 0.15);
    animation: slideIn 0.25s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-8px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.domain-name {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 500;
}

.domain-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 14px;
}

.domain-cta {
    display: flex;
    align-items: center;
    gap: 14px;
}

.cta-price {
    font-weight: 600;
    font-family: var(--font-mono);
    color: var(--success);
    font-size: 0.9rem;
}

.cta-btn {
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.cta-btn.btn-primary {
    background: var(--accent);
    color: white;
}

.cta-btn.btn-primary:hover {
    background: var(--accent-light);
    box-shadow: 0 4px 16px var(--accent-glow);
}

.cta-btn.btn-accent {
    background: linear-gradient(135deg, var(--warning), #d97706);
    color: white;
}

.cta-btn.btn-accent:hover {
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

.cta-btn.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.cta-btn.btn-secondary:hover {
    border-color: var(--accent);
}

/* Selectable Domain List */
.domain-list.selectable .domain-item {
    cursor: pointer;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.domain-list.selectable .domain-item:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
}

.domain-list.selectable .domain-item.selected {
    background: var(--accent-muted);
    border-color: var(--accent);
}

.domain-item .checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.domain-item.selected .checkbox {
    background: var(--accent);
    border-color: var(--accent);
}

.domain-item.selected .checkbox::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Domain Score Badge */
.domain-score {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: var(--radius-xs);
    font-weight: 600;
    font-family: var(--font-mono);
}

.domain-score.high {
    background: var(--success-muted);
    color: var(--success);
}

.domain-score.medium {
    background: var(--accent-muted);
    color: var(--accent);
}

.domain-score.low {
    background: var(--bg-hover);
    color: var(--text-muted);
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 20px 0;
}

.page-btn {
    padding: 10px 18px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-btn:hover:not(:disabled) {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--accent);
}

.page-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.page-info {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-family: var(--font-mono);
}

/* Error Toast */
.error-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--error);
    color: white;
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    animation: toastSlideUp 0.3s ease;
}

.error-toast.hidden {
    display: none;
}

@keyframes toastSlideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.toast-close {
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    width: 44px;   /* Accessibility: minimum touch target */
    height: 44px;  /* Accessibility: minimum touch target */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.toast-close:hover {
    background: rgba(255,255,255,0.25);
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    contain: layout style;
    animation: modalFadeIn 0.25s ease;
}

.modal.hidden {
    display: none;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    max-width: 420px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.modal-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    width: 44px;   /* Accessibility: minimum touch target */
    height: 44px;  /* Accessibility: minimum touch target */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--accent);
}

/* Login Steps */
.login-step {
    text-align: center;
}

.login-step.hidden {
    display: none;
}

/* Modal Icons */
.modal-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.modal-icon svg {
    color: var(--accent);
}

/* Status Icons (verify page) */
.status-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.status-icon.success svg {
    color: var(--success);
}

.status-icon.error svg {
    color: var(--error);
}

/* Modal Input */
.modal-content .input-group {
    margin-bottom: 20px;
}

.modal-content .input-group input {
    padding: 14px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
    width: 100%;
    transition: all 0.2s ease;
}

.modal-content .input-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-muted);
}

/* Checkout Modal */
.checkout-domain {
    font-family: var(--font-mono);
    font-size: 1.5rem !important;
    font-weight: 600;
    color: var(--accent) !important;
    margin: 20px 0 !important;
}

.checkout-options {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.whois-help-btn {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    padding: 0;
    transition: color 0.2s ease;
}

.whois-help-btn:hover {
    color: var(--accent-light);
}

.whois-explanation {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 16px;
    animation: fadeIn 0.2s ease;
}

.whois-explanation.hidden {
    display: none;
}

.whois-explanation p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.whois-explanation p:first-child {
    color: var(--text-primary);
    margin-bottom: 8px;
}

.checkout-summary {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border);
    padding: 20px !important;
    border-radius: var(--radius-sm) !important;
    margin: 24px 0 !important;
}

/* Checkout Loading */
.checkout-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 32px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.checkout-loading.hidden {
    display: none;
}

.checkout-loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    color: var(--text-secondary);
}

.summary-row.total {
    border-top: 1px solid var(--border);
    padding-top: 16px;
    margin-top: 8px;
    color: var(--text-primary);
    font-weight: 600;
}

/* Modal Form Utilities */
.modal-input-group {
    margin: 20px 0;
}

.modal-input-full {
    width: 100%;
}

.modal-btn-full {
    width: 100%;
}

.modal-btn-mt {
    margin-top: 20px;
}

.checkout-domain-display {
    font-size: 24px;
    font-weight: 600;
    color: var(--accent);
    margin: 16px 0;
}

.checkout-options-group {
    margin: 20px 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin: 8px 0;
}

.summary-row.hidden-row {
    display: none;
}

/* Text Helpers */
.text-muted {
    color: var(--text-secondary);
}

/* Dev Panel - Hidden by default, only shown via JS on dev environments */
.dev-panel {
    display: none !important; /* FAILSAFE: Always hidden by default */
    background: var(--bg-elevated);
    border: 1px dashed var(--warning);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 28px;
}

/* Only show when JS explicitly removes .hidden class on dev environments */
.dev-panel:not(.hidden) {
    display: block !important;
}

.dev-panel-header {
    font-weight: 600;
    color: var(--warning);
    margin-bottom: 12px;
    font-size: 0.85rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dev-panel-content {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.dev-panel .cta-btn {
    background: var(--warning);
    color: #000;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.dev-panel .cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
}

/* Responsive */
@media (max-width: 640px) {
    .container {
        padding: 32px 16px;
    }

    header {
        margin-bottom: 40px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .logo {
        flex-direction: column;
        gap: 12px;
    }

    .progress-stats {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }

    .domain-item {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .domain-info {
        justify-content: space-between;
    }

    .domain-cta {
        justify-content: space-between;
        padding-top: 12px;
        border-top: 1px solid var(--border);
    }

    .options-row {
        gap: 8px;
    }

    .tld-btn {
        padding: 8px 10px;
        font-size: 0.8rem;
    }

    .search-options {
        padding: 16px;
    }

    .tld-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .position-options {
        flex-direction: column;
        gap: 6px;
    }

    .position-option {
        padding: 10px 12px;
    }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5, 5, 6, 0.95);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.loading-overlay.hidden {
    display: none;
}

.loading-content {
    text-align: center;
    max-width: 380px;
    padding: 40px;
}

.loading-spinner-large {
    width: 48px;
    height: 48px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 28px;
}

.loading-progress-container {
    margin-bottom: 28px;
}

.loading-progress-bar {
    height: 4px;
    background: var(--bg-surface);
    border-radius: 2px;
    overflow: hidden;
}

.loading-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: 2px;
    width: 0%;
    transition: width 0.5s ease-out;
}

.loading-status {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.loading-substatus {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Word Lists (if used) */
.word-lists {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.word-column {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
}

.word-column h3 {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.word-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.word-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-surface);
    border-radius: var(--radius-xs);
    font-size: 0.9rem;
    color: var(--text-primary);
}

.word-tag .tag-score {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--accent);
    opacity: 0.8;
}

/* Word Score */
.word-score {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 4px;
    font-weight: 600;
    font-family: var(--font-mono);
}

.word-score.high {
    background: var(--success-muted);
    color: var(--success);
}

.word-score.medium {
    background: var(--accent-muted);
    color: var(--accent);
}

.word-score.low {
    background: var(--bg-hover);
    color: var(--text-muted);
}

/* Select Actions */
.select-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 8px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--accent);
}

.selection-count {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-family: var(--font-mono);
}

/* Export Actions */
.export-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.export-btn {
    flex: 1;
    padding: 14px 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.export-btn:hover:not(:disabled) {
    background: var(--bg-hover);
    border-color: var(--accent);
}

.export-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Status Badge */
.status-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: var(--radius-xs);
    background: var(--success);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Info Text */
.info-text {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 24px;
    font-size: 0.9rem;
}

/* Results Panel */
.results-panel {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 16px;
}

.results-panel h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.results-panel h3 span {
    color: var(--text-secondary);
    font-weight: 400;
}

@media (max-width: 640px) {
    .word-lists {
        grid-template-columns: 1fr;
    }

    .export-actions {
        flex-direction: column;
    }

    .select-actions {
        flex-wrap: wrap;
    }

    .selection-count {
        width: 100%;
        text-align: center;
        margin-left: 0;
        margin-top: 8px;
    }
}

/* ===========================================
   Madlibs Builder Styles
   =========================================== */

/* Category Grid */
.category-grid {
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.category-grid.collapsed {
    margin-bottom: 0;
}

.category-grid.collapsed .step-label,
.category-grid.collapsed .category-cards {
    display: none;
}

.category-grid.hidden {
    display: none;
}

.step-label {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 16px;
    text-align: center;
}

.category-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

@media (max-width: 640px) {
    .category-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

.category-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.category-card:hover {
    border-color: var(--accent);
    background: var(--bg-hover);
    transform: translateY(-2px);
}

.category-card.selected {
    border-color: var(--accent);
    background: var(--accent-muted);
    box-shadow: 0 0 0 3px var(--accent-muted);
}

.category-label {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.category-description {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Input Section */
.input-section {
    animation: fadeIn 0.3s ease;
    margin-bottom: 20px;
}

.input-section.hidden {
    display: none;
}

.back-to-categories {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    margin-bottom: 20px;
    padding: 0;
    transition: color 0.2s ease;
}

.back-to-categories:hover {
    color: var(--accent);
}

/* Main Input Prompt */
.input-prompt {
    margin-bottom: 24px;
}

.prompt-label {
    display: block;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.main-input {
    width: 100%;
    padding: 16px 20px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1.05rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.main-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-muted);
}

.main-input::placeholder {
    color: var(--text-muted);
}

/* Vibe Section */
.vibe-section {
    margin-bottom: 8px;
}

.vibe-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.vibe-label .optional {
    color: var(--text-muted);
    font-size: 0.85em;
}

/* Vibe Chips */
.vibe-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.vibe-chip {
    padding: 8px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vibe-chip:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    background: var(--bg-hover);
}

.vibe-chip.selected {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.vibe-chip.add-custom-vibe {
    border-style: dashed;
    color: var(--text-muted);
}

.vibe-chip.add-custom-vibe:hover {
    border-style: solid;
    color: var(--accent);
}

.vibe-chip.custom {
    background: var(--accent-muted);
    border-color: var(--accent);
    color: var(--accent);
}

.vibe-chip.custom.selected {
    background: var(--accent);
    color: white;
}

.vibe-chip .remove-vibe {
    margin-left: 6px;
    font-weight: bold;
    opacity: 0.7;
}

.vibe-chip .remove-vibe:hover {
    opacity: 1;
}

/* Custom Vibe Input */
.custom-vibe-input {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.custom-vibe-input.hidden {
    display: none;
}

.custom-vibe-input input {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
}

.custom-vibe-input input:focus {
    outline: none;
    border-color: var(--accent);
}

.custom-vibe-input input::placeholder {
    color: var(--text-muted);
}

.add-custom-btn {
    padding: 10px 18px;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-custom-btn:hover {
    background: var(--accent-light);
}

/* Hero Statement - Floating description preview */
.hero-statement {
    margin: 32px 0 24px;
    padding: 0;
    text-align: center;
}

.hero-statement.hidden {
    display: none;
}

.hero-text {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.35;
    letter-spacing: -0.02em;
    margin: 0;
    padding: 16px 0;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.4);
    transition: opacity 0.3s ease;
}

/* Edit manually link - now inside input section */
.edit-raw-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    margin-top: 32px;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
    display: block;
    text-align: center;
    width: 100%;
}

.edit-raw-btn:hover {
    color: var(--accent);
}

/* ===========================================
   Word Count Selection (Domain Length)
   =========================================== */

.word-count-section {
    margin: 20px 0;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.word-count-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.word-count-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.word-count-btn:hover {
    border-color: var(--accent);
    background: var(--bg-hover);
}

.word-count-btn.active {
    background: var(--accent-muted);
    border-color: var(--accent);
}

.word-count-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.word-count-example {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.word-count-btn.active .word-count-label {
    color: var(--accent);
}

.word-count-btn.active .word-count-example {
    color: var(--accent);
    opacity: 0.8;
}

/* ===========================================
   Sub-options (Wordplay numbers, Languages)
   =========================================== */

.sub-options {
    padding: 12px 16px;
    margin: -8px 0 16px 0;
    background: var(--bg-surface);
    border-radius: var(--radius-sm);
    animation: slideDown 0.2s ease;
}

.sub-options.hidden {
    display: none;
}

.sub-toggle {
    margin: 0;
}

.sub-toggle .slider {
    width: 36px;
    height: 20px;
}

.sub-toggle .slider::after {
    width: 14px;
    height: 14px;
    top: 2px;
    left: 2px;
}

.sub-toggle .toggle input:checked + .slider::after {
    transform: translateX(16px);
}

.sub-toggle .toggle-label {
    font-size: 0.85rem;
}

/* ===========================================
   Language Checkboxes
   =========================================== */

.language-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
}

.lang-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

@media (max-width: 640px) {
    .word-count-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .word-count-btn {
        padding: 12px 8px;
    }

    .word-count-label {
        font-size: 0.8rem;
    }

    .word-count-example {
        font-size: 0.7rem;
    }

    .sub-options {
        padding: 10px 12px;
    }
}

/* Raw Editor */
.raw-editor {
    margin-bottom: 20px;
}

.raw-editor.hidden {
    display: none;
}

.raw-editor textarea {
    width: 100%;
    min-height: 100px;
    padding: 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.raw-editor textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.raw-editor textarea::placeholder {
    color: var(--text-muted);
}

.use-builder-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    margin-top: 12px;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.use-builder-btn:hover {
    color: var(--accent);
}

/* Responsive adjustments for input section */
@media (max-width: 640px) {
    .main-input {
        padding: 14px 16px;
        font-size: 1rem;
    }

    .vibe-chip {
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    .prompt-label {
        font-size: 1rem;
    }
}

/* ===========================================
   Generating Phase - Serene AI Loading
   =========================================== */

.generating-phase {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 40px 20px;
    animation: fadeIn 0.4s ease;
}

.generating-phase.hidden {
    display: none;
}

.generating-content {
    text-align: center;
    max-width: 400px;
}

/* Breathing Orb Animation */
.generating-orb {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 32px;
}

.orb-core {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    background: var(--accent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 30px var(--accent), 0 0 60px rgba(45, 212, 191, 0.3);
    animation: orbPulse 2s ease-in-out infinite;
}

.orb-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px solid var(--accent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
}

.orb-ring-1 {
    width: 50px;
    height: 50px;
    animation: orbRing 2s ease-out infinite;
}

.orb-ring-2 {
    width: 80px;
    height: 80px;
    animation: orbRing 2s ease-out infinite 0.4s;
}

.orb-ring-3 {
    width: 110px;
    height: 110px;
    animation: orbRing 2s ease-out infinite 0.8s;
}

@keyframes orbPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 30px var(--accent), 0 0 60px rgba(45, 212, 191, 0.3);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.15);
        box-shadow: 0 0 40px var(--accent), 0 0 80px rgba(45, 212, 191, 0.4);
    }
}

@keyframes orbRing {
    0% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(0.5);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

.generating-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.generating-prompt {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--accent-light);
    line-height: 1.5;
    margin: 0 auto 20px;
    max-width: 500px;
    padding: 16px 24px;
    background: rgba(20, 184, 166, 0.08);
    border: 1px solid rgba(20, 184, 166, 0.2);
    border-radius: var(--radius-md);
    text-align: center;
}

.generating-prompt:empty {
    display: none;
}

.generating-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* Breathing Progress Bar */
.generating-bar {
    width: 100%;
    max-width: 280px;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    margin: 0 auto 16px;
    overflow: hidden;
}

.generating-bar-fill {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--accent), rgba(45, 212, 191, 0.4), var(--accent));
    background-size: 200% 100%;
    border-radius: 2px;
    animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.generating-time {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.generating-reassurance {
    font-size: 0.85rem;
    color: var(--accent);
    opacity: 0;
    animation: fadeInUp 0.4s ease forwards;
}

.generating-reassurance.hidden {
    display: none;
}

.generating-fact {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 16px;
    font-style: italic;
    opacity: 0;
    animation: fadeInUp 0.4s ease forwards;
}

.generating-fact.hidden {
    display: none;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hide checking phase during generation */
#checking-phase.hidden {
    display: none;
}

/* ===========================================
   Difficulty Badge - Helpful Guidance Style
   =========================================== */

.difficulty-badge {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    margin: 16px 0;
    animation: fadeIn 0.3s ease;
    /* Soft, informational blue-teal gradient - feels like helpful guidance */
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.08) 0%, rgba(20, 184, 166, 0.06) 100%);
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.difficulty-badge.hidden {
    display: none;
}

/* Icon wrapper with subtle glow */
.difficulty-icon-wrap {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.difficulty-icon-svg {
    width: 20px;
    height: 20px;
    color: #38bdf8;
    opacity: 0.9;
}

.difficulty-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.difficulty-text {
    font-size: 0.85rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
}

/* Highlight the actionable items */
.difficulty-text strong {
    color: #38bdf8;
    font-weight: 500;
}

/* Remove the harsh color variants - use consistent helpful style */
.difficulty-badge.hard,
.difficulty-badge.medium {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.08) 0%, rgba(20, 184, 166, 0.06) 100%);
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.difficulty-badge.hard .difficulty-text,
.difficulty-badge.medium .difficulty-text {
    color: rgba(255, 255, 255, 0.85);
}

.difficulty-badge.easy {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(16, 185, 129, 0.04) 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.difficulty-badge.easy .difficulty-text {
    color: rgba(255, 255, 255, 0.85);
}

/* ===========================================
   No Results Modal
   =========================================== */

.no-results-content {
    max-width: 480px;
    text-align: center;
}

.no-results-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.no-results-icon svg {
    color: var(--warning);
}

.no-results-message {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 8px;
}

/* Retry Options (multi-select checkboxes) */
.retry-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
    text-align: left;
}

.retry-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.retry-option:hover {
    border-color: var(--accent);
    background: var(--bg-hover);
}

.retry-option:has(input:checked) {
    background: var(--accent-muted);
    border-color: var(--accent);
}

.retry-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--accent);
    cursor: pointer;
    flex-shrink: 0;
}

.retry-option.hidden {
    display: none;
}

.option-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.option-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.option-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.text-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    margin-top: 16px;
    padding: 8px;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.text-btn:hover {
    color: var(--accent);
}

@media (max-width: 640px) {
    .difficulty-badge {
        padding: 10px 14px;
        gap: 8px;
    }

    .difficulty-text {
        font-size: 0.8rem;
    }

    .suggestion-btn {
        padding: 14px 16px;
    }

    .suggestion-title {
        font-size: 0.9rem;
    }
}

/* ===========================================
   Domain Description Wizard - Step-by-Step Builder
   =========================================== */

.wizard-wrapper {
    animation: wizardFadeIn 0.4s ease-out;
}

.wizard-wrapper.hidden {
    display: none;
}

/* Main content area with side navigation */
.wizard-main {
    display: grid;
    grid-template-columns: 80px 1fr 80px;
    gap: 16px;
    align-items: start;
    margin-top: 8px;
}

/* Center content column */
.wizard-center {
    min-width: 0;
}

/* Side navigation columns */
.wizard-nav-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 80px;
    position: sticky;
    top: 100px;
}

.wizard-nav-side.hidden {
    visibility: hidden;
    pointer-events: none;
}

.wizard-nav-left {
    justify-self: end;
}

.wizard-nav-right {
    justify-self: start;
    gap: 12px;
}

/* Mobile bottom navigation - hidden on desktop */
.wizard-nav-mobile {
    display: none;
}

@keyframes wizardFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Text Display - The sentence being built */
.wizard-hero {
    text-align: center;
    padding: 24px 16px 16px;
    margin-top: 8px;
    animation: heroFadeIn 0.4s ease-out;
}

.wizard-hero.hidden {
    display: none;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wizard-hero .hero-text {
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 3.5vw, 1.85rem);
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin: 0;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
}

.hero-prefix {
    color: var(--text-primary);
    font-weight: 400;
}

.hero-connector {
    color: var(--text-primary);
    font-weight: 400;
}

.hero-highlight {
    color: var(--accent-light);
    font-weight: 600;
    position: relative;
}

.hero-placeholder {
    color: var(--text-faint);
    font-weight: 500;
    letter-spacing: 0.1em;
}

.hero-vibe {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 0.9em;
    font-style: italic;
}

/* Progress Indicator */
.wizard-progress {
    position: relative;
    padding: 0 20px;
    margin-bottom: 32px;
}

.progress-dots {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.progress-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.progress-dot::before {
    content: '';
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 2px solid var(--border);
    transition: all 0.25s ease;
}

.progress-dot.completed::before {
    background: var(--accent);
    border-color: var(--accent);
}

.progress-dot.active::before {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-muted);
    animation: dotPulse 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes dotPulse {
    0% {
        transform: scale(0.8);
        box-shadow: 0 0 0 0 var(--accent);
    }
    50% {
        transform: scale(1.3);
        box-shadow: 0 0 0 8px transparent;
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 4px var(--accent-muted);
    }
}

.dot-label {
    font-size: 0.7rem;
    color: var(--text-faint);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0;
    transform: translateY(-4px);
    transition: all 0.2s ease;
}

.progress-dot.active .dot-label,
.progress-dot.completed .dot-label {
    opacity: 1;
    transform: translateY(0);
    color: var(--text-muted);
}

.progress-dot.active .dot-label {
    color: var(--accent);
}

.progress-line {
    position: absolute;
    top: 5px;
    left: 40px;
    right: 40px;
    height: 2px;
    background: var(--border);
    z-index: 1;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 1px;
    box-shadow: 0 0 8px var(--accent-muted);
}

/* Current Step Content */
.wizard-step {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    margin-bottom: 20px;
}

/* Step transition animations */
.wizard-step.step-enter {
    animation: stepSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.wizard-step.step-enter-back {
    animation: stepSlideInBack 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.wizard-step.step-exit {
    animation: stepSlideOut 0.25s cubic-bezier(0.4, 0, 1, 1) forwards;
}

.wizard-step.step-exit-back {
    animation: stepSlideOutBack 0.25s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes stepSlideIn {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes stepSlideInBack {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes stepSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-30px);
    }
}

@keyframes stepSlideOutBack {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(30px);
    }
}

/* Staggered chip reveal animation */
.wizard-step.step-enter .wizard-chip,
.wizard-step.step-enter-back .wizard-chip {
    opacity: 0;
    animation: chipReveal 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.wizard-step.step-enter .wizard-chip:nth-child(1),
.wizard-step.step-enter-back .wizard-chip:nth-child(1) { animation-delay: 0.1s; }
.wizard-step.step-enter .wizard-chip:nth-child(2),
.wizard-step.step-enter-back .wizard-chip:nth-child(2) { animation-delay: 0.13s; }
.wizard-step.step-enter .wizard-chip:nth-child(3),
.wizard-step.step-enter-back .wizard-chip:nth-child(3) { animation-delay: 0.16s; }
.wizard-step.step-enter .wizard-chip:nth-child(4),
.wizard-step.step-enter-back .wizard-chip:nth-child(4) { animation-delay: 0.19s; }
.wizard-step.step-enter .wizard-chip:nth-child(5),
.wizard-step.step-enter-back .wizard-chip:nth-child(5) { animation-delay: 0.22s; }
.wizard-step.step-enter .wizard-chip:nth-child(6),
.wizard-step.step-enter-back .wizard-chip:nth-child(6) { animation-delay: 0.25s; }
.wizard-step.step-enter .wizard-chip:nth-child(7),
.wizard-step.step-enter-back .wizard-chip:nth-child(7) { animation-delay: 0.28s; }
.wizard-step.step-enter .wizard-chip:nth-child(8),
.wizard-step.step-enter-back .wizard-chip:nth-child(8) { animation-delay: 0.31s; }
.wizard-step.step-enter .wizard-chip:nth-child(9),
.wizard-step.step-enter-back .wizard-chip:nth-child(9) { animation-delay: 0.34s; }
.wizard-step.step-enter .wizard-chip:nth-child(10),
.wizard-step.step-enter-back .wizard-chip:nth-child(10) { animation-delay: 0.37s; }
.wizard-step.step-enter .wizard-chip:nth-child(n+11),
.wizard-step.step-enter-back .wizard-chip:nth-child(n+11) { animation-delay: 0.4s; }

@keyframes chipReveal {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Step header animation */
.wizard-step.step-enter .step-header,
.wizard-step.step-enter-back .step-header {
    opacity: 0;
    animation: headerReveal 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes headerReveal {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-header {
    text-align: center;
    margin-bottom: 24px;
}

.step-number {
    display: block;
    font-size: 1rem;
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

.step-prompt {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.01em;
}

.step-prompt .optional {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.85rem;
}

.step-hint {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 6px;
}

/* Multi-select badge - draws attention to multiple selection capability */
.multi-select-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 8px 16px 8px 12px;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.15), rgba(20, 184, 166, 0.08));
    border: 1px solid rgba(20, 184, 166, 0.3);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
    animation: badgeEntrance 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

.multi-select-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: badgeShimmer 2s ease-in-out 0.7s;
}

.multi-icon {
    flex-shrink: 0;
    opacity: 0.9;
}

@keyframes badgeEntrance {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes badgeShimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Wizard Chips - Small pill buttons */
.wizard-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.wizard-chip {
    padding: 10px 18px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.wizard-chip:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    background: var(--bg-hover);
    transform: translateY(-1px);
}

/* Chips with hints (word count options) */
.wizard-chip.has-hint {
    flex-direction: column;
    padding: 12px 20px;
    text-align: center;
}

.wizard-chip .chip-label {
    display: block;
}

.wizard-chip .chip-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 400;
}

.wizard-chip.selected .chip-hint {
    color: rgba(255, 255, 255, 0.7);
}

/* Config step chips - slightly different styling */
.wizard-chips.config-chips {
    max-width: 500px;
    margin: 0 auto;
}

.wizard-chip.selected {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    box-shadow: 0 4px 12px var(--accent-glow);
}

.wizard-chip.selected:hover {
    background: var(--accent-light);
    border-color: var(--accent-light);
}

/* Custom chip with plus icon */
.wizard-chip.custom-chip {
    border-style: dashed;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.wizard-chip.custom-chip:hover {
    border-style: solid;
    color: var(--accent);
}

.wizard-chip.custom-chip svg {
    opacity: 0.7;
}

/* Custom Input Row */
.custom-input-row {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    animation: customInputSlide 0.25s ease-out;
}

.custom-input-row.hidden {
    display: none;
}

@keyframes customInputSlide {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.custom-input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: border-color 0.2s ease;
}

.custom-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-muted);
}

.custom-input::placeholder {
    color: var(--text-muted);
}

.custom-add-btn {
    padding: 12px 20px;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-add-btn:hover {
    background: var(--accent-light);
    transform: translateY(-1px);
}

/* Include Word Input */
.include-word-input-row {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    animation: customInputSlide 0.25s ease-out;
}

.include-word-input-row.hidden {
    display: none;
}

.include-word-input {
    width: 100%;
    max-width: 360px;
    padding: 14px 18px;
    background: var(--bg-surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
    text-align: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.include-word-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-muted);
}

.include-word-input::placeholder {
    color: var(--text-muted);
}

/* Side Navigation Buttons (Desktop) */
.wizard-nav-side .wizard-back {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    border-radius: 28px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
}

.wizard-nav-side .wizard-back::before {
    content: 'Back';
}

.wizard-nav-side .wizard-back:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateX(-4px);
    box-shadow: 0 4px 16px rgba(13, 148, 136, 0.2);
}

.wizard-nav-side .wizard-back:disabled {
    opacity: 0;
    cursor: default;
    pointer-events: none;
}

.wizard-nav-side .wizard-skip {
    padding: 8px 16px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.wizard-nav-side .wizard-skip:hover {
    color: var(--text-primary);
}

.wizard-nav-side .wizard-next {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    border-radius: 28px;
    background: linear-gradient(135deg, #0d9488 0%, #0a7c72 100%);
    border: none;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(13, 148, 136, 0.3);
    white-space: nowrap;
}

.wizard-nav-side .wizard-next:hover:not(:disabled) {
    transform: translateX(4px);
    box-shadow: 0 6px 24px rgba(13, 148, 136, 0.4);
}

.wizard-nav-side .wizard-next:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.wizard-nav-side .wizard-next svg {
    flex-shrink: 0;
}

/* Smaller desktop: icon-only buttons */
@media (max-width: 900px) and (min-width: 641px) {
    .wizard-main {
        grid-template-columns: 60px 1fr 60px;
    }

    .wizard-nav-side .wizard-back {
        width: 56px;
        height: 56px;
        padding: 0;
        border-radius: 50%;
        justify-content: center;
    }

    .wizard-nav-side .wizard-back::before {
        display: none;
    }

    .wizard-nav-side .wizard-next {
        width: 56px;
        height: 56px;
        padding: 0;
        border-radius: 50%;
        justify-content: center;
    }

    .wizard-nav-side .wizard-next .wizard-next-text {
        display: none;
    }

    .wizard-nav-side .wizard-skip {
        font-size: 0.75rem;
        padding: 6px 10px;
    }
}

.wizard-next {
    background: linear-gradient(135deg, #0d9488 0%, #0a7c72 100%);
    border: none;
    color: white;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    justify-content: center;
}

.wizard-next:hover:not(:disabled) {
    background: linear-gradient(135deg, #0f9d90 0%, #0d8a7e 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(13, 148, 136, 0.4);
}

.wizard-next:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.wizard-next svg,
.wizard-back svg {
    width: 16px;
    height: 16px;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .wizard-hero {
        padding: 24px 12px 20px;
    }

    .wizard-hero .hero-text {
        font-size: 1.2rem;
        line-height: 1.6;
    }

    .wizard-step {
        padding: 20px 16px;
    }

    .step-prompt {
        font-size: 1.1rem;
    }

    .wizard-chips {
        gap: 8px;
    }

    .wizard-chip {
        padding: 8px 14px;
        font-size: 0.85rem;
    }

    .progress-dots {
        gap: 4px;
    }

    .dot-label {
        font-size: 0.6rem;
        display: none;
    }

    .progress-dot.active .dot-label {
        display: block;
    }

    /* Mobile: Switch to single-column layout */
    .wizard-main {
        display: block;
    }

    .wizard-wrapper {
        padding-bottom: 20px;
    }

    /* Hide desktop side navigation on mobile */
    .wizard-nav-side {
        display: none !important;
    }

    /* Show mobile bottom navigation */
    .wizard-nav-mobile {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        padding: 12px 16px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        background: rgba(17, 24, 28, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-top: 1px solid var(--border);
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.25);
        z-index: 100;
    }

    .wizard-nav-mobile.hidden {
        display: none;
    }

    .wizard-nav-mobile-right {
        display: flex;
        justify-content: flex-end;
        gap: 8px;
        flex: 1;
    }

    .wizard-nav-mobile .wizard-back {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 12px 20px;
        border-radius: 24px;
        background: var(--bg-elevated);
        border: 1px solid var(--border);
        color: var(--text-secondary);
        font-size: 0.9rem;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s ease;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .wizard-nav-mobile .wizard-back:hover:not(:disabled) {
        border-color: var(--accent);
        color: var(--accent);
    }

    .wizard-nav-mobile .wizard-back:disabled {
        opacity: 0;
        pointer-events: none;
    }

    .wizard-nav-mobile .wizard-next {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 12px 20px;
        border-radius: 24px;
        background: linear-gradient(135deg, #0d9488 0%, #0a7c72 100%);
        border: none;
        color: white;
        font-size: 0.9rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s ease;
        box-shadow: 0 2px 8px rgba(13, 148, 136, 0.3);
    }

    .wizard-nav-mobile .wizard-next:disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }

    .wizard-nav-mobile .wizard-skip {
        padding: 10px 14px;
        background: transparent;
        border: none;
        color: var(--text-muted);
        font-size: 0.85rem;
        font-weight: 500;
        cursor: pointer;
    }

    .wizard-nav-mobile .wizard-skip:hover {
        color: var(--text-primary);
    }

    /* Hide edit-raw-btn on mobile */
    .edit-raw-btn {
        display: none !important;
    }
}

/* ========================================
   Footer Styles
   ======================================== */

.site-footer {
    background: var(--bg-deep);
    border-top: 1px solid var(--border-subtle);
    padding: 32px 20px;
    margin-top: auto;
    text-align: center;
}

.footer-content {
    max-width: 720px;
    margin: 0 auto;
}

.footer-logo {
    margin-bottom: 24px;
}

.footer-logo img {
    height: 40px;
    width: auto;
    opacity: 0.9;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 24px;
    margin-bottom: 24px;
}

.footer-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-nav a:hover,
.footer-nav a:focus {
    color: var(--accent);
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.7;
}

.footer-copyright a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-copyright a:hover,
.footer-copyright a:focus {
    color: var(--accent);
}

.footer-divider {
    width: 48px;
    height: 1px;
    background: var(--border);
    margin: 16px auto;
}

/* Product Hunt Badge */
.ph-badge {
    margin-bottom: 24px;
}

.ph-badge a {
    display: inline-block;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.ph-badge a:hover,
.ph-badge a:focus {
    transform: translateY(-2px);
    opacity: 0.9;
}

.ph-badge img {
    width: 250px;
    height: auto;
}

/* ========================================
   Content Pages - Refined Editorial Style
   ======================================== */

.content-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content-page main {
    /* flex: 1 removed - footer margin-top: auto handles positioning */
}

/* Page header with back navigation */
.page-nav {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px 24px 0;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--accent);
}

.back-link::before {
    content: '←';
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.back-link:hover::before {
    transform: translateX(-3px);
}

/* Content container */
.content-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 48px 24px 24px;
}

/* Page hero - editorial style */
.page-hero {
    margin-bottom: 64px;
    text-align: center;
    animation: contentFadeIn 0.6s ease-out;
}

.page-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.25rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 20px;
}

.page-hero .lead {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto;
}

.page-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
}

.page-meta-item {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.page-meta-item span {
    color: var(--text-secondary);
    text-transform: none;
    letter-spacing: normal;
}

@keyframes contentFadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Content sections */
.content-section {
    margin-bottom: 56px;
    animation: contentFadeIn 0.6s ease-out backwards;
}

.content-section:nth-child(2) { animation-delay: 0.1s; }
.content-section:nth-child(3) { animation-delay: 0.15s; }
.content-section:nth-child(4) { animation-delay: 0.2s; }
.content-section:nth-child(5) { animation-delay: 0.25s; }

.section-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
    display: block;
}

.content-section h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.content-section p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 16px;
}

.content-section p:last-child {
    margin-bottom: 0;
}

.content-section a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.content-section a:hover {
    border-bottom-color: var(--accent);
}

.content-section strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Process steps - numbered editorial style */
.process-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 32px;
    counter-reset: step;
}

.process-step {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 24px;
    padding: 32px 0;
    border-bottom: 1px solid var(--border-subtle);
    counter-increment: step;
}

.process-step:first-child {
    padding-top: 0;
}

.process-step:last-child {
    border-bottom: none;
}

.process-steps .step-number {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    opacity: 0.8;
}

.process-steps .step-number::before {
    content: counter(step, decimal-leading-zero);
}

.step-content h3 {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.step-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0;
}

/* Info card */
.info-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 28px 32px;
    margin-top: 32px;
}

.info-card p {
    margin: 0;
    font-size: 0.95rem;
}

.info-card p + p {
    margin-top: 12px;
}

/* At-a-glance summary for GEO optimization */
.at-a-glance {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-bottom: 48px;
}

.glance-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-muted);
    border-radius: var(--radius-sm);
    color: var(--accent);
}

.glance-icon svg {
    width: 20px;
    height: 20px;
}

.glance-content {
    flex: 1;
    min-width: 0;
}

.glance-content strong {
    display: block;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.glance-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0;
}

/* Trust grid for E-E-A-T signals */
.trust-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 32px;
}

.trust-item {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.trust-item:hover {
    border-color: var(--border-accent);
    transform: translateY(-2px);
}

.trust-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-muted);
    border-radius: var(--radius-sm);
    color: var(--accent);
    margin-bottom: 16px;
}

.trust-icon svg {
    width: 22px;
    height: 22px;
}

.trust-item h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px;
}

.trust-item p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 640px) {
    .trust-grid {
        grid-template-columns: 1fr;
    }

    .at-a-glance {
        flex-direction: column;
        align-items: stretch;
    }

    .glance-icon {
        width: 36px;
        height: 36px;
    }
}

/* Legal page specific styles */
.legal-content {
    animation: contentFadeIn 0.6s ease-out 0.1s backwards;
}

.legal-content h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 48px 0 16px;
    letter-spacing: -0.01em;
}

.legal-content h2:first-child {
    margin-top: 0;
}

.legal-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.85;
    margin-bottom: 16px;
}

.legal-content ul,
.legal-content ol {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.85;
    margin-bottom: 20px;
    padding-left: 20px;
}

.legal-content li {
    margin-bottom: 10px;
    padding-left: 4px;
}

.legal-content li::marker {
    color: var(--accent);
}

.legal-content a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.legal-content a:hover {
    border-bottom-color: var(--accent);
}

.legal-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Section divider */
.section-divider {
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
    margin: 48px 0;
    border: none;
}

/* Resource Navigation Grid */
.resource-nav-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.resource-nav-item {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.resource-nav-item:hover {
    border-color: var(--accent);
    background: var(--bg-hover);
    transform: translateY(-2px);
}

.resource-nav-item h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    transition: color 0.2s ease;
}

.resource-nav-item:hover h3 {
    color: var(--accent);
}

.resource-nav-item p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

@media (max-width: 640px) {
    .resource-nav-grid {
        grid-template-columns: 1fr;
    }
}

/* CTA Button Inline (for use in info-card) */
.cta-button-inline,
.content-section .cta-button-inline {
    display: inline-block;
    background: var(--accent);
    color: #050506;
    font-weight: 600;
    padding: 14px 32px;
    border-radius: 100px;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(20, 184, 166, 0.25);
    border-bottom: none;
}

.cta-button-inline:hover,
.content-section .cta-button-inline:hover {
    background: var(--accent-light);
    color: #050506;
    box-shadow: 0 8px 32px rgba(20, 184, 166, 0.35);
    transform: translateY(-2px);
    border-bottom: none;
}

/* ========================================
   Contact Page Styles
   ======================================== */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    margin-top: 48px;
}

.contact-form-wrapper {
    animation: contentFadeIn 0.6s ease-out 0.15s backwards;
}

.contact-form {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group:last-of-type {
    margin-bottom: 28px;
}

.form-group label {
    display: block;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 10px;
    letter-spacing: 0.01em;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-muted);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group textarea {
    min-height: 140px;
    resize: vertical;
    line-height: 1.6;
}

.turnstile-container {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
}

.contact-alt {
    text-align: center;
    padding: 20px 24px;
    border-top: 1px solid var(--border-subtle);
    margin-top: 24px;
}

.contact-alt p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.contact-alt a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.contact-alt a:hover {
    border-bottom-color: var(--accent);
}

.form-success,
.form-error {
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    font-size: 0.9rem;
}

.form-success {
    background: var(--success-muted);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success);
}

.form-error {
    background: var(--error-muted);
    border: 1px solid rgba(244, 63, 94, 0.3);
    color: var(--error);
}

.form-success.hidden,
.form-error.hidden {
    display: none;
}

/* ========================================
   Responsive Footer
   ======================================== */

@media (max-width: 600px) {
    .site-footer {
        padding: 24px 16px;
    }

    .footer-nav {
        gap: 6px 16px;
    }

    .footer-nav a {
        font-size: 0.85rem;
    }

    .footer-copyright {
        font-size: 0.8rem;
    }
}

/* ========================================
   Responsive Content Pages
   ======================================== */

@media (max-width: 640px) {
    .content-container {
        padding: 32px 20px;
    }

    .page-hero {
        margin-bottom: 48px;
    }

    .page-hero h1 {
        font-size: 1.875rem;
    }

    .page-hero .lead {
        font-size: 1rem;
    }

    .content-section {
        margin-bottom: 40px;
    }

    .content-section h2 {
        font-size: 1.25rem;
    }

    .process-step {
        grid-template-columns: 48px 1fr;
        gap: 16px;
        padding: 24px 0;
    }

    .process-steps .step-number {
        font-size: 1.75rem;
    }

    .step-content h3 {
        font-size: 1rem;
    }

    .contact-form {
        padding: 24px 20px;
    }

    .legal-content h2 {
        font-size: 1.125rem;
        margin-top: 36px;
    }

    .info-card {
        padding: 20px 24px;
    }

    .page-nav {
        padding: 20px 20px 0;
    }
}
