:root {
    --bg: #fff;
    --surface: #f9f9f9;
    --surface2: #ededed;
    --ink: #202020;
    --muted: #686868;
    --line: #e5e5e5;
    --accent: #202020;
    --accent-soft: #eeeeee;
    --error: #a33535;
    --error-soft: #fff0ef;
    --shadow: 0 16px 60px #00000018;
    --radius: 12px;
    color-scheme: light;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-synthesis: none;
    font-size: 14px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--bg)
}

:root[data-theme=dark] {
    --bg: #212121;
    --surface: #171717;
    --surface2: #303030;
    --ink: #ececec;
    --muted: #aaaaaa;
    --line: #3b3b3b;
    --accent: #ececec;
    --accent-soft: #303030;
    --error: #ffa59e;
    --error-soft: #3a2424;
    --shadow: 0 16px 60px #0005;
    color-scheme: dark
}

* {
    box-sizing: border-box
}

body {
    margin: 0
}

button,
input,
textarea,
select {
    font: inherit
}

button,
a,
input,
textarea,
select {
    -webkit-tap-highlight-color: transparent
}

button {
    cursor: pointer
}

button:disabled {
    cursor: not-allowed;
    opacity: .55
}

button {
    color: inherit
}

button:active:not(:disabled) {
    transform: translateY(1px)
}

a {
    color: var(--accent);
    text-underline-offset: 3px
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px
}

[hidden] {
    display: none !important
}

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

h1,
h2,
h3 {
    line-height: 1.2;
    letter-spacing: -.045em;
    font-weight: 600
}

small {
    font-size: 12px;
    color: var(--muted)
}

label {
    font-weight: 500
}

input,
textarea,
select {
    color: var(--ink);
    background: var(--bg)
}

input,
select {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 11px 12px;
    min-width: 0
}

input::placeholder,
textarea::placeholder {
    color: var(--muted);
    opacity: 1
}

button {
    border: 0;
    background: none
}

button,
a {
    transition: background .15s, color .15s
}

button:hover:not(:disabled) {
    filter: brightness(.96)
}

:root[data-theme=dark] button:hover:not(:disabled) {
    filter: brightness(1.1)
}

.muted {
    color: var(--muted)
}

.eyebrow {
    display: block;
    font-size: 10px;
    letter-spacing: .18em;
    font-weight: 650;
    color: var(--muted);
    margin-bottom: 18px
}

.brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 23px;
    letter-spacing: -1px;
    text-decoration: none;
    color: var(--ink);
    font-weight: 650;
    white-space: nowrap
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 35px;
    height: 35px;
    border-radius: 11px;
    background: var(--accent);
    color: var(--bg);
    font-size: 30px;
    line-height: 1;
    letter-spacing: -2px;
    padding-bottom: 6px;
    padding-right: 3px
}

.beta {
    font-size: 9px;
    letter-spacing: .05em;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 1px 4px;
    color: var(--muted);
    margin-left: 2px
}

.dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    flex: none
}

.primary {
    background: var(--accent);
    color: var(--bg);
    border-radius: 8px;
    padding: 12px 18px;
    display: inline-flex;
    gap: 22px;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap
}

.full {
    width: 100%;
    justify-content: space-between
}

.outline-button,
.small-button {
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 8px 13px;
    white-space: nowrap;
    font-size: 12px;
    background: var(--bg)
}

.small-button {
    padding: 6px 9px;
    font-size: 11px
}

.icon-btn {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 7px;
    font-size: 20px;
    line-height: 1;
    flex: none
}

.icon-btn:hover {
    background: var(--surface2)
}

.quiet-button {
    font-size: 12px;
    color: var(--muted);
    padding: 7px 10px;
    border-radius: 7px
}

.quiet-button:hover {
    background: var(--surface2);
    color: var(--ink)
}

.notice,
.error-banner {
    font-size: 12px;
    padding: 12px 15px;
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--ink);
    margin: 16px 0
}

.error-banner {
    background: var(--error-soft);
    color: var(--error);
    white-space: pre-line
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0)
}

.workspace {
    height: 100dvh;
    display: grid;
    grid-template-columns: 272px minmax(0, 1fr);
    overflow: hidden
}

