@font-face {
  font-family: Geist;
  src: url('/geist-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --bg: #161917;
  --surface: #111412;
  --text: #eff1eb;
  --muted: #a6afa8;
  --line: #343b35;
  --accent: #a6d2b8;
  font-family: Geist, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 16px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, select, input, textarea { font: inherit; }
button, select { cursor: pointer; }
button { color: inherit; background: transparent; border: 0; }
button:disabled { cursor: default; opacity: .48; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1,h2,h3,p { margin: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.wordmark { display: inline-flex; align-items: center; gap: .75rem; font-size: 1.12rem; font-weight: 600; letter-spacing: -.045em; }
.mark { width: 1.5rem; height: 1.5rem; position: relative; display: inline-block; transform: rotate(-8deg); flex: none; }
.mark::before,.mark::after { content: ''; position: absolute; width: .85rem; height: .85rem; border: 2px solid var(--accent); border-radius: 4px; transform: rotate(45deg); }
.mark::before { left: .04rem; top: .28rem; }
.mark::after { left: .46rem; top: .28rem; border-left-color: transparent; border-bottom-color: transparent; }
.loading { padding: 3rem; color: var(--muted); }
.login-view { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.masthead { height: 4.8rem; padding: 0 clamp(1.3rem,5vw,5.3rem); display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); }
.domain,.hardware,.models div span:last-child { font-family: Consolas, ui-monospace, monospace; }
.domain { font-size: .84rem; color: var(--muted); }
.login-grid { flex: 1; width: min(65rem,100%); align-self: center; display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: clamp(3rem,7vw,7rem); padding: 5rem 2.5rem 8rem; }
.model-intro { border-right: 1px solid var(--line); padding-right: clamp(2.6rem,5.6vw,5.5rem); }
.model-intro h1 { font-size: clamp(3.2rem,6.5vw,5.8rem); font-weight: 500; line-height: .99; letter-spacing: -.077em; }
.accent { color: var(--accent); }
.hardware { color: var(--muted); margin: 2.1rem 0 1rem; font-size: .84rem; }
.hardware span { color: #87968b; padding: 0 .25rem; }
.models { border-bottom: 1px solid var(--line); }
.models div { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); padding: .72rem 0; font-size: .96rem; }
.models div span:last-child { font-size: .79rem; color: var(--muted); }
.login-form { max-width: 24rem; width: 100%; }
.login-form h2 { font-size: 2.05rem; letter-spacing: -.055em; font-weight: 550; }
.login-form p { margin-top: .85rem; line-height: 1.55; color: var(--muted); }
.login-form strong { color: var(--text); font-weight: 500; }
.login-form label { display: block; font-size: .9rem; font-weight: 500; margin: 1.8rem 0 .5rem; }
.login-form input { width: 100%; border: 1px solid #525c53; background: var(--surface); color: var(--text); border-radius: .45rem; padding: .76rem .9rem; }
.login-form input::placeholder,textarea::placeholder { color: #a0a9a1; opacity: 1; }
.solid,.send { border: 1px solid transparent; border-radius: .4rem; color: #19201b; background: #e2eae0; font-weight: 600; }
.solid { width: 100%; padding: .78rem .9rem; margin-top: .8rem; }
.solid:not(:disabled):hover,.send:not(:disabled):hover { background: white; }
.error,.login-form .error { color: #ffc2af; }
.workspace { height: 100vh; height: 100dvh; display: grid; grid-template-columns: clamp(13.5rem,18vw,17.5rem) minmax(0,1fr); overflow: hidden; }
.sidebar { background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 1.35rem .85rem 0; min-height: 0; }
.side-top { display: flex; align-items: center; justify-content: space-between; margin: 0 .45rem 1.65rem; }
.new-chat { border: 1px solid #434b44; display: flex; align-items: center; gap: .6rem; min-height: 2.7rem; font-size: .94rem; font-weight: 500; padding: .45rem .65rem; border-radius: .45rem; text-align: left; }
.new-chat:hover,.history-button:hover,.icon:hover,.starters button:hover { background: #262d27; }
.new-chat span { color: var(--accent); font-size: 1.2rem; line-height: .8; }
.history-heading { font-size: .82rem; color: var(--muted); margin: 1.8rem .55rem .6rem; }
#history { flex: 1; overflow-y: auto; min-height: 0; }
.history-button { text-align: left; width: 100%; padding: .64rem .6rem; font-size: .9rem; border-radius: .25rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; border-left: 1px solid transparent; }
.history-button[aria-current=true] { background: #242a25; border-left-color: var(--accent); }
.history-empty { color: var(--muted); font-size: .86rem; padding: .4rem .55rem; }
.side-bottom { border-top: 1px solid var(--line); padding: 1rem .3rem; margin-top: .75rem; display: flex; align-items: center; justify-content: space-between; gap: .4rem; }
.host { display: flex; align-items: center; gap: .45rem; font-size: .81rem; }
.status-dot { width: .45rem; height: .45rem; background: #929c94; border-radius: 100%; }
.status-dot.online { background: var(--accent); }
.text-button { padding: .4rem .25rem; color: var(--muted); font-size: .82rem; }
.text-button:hover { color: white; text-decoration: underline; }
.conversation { display: flex; flex-direction: column; min-height: 0; position: relative; }
.thread-header { flex: none; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); gap: .7rem; height: 4rem; padding: 0 clamp(1.1rem,3vw,3.25rem); }
.thread-header h1 { font-size: .98rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-header .text-button { flex: none; }
.icon { width: 2.75rem; height: 2.75rem; align-items: center; justify-content: center; font-size: 1.6rem; border-radius: .3rem; }
.menu,.close-side,.scrim { display: none; }
.scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.messages,.compose-area { width: min(calc(100% - 3.25rem),48rem); margin-inline: auto; }
.messages { padding: 1.9rem 0 1rem; }
.turn { padding: .4rem 0 1.7rem; }
.speaker { font-size: .81rem; font-weight: 600; color: var(--accent); margin-bottom: .55rem; }
.turn.user .speaker { color: var(--muted); }
.message-body { overflow-wrap: anywhere; line-height: 1.66; }
.message-body p { margin: .55rem 0; white-space: pre-wrap; }
.message-body p:first-child { margin-top: 0; }
.message-body a { color: var(--accent); }
.message-body h3 { font-size: 1.08rem; margin: 1.2rem 0 .5rem; }
.message-body ul,.message-body ol { padding-left: 1.4rem; margin: .6rem 0; }
.message-body :not(pre)>code { font-family: Consolas, monospace; color: #d4e4d4; background: #252c26; padding: .05em .24em; border-radius: .17em; }
.code-block { background: #101310; border: 1px solid var(--line); border-radius: .45rem; margin: .75rem 0; overflow: hidden; }
.code-bar { display: flex; align-items: center; justify-content: space-between; padding: .25rem .8rem; color: var(--muted); font: .82rem Consolas, monospace; border-bottom: 1px solid var(--line); }
.code-bar button { font-family: Geist, sans-serif; }
.code-block pre { margin: 0; padding: .9rem; overflow-x: auto; font: .9rem/1.6 Consolas, ui-monospace, monospace; }
.thinking { color: var(--muted); font-size: .9rem; }
.compose-area { flex: none; padding: .8rem 0 1.4rem; }
.empty .scroll { flex: 0; }
.empty .compose-area { margin-block: auto; padding-bottom: max(1.4rem,8vh); }
.prompt-mark { user-select: none; display: inline-flex; align-items: baseline; color: var(--accent); font: 2.6rem/.8 Consolas, monospace; margin: 0 0 1.3rem; }
.prompt-mark i { width: .45em; height: .12em; background: currentColor; display: inline-block; transform: translateY(.04em); }
.welcome h2 { font-weight: 500; font-size: clamp(2.25rem,4.1vw,3.65rem); line-height: 1.08; letter-spacing: -.065em; margin-bottom: 1.55rem; }
.composer { background: #101410; border: 1px solid #435045; border-radius: .7rem; padding: .95rem 1rem .7rem; }
.composer:focus-within { border-color: #869e8d; }
.composer textarea { border: 0; background: transparent; width: 100%; color: var(--text); line-height: 1.5; padding: 0; resize: none; min-height: 3.3rem; max-height: min(25vh,11rem); outline: 0; }
.composer-tools { display: flex; gap: .5rem; justify-content: space-between; align-items: center; }
.select-wrap { position: relative; max-width: calc(100% - 5rem); }
.select-wrap::after { content: ''; border: solid currentColor; border-width: 0 1px 1px 0; width: .35rem; height: .35rem; transform: rotate(45deg); position: absolute; right: .4rem; top: 41%; pointer-events: none; }
select { max-width: 100%; appearance: none; color: var(--muted); border: 0; background: var(--surface); padding: .55rem 1.3rem .55rem 0; font-size: .85rem; }
select option { color: var(--text); }
.send { padding: .42rem .9rem; font-size: .9rem; min-height: 2.1rem; }
.starters { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.starters button { border: 1px solid var(--line); border-radius: .35rem; padding: .45rem .77rem; font-size: .84rem; color: #c5cec6; }
.notice { margin-top: .55rem; font-size: .85rem; color: #e6c6b6; }
@media(max-width: 760px) {
  .workspace { display: block; }
  .conversation { height: 100%; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(20rem,87vw); z-index: 3; visibility: hidden; transform: translateX(-101%); }
  .workspace.drawer .sidebar { visibility: visible; transform: none; }
  .scrim:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 2; background: #0009; cursor: default; }
  .icon.menu,.icon.close-side { display: inline-flex; }
  .menu-bars,.menu-bars::before { display: block; width: 1.05rem; height: 1px; background: currentColor; }
  .menu-bars::before { content: ''; transform: translateY(.35rem); width: .75rem; }
  .thread-header { height: 3.5rem; padding: 0 .75rem 0 .3rem; justify-content: flex-start; gap: .25rem; }
  .thread-header .text-button { margin-left: auto; }
  .messages,.compose-area { width: min(calc(100% - 2rem),42rem); }
  .compose-area { padding-bottom: max(.8rem,env(safe-area-inset-bottom)); }
  .messages { padding-top: 1.25rem; }
  .side-bottom { padding-bottom: max(1rem,env(safe-area-inset-bottom)); }
  .login-grid { grid-template-columns: 1fr; gap: 2rem; padding: 2.25rem 1.5rem 3rem; max-width: 31rem; align-content: center; }
  .model-intro { padding: 0; border: 0; }
  .model-intro h1 { font-size: 2.7rem; }
  .model-intro h1 br { display: none; }
  .model-intro h1 br::after { content: ' '; }
  .hardware { margin: .8rem 0; }
  .models { display: none; }
  .login-form { max-width: none; border-top: 1px solid var(--line); padding-top: 1.6rem; }
  .masthead { height: 4rem; }
  .login-form h2 { font-size: 1.7rem; }
  .login-form label { margin-top: 1.3rem; }
}
@media(max-width: 420px) {
  .domain { font-size: .7rem; }
  .welcome h2 { font-size: 2.15rem; }
  .starters { gap: .4rem; }
  .starters button { padding: .5rem .56rem; }
}
@media(max-height: 560px) {
  .empty .compose-area { padding-block: .6rem; }
  .prompt-mark { display: none; }
  .welcome h2 { font-size: 1.8rem; margin-bottom: .6rem; }
}
