:root {
    --bg: #f7f7f8;
    --panel: #ffffff;
    --text: #171717;
    --muted: #666b76;
    --border: #e6e8ec;
    --primary: #111827;
    --primary-hover: #000000;
    --success: #0f766e;
    --warning: #9a3412;
    --free: #2563eb;
    --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

a { color: inherit; }

code {
    background: #f1f2f4;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.1rem 0.35rem;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem clamp(1rem, 4vw, 3rem);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    font-weight: 800;
}

.brand-mark {
    width: 2rem;
    height: 2rem;
    border-radius: 0.65rem;
    display: grid;
    place-items: center;
    background: var(--primary);
    color: white;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.site-nav a,
.muted-link {
    color: var(--muted);
    text-decoration: none;
}

.site-nav a:hover,
.muted-link:hover {
    color: var(--text);
}

.site-main {
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 2.5rem 0 4rem;
}

.hero {
    padding: clamp(2rem, 7vw, 5rem);
    background: radial-gradient(circle at top left, #ffffff, #f2f4f8);
    border: 1px solid var(--border);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.eyebrow {
    margin: 0 0 0.6rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    font-weight: 800;
}

.hero h1,
.panel h1,
.pricing-card h1 {
    margin: 0;
    font-size: clamp(2.1rem, 5vw, 4.5rem);
    line-height: 1;
    letter-spacing: -0.05em;
}

.hero p,
.panel p,
.pricing-card p {
    color: var(--muted);
    font-size: 1.05rem;
}

.hero-actions {
    margin-top: 1.5rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.75rem 1.1rem;
    border-radius: 999px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    font-weight: 750;
    border: 0;
    cursor: pointer;
}

.button:hover { background: var(--primary-hover); }
.button.small { min-height: 36px; padding: 0.55rem 0.9rem; }

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin: 2.6rem 0 1rem;
}

.section-heading h2 { margin: 0; font-size: 1.5rem; }
.section-heading p { margin: 0; color: var(--muted); }

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

.tool-card,
.empty-card {
    display: block;
    min-height: 150px;
    padding: 1.1rem;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
    text-decoration: none;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.tool-card:hover {
    transform: translateY(-2px);
    border-color: #c8ccd4;
    box-shadow: var(--shadow);
}

.tool-card h3 { margin: 0.8rem 0 0.35rem; }
.tool-card p { margin: 0; color: var(--muted); }

.label,
.pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    padding: 0.25rem 0.55rem;
    font-size: 0.78rem;
    font-weight: 800;
}

.label.free { background: #dbeafe; color: var(--free); }
.label.locked { background: #ffedd5; color: var(--warning); }
.label.unlocked,
.pill.success { background: #ccfbf1; color: var(--success); }

.panel,
.pricing-card,
.tool-shell {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 28px;
    box-shadow: var(--shadow);
    padding: clamp(1.25rem, 4vw, 2.5rem);
}

.narrow { max-width: 720px; margin: 3rem auto; }
.center-screen { min-height: 75vh; display: grid; place-items: center; }

.locked-panel,
.success-panel,
.error-panel { text-align: center; }
.locked-panel .button,
.success-panel .button,
.error-panel .button { margin: 1rem 0.5rem; }

.tool-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.pricing-card {
    max-width: 760px;
    margin: 3rem auto;
}

.price {
    font-size: 3.5rem !important;
    font-weight: 900;
    color: var(--text) !important;
    margin: 1rem 0 !important;
}

.price span {
    font-size: 1rem;
    color: var(--muted);
    font-weight: 700;
}

.feature-list {
    display: grid;
    gap: 0.6rem;
    padding-left: 1.2rem;
    margin: 1.4rem 0;
}

.notice {
    padding: 1rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    margin: 1rem 0;
}

.notice.error {
    background: #fff7ed;
    color: #9a3412;
    border-color: #fed7aa;
}

.small-note,
.site-footer {
    color: var(--muted);
    font-size: 0.9rem;
}

.site-footer {
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 1.5rem 0 3rem;
}

/* Helpful defaults for single-file tools */
.tool-shell input,
.tool-shell textarea,
.tool-shell select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0.8rem 0.9rem;
    font: inherit;
}

.tool-shell textarea { min-height: 180px; resize: vertical; }
.tool-shell button { font: inherit; }

@media (max-width: 720px) {
    .site-header { align-items: flex-start; flex-direction: column; }
    .hero h1,
    .panel h1,
    .pricing-card h1 { font-size: 2.2rem; }
    .price { font-size: 2.5rem !important; }
}