.sidebar {
    background: var(--surface);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 28px 17px 0
}

.sidebar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px;
    margin-bottom: 33px
}

.sidebar-top .icon-btn {
    font-size: 18px;
    color: var(--muted)
}

.new-chat {
    display: flex;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--line);
    background: var(--bg);
    padding: 11px 10px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 550;
    text-align: left;
    box-shadow: none
}

.new-chat>span {
    font-size: 20px;
    line-height: 1;
    color: var(--accent)
}

kbd {
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--muted);
    font-size: 9px;
    padding: 1px 4px;
    font-family: inherit
}

.search {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 17px 3px 29px;
    color: var(--muted)
}

.search span {
    font-size: 23px;
    line-height: 1
}

.search input {
    background: transparent;
    border: 0;
    padding: 4px 0;
    width: 100%;
    font-size: 12px;
    outline-offset: 3px
}

.history-heading {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 9px;
    letter-spacing: .12em;
    padding: 0 10px;
    margin-bottom: 12px
}

.history {
    overflow-y: auto;
    flex: 1;
    min-height: 80px;
    padding-bottom: 20px
}

.history-item {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
    padding: 11px 10px;
    font-size: 12px;
    border-radius: 7px;
    color: var(--muted);
    margin: 2px 0
}

.history-item:hover {
    background: var(--surface2);
    color: var(--ink)
}

.history-item.active {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 550
}

.history-empty {
    font-size: 12px;
    color: var(--muted);
    padding: 0 10px;
    line-height: 1.7
}

.sidebar-bottom {
    margin-top: auto
}

.credit-block {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 14px 12px;
    background: var(--bg);
    margin-bottom: 13px
}

.credit-block>div:first-child {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 9px;
    letter-spacing: .08em;
    color: var(--muted);
    font-weight: 600
}

.balance-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 8px 0 2px;
    gap: 6px
}

.balance-line strong {
    font-size: 25px;
    letter-spacing: -.06em;
    font-weight: 550;
    line-height: 1.5
}

.credit-block small {
    font-size: 10px
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: left;
    padding: 10px 9px;
    font-size: 11px;
    color: var(--muted)
}

.sidebar-link>span:first-child {
    font-size: 18px;
    line-height: 1
}

.sidebar-link>span:last-child {
    margin-left: auto;
    font-size: 10px
}

.account-button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: calc(100% + 34px);
    margin: 13px -17px 0;
    padding: 17px 21px;
    border-top: 1px solid var(--line);
    text-align: left
}

.avatar {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    background: var(--bg);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600
}

.account-button strong {
    display: block;
    font-size: 11px;
    max-width: 155px;
    overflow: hidden;
    text-overflow: ellipsis
}

.account-button small {
    display: block;
    font-size: 10px
}

.account-button>span:last-child {
    margin-left: auto;
    font-size: 17px;
    color: var(--muted)
}

.main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0
}

.topbar {
    height: 77px;
    flex: none;
    border-bottom: 1px solid var(--line);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px
}

.topbar-left,
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 0
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 11px;
    color: var(--muted);
    min-width: 0
}

.breadcrumb strong {
    font-weight: 500;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px
}

.status-chip {
    font-size: 9px;
    letter-spacing: .025em;
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 4px 8px;
    border-radius: 5px;
    white-space: nowrap
}

.topbar-actions {
    gap: 13px
}

#expand {
    display: none
}

.conversation-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 35px 8px;
    flex: none
}

.conversation-toolbar>div {
    display: flex;
    align-items: center;
    gap: 3px
}

.model-picker {
    display: flex;
    align-items: center;
    gap: 8px
}

.model-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 3px;
    transform: rotate(-12deg)
}

.model-picker select {
    border: 0;
    background: transparent;
    font-size: 12px;
    max-width: 320px;
    padding: 7px 23px 7px 0;
    font-weight: 550;
    cursor: pointer
}

.review-banner {
    margin: 0 35px 5px;
    font-size: 10px;
    color: var(--accent);
    display: flex;
    gap: 9px;
    align-items: center
}

.review-banner>span {
    color: var(--muted);
    font-size: 10px
}

.conversation-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    scroll-behavior: smooth;
    padding: 0 32px
}

