:root {
    --bg: #f5efe4;
    --bg-accent: #e6dcc8;
    --surface: rgba(255, 252, 246, 0.92);
    --surface-strong: #fffdf8;
    --text: #1f2430;
    --muted: #596173;
    --border: rgba(58, 68, 84, 0.14);
    --primary: #1f6f5f;
    --primary-dark: #154f44;
    --danger: #8b2f39;
    --shadow: 0 20px 45px rgba(54, 43, 24, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "DM Sans", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(245, 191, 117, 0.22), transparent 32%),
        radial-gradient(circle at right, rgba(31, 111, 95, 0.18), transparent 30%),
        linear-gradient(135deg, var(--bg) 0%, #f8f5ee 55%, var(--bg-accent) 100%);
}

.page-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 48px;
}

.hero {
    display: grid;
    /* grid-template-columns: 2fr 1fr;x */
    gap: 24px;
    align-items: stretch;
    margin-bottom: 24px;
}

.hero-copy,
.hero-card,
.panel {
    background: var(--surface);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
}

.hero-copy {
    padding: 30px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.82rem;
}

h1,
h2,
h3 {
    margin-top: 0;
}

h1 {
    font-size: clamp(2rem, 3vw, 3.4rem);
    line-height: 1.05;
    margin-bottom: 14px;
}

.hero-text {
    margin: 0;
    font-size: 1.04rem;
    line-height: 1.65;
    color: var(--muted);
    max-width: 62ch;
}

.hero-card {
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    background:
        linear-gradient(180deg, rgba(31, 111, 95, 0.07), rgba(255, 255, 255, 0.5)),
        var(--surface);
}

.chip {
    width: fit-content;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(31, 111, 95, 0.1);
    color: var(--primary-dark);
    font-weight: 700;
}

.panel {
    padding: 24px;
}

.input-panel label {
    display: block;
    margin-bottom: 12px;
    font-weight: 700;
}

textarea,
pre {
    font-family: "JetBrains Mono", monospace;
}

textarea {
    width: 100%;
    min-height: 360px;
    border-radius: 18px;
    border: 1px solid rgba(56, 65, 80, 0.16);
    padding: 18px;
    font-size: 0.95rem;
    line-height: 1.6;
    resize: vertical;
    background: var(--surface-strong);
    color: var(--text);
}

textarea:focus {
    outline: 2px solid rgba(31, 111, 95, 0.18);
    border-color: rgba(31, 111, 95, 0.35);
}

.actions {
    margin-top: 16px;
}

button {
    border: none;
    border-radius: 999px;
    padding: 14px 22px;
    background: linear-gradient(135deg, var(--primary) 0%, #2c8e79 100%);
    color: white;
    font-size: 0.98rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 12px 24px rgba(31, 111, 95, 0.2);
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(31, 111, 95, 0.24);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.result-card.full-width {
    grid-column: 1 / -1;
}

pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.6;
    font-size: 0.9rem;
    color: #263142;
}

.error-panel {
    margin-top: 24px;
    border-color: rgba(139, 47, 57, 0.18);
    background: rgba(255, 246, 247, 0.96);
}

.error-panel h2,
.error-panel pre {
    color: var(--danger);
}

.note-panel {
    margin-top: 24px;
}

.note-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 18px;
}

.note-grid p {
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.6;
}

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

@media (max-width: 640px) {
    .page-shell {
        width: min(100% - 20px, 1180px);
        padding-top: 20px;
    }

    .hero-copy,
    .hero-card,
    .panel {
        padding: 20px;
    }

    textarea {
        min-height: 300px;
    }
}
