:root {
    --accent: #4f46e5;
    --accent-dark: #4338ca;
    --accent-tint: #ecebfd;
    --text: #1a1a1a;
    --text-muted: #5b6472;
    --border: #e2e4e9;
    --bg: #f6f7f9;
    --surface: #ffffff;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--bg);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
    color: var(--text);
    line-height: 1.55;
    font-size: 16px;
}

header {
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

header h1 {
    font-size: 1.75rem;
    letter-spacing: -0.02em;
    margin: 0 0 0.25rem;
}

header h1 a {
    color: inherit;
    text-decoration: none;
}

header .tagline {
    color: var(--text-muted);
    margin: 0;
}

header .account-nav {
    font-size: 0.85rem;
    margin: 0.5rem 0 0;
}

header .account-nav a {
    color: var(--text-muted);
}

main {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.75rem 1.75rem 2rem;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.04);
}

h2 {
    font-size: 1.35rem;
    letter-spacing: -0.01em;
    margin-top: 0;
}

.plan-name-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin: -0.5rem 0 1.5rem;
}

h3 {
    font-size: 1.1rem;
    margin-top: 2rem;
}

h4 {
    font-size: 1rem;
}

a {
    color: var(--accent);
}

.field {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

label .optional {
    font-weight: normal;
    color: var(--text-muted);
}

label.radio {
    font-weight: normal;
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.5rem 0.65rem;
    margin: 0 0 0.35rem -0.65rem;
    border-radius: 6px;
    transition: background 0.12s ease;
}

label.radio input[type="radio"] {
    flex-shrink: 0;
    margin: 0.2rem 0 0;
}

label.radio:hover {
    background: var(--accent-tint);
}

input[type="radio"] {
    accent-color: var(--accent);
}

input[type="text"],
input[type="number"],
textarea {
    width: 100%;
    max-width: 480px;
    padding: 0.6rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text);
    background: var(--surface);
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

#products {
    max-width: 800px;
}

input[type="text"]:focus,
input[type="number"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0.4rem 0 0;
}

.error {
    color: #b00020;
    font-size: 0.9rem;
    margin: 0.3rem 0 0;
}

.next-steps {
    list-style: none;
    padding: 0;
}

.next-steps > li {
    margin-bottom: 1rem;
    padding-left: 1rem;
    border-left: 3px solid var(--accent);
}

.next-steps .timeframe {
    display: block;
    font-weight: 600;
    color: var(--accent-dark);
    margin-bottom: 0.35rem;
}

button, .button {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0.75rem 1.35rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    display: inline-block;
    text-decoration: none;
    margin-top: 1rem;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
    transition: background 0.12s ease, transform 0.05s ease;
}

button:hover, .button:hover {
    background: var(--accent-dark);
}

button:active, .button:active {
    transform: translateY(1px);
}

.plan-list {
    list-style: none;
    padding: 0;
}

.plan-list-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--border);
}

.plan-rename-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.plan-rename-form input[type="text"] {
    max-width: none;
    flex: 1;
}

.plan-rename-form button {
    margin-top: 0;
    padding: 0.5rem 0.9rem;
    font-size: 0.85rem;
}

.plan-list-item .button {
    margin-top: 0;
    white-space: nowrap;
}

.campaign-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

@media (min-width: 900px) {
    .campaign-cards {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
        align-items: start;
    }

    .campaign-card {
        margin-bottom: 0;
    }
}

.badge {
    font-size: 0.7rem;
    font-weight: 600;
    background: var(--accent-tint);
    color: var(--accent-dark);
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.confidence-note, .disclaimer {
    font-size: 0.9rem;
    color: var(--text-muted);
    background: #f8f8fb;
    border-left: 3px solid var(--border);
    padding: 0.75rem 1rem;
    border-radius: 0 6px 6px 0;
}

.next-plan-prompt {
    font-size: 0.95rem;
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.bid-warning {
    font-size: 0.95rem;
    color: #7a4a00;
    background: #fff6e5;
    border-left: 3px solid #e8a100;
    padding: 0.9rem 1.1rem;
    border-radius: 0 6px 6px 0;
    margin-bottom: 1.5rem;
}

.bid-warning strong {
    color: #5c3900;
}

.explanation {
    background: #f8f8fb;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    line-height: 1.7;
}

.explanation p {
    margin-bottom: 1rem;
}

.explanation p:last-child {
    margin-bottom: 0;
}

.explanation p::first-line {
    font-weight: 600;
}

.section-nav {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
    margin: 0 0 1.5rem;
}

.section-nav a {
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    transition: background 0.12s ease, color 0.12s ease;
}

.section-nav a:hover {
    background: var(--accent-tint);
    color: var(--accent-dark);
}

.loading-overlay {
    text-align: center;
    padding: 3rem 1rem;
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 1.5rem;
    border: 4px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.loading-hint {
    color: var(--text-muted);
    max-width: 420px;
    margin: 0 auto;
}

.landing-headline {
    font-size: 1.75rem;
    letter-spacing: -0.01em;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.landing-lede {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 0;
}

.landing-section {
    margin-top: 2.25rem;
}

.landing-section h3 {
    margin-top: 0;
}

.benefit-list {
    list-style: none;
    padding: 0;
}

.benefit-list > li {
    margin-bottom: 1rem;
    padding-left: 1rem;
    border-left: 3px solid var(--accent);
}

.guarantee-box {
    margin-top: 2.25rem;
    background: var(--accent-tint);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
}

.guarantee-box h3 {
    margin-top: 0;
    color: var(--accent-dark);
}

.guarantee-box p {
    margin-bottom: 0;
}

.cta-row {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.site-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.site-footer a {
    color: var(--text-muted);
}