.welcome {
    width: 100%;
    max-width: 690px;
    margin: 0 auto;
    padding: 40px 0 25px
}

.welcome-emblem {
    font-weight: 650;
    font-size: 48px;
    letter-spacing: -5px;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 23px
}

.welcome .eyebrow {
    font-size: 9px;
    margin-bottom: 13px
}

.welcome h1 {
    font-size: clamp(33px, 3.5vw, 48px);
    letter-spacing: -.055em;
    line-height: 1.14;
    margin-bottom: 17px
}

.welcome>p {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.8;
    margin-bottom: 28px
}

.suggestions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px
}

.suggestions>button {
    position: relative;
    text-align: left;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 18px 15px 17px 47px;
    min-height: 89px;
    background: var(--bg)
}

.suggestions>button:hover {
    border-color: var(--accent);
    background: var(--surface)
}

.suggestion-icon {
    position: absolute;
    left: 17px;
    top: 18px;
    color: var(--accent);
    font-size: 20px;
    line-height: 1.2
}

.suggestions strong {
    font-size: 12px;
    font-weight: 550;
    margin-bottom: 5px;
    letter-spacing: -.01em
}

.suggestions button>span:last-child {
    font-size: 11px;
    color: var(--muted)
}

.welcome-note {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 24px;
    font-size: 10px;
    color: var(--muted)
}

.welcome-note .dot {
    width: 4px;
    height: 4px
}

.messages {
    max-width: 760px;
    margin: 0 auto;
    padding: 30px 0
}

.messages:empty {
    padding: 0
}

.message {
    margin-bottom: 26px;
    position: relative;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    overflow-wrap: anywhere
}

.message-avatar {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    flex: none;
    font-size: 17px;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600
}

.message.user {
    justify-content: flex-end;
    padding-left: 35px
}

.message.user .message-body {
    background: var(--surface);
    padding: 12px 18px;
    border-radius: 12px;
    max-width: 90%
}

.message-body {
    min-width: 0;
    flex: 1;
    font-size: 14px;
    line-height: 1.8
}

.message.user .message-body {
    flex: 0 1 auto
}

.message-body p:last-child {
    margin-bottom: 0
}

.message-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    color: var(--muted);
    font-size: 10px
}

.message-meta button {
    padding: 3px 7px;
    border-radius: 5px;
    font-size: 10px;
    color: var(--muted);
    border: 1px solid var(--line)
}

.message-body pre {
    position: relative;
    overflow: auto;
    padding: 35px 18px 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 9px;
    font-size: 12px;
    line-height: 1.7;
    max-width: 100%
}

.message-body pre>button {
    position: absolute;
    right: 9px;
    top: 7px;
    font-size: 10px;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 3px 7px;
    background: var(--bg)
}

code {
    font-family: Consolas, 'Courier New', monospace;
    font-size: .9em
}

p code,
li code {
    background: var(--surface2);
    padding: 2px 4px;
    border-radius: 4px
}

.message-body blockquote {
    margin-left: 0;
    border-left: 3px solid var(--line);
    padding-left: 15px;
    color: var(--muted)
}

.message-body table {
    border-collapse: collapse;
    width: 100%;
    overflow: auto;
    display: block
}

td,
th {
    border: 1px solid var(--line);
    padding: 8px 12px;
    text-align: left
}

.message-body h1 {
    font-size: 26px
}

.message-body h2 {
    font-size: 22px
}

.message-body h3 {
    font-size: 18px
}

.message-body img {
    display: block;
    max-width: 100%;
    max-height: 450px;
    border-radius: 10px;
    margin-top: 14px
}

.message-error {
    padding: 9px 12px;
    background: var(--error-soft);
    color: var(--error);
    border-radius: 6px;
    font-size: 11px;
    margin-top: 10px
}

