@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@700;800&display=swap");

:root {
    --paper: #fafaf5;
    --ink: #233b2c;
    --accent: #2f573c;
    --line: #d9dfd0;
    --dock-clearance: 100px;
}
* {
    box-sizing: border-box;
}
[hidden] {
    display: none !important;
}
body {
    margin: 0;
    padding-bottom: var(--dock-clearance);
    background: var(--paper);
    color: var(--ink);
    font:
        15px/1.6 "DM Sans",
        sans-serif;
}
html {
    scroll-padding-bottom: var(--dock-clearance);
}
button,
input,
textarea {
    font: inherit;
}
button,
a {
    touch-action: manipulation;
}
button {
    cursor: pointer;
}
button:disabled {
    cursor: wait;
    opacity: 0.6;
}
a {
    color: inherit;
    text-underline-offset: 4px;
}
a,
p,
.status {
    overflow-wrap: anywhere;
}
button:focus-visible,
a:focus-visible,
textarea:focus-visible,
input:focus-visible,
summary:focus-visible,
[tabindex="-1"]:focus-visible {
    outline: 3px solid #a57423;
    outline-offset: 3px;
}
h2 {
    font:
        400 28px/1.2 Georgia,
        serif;
    margin: 0 0 8px;
}
.site {
    max-width: 1440px;
    margin: auto;
}
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 28px;
    border-bottom: 1px solid var(--line);
    gap: 20px;
}
.brand {
    font:
        800 23px "Manrope",
        sans-serif;
    letter-spacing: -1px;
    text-decoration: none;
}
.brand span {
    color: #758554;
}
.links {
    display: flex;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
    font-size: 13px;
}
.links a {
    text-decoration: none;
}
.hero {
    max-width: 1100px;
    padding: 20px 28px 0;
    margin: auto;
}
.hero img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}
.hero p {
    text-align: center;
    margin: 10px 0 0;
    font-size: 12px;
    color: #576257;
}
.guide {
    max-width: 1100px;
    margin: auto;
    padding: 12px 28px;
}
.guide h2 {
    font-size: 24px;
    margin-bottom: 6px;
}
.guide > p {
    font-size: 13px;
    margin: 4px 0 8px;
}
.instruction-section {
    padding: 6px 0;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
    line-height: 1.5;
}
.instruction-section h3 {
    display: inline;
    font-size: inherit;
    margin: 0;
}
.instruction-section h3::after {
    content: ": ";
    white-space: pre;
}
.instruction-section p {
    display: inline;
    margin: 0;
    color: #40513b;
}
.workspace {
    max-width: 1044px;
    margin: auto;
    padding: 18px 0;
}
.disclaimer {
    font-size: 12px;
    color: #576257;
    margin: 0 0 14px;
}
.transcript {
    border-top: 1px solid var(--line);
    padding-top: 12px;
    overflow-wrap: anywhere;
}
.transcript:empty {
    display: none;
}
.transcript > p {
    margin: 0 0 14px;
}
.bot-turn {
    margin-bottom: 22px;
    scroll-margin-top: 16px;
}
.bot-turn > strong {
    display: block;
    color: #426447;
    font-size: 12px;
    margin-bottom: 10px;
}
.bot-turn p {
    margin: 0 0 12px;
}
.bot-turn h1,
.bot-turn h2,
.bot-turn h3,
.bot-turn h4 {
    font:
        600 15px/1.6 "DM Sans",
        sans-serif;
    margin: 16px 0 4px;
}
.bot-turn ol,
.bot-turn ul {
    padding-left: 24px;
}
.bot-turn li {
    margin-bottom: 8px;
}
.bot-turn a {
    color: #43663c;
}
.bot-turn pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.bot-turn table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
}
.bot-turn td,
.bot-turn th {
    padding: 6px;
    border: 1px solid var(--line);
}
.notice {
    max-width: 1044px;
    margin: 0 auto 12px;
    padding: 12px 0;
    border-block: 1px solid var(--line);
}
.notice summary {
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}
.notice p {
    margin: 8px 0 0;
    font-size: 13px;
    max-width: 95ch;
}
.footer {
    border-top: 1px solid var(--line);
    padding: 16px 28px;
    display: flex;
    justify-content: space-between;
    gap: 25px;
    font-size: 12px;
}
.footer p {
    max-width: 80ch;
    margin: 0;
}
.footer button {
    align-self: center;
    flex-shrink: 0;
}
.open-ask {
    color: var(--accent);
    border: 1px solid #bfccb7;
    border-radius: 5px;
    background: #f6f8f1;
    padding: 7px 12px;
}
.primary {
    border: 0;
    background: var(--accent);
    color: white;
    padding: 10px 16px;
    border-radius: 7px;
    font-weight: 600;
}
.secondary {
    border: 1px solid #d1d9ca;
    background: white;
    color: #304832;
    padding: 9px 12px;
    border-radius: 7px;
    font-size: 12px;
}
#ask-dock {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    pointer-events: none;
    padding: 8px max(16px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}
