:root {
    color-scheme: light;
    --paper: #f2f5ef;
    --surface: #ffffff;
    --ink: #172a24;
    --muted: #65736b;
    --line: #d8dfd6;
    --forest: #1e5945;
    --forest-dark: #143d30;
    --acid: #d9f06a;
    --mono: Consolas, "Courier New", monospace;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    background-color: var(--paper);
    background-image: linear-gradient(90deg, rgba(30, 89, 69, 0.035) 1px, transparent 1px), linear-gradient(rgba(30, 89, 69, 0.035) 1px, transparent 1px);
    background-size: 32px 32px;
    color: var(--ink);
    font-family: "Trebuchet MS", Verdana, sans-serif;
    line-height: 1.5;
}

a {
    color: inherit;
}

button,
textarea {
    font: inherit;
}

:focus-visible {
    outline: 3px solid #b6cd46;
    outline-offset: 3px;
}

.app-shell {
    width: min(1320px, calc(100% - 64px));
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    margin-inline: auto;
}

.masthead {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--line);
}

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--ink);
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 700;
    text-decoration: none;
}

.monogram {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    background: var(--forest-dark);
    color: var(--acid);
    font-family: Georgia, serif;
    font-size: 0.95rem;
}

.portfolio-link {
    color: var(--forest-dark);
    font-size: 0.86rem;
    font-weight: 700;
    text-underline-offset: 4px;
}

.assistant-layout {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
    align-items: stretch;
    gap: clamp(32px, 5vw, 76px);
    padding: 54px 0 48px;
}

.intro {
    align-self: center;
    padding-block: 24px;
}

.eyebrow,
.scope-title,
.chat-kicker,
.message-label {
    margin: 0;
    color: var(--forest);
    font-family: var(--mono);
    font-size: 0.67rem;
    font-weight: 700;
}

.eyebrow {
    margin-bottom: 18px;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    max-width: 600px;
    margin-bottom: 18px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 3.15rem;
    font-weight: 500;
    line-height: 1.06;
}

.intro-copy {
    max-width: 430px;
    margin-bottom: 32px;
    color: var(--muted);
    font-size: 1rem;
}

.scope-note {
    padding: 20px 0 20px 18px;
    border-left: 2px solid var(--forest);
}

.scope-title {
    margin-bottom: 10px;
}

.scope-note ul {
    display: grid;
    gap: 5px;
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    font-size: 0.86rem;
}

.suggestions {
    display: grid;
    gap: 0;
    margin-top: 30px;
}

.suggestions .scope-title {
    margin-bottom: 6px;
}

.suggestions button {
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border: 0;
    border-top: 1px solid var(--line);
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    font-size: 0.82rem;
    text-align: left;
}

.suggestions button:hover {
    color: var(--forest);
}

.suggestions button span {
    flex: 0 0 auto;
    color: var(--forest);
}

.chat-panel {
    min-width: 0;
    min-height: 620px;
    max-height: calc(100svh - 112px);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    background: var(--surface);
}

.chat-header {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 22px;
    border-bottom: 1px solid var(--line);
}

.chat-kicker {
    margin-bottom: 4px;
    font-size: 0.6rem;
}

.chat-header h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.35rem;
    font-weight: 500;
}

.scope-badge {
    padding: 5px 8px;
    border: 1px solid var(--line);
    color: var(--forest);
    font-family: var(--mono);
    font-size: 0.58rem;
    font-weight: 700;
}

.messages {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    overflow-y: auto;
    margin: 0;
    padding: 24px 22px;
    list-style: none;
}

.message {
    max-width: min(82%, 620px);
    padding: 13px 15px;
    border: 1px solid var(--line);
    background: var(--paper);
}

.user-message {
    align-self: flex-end;
    border-color: var(--forest-dark);
    background: var(--forest-dark);
    color: #ffffff;
}

.message-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.58rem;
}

.user-message .message-label {
    color: var(--acid);
}

.message p {
    margin: 0;
    font-size: 0.9rem;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.composer {
    margin: 0 16px;
    padding: 14px 16px 12px;
    border: 1px solid var(--line);
    background: var(--surface);
}

.composer textarea {
    width: 100%;
    min-height: 52px;
    max-height: 160px;
    resize: vertical;
    border: 0;
    background: transparent;
    color: var(--ink);
    font-size: 0.9rem;
    line-height: 1.5;
}

.composer textarea:focus {
    outline: none;
}

.composer textarea::placeholder {
    color: #7b877f;
}

.composer-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
}

.character-count {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.62rem;
}

.send-button {
    min-width: 88px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 12px;
    border: 0;
    background: var(--forest-dark);
    color: #ffffff;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 700;
}

.send-button:hover:not(:disabled) {
    background: var(--forest);
}

.send-button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.status-message {
    min-height: 24px;
    margin: 7px 18px 0;
    color: var(--muted);
    font-size: 0.74rem;
}

.site-footer {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.74rem;
}

.site-footer a {
    color: var(--ink);
    text-underline-offset: 3px;
}

.footer-dot {
    padding-inline: 3px;
    color: var(--forest);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    clip-path: inset(50%);
}

@media (max-width: 760px) {
    .app-shell {
        width: calc(100% - 32px);
    }

    .assistant-layout {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 34px 0 28px;
    }

    .intro {
        padding: 0;
    }

    h1 {
        max-width: 480px;
        font-size: 2.5rem;
    }

    .intro-copy {
        margin-bottom: 22px;
    }

    .scope-note {
        padding-block: 14px;
    }

    .suggestions {
        margin-top: 22px;
    }

    .chat-panel {
        min-height: 560px;
        max-height: none;
    }

    .site-footer {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        padding: 14px 0;
    }
}

@media (max-width: 420px) {
    .app-shell {
        width: calc(100% - 24px);
    }

    h1 {
        font-size: 2.2rem;
    }

    .chat-header {
        padding-inline: 14px;
    }

    .messages {
        padding: 18px 14px;
    }

    .composer {
        margin-inline: 10px;
        padding-inline: 11px;
    }

    .message {
        max-width: 94%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
