:root {
    --bg: #07111d;
    --bg-alt: #0d2235;
    --surface: rgba(10, 24, 39, 0.82);
    --surface-strong: #10283f;
    --text: #edf6ff;
    --muted: #a1b8ca;
    --accent: #2ad0c8;
    --accent-soft: #8de4df;
    --accent-warm: #ffb86a;
    --border: rgba(255, 255, 255, 0.14);
    --ok: #88f5b7;
    --warn: #ffd08f;
    --bad: #ff9ca0;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', 'Segoe UI', sans-serif;
    background: radial-gradient(circle at top right, #14395a 0%, var(--bg) 35%), linear-gradient(130deg, #07111d 0%, #071a2d 60%, #0f2741 100%);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.55;
    overflow-x: hidden;
}

h1,
h2,
h3 {
    font-family: 'Fraunces', 'Times New Roman', serif;
    letter-spacing: 0.01em;
    margin-top: 0;
}

a {
    color: inherit;
}

.background-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        radial-gradient(circle at 15% 20%, rgba(42, 208, 200, 0.15), transparent 42%),
        radial-gradient(circle at 85% 10%, rgba(255, 184, 106, 0.15), transparent 40%),
        radial-gradient(circle at 70% 75%, rgba(102, 179, 255, 0.11), transparent 45%);
    animation: drift 18s ease-in-out infinite;
}

@keyframes drift {
    0% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(0, -10px, 0); }
    100% { transform: translate3d(0, 0, 0); }
}

.wrap {
    width: min(1140px, calc(100% - 32px));
    margin-inline: auto;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    background: rgba(8, 19, 32, 0.66);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    color: #f8fdff;
    letter-spacing: 0.02em;
}

.menu {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 0.95rem;
}

.menu a {
    text-decoration: none;
    color: var(--muted);
    transition: color 0.2s ease;
}

.menu a:hover {
    color: var(--accent-soft);
}

.hero {
    padding: 72px 0 40px;
    display: grid;
    grid-template-columns: 1.2fr 0.95fr;
    gap: 26px;
    align-items: start;
}

.eyebrow {
    margin: 0 0 8px;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    color: var(--accent-soft);
    font-weight: 700;
}

.hero h1 {
    font-size: clamp(1.95rem, 5vw, 3.2rem);
    line-height: 1.12;
    margin-bottom: 14px;
}

.subtext {
    margin: 0;
    color: var(--muted);
    max-width: 680px;
}

.hero-cta-row {
    margin-top: 24px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 11px 16px;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(120deg, var(--accent), #2cdb89);
    color: #073420;
    box-shadow: 0 8px 20px rgba(28, 176, 165, 0.28);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.04);
    color: #edf6ff;
    border-color: var(--border);
}

.btn-full {
    width: 100%;
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 24px;
}

.metric-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
}

.metric-card strong {
    display: block;
    font-size: 1.7rem;
    color: #f9fdff;
}

.metric-card span {
    color: var(--muted);
    font-size: 0.86rem;
}

.glass-card {
    background: linear-gradient(160deg, rgba(26, 51, 77, 0.95), rgba(16, 35, 55, 0.84));
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 20px 40px rgba(1, 10, 18, 0.38);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    right: -110px;
    top: -110px;
    background: radial-gradient(circle, rgba(255, 184, 106, 0.35), rgba(255, 184, 106, 0));
}

.glass-card > * {
    position: relative;
    z-index: 1;
}