.typing {
    width: 85px;
    height: 16px;
    margin: 9px 0;
    background: linear-gradient(90deg, var(--surface2) 25%, var(--line) 50%, var(--surface2) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 5px
}

.skeleton {
    color: var(--muted);
    font-size: 12px;
    padding: 10px;
    animation: fade 1.5s alternate infinite
}

@keyframes shimmer {
    to {
        background-position: -200% 0
    }
}

@keyframes fade {
    to {
        opacity: .4
    }
}

.composer-area {
    width: 100%;
    max-width: 824px;
    padding: 0 32px;
    align-self: center;
    flex: none
}

.composer {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 15px 14px 11px;
    box-shadow: none;
    background: var(--bg)
}

.composer:focus-within {
    border-color: var(--accent)
}

.composer textarea {
    width: 100%;
    border: 0;
    resize: vertical;
    min-height: 48px;
    max-height: 180px;
    background: transparent;
    padding: 0 3px;
    font-size: 13px;
    line-height: 1.6;
    outline: none
}

.composer-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px
}

.composer-tools-left {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0
}

.composer-tools-left>span {
    font-size: 10px;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

.send-button {
    background: var(--accent);
    color: var(--bg);
    border-radius: 7px;
    font-size: 11px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 550
}

.send-button span {
    font-size: 19px;
    line-height: 1
}

.stop-button {
    font-size: 11px;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 7px
}

.composer-footer {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: var(--muted);
    gap: 10px;
    margin: 9px 2px 0
}

.composer-footer>span {
    max-width: 72%
}

.composer-footer button {
    padding: 0;
    font-size: 9px;
    color: var(--muted);
    white-space: nowrap
}

.main-footer {
    padding: 21px 32px 15px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 9px;
    color: var(--muted);
    flex: none
}

.main-footer>div {
    display: flex;
    gap: 16px
}

.main-footer a {
    color: var(--muted);
    text-decoration: none
}

.quote-panel {
    background: var(--surface);
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    margin-top: 12px
}

.quote-panel strong {
    font-size: 13px
}

.quote-panel p {
    font-size: 12px;
    margin: 8px 0
}

.quote-panel small {
    font-size: 10px
}

.quote-actions {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-top: 13px
}

.quote-actions label {
    font-size: 10px;
    flex: 1
}

.quote-actions input {
    display: block;
    width: 100%;
    padding: 8px;
    margin-top: 4px
}

.quote-actions button {
    font-size: 11px;
    padding: 10px 12px
}

.attachment {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    font-size: 12px
}

.attachment img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line)
}

.attachment button {
    color: var(--error);
    font-size: 11px
}

.workspace.collapsed {
    grid-template-columns: 0 minmax(0, 1fr)
}

.workspace.collapsed .sidebar {
    visibility: hidden
}

.workspace.collapsed #expand {
    display: inline-grid
}

.panel {
    background: var(--bg);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 28px;
    box-shadow: var(--shadow);
    width: 620px;
    max-width: calc(100vw - 30px);
    max-height: 85dvh
}

.panel::backdrop {
    background: #00000066;
    backdrop-filter: blur(3px)
}

.panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    padding-bottom: 20px;
    margin-bottom: 20px
}

.panel-heading .eyebrow {
    font-size: 9px;
    margin-bottom: 8px
}

.panel-heading h2 {
    font-size: 26px;
    margin: 0
}

.panel p {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.8
}

.panel h3 {
    font-size: 16px;
    margin: 23px 0 10px
}

.panel .panel-row {
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    font-size: 12px
}

.panel-row small {
    display: block;
    font-size: 10px
}

.panel-row button {
    flex: none
}

.panel input,
.panel textarea {
    width: 100%;
    margin: 5px 0 12px
}

.panel textarea {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    resize: vertical;
    min-height: 90px
}

.toggle-label {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    font-size: 13px
}

.toggle-label input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--accent)
}

.bundle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
    gap: 12px
}

.bundle strong {
    display: block;
    font-size: 13px
}

.bundle small {
    font-size: 11px
}

.bundle button {
    font-size: 12px
}

.bundle .bundle-price {
    font-size: 18px;
    font-weight: 600;
    margin-right: 12px
}

.usage-balances {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 20px 0
}

.usage-balances>div {
    padding: 13px;
    background: var(--surface);
    border-radius: 8px;
    font-size: 10px;
    color: var(--muted)
}

.usage-balances strong {
    display: block;
    color: var(--ink);
    font-size: 20px;
    letter-spacing: -.04em;
    font-weight: 550
}

.usage-table {
    width: 100%;
    font-size: 11px;
    border-collapse: collapse
}