#ask-dock > * {
    pointer-events: auto;
}
.launcher-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    max-width: 100%;
}
#dock-status:empty {
    display: none;
}
#dock-status {
    background: var(--paper);
    padding: 4px 8px;
    border-radius: 5px;
}
#ask-launch {
    box-shadow: 0 3px 16px #20382324;
}
#ask-panel {
    width: min(1044px, 100%);
    max-height: 65dvh;
    margin: auto;
    background: white;
    border: 1px solid #c9d3c0;
    border-radius: 10px;
    box-shadow: 0 -4px 24px #20382316;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.dock-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 16px;
    font-size: 14px;
    flex-shrink: 0;
}
.dock-heading button {
    background: transparent;
    border: 0;
    color: #36523a;
    padding: 7px;
}
.panel-content {
    padding: 0 16px 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.question-form label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 4px;
}
.primary-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}
textarea {
    flex: 1;
    min-width: 0;
    width: 100%;
    resize: vertical;
    min-height: 54px;
    height: 54px;
    max-height: 150px;
    padding: 10px;
    border: 1px solid #bdcab9;
    background: #fbfcf8;
    color: var(--ink);
    border-radius: 9px;
    font-size: 16px;
}
.session {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 6px;
}
.upload {
    border-top: 1px solid var(--line);
    margin-top: 8px;
    padding-top: 8px;
}
.upload summary {
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    min-height: 24px;
}
.upload input {
    max-width: 100%;
    width: 100%;
    font-size: 14px;
}
.hint,
.status {
    font-size: 12px;
    color: #576257;
    margin: 4px 0;
}
.message {
    font-size: 13px;
    background: #edf2e6;
    padding: 8px 12px;
    border-radius: 6px;
    margin: 6px 0;
}
.message:empty {
    display: none;
}
.error {
    color: #9c271d;
}
@media (max-width: 1100px) {
    .workspace,
    .notice {
        margin-left: 28px;
        margin-right: 28px;
    }
}
@media (max-width: 760px) {
    .nav {
        padding: 14px 18px;
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 10px;
    }
    .brand {
        font-size: 20px;
    }
    .links {
        gap: 10px;
        font-size: 12px;
    }
    .hero {
        padding: 12px 18px 0;
    }
    .guide {
        padding: 10px 18px;
    }
    .instruction-section {
        padding: 7px 0;
        line-height: 1.55;
    }
    .workspace {
        margin: 0 18px;
        padding: 16px 0;
    }
    .notice {
        margin: 0 18px 10px;
    }
    .footer {
        padding: 16px 18px;
        flex-direction: column;
    }
    .footer button {
        align-self: flex-start;
    }
    .open-ask {
        min-height: 40px;
    }
    #ask-dock {
        padding: 6px 8px max(6px, env(safe-area-inset-bottom));
    }
    .dock-heading {
        padding: 2px 12px;
    }
    .dock-heading button {
        min-height: 40px;
    }
    .panel-content {
        padding: 0 12px 10px;
    }
    .primary {
        min-height: 44px;
    }
    .secondary {
        min-height: 36px;
    }
}
