:root {
    --bg-start: #faf4eb;
    --bg-mid: #edf5ef;
    --bg-end: #f7ebe2;
    --panel: rgba(255, 252, 247, 0.76);
    --panel-border: rgba(255, 255, 255, 0.7);
    --ink: #202630;
    --muted: #5f6977;
    --line: rgba(32, 38, 48, 0.12);
    --accent: #0f766e;
    --accent-strong: #0b5f59;
    --accent-soft: rgba(15, 118, 110, 0.12);
    --highlight: #dc8f29;
    --danger: #b42318;
    --shadow: 0 24px 70px rgba(38, 46, 59, 0.14);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Manrope", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 10% 12%, rgba(15, 118, 110, 0.22), transparent 28%),
        radial-gradient(circle at 86% 14%, rgba(220, 143, 41, 0.22), transparent 26%),
        linear-gradient(135deg, var(--bg-start) 0%, var(--bg-mid) 50%, var(--bg-end) 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.25), transparent 75%);
    pointer-events: none;
}

.page-shell {
    position: relative;
    min-height: 100vh;
    padding: clamp(24px, 4vw, 40px);
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(8px);
    opacity: 0.75;
    pointer-events: none;
}

.orb-a {
    top: 70px;
    left: -80px;
    width: 220px;
    height: 220px;
    background: rgba(15, 118, 110, 0.2);
}

.orb-b {
    right: -50px;
    bottom: 60px;
    width: 280px;
    height: 280px;
    background: rgba(220, 143, 41, 0.16);
}

.orb-c {
    right: 8%;
    top: 16%;
    width: 180px;
    height: 180px;
    background: rgba(37, 99, 235, 0.12);
}

.split-layout,
.result-layout {
    position: relative;
    z-index: 1;
    display: grid;
    gap: clamp(20px, 3vw, 32px);
    max-width: 1180px;
    margin: 0 auto;
    min-height: calc(100vh - 80px);
    align-items: center;
}

.split-layout {
    grid-template-columns: 1.15fr 0.85fr;
}

.result-layout {
    grid-template-columns: 1fr 0.72fr;
}

.panel {
    position: relative;
    padding: clamp(24px, 3vw, 36px);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-xl);
    background: var(--panel);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.eyebrow,
.panel-kicker,
.insight-label,
.context-label {
    display: inline-block;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--accent);
}

h1,
h2 {
    margin: 0;
    font-family: "Fraunces", serif;
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -0.03em;
}

h1 {
    margin-top: 14px;
    font-size: clamp(2.7rem, 5vw, 5rem);
    max-width: 11ch;
}

h2 {
    font-size: clamp(1.7rem, 3vw, 2.4rem);
}

.lead,
.panel-copy,
.result-copy {
    color: var(--muted);
    font-size: 1.04rem;
    line-height: 1.75;
}

.lead {
    max-width: 56ch;
    margin: 20px 0 32px;
}

.insight-grid,
.summary-grid,
.context-list {
    display: grid;
    gap: 14px;
}

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

.insight-card,
.summary-card,
.context-item {
    padding: 18px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.72);
}

.insight-card strong,
.summary-card strong,
.context-item strong {
    display: block;
    margin-top: 10px;
    font-size: 1.12rem;
    color: var(--ink);
}

.insight-card p,
.context-item {
    color: var(--muted);
}

.insight-card p {
    margin: 8px 0 0;
    font-size: 0.94rem;
    line-height: 1.55;
}

.panel-intro {
    margin-bottom: 24px;
}

.panel-copy {
    margin: 12px 0 0;
}

.predict-form {
    display: grid;
    gap: 18px;
}

.field-group {
    display: grid;
    gap: 10px;
}

label {
    font-weight: 800;
    text-align: left;
}

input,
select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
    font: inherit;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

input:focus,
select:focus {
    outline: none;
    border-color: rgba(15, 118, 110, 0.55);
    box-shadow: 0 0 0 4px var(--accent-soft);
    transform: translateY(-1px);
}

.field-note {
    margin: 0;
    text-align: left;
    color: var(--muted);
    font-size: 0.92rem;
}

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 14px 22px;
    border: none;
    border-radius: 999px;
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-button {
    background: linear-gradient(135deg, var(--accent) 0%, #155e75 100%);
    color: #fff;
    box-shadow: 0 16px 36px rgba(15, 118, 110, 0.28);
}

.secondary-button {
    background: rgba(255, 255, 255, 0.82);
    color: var(--ink);
    border: 1px solid rgba(32, 38, 48, 0.1);
}

.primary-button:hover,
.secondary-button:hover {
    transform: translateY(-2px);
}

.message {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    font-weight: 700;
}

.message-error {
    background: rgba(180, 35, 24, 0.08);
    color: var(--danger);
    border: 1px solid rgba(180, 35, 24, 0.16);
}

.result-panel h1 {
    max-width: 12ch;
}

.result-figure {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    margin: 28px 0;
    flex-wrap: wrap;
}

.result-unit {
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(220, 143, 41, 0.15);
    color: #8f5f19;
    font-weight: 800;
}

.result-value {
    font-family: "Fraunces", serif;
    font-size: clamp(2.8rem, 6vw, 5.4rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
}

.summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 24px;
}

.summary-card span {
    display: block;
    color: var(--muted);
    font-size: 0.88rem;
}

.action-row {
    margin-top: 26px;
}

.context-panel {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.context-list {
    margin-top: 24px;
}

.context-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    color: var(--muted);
}

.context-item strong {
    margin-top: 0;
    text-align: right;
}

[data-animate] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 560ms ease, transform 560ms ease;
}

[data-animate].is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 980px) {
    .split-layout,
    .result-layout,
    .insight-grid,
    .summary-grid {
        grid-template-columns: 1fr;
    }

    .panel {
        padding: 26px;
    }

    .result-layout,
    .split-layout {
        min-height: auto;
    }
}

@media (max-width: 640px) {
    .page-shell {
        padding: 18px;
    }

    h1 {
        font-size: clamp(2.2rem, 12vw, 3.3rem);
    }

    .result-value {
        font-size: clamp(2.4rem, 13vw, 3.8rem);
    }

    .panel {
        border-radius: 22px;
    }
}
