:root {
    --background: #f5f7f8;
    --surface: #ffffff;
    --text: #172126;
    --muted: #66747b;
    --border: #dce3e6;
    --accent: #176b63;
    --accent-dark: #11544e;
    --soft: #eaf3f1;
    --radius: 20px;
}

* {
    box-sizing: border-box;
}

html {
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    color: var(--text);
    background: var(--background);
}

body {
    margin: 0;
    min-height: 100vh;
}

button,
textarea {
    font: inherit;
}

.topbar {
    height: 76px;
    max-width: 1120px;
    margin: auto;
    padding: 0 28px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    color: var(--text);
    text-decoration: none;
    font-weight: 750;

    display: flex;
    align-items: center;
    gap: 11px;
}

.brand-mark {
    width: 38px;
    height: 38px;

    display: grid;
    place-items: center;

    border-radius: 11px;

    color: white;
    background: var(--accent);

    font-size: 13px;
    letter-spacing: .04em;
}

.pilot-badge {
    padding: 7px 11px;

    border: 1px solid var(--border);
    border-radius: 999px;

    color: var(--muted);
    background: rgba(255,255,255,.6);

    font-size: 12px;
}

main {
    max-width: 920px;
    margin: auto;
    padding: 85px 28px 60px;
}

.hero {
    text-align: center;
}

.eyebrow {
    margin-bottom: 18px;

    color: var(--accent);

    font-size: 13px;
    font-weight: 750;
    letter-spacing: .13em;
}

h1 {
    margin: 0;

    font-size: clamp(48px, 8vw, 78px);
    line-height: .98;
    letter-spacing: -.055em;
}

.intro {
    max-width: 580px;
    margin: 28px auto 38px;

    color: var(--muted);

    font-size: 18px;
    line-height: 1.6;
}

.question-box {
    max-width: 760px;
    margin: auto;

    padding: 18px;

    border: 1px solid var(--border);
    border-radius: var(--radius);

    background: var(--surface);

    box-shadow:
        0 20px 50px rgba(30, 55, 60, .06);
}

textarea {
    width: 100%;
    min-height: 95px;

    padding: 4px 6px;

    border: none;
    outline: none;
    resize: none;

    color: var(--text);
    background: transparent;

    font-size: 18px;
    line-height: 1.5;
}

textarea::placeholder {
    color: #9ba6aa;
}

.question-footer {
    margin-top: 10px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

#counter {
    color: #9aa5aa;
    font-size: 12px;
}

#submit-button {
    border: none;
    border-radius: 13px;

    padding: 12px 17px;

    display: flex;
    align-items: center;
    gap: 13px;

    color: white;
    background: var(--accent);

    cursor: pointer;

    font-weight: 650;
}

#submit-button:hover {
    background: var(--accent-dark);
}

#submit-button:disabled {
    opacity: .55;
    cursor: default;
}

.examples {
    max-width: 760px;
    margin: 20px auto 0;

    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 9px;

    color: var(--muted);

    font-size: 13px;
}

.examples > span {
    padding: 8px 2px;
}

.example {
    padding: 8px 12px;

    border: 1px solid var(--border);
    border-radius: 999px;

    color: var(--muted);
    background: transparent;

    cursor: pointer;
}

.example:hover {
    color: var(--text);
    background: white;
}

.answer-section {
    max-width: 760px;
    margin: 46px auto 0;

    padding: 28px;

    border: 1px solid var(--border);
    border-radius: var(--radius);

    background: var(--surface);

    text-align: left;
}

.answer-heading {
    margin-bottom: 19px;

    display: flex;
    align-items: center;
    gap: 9px;

    color: var(--muted);

    font-size: 13px;
    font-weight: 650;
}

.answer-dot {
    width: 8px;
    height: 8px;

    border-radius: 50%;
    background: var(--accent);
}

.answer {
    white-space: pre-wrap;

    font-size: 17px;
    line-height: 1.7;
}

.loading {
    margin-top: 45px;

    text-align: center;
    color: var(--muted);
}

.loading span {
    width: 7px;
    height: 7px;
    margin: 0 3px;

    display: inline-block;

    border-radius: 50%;
    background: var(--accent);

    animation: pulse 1s infinite alternate;
}

.loading span:nth-child(2) {
    animation-delay: .2s;
}

.loading span:nth-child(3) {
    animation-delay: .4s;
}

.loading p {
    margin-top: 12px;
    font-size: 13px;
}

@keyframes pulse {
    to {
        opacity: .25;
        transform: translateY(-4px);
    }
}

.principle {
    max-width: 760px;
    margin: 65px auto 0;

    padding-top: 24px;

    display: flex;
    flex-direction: column;
    gap: 5px;

    border-top: 1px solid var(--border);

    color: var(--muted);

    font-size: 13px;
    line-height: 1.6;
}

.principle strong {
    color: var(--text);
}

footer {
    max-width: 1120px;
    margin: 60px auto 0;

    padding: 28px;

    display: flex;
    justify-content: space-between;

    border-top: 1px solid var(--border);

    color: #8a979c;

    font-size: 12px;
}

@media (max-width: 640px) {
    main {
        padding-top: 55px;
    }

    h1 {
        font-size: 52px;
    }

    .intro {
        font-size: 16px;
    }

    .examples > span {
        width: 100%;
    }

    footer {
        flex-direction: column;
        gap: 5px;
    }
}

.sources {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.sources-title {
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.sources ul {
    margin: 0;
    padding-left: 20px;
}

.sources li {
    margin: 6px 0;
    color: var(--muted);
    font-size: 13px;
}

.sources a {
    color: var(--accent);
    text-decoration: none;
}

.sources a:hover {
    text-decoration: underline;
}