.usage-table td,
.usage-table th {
    border: 0;
    border-bottom: 1px solid var(--line);
    padding: 12px 6px
}

.usage-table th {
    color: var(--muted);
    font-weight: 500;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .05em
}

.usage-table td:last-child,
.usage-table th:last-child {
    text-align: right
}

.usage-table small {
    font-size: 9px
}

.table-wrap {
    overflow: auto
}

.badge {
    font-size: 9px;
    padding: 3px 6px;
    background: var(--surface2);
    border-radius: 4px;
    white-space: nowrap
}

.danger {
    color: var(--error)
}

button.danger {
    border: 1px solid var(--error);
    padding: 10px 13px;
    border-radius: 7px;
    font-size: 12px
}

.toast {
    position: fixed;
    z-index: 100;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--ink);
    color: var(--bg);
    padding: 12px 20px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    max-width: 90vw;
    font-size: 12px
}

.auth-layout {
    min-height: 100dvh;
    display: grid;
    grid-template-columns: 1fr 1fr
}

.auth-story {
    background: var(--surface);
    padding: 48px 60px 35px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--line)
}

.auth-pitch {
    margin: auto 0;
    padding: 70px 0
}

.auth-pitch .eyebrow {
    color: var(--accent);
    margin-bottom: 25px
}

.auth-pitch h1 {
    font-size: clamp(50px, 5.3vw, 78px);
    line-height: 1.05;
    letter-spacing: -.065em;
    margin-bottom: 27px
}

.auth-pitch p {
    font-size: 15px;
    line-height: 1.9;
    color: var(--muted)
}

.auth-foot {
    font-size: 11px;
    color: var(--muted);
    display: flex;
    gap: 8px;
    align-items: center
}

.auth-form-wrap {
    padding: 45px 60px 28px;
    display: flex;
    flex-direction: column
}

.auth-form {
    width: 100%;
    max-width: 360px;
    margin: auto;
    padding: 45px 0
}

.auth-form h2 {
    font-size: 32px;
    margin-bottom: 12px
}

.auth-form>.muted {
    font-size: 13px;
    margin-bottom: 25px
}

.auth-form .eyebrow {
    font-size: 9px
}

.field {
    margin-bottom: 18px
}

.field label {
    display: block;
    font-size: 12px;
    margin-bottom: 7px
}

.field input {
    width: 100%;
    font-size: 13px
}

.field small {
    display: block;
    font-size: 10px;
    margin-top: 7px
}

.auth-form .notice {
    font-size: 11px;
    margin-bottom: 23px
}

.small-link {
    display: block;
    text-align: right;
    font-size: 11px;
    margin: -5px 0 25px;
    text-decoration: none
}

.errorlist {
    font-size: 11px;
    color: var(--error);
    padding-left: 18px
}

.auth-switch {
    font-size: 12px;
    text-align: center;
    margin: 23px 0
}

.auth-switch a {
    font-weight: 600;
    text-decoration: none
}

.fineprint {
    font-size: 10px;
    line-height: 1.8;
    color: var(--muted);
    text-align: center
}

.fineprint a {
    color: var(--muted)
}

.auth-footer {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--muted);
    gap: 15px
}

.mobile-brand {
    display: none
}

.simple-page {
    max-width: 480px;
    margin: 60px auto;
    padding: 25px
}

.simple-page .brand {
    margin-bottom: 60px
}

.simple-page label {
    display: block;
    font-size: 12px
}

.simple-page input {
    width: 100%;
    margin-top: 5px
}

.simple-page h1 {
    font-size: 38px
}

.simple-page p {
    font-size: 13px
}

.policy-page {
    max-width: 760px;
    margin: 50px auto;
    padding: 25px
}

.policy-page .brand {
    margin-bottom: 65px
}

.policy-page h1 {
    font-size: 46px
}

.policy-page h2 {
    font-size: 22px;
    margin: 35px 0 15px
}

.policy-page p {
    font-size: 14px;
    line-height: 1.9;
    color: var(--muted)
}

.k,
.kn,
.kd {
    color: var(--accent)
}

.s,
.s1,
.s2,
.c,
.c1 {
    color: var(--muted)
}

