:root {
    color-scheme: dark;
    --ink: #05060a;
    --panel: rgba(8, 10, 18, 0.72);
    --line: rgba(255, 255, 255, 0.12);
    --muted: #cbd5e1;
    --emerald: #10b981;
    --purple: #8b5cf6;
    --cyan: #22d3ee;
    --rose: #fb7185;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    background:
        linear-gradient(135deg, rgba(139, 92, 246, .16), transparent 30%),
        linear-gradient(315deg, rgba(16, 185, 129, .14), transparent 32%),
        var(--ink);
    color: #f8fafc;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body::before {
    position: fixed;
    inset: 0;
    z-index: -2;
    content: "";
    background-image: linear-gradient(rgba(139, 92, 246, .1) 1px, transparent 1px), linear-gradient(90deg, rgba(34, 211, 238, .08) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(to bottom, black, transparent 78%);
}
body::after {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    content: "";
    background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 18px), radial-gradient(circle at 50% 0%, rgba(34, 211, 238, .08), transparent 35%);
}
a { color: inherit; text-decoration: none; }
svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.shell { width: min(1180px, calc(100% - 2rem)); margin-inline: auto; }
.site-header { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid rgba(255,255,255,.1); background: rgba(5,6,10,.78); backdrop-filter: blur(20px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 0; }
.brand { display: inline-flex; align-items: center; gap: .7rem; min-width: 0; }
.brand-mark { width: 3rem; height: 3rem; object-fit: contain; }
.brand-name { font-size: clamp(1.35rem, 4vw, 1.85rem); font-weight: 950; line-height: 1; filter: drop-shadow(0 0 18px rgba(34,211,238,.35)); }
.c1 { color: #67e8f9; } .c2 { color: #7dd3fc; } .c3 { color: #c4b5fd; } .c4 { color: #f0abfc; } .c5 { color: #6ee7b7; } .c6 { color: #fcd34d; } .c7 { color: #fdba74; }
.nav-links { display: flex; gap: .35rem; align-items: center; }
.nav-links a { display: inline-flex; align-items: center; gap: .45rem; min-height: 2.5rem; padding: 0 .75rem; color: #cbd5e1; font-size: .92rem; transition: all .3s; border: 1px solid transparent; }
.nav-links a:hover { color: #fff; border-color: rgba(255,255,255,.1); background: rgba(255,255,255,.05); }
.hero, .page-pad { padding: 1.5rem 0 3rem; }
.hero-grid { display: grid; gap: 2rem; align-items: start; grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr); }
.hero-copy { display: grid; gap: 1.35rem; }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; width: fit-content; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04); padding: .65rem .8rem; color: #e2e8f0; backdrop-filter: blur(14px); }
.eyebrow svg { color: var(--emerald); }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 820px; margin-bottom: 0; font-size: clamp(2.15rem, 6vw, 4rem); line-height: 1.08; letter-spacing: 0; }
h2 { font-size: clamp(1.45rem, 3vw, 2rem); margin-bottom: 1rem; }
.lede, .hero-copy p:not(.eyebrow), .seo-section p { color: #cbd5e1; font-size: 1.08rem; line-height: 1.75; }
.glass { border: 1px solid var(--line); background: var(--panel); box-shadow: 0 24px 80px rgba(0,0,0,.28); backdrop-filter: blur(22px); }
.tool-card { padding: 1.55rem; }
.section-label { margin-bottom: .6rem; color: var(--emerald); font-size: .82rem; font-weight: 800; text-transform: uppercase; letter-spacing: .22em; }
.cyan { color: var(--cyan); }
.form-stack { display: grid; gap: 1rem; }
input, select, textarea { width: 100%; border: 1px solid rgba(255,255,255,.14); background: rgba(0,0,0,.35); color: #fff; min-height: 2.8rem; padding: .75rem; font: inherit; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(16,185,129,.28); border-color: rgba(16,185,129,.65); }
.input-wrap { display: flex; align-items: center; gap: .8rem; border: 1px solid rgba(255,255,255,.14); background: rgba(0,0,0,.35); padding: 0 .85rem; }
.input-wrap input { border: 0; background: transparent; padding-inline: 0; }
.input-wrap svg { color: var(--cyan); flex: none; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid rgba(255,255,255,.14); background: rgba(0,0,0,.35); padding: .25rem; }
.segmented button { border: 0; min-height: 2.8rem; color: #cbd5e1; background: transparent; font-weight: 800; cursor: pointer; transition: all .3s; }
.segmented button.active { color: #fff; background: var(--purple); box-shadow: 0 0 30px rgba(139,92,246,.3); }
.segmented.compact { min-width: 220px; }
.primary-button, .secondary-button, .outline-button, .danger-button { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; border: 0; padding: .75rem 1.1rem; font-weight: 900; cursor: pointer; transition: all .3s; }
.primary-button { background: var(--emerald); color: #03110d; }
.primary-button:hover { background: #6ee7b7; }
.secondary-button { background: var(--purple); color: #fff; }
.secondary-button:hover { background: #a78bfa; }
.outline-button { border: 1px solid rgba(16,185,129,.4); background: rgba(16,185,129,.1); color: #fff; }
.outline-button:hover { background: rgba(16,185,129,.2); }
.danger-button { border: 1px solid rgba(251,113,133,.45); background: rgba(251,113,133,.12); color: #fff; }
.result-box { border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); color: #e2e8f0; padding: 1rem; line-height: 1.6; }
.signal-grid { display: grid; gap: .8rem; grid-template-columns: repeat(4, 1fr); margin-top: 1.5rem; }
.signal-item { display: flex; align-items: center; gap: .65rem; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.035); padding: .85rem 1rem; color: #e2e8f0; }
.signal-item svg { color: var(--emerald); flex: none; }
.ad-slot { display: flex; align-items: center; justify-content: center; min-height: 250px; width: 100%; margin-top: 1.5rem; border: 1px solid var(--line); background: rgba(8,10,18,.68); color: #64748b; text-transform: uppercase; letter-spacing: .28em; font-size: .75rem; }
.band { border-block: 1px solid rgba(255,255,255,.1); background: rgba(0,0,0,.2); padding: 3rem 0; }
.utility-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 2rem; }
.tool-heading-row { display: flex; align-items: start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.image-form { display: grid; gap: 1rem; grid-template-columns: .85fr 1.15fr; }
.upload-box { position: relative; display: grid; place-items: center; min-height: 18rem; border: 1px dashed rgba(255,255,255,.2); background: rgba(0,0,0,.25); color: #cbd5e1; cursor: pointer; overflow: hidden; }
.upload-box input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-box img { max-width: 100%; max-height: 16rem; object-fit: contain; }
.image-controls { display: grid; gap: .85rem; }
.image-controls label, .form-stack label { color: #94a3b8; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.side-stack, .admin-stack { display: grid; gap: 1rem; align-content: start; }
.mini-card { padding: 1.25rem; }
.mini-card p { color: #cbd5e1; line-height: 1.6; margin-bottom: 0; }
.seo-section { padding: 3rem 0; }
.seo-section > div:first-child { max-width: 720px; }
.feature-grid, .faq-grid, .post-grid { display: grid; gap: 1rem; margin-top: 2rem; }
.feature-grid { grid-template-columns: repeat(3, 1fr); }
.faq-grid { grid-template-columns: repeat(3, 1fr); }
.faq-card { padding: 1.2rem; }
.faq-card summary { cursor: pointer; font-weight: 900; }
.faq-card p { margin: .8rem 0 0; color: #cbd5e1; line-height: 1.65; }
.blog-hero { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 2rem; align-items: end; }
.post-grid { grid-template-columns: repeat(3, 1fr); }
.post-card { display: flex; min-height: 20rem; flex-direction: column; padding: 1.3rem; }
.post-card h2 { font-size: 1.25rem; line-height: 1.35; }
.post-card p { color: #cbd5e1; line-height: 1.6; flex: 1; }
.post-card footer, .article-meta { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid rgba(255,255,255,.1); padding-top: 1rem; color: #94a3b8; font-size: .85rem; }
.tag-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.tag-row span { border: 1px solid rgba(139,92,246,.35); background: rgba(139,92,246,.12); color: #ede9fe; padding: .35rem .5rem; font-size: .75rem; font-weight: 800; }
.article-shell { max-width: 880px; padding: 3rem 0; }
.article-header { padding: 2rem; }
.article-header p { color: #cbd5e1; font-size: 1.08rem; line-height: 1.75; }
.article-ad { margin: 2rem 0; }
.prose { color: #cbd5e1; font-size: 1.08rem; line-height: 1.8; }
.prose h2, .prose h3 { color: #fff; margin-top: 2rem; }
.prose a { color: #34d399; }
.article-faq { grid-template-columns: 1fr; }
.login-panel { width: min(100%, 430px); margin: 8vh auto; padding: 1.5rem; }
.admin-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.admin-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: 2rem; }
.admin-card { padding: 1.35rem; }
.alert { padding: 1rem; margin-bottom: 1rem; border: 1px solid rgba(255,255,255,.12); }
.alert.success { border-color: rgba(16,185,129,.45); background: rgba(16,185,129,.12); color: #d1fae5; }
.alert.danger { border-color: rgba(251,113,133,.45); background: rgba(251,113,133,.12); color: #ffe4e6; }
.button-row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }

@media (max-width: 900px) {
    .hero-grid, .utility-grid, .blog-hero, .admin-grid, .image-form { grid-template-columns: 1fr; }
    .signal-grid, .feature-grid, .faq-grid, .post-grid { grid-template-columns: 1fr; }
    .nav-links a { padding: 0 .5rem; }
    .tool-heading-row { display: grid; }
}

@media (max-width: 520px) {
    .shell { width: min(100% - 1rem, 1180px); }
    .brand-mark { width: 2.7rem; height: 2.7rem; }
    .nav-links a { font-size: .82rem; }
    .hero, .page-pad { padding-top: 1rem; }
    .tool-card, .article-header, .admin-card { padding: 1rem; }
    .eyebrow { font-size: .88rem; }
}
