:root {
    --neutral-900: #0a0a0a;
    --neutral-800: #1f1f1f;
    --neutral-700: #3f3f3f;
    --neutral-500: #737373;
    --neutral-200: #e5e5e5;
    --neutral-100: #f5f5f5;
    --accent: #111111;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--neutral-900);
    background: #ffffff;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

a:hover {
    text-decoration: none;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    animation: fadeUp 0.6s ease-out both;
}

.container {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container.narrow {
    max-width: 48rem;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--neutral-200);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 3.5rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.brand-dot {
    height: 0.65rem;
    width: 0.65rem;
    background: var(--accent);
    border-radius: 999px;
    transition: transform 0.2s ease;
}

.brand:hover .brand-dot {
    transform: scale(1.12);
}

.pill-link {
    border: 1px solid var(--accent);
    border-radius: 999px;
    padding: 0.3rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pill-link:hover {
    background: var(--accent);
    color: #ffffff;
}

.hero {
    position: relative;
    padding: 4rem 0 5rem;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 42vh;
    background: linear-gradient(180deg, #f7f7f7 0%, #ffffff 90%);
    z-index: -1;
}

.hero-inner h1 {
    font-size: clamp(2.5rem, 4vw, 3.8rem);
    letter-spacing: -0.03em;
    margin: 0;
}

.lead {
    margin-top: 1rem;
    max-width: 40rem;
    font-size: clamp(1rem, 1.4vw, 1.15rem);
    color: var(--neutral-700);
    line-height: 1.6;
}

.hero-actions {
    margin-top: 2rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.section {
    padding: 3.5rem 0 5rem;
    border-top: 1px solid var(--neutral-200);
}

.section-header h2 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    letter-spacing: -0.02em;
}

.subtext {
    margin-top: 0.8rem;
    color: var(--neutral-700);
    line-height: 1.6;
}

.control-card,
.output-card {
    margin-top: 2rem;
    border: 1px solid var(--neutral-200);
    border-radius: 1.2rem;
    background: #ffffff;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.preset-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chip {
    border: 1px solid #d4d4d4;
    background: var(--neutral-100);
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chip:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.control-row {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

label {
    font-size: 0.9rem;
    color: var(--neutral-700);
}

input[type="number"] {
    width: 7rem;
    padding: 0.55rem 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid #d4d4d4;
    font-size: 1rem;
}

input[type="number"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.12);
}

.button-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent);
    color: #ffffff;
    border: none;
    border-radius: 0.9rem;
    padding: 0.6rem 1.1rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.button-primary:hover {
    background: #000000;
}

.note {
    margin-top: 0.6rem;
    font-size: 0.8rem;
    color: var(--neutral-500);
}

#output {
    min-height: 220px;
    max-height: 320px;
    overflow-y: auto;
    white-space: pre-wrap;
    background: #fafafa;
    border: 1px solid var(--neutral-200);
    border-radius: 0.9rem;
    padding: 1rem;
    line-height: 1.6;
    color: var(--neutral-800);
}

.stats {
    margin-top: 1rem;
    text-align: center;
    font-weight: 600;
    color: var(--neutral-700);
}

.site-footer {
    border-top: 1px solid var(--neutral-200);
    padding: 2rem 1.5rem 3rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--neutral-500);
}

.site-footer a {
    font-weight: 600;
    color: var(--neutral-800);
}

.footer-note {
    margin-top: 0.5rem;
}

.footer-link {
    margin-top: 2rem;
}

@media (max-width: 640px) {
    .header-inner {
        height: auto;
        padding: 0.75rem 0;
    }

    .hero {
        padding: 3rem 0 4rem;
    }

    .control-card,
    .output-card {
        padding: 1.25rem;
    }
}