@media(min-width:1500px) {
    .welcome {
        padding-top: 75px
    }

    .workspace {
        grid-template-columns: 286px minmax(0, 1fr)
    }

    .welcome h1 {
        font-size: 50px
    }

    .composer-area {
        max-width: 870px
    }

    .welcome {
        max-width: 720px
    }
}

@media(max-height:820px) and (min-width:769px) {
    .welcome {
        padding-top: 15px
    }

    .welcome-emblem {
        font-size: 39px;
        margin-bottom: 15px
    }

    .welcome h1 {
        font-size: 38px
    }

    .welcome>p {
        margin-bottom: 20px
    }

    .suggestions>button {
        min-height: 76px;
        padding-top: 13px;
        padding-bottom: 13px
    }

    .welcome-note {
        margin-top: 17px
    }

    .main-footer {
        padding-top: 13px
    }

    .topbar {
        height: 65px
    }
}

@media(max-width:1050px) {
    .workspace {
        grid-template-columns: 240px minmax(0, 1fr)
    }

    .sidebar {
        padding-left: 13px;
        padding-right: 13px
    }

    .brand {
        font-size: 21px
    }

    .sidebar-top {
        padding: 0
    }

    .sidebar-top .icon-btn {
        width: 25px
    }

    .new-chat {
        font-size: 11px
    }

    .new-chat kbd {
        display: none
    }

    .account-button {
        width: calc(100% + 26px);
        margin-left: -13px;
        margin-right: -13px;
        padding-left: 17px;
        padding-right: 17px
    }

    .status-chip {
        display: none
    }

    .topbar {
        padding: 0 24px
    }

    .breadcrumb {
        gap: 10px
    }

    .breadcrumb strong {
        max-width: 170px
    }

    .topbar-actions {
        gap: 9px
    }

    .conversation-toolbar {
        padding-left: 26px;
        padding-right: 24px
    }

    .review-banner {
        margin-left: 26px;
        margin-right: 24px
    }

    .review-banner>span {
        font-size: 9px
    }

    .welcome h1 {
        font-size: 37px
    }

    .suggestions>button {
        padding-left: 38px;
        padding-right: 9px
    }

    .suggestion-icon {
        left: 12px
    }

    .suggestions strong {
        font-size: 11px
    }

    .suggestions button>span:last-child {
        font-size: 10px
    }

    .auth-story {
        padding: 40px
    }

    .auth-form-wrap {
        padding: 35px
    }

    .composer-footer>span {
        max-width: 60%
    }
}

