:root {
    --bg: #04050a;
    --card: rgba(8, 10, 20, 0.85);
    --border: rgba(255, 255, 255, 0.08);
    --accent: #4de1c1;
    --accent-strong: #2db193;
    --txt: #f8f8fb;
    --muted: #9da4bc;
    --danger: #ff6f6f;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: radial-gradient(circle at top, #142042, #04050a 60%);
    color: var(--txt);
    min-height: 100vh;
    padding: 1.5rem;
}

.app {
    max-width: 1000px;
    margin: 0 auto 4rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.eyebrow {
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: var(--muted);
    margin: 0 0 0.5rem;
}

h1 {
    margin: 0 0 0.5rem;
    font-size: clamp(1.8rem, 5vw, 2.7rem);
}

.lede {
    color: var(--muted);
    max-width: 640px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 1.5rem;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.35);
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.inline {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

label {
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

input, select, textarea {
    width: 100%;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 0.9rem;
    padding: 0.75rem 1rem;
    color: var(--txt);
    font: inherit;
}

textarea {
    resize: vertical;
}

button {
    border: none;
    border-radius: 999px;
    padding: 0.8rem 1.6rem;
    font-weight: 600;
    cursor: pointer;
    background: rgba(255,255,255,0.08);
    color: var(--txt);
    transition: background 0.2s ease;
}

button.primary {
    background: var(--accent);
    color: #020304;
}

button.primary:hover {
    background: var(--accent-strong);
}

button.ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--txt);
    padding: 0.6rem 1.2rem;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

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

.hidden {
    display: none !important;
}

.code {
    font-family: 'JetBrains Mono', Consolas, monospace;
    font-size: 0.85rem;
    color: var(--muted);
}

.chip-row {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.chip-row button {
    background: rgba(255,255,255,0.12);
    padding: 0.4rem 0.9rem;
}

.feedback {
    min-height: 1.3rem;
    color: var(--muted);
}

.feedback.success { color: var(--accent); }
.feedback.error { color: var(--danger); }

.group-headline {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
}

.metric-inputs {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.metric-inputs label {
    font-size: 0.9rem;
}

.metric-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.metric-card {
    flex: 1 1 150px;
    min-width: 150px;
    padding: 1rem;
    background: rgba(255,255,255,0.04);
    border-radius: 1rem;
    border: 1px solid rgba(255,255,255,0.08);
}

.metric-card .label {
    font-size: 0.85rem;
    color: var(--muted);
    margin: 0;
}

.metric-card .value {
    margin: 0.2rem 0;
}

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

.pill-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pill-list li {
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.timeline-entry {
    display: flex;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 0.75rem;
}

.timeline-entry:last-child {
    border: none;
    padding-bottom: 0;
}

.timeline-entry strong {
    font-size: 0.95rem;
}

.timeline-entry .values {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.timeline-entry .tag {
    background: rgba(255,255,255,0.08);
    border-radius: 999px;
    padding: 0.25rem 0.7rem;
    font-size: 0.8rem;
}

@media (max-width: 640px) {
    body {
        padding: 1rem;
    }
    .inline {
        flex-direction: column;
    }
    .timeline-entry {
        flex-direction: column;
    }
}
