:root {
  color-scheme: dark;
  --base: #101514;
  --panel: #17201d;
  --line: #36403a;
  --text: #f3efe5;
  --muted: #b1bab2;
  --gold: #ddc798;
  --green: #91c7a9;
  --serif: 'Baskervville', 'Palatino Linotype', Georgia, serif;
  --sans: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
  font-family: var(--sans); color: var(--text); background: var(--base);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button, input, textarea { border-radius: 5px; }
button:focus-visible, input:focus-visible, textarea:focus-visible, h1:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
button:disabled { cursor: default; opacity: .57; }
button { color: inherit; }
button:hover:enabled { filter: brightness(1.1); }
.brand { display: flex; align-items: center; gap: 14px; font-family: var(--serif); font-size: 1.25rem; line-height: 1; letter-spacing: .18em; }
.brand-mark { position: relative; width: 21px; height: 21px; transform: rotate(45deg); border: 1px solid var(--gold); display: inline-grid; place-items: center; flex: none; }
.brand-mark::before, .brand-mark::after { content: ''; position: absolute; border: 1px solid var(--gold); inset: 3px; }
.brand-mark::after { inset: 6px; background: var(--gold); }
.eyebrow, .section-label { color: var(--gold); font-size: .72rem; line-height: 1.5; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.indicator { display: inline-block; height: 7px; width: 7px; margin-right: 6px; background: var(--green); border-radius: 50%; vertical-align: .08em; }
.entry { min-height: 100svh; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); max-width: 1920px; margin: auto; }
.identity-panel { padding: clamp(32px,5vw,80px); display: flex; flex-direction: column; align-items: flex-start; position: relative; isolation: isolate; overflow: hidden; min-height: 620px; border-right: 1px solid var(--line); background: radial-gradient(ellipse at 56% 51%, #284237 0%, #1c3028 35%, #15211c 69%, #17221d 100%); }
.identity-panel::before { content: ''; position: absolute; z-index: -1; inset: 0; opacity: .15; background-image: linear-gradient(90deg,#79947d 1px,transparent 1px),linear-gradient(#79947d 1px,transparent 1px); background-size: 64px 64px; mask-image: radial-gradient(ellipse,black,transparent 80%); }
.identity-copy { margin-top: auto; position: relative; }
.identity-copy .eyebrow { display:flex; align-items:center; gap:12px; margin:0 0 14px; }
.identity-copy .eyebrow::before { content:''; width:32px; height:1px; background:var(--gold); }
.identity-copy h1 { font: 400 clamp(3.1rem,5.5vw,6rem)/.99 var(--serif); letter-spacing: -.055em; margin:0; }
.identity-copy h1 em { color: var(--gold); font-weight: 400; }
.insignia { width: min(23vw,36vh,320px); flex: none; aspect-ratio: 1; margin: auto; position: relative; color: #c5b482; opacity: .9; }
.orbit,.diamond,.coincidence { position: absolute; }
.orbit { border: 1px solid currentColor; border-radius: 50%; }
.outer { inset: 0; opacity: .5; outline: 1px dashed #a4b49b; outline-offset: 7px; }
.inner { inset: 7%; opacity: .62; }
.diamond { inset: 19.6%; transform: rotate(45deg); border:1px solid #a1a888; opacity:.7; }
.coincidence { inset: 19%; }
.coincidence i { position: absolute; border: 1px solid #e7d3a6; border-radius: 50%; width: 69%; height:69%; }
.coincidence i:first-child { top:0; left:15.5%; }
.coincidence i:nth-child(2) { bottom:0; left:15.5%; }
.coincidence i:nth-child(3) { left:0; top:15.5%; }
.coincidence i:last-child { right:0; top:15.5%; }
.insignia span { position: absolute; width: 7px; height: 7px; background:var(--gold); transform: translate(-50%,-50%) rotate(45deg); }
.north { top:0;left:50%; }.east { top:50%;left:100%; }.south { top:100%;left:50%; }.west { top:50%;left:0; }
.entry-content { display: grid; place-items:center; padding: clamp(30px,5vw,80px); }
.auth-card { width:100%; max-width:395px; }
.auth-card .eyebrow { color:var(--green); }
.auth-card h2 { font:400 clamp(2.5rem,4.4vw,4rem)/1.1 var(--serif); letter-spacing:-.05em; margin:16px 0 12px; }
.subtitle,.list-empty,.data-note,#chat-intro { color:var(--muted); line-height:1.6; }
.subtitle { margin:0 0 30px; }
#auth-form label { display:block; font-weight:550; font-size:.9rem; margin:17px 0 8px; }
input,textarea { background:#151c19; border:1px solid #49574d; color:var(--text); }
input { width:100%; padding:10px 12px; height:46px; }
.primary { border:1px solid var(--gold); background:var(--gold); color:#20241e; min-height:40px; padding:8px 16px; font-weight:650; }
#auth-submit { margin:25px 0 19px; width:100%; display:flex; align-items:center; justify-content:space-between; height:46px; }
.switch-method,.feedback { font-size:.9rem; line-height:1.5; }
.switch-method { color:var(--muted); }
.text-button { font-size:inherit; border:0; background:transparent; padding:3px; color:var(--gold); text-decoration:underline; text-underline-offset:4px; }
.feedback { color:#c1d7c6; margin:8px 0; overflow-wrap:anywhere; }
.feedback.error { color:#ffb9ab; }
.feedback:empty { display:none; }
.desk { display:grid; grid-template-columns:clamp(224px,21vw,300px) minmax(0,1fr); height:100dvh; min-height:350px; }
#sidebar { background:#141d18; padding:30px 20px 20px; display:flex; flex-direction:column; border-right:1px solid var(--line); min-height:0; }
#sidebar .brand { margin:2px 6px 34px; }
.new-chat { display:flex; align-items:center; justify-content:center; gap:8px; border:1px solid #777157; color:var(--gold); background:#232b22; min-height:43px; width:100%; }
.new-chat span { font-size:1.1rem; }
.section-label { color:var(--muted); margin:32px 5px 12px; font-size:.67rem; }
#chat-list { overflow-y:auto; }
#chat-list button { display:block; border:1px solid transparent; text-align:left; width:100%; text-overflow:ellipsis; white-space:nowrap; overflow:hidden; padding:10px 12px; background:transparent; color:var(--muted); }
#chat-list button[aria-current="page"] { background:#23362b; color:#eff6e9; border-color:#3f5846; }
.list-empty { font-size:.85rem; padding:0 5px; }
.account { margin-top:auto; border-top:1px solid var(--line); padding:18px 5px 0; display:flex; align-items:center; gap:11px; }
.avatar { display:grid; place-items:center; width:34px; height:34px; border:1px solid #6e705c; color:var(--gold); font:400 1rem var(--serif); border-radius:50%; flex:none; }
.account-text { overflow:hidden; }
.account-text strong { display:block; overflow-wrap:anywhere; font-size:.9rem; }
.account-text button { font-size:.8rem; padding-left:0; }
.conversation { min-width:0; min-height:0; display:flex; flex-direction:column; }
.desk-header { display:flex; justify-content:space-between; gap:8px; align-items:center; padding:18px clamp(14px,3vw,48px); border-bottom:1px solid var(--line); color:var(--muted); font-size:.82rem; }
.workspace-label { display:flex; align-items:center; gap:12px; }.nav-toggle { display:none; }
.conversation-body { min-height:0; flex:1; display:flex; flex-direction:column; }
.transcript { flex:1; overflow:auto; padding: clamp(24px,4vw,60px) max(20px,calc((100% - 780px)/2)) 12px; }
.chat-heading h1 { font:400 clamp(2rem,4vw,3.5rem)/1.1 var(--serif); margin:12px 0; color:var(--text); letter-spacing:-.04em; overflow-wrap:anywhere; }
.chat-heading .eyebrow { margin:0; }
#chat-intro { margin:10px 0 20px; max-width:52ch; }
#messages { padding:0; list-style:none; margin:12px 0; }
#messages li { border-top:1px solid var(--line); padding:18px 0 20px; }
.speaker { margin:0 0 7px; color:var(--green); font-size:.77rem; font-weight:650; }
.model-reply .speaker { color:var(--gold); }
.message { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.6; margin:0; }
.compose-area { margin:0 auto; width:min(calc(100% - 40px),780px); padding:12px 0; }
#compose-form { border:1px solid #546254; background:#18201b; border-radius:9px; padding:14px; }
#compose { width:100%; display:block; background:transparent; border:0; padding:4px; resize:vertical; min-height:54px; max-height:25vh; }
.compose-tools { display:flex; align-items:center; justify-content:space-between; gap:15px; margin-top:8px; }
#provider-state,.data-note { font-size:.8rem; color:var(--muted); }
.data-note { text-align:center; margin:8px 0 0; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
@media (max-width:720px) {
  .entry { display:flex; flex-direction:column; }
  .identity-panel { min-height:0; padding:24px; border-right:none; border-bottom:1px solid var(--line); }
  .identity-copy,.insignia { display:none; }
  .entry-content { flex:1; padding:36px 24px; }
  .desk { grid-template-columns:minmax(0,1fr); }
  #sidebar { display:none; }
  .desk.nav-open #sidebar { display:flex; position:absolute; z-index:2; top:55px; bottom:0; left:0; width:min(85vw,290px); box-shadow:15px 0 30px #0008; }
  .desk-header { min-height:55px; padding:9px 15px; }
  .nav-toggle { display:inline-block; border:1px solid var(--line); background:var(--panel); padding:6px 10px; }
  .local-label { display:none; }
  .compose-area { width:calc(100% - 24px); }
}

/* The brass dial and its raised bezel carry through to the workspace controls. */
.identity-panel {
  background: radial-gradient(ellipse at 40% 28%, #365749 0%, #1d352d 44%, #101c19 85%);
}
.insignia {
  opacity: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 24%, #395247, #142820 62%, #0d1915);
  box-shadow: inset 0 1px 2px #f4e1bc80, inset 0 -5px 16px #0008,
    0 0 0 9px #172b23, 0 0 0 10px #81795d, 0 20px 44px #06100cb3;
}
.inner { box-shadow: inset 0 0 0 4px #12251d, 0 0 12px #d2c59a22; }
.insignia span { box-shadow: 0 0 10px #dac39777; }
.entry-content, .conversation {
  background: radial-gradient(ellipse at 85% 0%, #21342b 0, transparent 60%), #101715;
}
.auth-card {
  max-width: 480px;
  padding: clamp(24px, 3.2vw, 48px);
  border: 1px solid #405046;
  border-radius: 20px;
  background: linear-gradient(145deg, #233028, #181f1c 65%);
  box-shadow: inset 0 1px #cde2d214, 0 22px 54px #07100b66;
}
.auth-card input { background: #101915; border-radius: 8px; }
.primary {
  border-radius: 8px;
  background: linear-gradient(165deg, #f1dcad, #d6b77b);
  box-shadow: inset 0 1px #fff6, 0 3px 9px #0003;
}
#sidebar { background: linear-gradient(165deg, #23322a, #121c17 56%); }
#chat-list button[aria-current="page"] { box-shadow: inset 3px 0 #c8af7b; }
#messages li {
  margin: 12px 0;
  padding: 16px 20px;
  border: 1px solid #38483e;
  border-radius: 4px 15px 15px;
  background: linear-gradient(130deg, #202e26, #19231e);
}
#messages .model-reply { border-left: 3px solid #c8af7b; }
#compose-form {
  background: linear-gradient(155deg, #28372e, #19241e);
  box-shadow: inset 0 1px #e7edce14, 0 8px 24px #0004;
  border-radius: 15px;
}
#compose-form:focus-within { border-color: var(--gold); }
@media (max-width:720px) {
  .identity-panel .insignia { display:block; position:absolute; width:42px; right:28px; top:12px; }
  .entry-content { padding:24px 16px; }
  .auth-card { padding:24px; }
}

/* Brushed brass chapter ring, enamel face and engraved minute divisions. */
.insignia::before, .insignia::after {
  content: ""; position: absolute; pointer-events: none; border-radius: 50%;
}
.insignia::before {
  inset: -5%;
  background: conic-gradient(from 36deg, #786347, #ecdbab 15%, #8b7754 30%, #4c4333 46%, #d1bc88 65%, #f3e4c4 77%, #786347);
  mask: radial-gradient(circle closest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
}
.insignia::after {
  inset: 2%;
  background: repeating-conic-gradient(from -.4deg, #dbc99c 0deg .8deg, transparent .8deg 6deg);
  mask: radial-gradient(circle closest-side, transparent 94%, #000 95%);
  opacity: .78;
}
.insignia {
  background: radial-gradient(ellipse at 34% 18%, #56705a55, transparent 54%),
    repeating-radial-gradient(circle at center, #ddc99b09 0 1px, transparent 1px 4px),
    linear-gradient(135deg, #304b3e, #14271f 58%, #213a2e);
}
.coincidence { filter: drop-shadow(0 2px 1px #050c09); }
.identity-panel {
  background: radial-gradient(ellipse at 46% 36%, #385948 0%, #233d32 30%, #12231c 69%, #101b16);
}
.identity-panel::after {
  content: ""; position: absolute; inset: 17px; border: 1px solid #cbb88436;
  box-shadow: inset 0 0 0 4px #0c191226; pointer-events: none;
}
.auth-card, #compose-form { position: relative; }
.auth-card::before, #compose-form::before {
  content: ""; position: absolute; height: 1px; top: -1px; left: 12%; right: 12%;
  background: linear-gradient(90deg, transparent, #d6bf8cbb, transparent); pointer-events: none;
}
.auth-card { border-radius: 14px; box-shadow: inset 0 0 0 4px #0a140e35, 0 28px 62px #040b0759; }
.desk-header { background: linear-gradient(90deg, #1c2c23, #151f19 70%); border-bottom-color: #ab966740; }
.chat-heading { border-bottom: 1px solid #ad9b703d; padding-bottom: 8px; margin-bottom: 15px; }
.chat-heading h1 { font-size: clamp(2.35rem,4.5vw,4.4rem); text-wrap: balance; }
.chat-heading .eyebrow { display:flex; align-items:center; gap:12px; }
.chat-heading .eyebrow::before { content:""; width:28px; height:1px; background:var(--gold); }
#messages li { box-shadow: inset 0 1px #e1dfc80b, 0 4px 12px #050c080f; }
.avatar { background: radial-gradient(ellipse at 32% 20%, #48543b, #1d2a21 72%); box-shadow: inset 0 0 0 3px #19271f; }
.primary { background: linear-gradient(118deg, #cbb07b, #eeddb7 40%, #e1ca9b 62%, #ceb37f); }
@media (max-width:720px) {
  .identity-panel::after { inset:6px; }
  .insignia::after { display:none; }
}
.lux-dial { position:absolute; inset:9%; width:82%; height:82%; border-radius:50%; object-fit:cover; border:1px solid #baa473; } .lux-avatar { width:40px; height:40px; border-radius:50%; object-fit:cover; border:1px solid var(--gold); }
#messages li { display:flex; flex-direction:row-reverse; align-items:flex-end; gap:10px; padding:0; background:none; border:0; box-shadow:none; }
#messages li.model-reply { flex-direction:row; border:0; }
.bubble { min-width:0; max-width:min(78%,62ch); padding:12px 16px; background:#263e32; border:1px solid #44604f; border-radius:16px 16px 4px 16px; }
.model-reply .bubble { background:#272c24; border-color:#554f3e; border-radius:16px 16px 16px 4px; }
.message-face { display:inline-grid; place-items:center; width:36px; height:36px; flex:none; border:1px solid #ad9769; border-radius:50%; object-fit:cover; color:var(--gold); background:#25382d; font-family:var(--serif); }
#avatar { padding:0; border:0; width:36px; height:36px; }
.entry-emblem { display:grid; justify-items:center; gap:24px; margin:auto; padding:28px 0; }
.entry-greeting { display:flex; align-items:center; justify-content:space-between; gap:14px; margin:16px 0 12px; }
.entry-greeting h2 { margin:0; font-size:clamp(2.1rem,3.2vw,3.2rem); }
.entry-host { width:clamp(60px,6.5vw,92px); aspect-ratio:1; object-fit:cover; border:1px solid var(--gold); border-radius:50%; flex:none; }
.entry-signature { border-top:1px solid var(--line); padding-top:16px; margin:20px 0 0; font:1rem var(--serif); color:var(--muted); }
.entry-signature em { color:var(--gold); }
@media (max-width:720px) {
  .entry-emblem { gap:12px; padding:0; margin:0 4px 0 auto; }
  .identity-panel { flex-direction:row; align-items:center; }
  .entry-emblem .insignia { position:relative; inset:auto; margin:0; }
}