@media(max-width:768px) {

    .workspace,
    .workspace.collapsed {
        grid-template-columns: minmax(0, 1fr)
    }

    .sidebar,
    .workspace.collapsed .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 280px;
        z-index: 30;
        visibility: visible;
        transform: translateX(-100%);
        transition: transform .2s
    }

    .workspace.mobile-open .sidebar {
        transform: translateX(0)
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        background: #00000070;
        z-index: 29
    }

    .workspace.mobile-open .sidebar-backdrop {
        display: block !important
    }

    #expand {
        display: inline-grid
    }

    .topbar {
        height: 59px;
        padding: 0 15px
    }

    .breadcrumb>span {
        display: none
    }

    .breadcrumb strong {
        font-size: 11px;
        max-width: 150px
    }

    .topbar-left {
        gap: 8px
    }

    .topbar-actions {
        gap: 4px
    }

    .topbar-actions .outline-button {
        font-size: 10px;
        padding: 7px 9px
    }

    .conversation-toolbar {
        padding: 11px 19px 5px
    }

    .model-picker select {
        font-size: 11px;
        max-width: 230px
    }

    .conversation-toolbar .icon-btn {
        width: 27px;
        font-size: 18px
    }

    .conversation-toolbar .quiet-button {
        font-size: 10px;
        padding: 5px
    }

    .review-banner {
        margin: 0 20px 3px;
        font-size: 9px;
        align-items: flex-start
    }

    .review-banner>span {
        font-size: 8px;
        max-width: 250px
    }

    .conversation-scroll {
        padding: 0 22px
    }

    .welcome {
        padding: 30px 0 20px;
        max-width: 510px
    }

    .welcome-emblem {
        font-size: 42px;
        margin-bottom: 20px
    }

    .welcome h1 {
        font-size: 38px
    }

    .welcome>p {
        font-size: 12px;
        margin-bottom: 23px
    }

    .suggestions {
        gap: 8px
    }

    .suggestions>button {
        padding: 14px 12px;
        min-height: 108px
    }

    .suggestion-icon {
        position: static;
        margin-bottom: 9px;
        font-size: 18px
    }

    .suggestions strong {
        font-size: 11px
    }

    .suggestions button>span:last-child {
        font-size: 10px
    }

    .welcome-note {
        font-size: 9px;
        gap: 6px;
        margin-top: 20px
    }

    .composer-area {
        padding: 0 15px
    }

    .composer {
        padding: 12px;
        border-radius: 12px
    }

    .composer textarea {
        font-size: 14px;
        min-height: 43px
    }

    .composer-tools-left>span {
        font-size: 9px;
        max-width: 200px
    }

    .composer-footer {
        font-size: 8px;
        gap: 8px;
        margin-top: 7px
    }

    .composer-footer>span {
        max-width: 62%
    }

    .composer-footer button {
        font-size: 8px
    }

    .main-footer {
        padding: 12px 17px 9px;
        font-size: 8px
    }

    .main-footer>span {
        max-width: 60%
    }

    .main-footer>div {
        gap: 11px
    }

    .main-footer>div>span {
        display: none
    }

    .quote-panel {
        padding: 12px;
        margin-top: 8px
    }

    .quote-actions {
        flex-wrap: wrap;
        gap: 8px
    }

    .quote-actions label {
        min-width: 110px
    }

    .quote-actions .primary {
        font-size: 11px
    }

    .quote-actions .quiet-button {
        font-size: 10px;
        padding: 8px
    }

    .quote-panel p {
        font-size: 11px
    }

    .messages {
        padding: 25px 0
    }

    .message {
        gap: 9px
    }

    .message-avatar {
        width: 24px;
        height: 24px;
        font-size: 15px
    }

    .message-body {
        font-size: 13px
    }

    .message.user {
        padding-left: 15px
    }

    .message.user .message-body {
        max-width: 95%;
        padding: 10px 14px
    }

    .panel {
        padding: 22px;
        max-height: 88dvh
    }

    .panel-heading h2 {
        font-size: 24px
    }

    .auth-layout {
        grid-template-columns: 1fr
    }

    .auth-story {
        display: none
    }

    .auth-form-wrap {
        padding: 28px 26px;
        min-height: 100dvh
    }

    .auth-form {
        padding: 45px 0
    }

    .mobile-brand {
        display: flex
    }

    .auth-form h2 {
        font-size: 30px
    }

    .auth-footer {
        font-size: 9px
    }

    .policy-page {
        margin: 25px auto;
        padding: 24px
    }

    .policy-page h1 {
        font-size: 36px
    }
}

@media(prefers-reduced-motion:reduce) {

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important
    }
}

@media(max-width:768px) {
    .model-picker {
        min-width: 0;
        max-width: calc(100% - 133px)
    }

    .model-picker select {
        min-width: 0;
        width: 100%
    }

    .conversation-toolbar .quiet-button {
        white-space: nowrap
    }

    .conversation-toolbar>div {
        flex: none
    }
}

