:root {
  --paper: #f5f1e9;
  --ink: #202d36;
  --muted: #778189;
  --line: #d8d4cb;
  --navy: #173b4d;
  --navy-deep: #0e2d3c;
  --sun: #f4c85b;
  --white: #fffdfa;
  --user: #e8eef0;
  --shadow: 0 18px 50px rgba(23, 59, 77, .13);
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Georgia, 'Times New Roman', serif; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.eyebrow { margin: 0 0 9px; color: #a96d18; font: 700 11px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .13em; text-transform: uppercase; }
.login-view { min-height: 100vh; display: grid; grid-template-columns: minmax(300px, 560px) 1fr; }
.login-card { align-self: center; padding: 52px clamp(28px, 7vw, 100px); background: var(--white); box-shadow: var(--shadow); z-index: 1; }
.login-card h1 { font-size: clamp(42px, 5vw, 70px); line-height: .95; letter-spacing: -.055em; margin: 0 0 25px; }
.login-card > p:not(.eyebrow) { color: #5a666d; font-size: 18px; line-height: 1.45; max-width: 410px; }
.login-card form { margin-top: 42px; display: grid; gap: 10px; }
label { font: 700 13px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; }
input, textarea { border: 1px solid var(--line); border-radius: 5px; outline: none; background: white; color: var(--ink); }
input { padding: 15px 16px; font-size: 17px; }
input:focus, textarea:focus { border-color: #b5822a; box-shadow: 0 0 0 3px rgba(244, 200, 91, .22); }
.login-card button, .new-chat, #send-button { border: 0; border-radius: 5px; background: var(--navy); color: white; }
.login-card button { padding: 15px 17px; text-align: left; font-size: 17px; transition: background .2s, transform .2s; }
.login-card button span { float: right; font-size: 23px; line-height: 15px; }
.login-card button:hover { background: var(--navy-deep); transform: translateY(-1px); }
.login-art { position: relative; overflow: hidden; background: #d8e2de; background-image: radial-gradient(circle at 69% 30%, #f5d578 0 12%, transparent 12.3%), radial-gradient(circle at 44% 71%, #8eb1ad 0 22%, transparent 22.3%), linear-gradient(135deg, transparent 0 46%, rgba(255,255,255,.42) 46% 48%, transparent 48% 100%); }
.login-art::after { content: ''; position: absolute; width: min(50vw, 680px); aspect-ratio: 1; border: 1px solid rgba(23,59,77,.25); border-radius: 50%; left: 16%; top: 17%; }
.login-art span { position: absolute; top: 38%; left: 37%; color: var(--navy); font-size: clamp(150px, 27vw, 400px); font-weight: normal; line-height: .7; }
.app-view { min-height: 100vh; display: grid; grid-template-columns: 280px minmax(0, 1fr); }
.sidebar { padding: 20px 14px; background: var(--navy); color: #f5f1e9; display: flex; flex-direction: column; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 3px 8px; font-size: 19px; font-weight: bold; }
.brand-mark { display: grid; place-items: center; width: 28px; height: 28px; color: var(--navy); background: var(--sun); border-radius: 50%; font: bold 17px/1 ui-monospace, monospace; }
.new-chat { width: 100%; padding: 12px 13px; border: 1px solid rgba(255,255,255,.28); text-align: left; background: transparent; transition: background .2s; }
.new-chat:hover { background: rgba(255,255,255,.1); }
.chat-list { display: grid; gap: 4px; overflow-y: auto; }
.chat-list button { border: 0; border-radius: 4px; padding: 11px 10px; overflow: hidden; color: #dfe8e6; background: transparent; text-align: left; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.chat-list button:hover, .chat-list button.active { background: rgba(255,255,255,.13); color: white; }
.profile { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 13px 8px 2px; border-top: 1px solid rgba(255,255,255,.2); }
.profile > span { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 50%; background: #567d7e; font: 700 12px/1 ui-monospace, monospace; }
.profile strong { display: block; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.profile button { padding: 2px 0 0; border: 0; color: #b8cecb; background: transparent; font-size: 12px; }
.conversation { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; }
.conversation header { display: flex; align-items: center; justify-content: space-between; padding: 23px clamp(22px, 5vw, 76px); border-bottom: 1px solid var(--line); background: rgba(255,253,250,.7); }
.conversation h2 { margin: 0; font-size: 25px; letter-spacing: -.025em; }
.status { color: #476b58; font: 12px/1 ui-monospace, monospace; }
.status i { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: #5da171; }
.messages { width: min(900px, 100%); margin: 0 auto; padding: 45px clamp(20px, 5vw, 70px); }
.message { display: grid; grid-template-columns: 35px minmax(0, 1fr); gap: 15px; margin-bottom: 30px; animation: appear .28s ease both; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font: 700 12px/1 ui-monospace, monospace; }
.message.user .avatar { background: #b8c8ce; color: var(--navy); }
.message.assistant .avatar { background: var(--sun); color: var(--navy); }
.bubble { max-width: 700px; padding: 4px 0; font-size: 18px; line-height: 1.55; white-space: pre-wrap; }
.message.user .bubble { padding: 14px 16px; border-radius: 3px 16px 16px 16px; background: var(--user); }
.empty-state { max-width: 440px; margin: 13vh auto; text-align: center; }
.empty-symbol { margin: auto auto 18px; display: grid; place-items: center; width: 60px; height: 60px; color: var(--navy); border: 1px solid #d6ba70; border-radius: 50%; background: #fff6d9; font-size: 25px; }
.empty-state h3 { margin: 0 0 9px; font-size: 31px; letter-spacing: -.04em; }.empty-state p { margin: 0; color: var(--muted); line-height: 1.5; font-size: 17px; }
.composer { width: min(900px, 100%); margin: 0 auto; padding: 18px clamp(20px, 5vw, 70px) 30px; position: relative; }
.composer textarea { width: 100%; min-height: 58px; max-height: 180px; padding: 16px 55px 13px 17px; resize: none; font-size: 17px; line-height: 1.4; }
#send-button { position: absolute; right: clamp(31px, 6vw, 82px); top: 29px; width: 37px; height: 37px; font-size: 22px; }.composer p { margin: 8px 0 0; color: var(--muted); text-align: center; font: 11px/1 ui-monospace, monospace; }
#send-button:disabled { cursor: wait; opacity: .6; }.error { margin: 0 0 20px; padding: 12px 15px; border-left: 3px solid #bf5738; color: #7a3420; background: #fff2ec; }
@keyframes appear { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 720px) { .login-view { grid-template-columns: 1fr; }.login-art { display: none; }.app-view { grid-template-columns: 1fr; }.sidebar { display: none; }.conversation header { padding: 20px; }.messages { padding: 28px 20px; }.composer { padding: 14px 20px 22px; }.composer #send-button { right: 31px; top: 25px; }.bubble { font-size: 16px; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