.panel {
    margin-top: 24px;
    padding: 24px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(12, 27, 43, 0.92), rgba(11, 25, 39, 0.84));
    border: 1px solid var(--border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

.panel-header p {
    margin-top: 0;
    color: var(--muted);
}

.panel-header h2 {
    margin: 0 0 8px;
    font-size: clamp(1.45rem, 4vw, 2.2rem);
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0;
}

.tab-btn {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    border-radius: 10px;
    padding: 9px 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn.active {
    background: linear-gradient(120deg, rgba(42, 208, 200, 0.26), rgba(255, 184, 106, 0.2));
    color: #f8fdff;
    border-color: rgba(141, 228, 223, 0.4);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.tool-form,
.lead-form,
.compact-form {
    display: grid;
    gap: 12px;
}

label {
    display: block;
    font-size: 0.82rem;
    color: var(--accent-soft);
    font-weight: 600;
    margin-bottom: 5px;
}

input,
select,
textarea,
button {
    font: inherit;
}

input,
select,
textarea {
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(6, 16, 25, 0.7);
    color: var(--text);
    padding: 10px 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(42, 208, 200, 0.75);
    box-shadow: 0 0 0 3px rgba(42, 208, 200, 0.16);
}

.inline-input {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.grid-two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.status-line {
    min-height: 1.25em;
    margin: 4px 0 0;
    font-size: 0.88rem;
    color: var(--muted);
}

.status-line.ok {
    color: var(--ok);
}

.status-line.warn {
    color: var(--warn);
}

.status-line.error {
    color: var(--bad);
}

.analysis-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.hidden {
    display: none !important;
}

.score-card,
.result-card,
.feature-grid article {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    padding: 15px;
}

.result-card h3 {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.result-card-wide {
    grid-column: span 2;
}

.gauge {
    --score: 0;
    width: 124px;
    aspect-ratio: 1;
    margin: 10px 0;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 2rem;
    font-weight: 700;
    background:
        radial-gradient(circle closest-side, rgba(7, 20, 33, 0.98) 70%, transparent 72%),
        conic-gradient(var(--accent) calc(var(--score) * 1%), rgba(255, 255, 255, 0.09) 0);
    color: #f7fcff;
}

.score-list,
.detail-list,
.roadmap {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 7px;
    color: #e8f5ff;
}

.score-list span {
    color: var(--muted);
}

.roadmap li {
    border-left: 2px solid rgba(42, 208, 200, 0.46);
    padding-left: 8px;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
}

table {
    border-collapse: collapse;
    width: 100%;
    min-width: 640px;
}

th,
td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    font-size: 0.9rem;
}

th {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    color: var(--accent-soft);
    text-transform: uppercase;
}

.pill {
    display: inline-block;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 0.76rem;
    font-weight: 700;
}

.pill-available {
    background: rgba(136, 245, 183, 0.2);
    color: #93f6bf;
}

.pill-taken {
    background: rgba(255, 156, 160, 0.2);
    color: #ffb4b7;
}

.pill-unknown {
    background: rgba(255, 208, 143, 0.18);
    color: #ffd598;
}

.message-output {
    margin-top: 12px;
    display: grid;
    gap: 10px;
}

.message-output article {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 12px;
}

.feature-grid {
    margin-top: 22px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.feature-grid h3 {
    margin-bottom: 8px;
}

.feature-grid p {
    margin: 0;
    color: var(--muted);
}

.lead-panel {
    margin: 22px auto 72px;
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 16px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(14, 30, 48, 0.9), rgba(11, 23, 37, 0.88));
    padding: 20px;
}

.lead-copy ul {
    margin: 10px 0 0;
    padding-left: 18px;
    color: var(--muted);
}

.lead-copy li {
    margin-bottom: 6px;
}

.footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(3, 9, 15, 0.65);
}

.footer-inner {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.9rem;
    color: var(--muted);
}

.footer a {
    color: var(--accent-soft);
}

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1,
.reveal-delay-2,
.reveal-delay-3 {
    animation: popIn 0.7s ease backwards;
}

.reveal-delay-1 { animation-delay: 0.12s; }
.reveal-delay-2 { animation-delay: 0.24s; }
.reveal-delay-3 { animation-delay: 0.36s; }

@keyframes popIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 980px) {
    .hero,
    .lead-panel {
        grid-template-columns: 1fr;
    }

    .analysis-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .result-card-wide {
        grid-column: auto;
    }

    .hero-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .menu {
        display: none;
    }

    .hero {
        padding-top: 48px;
    }

    .grid-two,
    .inline-input,
    .feature-grid,
    .analysis-grid,
    .hero-metrics {
        grid-template-columns: 1fr;
    }

    .panel,
    .lead-panel {
        padding: 16px;
    }

    .footer-inner {
        flex-direction: column;
        justify-content: center;
        padding: 10px 0;
        text-align: center;
    }
}