/* Quiet chat layout: secondary controls live in menus, with a neutral palette. */
.main { position: relative; }
.topbar { height: 68px; border-bottom: 0; padding: 0 24px; }
.topbar-left { flex: 1; }
.model-picker { min-width: 0; max-width: none; }
.model-picker select { width: auto; max-width: 320px; font-size: 15px; font-weight: 550; color: var(--ink); }
.chat-options { position: relative; }
.chat-options summary { list-style: none; font-size: 25px; letter-spacing: 1px; }
.chat-options summary::-webkit-details-marker { display: none; }
.chat-options-menu { position: absolute; right: 0; top: 42px; z-index: 20; width: 225px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); box-shadow: var(--shadow); }
.chat-options-menu button { display: block; width: 100%; padding: 10px 12px; border-radius: 7px; text-align: left; font-size: 13px; }
.chat-options-menu button:hover { background: var(--surface2); }
.sidebar { padding-top: 22px; }
.sidebar-top { margin-bottom: 24px; }
.sidebar-top .brand { font-size: 22px; letter-spacing: -.8px; }
.new-chat { border: 0; background: transparent; box-shadow: none; font-size: 13px; }
.new-chat:hover { background: var(--surface2); }
.search { margin-bottom: 24px; }
.history-heading { text-transform: none; letter-spacing: 0; font-size: 12px; }
.history-item { font-size: 13px; }
.history-empty { font-size: 12px; }
.credit-block { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 8px; padding: 12px 8px; background: transparent; border: 0; border-radius: 0; margin: 0; }
.credit-block .balance-summary { display: flex; align-items: center; gap: 9px; text-align: left; padding: 0; letter-spacing: 0; color: var(--muted); font-size: 12px; }
.balance-summary strong { font-size: 14px; font-weight: 600; color: var(--ink); }
.credit-block>small { grid-column: 1/-1; margin-top: 5px; }
.credit-block .small-button { font-size: 11px; border: 0; background: var(--surface2); border-radius: 8px; }
.account-button { padding-top: 15px; padding-bottom: 17px; margin-top: 5px; }
.account-button strong { font-size: 12px; }
.avatar { background: var(--surface2); border: 0; }
.main.empty { justify-content: center; padding: 95px 0; }
.main.empty .topbar { position: absolute; top: 0; left: 0; right: 0; }
.main.empty .conversation-scroll { flex: 0 1 auto; padding-bottom: 0; }
.welcome { max-width: 760px; padding: 0; margin: 0 auto 30px; text-align: center; }
.welcome h1 { font-size: clamp(28px, 3vw, 36px); font-weight: 550; letter-spacing: -.035em; margin: 0 0 27px; line-height: 1.25; }
.suggestions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.suggestions>button { display: flex; flex-direction: row; align-items: center; gap: 8px; min-height: 0; padding: 10px 14px; border-radius: 20px; background: transparent; }
.suggestion-icon { position: static; font-size: 17px; line-height: 1; color: var(--muted); margin: 0; }
.suggestions strong { margin: 0; font-size: 12px; font-weight: 450; white-space: nowrap; }
.suggestions>button:hover { border-color: var(--muted); background: var(--surface2); }
.composer-area { max-width: 824px; }
.composer { border-radius: 24px; padding: 17px 16px 12px; border: 1px solid var(--line); background: var(--bg); }
:root[data-theme=dark] .composer { background: var(--surface2); border-color: transparent; }
.composer:focus-within { border-color: var(--muted); }
.composer textarea { font-size: 15px; min-height: 45px; }
.send-button { border-radius: 18px; padding: 8px 13px; }
.main-footer { justify-content: center; padding: 12px 20px 14px; font-size: 10px; text-align: center; }
.main.empty .main-footer { position: absolute; bottom: 0; left: 0; right: 0; }
.main-footer>span { max-width: none; }
.cost-details { color: var(--muted); font-size: 11px; }
.cost-details summary { cursor: pointer; }
.cost-details small { display: block; margin-top: 8px; }
.quote-panel { text-align: left; }
.message-meta { flex-wrap: wrap; }
@media(max-width:768px) {
    .topbar { height: 60px; padding: 0 15px; }
    .topbar .model-picker { max-width: calc(100vw - 110px); }
    .topbar .model-picker select { width: 100%; max-width: 100%; font-size: 14px; }
    .main.empty { padding: 82px 0 65px; }
    .welcome { margin-bottom: 25px; }
    .welcome h1 { font-size: 28px; margin-bottom: 23px; }
    .suggestions { max-width: 350px; margin: 0 auto; gap: 9px; }
    .suggestions>button { justify-content: center; padding: 10px 13px; min-height: 0; }
    .suggestions strong { font-size: 11px; }
    .suggestion-icon { font-size: 16px; }
    .composer { border-radius: 22px; padding: 14px 13px 10px; }
    .main-footer { font-size: 9px; padding: 10px 15px 12px; }
}
@media(max-height:560px) {
    .main.empty { justify-content: flex-start; padding-top: 78px; padding-bottom: 35px; }
    .main.empty .conversation-scroll { overflow-y: auto; }
    .welcome { margin-bottom: 16px; }
    .welcome h1 { margin-bottom: 15px; }
}
