@charset "UTF-8";

:root {
  color-scheme: dark;
  --canvas: #202120;
  --sidebar: #191a19;
  --surface: #2b2d2a;
  --text: #eeeee7;
  --muted: #a4a69c;
  --accent: #d8e9c2;
  --line: #383b35;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--text); }
button, textarea { font: inherit; }
button, a, summary, textarea { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
a { color: inherit; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
button { touch-action: manipulation; }
[hidden] { display: none !important; }
.app-shell { display: flex; height: 100dvh; overflow: hidden; }
.sidebar { position: sticky; top: 0; flex: 0 0 264px; display: flex; flex-direction: column; align-self: flex-start; height: 100dvh; min-height: 0; overflow-y: auto; padding: 30px 22px 20px; background: var(--sidebar); border-right: 1px solid #30312d; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; font-size: 23px; font-weight: 600; letter-spacing: -.8px; }
.brand-icon { display: grid; place-items: center; height: 34px; width: 34px; border-radius: 11px; background: var(--accent); color: var(--canvas); font: 29px/1 Georgia, serif; }
.brand-accent { color: var(--accent); }
.edition { font: 10px ui-monospace, monospace; color: #86897e; letter-spacing: 0; vertical-align: middle; }
.new-chat { display: flex; align-items: center; gap: 10px; padding: 13px 12px; border: 1px solid #42463c; border-radius: 9px; background: transparent; font-size: 13px; text-align: left; }
.new-chat:hover { background: #282b25; }
.sidebar-new { margin-top: 35px; }
.shortcut { margin-left: auto; color: var(--muted); }
.sidebar-body { margin-top: 42px; flex-shrink: 0; }
.eyebrow { font: 10px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 1.7px; color: var(--muted); }
.sidebar .eyebrow { font-size: 9px; letter-spacing: 1px; }
.sidebar-description { font-size: 14px; line-height: 1.65; color: #c2c5b9; margin: 11px 0 27px; }
.format-card { border: 1px solid #343730; padding: 17px 14px 5px; border-radius: 10px; }
.format-card h2 { font-size: 11px; font-weight: 500; margin: 0 0 16px; color: var(--muted); }
code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.format-card > code { font-size: 23px; color: var(--accent); letter-spacing: 2px; }
.format-card p { color: var(--muted); font-size: 11px; line-height: 1.85; }
.format-rule { height: 1px; background: #343730; margin: 16px 0; }
.chat-history { margin-top: 25px; }
.history-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.history-heading h2 { margin: 0; font-size: 12px; font-weight: 500; color: #c2c5b9; }
[data-chat-count] { font: 10px ui-monospace, monospace; color: var(--muted); }
.session-note { margin: 8px 0 12px; font-size: 10px; color: var(--muted); line-height: 1.6; }
.chat-list { display: grid; gap: 5px; }
.chat-row { display: flex; align-items: center; gap: 4px; padding: 2px 5px 2px 10px; border: 1px solid transparent; border-radius: 8px; }
.chat-row:hover { background: #252922; }
.chat-row.is-active { background: #2d3327; border-color: #444e3b; }
.chat-select { display: flex; flex: 1; align-items: center; min-width: 0; gap: 8px; padding: 10px 0; border: 0; background: transparent; text-align: left; font-size: 12px; }
.chat-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-size { color: var(--muted); font: 9px ui-monospace, monospace; }
.chat-delete { flex: 0 0 26px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #b6bfaa; font-size: 18px; }
.chat-delete:hover { background: #464038; color: #f0d3b6; }
.mobile-chat-picker { display: none; }
.visitor-area { margin-top: auto; padding-top: 24px; flex-shrink: 0; }
.visitor-profile { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 6px; border: 0; border-radius: 10px; background: transparent; text-align: left; font-size: 12px; }
.visitor-profile:hover, .visitor-profile[aria-expanded="true"] { background: #292f24; }
.visitor-avatar { display: grid; place-items: center; flex: 0 0 31px; height: 31px; border-radius: 50%; background: #30362b; color: var(--accent); font: 10px ui-monospace, monospace; }
.visitor-profile small { display: block; margin-top: 5px; font-size: 10px; color: var(--muted); }
.visitor-chevron { margin-left: auto; color: var(--muted); font-size: 18px; }
.visitor-profile[aria-expanded="true"] .visitor-chevron { transform: rotate(180deg); }
.guest-menu { position: fixed; z-index: 10; width: min(280px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; padding: 8px; border: 1px solid #4a5142; border-radius: 13px; background: #272b24; box-shadow: 0 12px 35px #0007; }
.guest-menu-heading { margin: 5px 10px 10px; color: var(--muted); font: 9px/1.6 ui-monospace, monospace; letter-spacing: 1px; text-transform: uppercase; }
.guest-menu-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 12px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font-size: 13px; text-align: left; text-decoration: none; }
.guest-menu-item small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.guest-menu-item:disabled { opacity: 1; color: #b7bead; }
.guest-menu-item[href]:hover { background: #363e2e; }
.guest-menu-symbol { color: var(--accent); font-size: 17px; }
.guest-menu-divider { height: 1px; margin: 4px 8px; background: #41483a; }
.main-panel { flex: 1; min-width: 0; min-height: 0; height: 100dvh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 2; background: var(--canvas); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; gap: 12px; min-height: 85px; padding: 0 36px; }
.model-label { font-size: 16px; font-weight: 600; letter-spacing: -.3px; }
.model-label > span { margin-left: 10px; color: var(--muted); font-weight: 400; font-size: 11px; letter-spacing: 0; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.local-badge { display: flex; gap: 7px; align-items: center; font: 10px ui-monospace, monospace; color: #b7bdad; }
.local-badge > span { height: 5px; width: 5px; border-radius: 50%; background: var(--accent); }
.mobile-new, .mobile-guest { display: none; }
.mobile-guide { display: block; max-width: 520px; margin: 10px auto 0; font-size: 10px; line-height: 1.7; color: var(--muted); }
.mobile-guide summary { cursor: pointer; text-align: center; }
.mobile-guide p { margin: 10px 0; }
.workspace { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; width: min(100%, 864px); margin: 0 auto; padding: 35px 36px 30px; }
.welcome { flex-shrink: 0; margin: auto 0; padding: 20px 0 36px; text-align: center; }
.hero-symbol { position: relative; display: inline-grid; place-items: center; width: 64px; height: 64px; border: 1px solid #66705a; border-radius: 20px; transform: rotate(-9deg); margin-bottom: 23px; background: linear-gradient(140deg, #36402e, #262b22); }
.hero-symbol span { font: italic 23px Georgia, serif; color: var(--accent); transform: rotate(9deg); }
.hero-symbol i { position: absolute; width: 9px; height: 9px; background: var(--accent); border: 3px solid var(--canvas); border-radius: 50%; bottom: -3px; right: 5px; }
.welcome > .eyebrow { color: #b4bea6; font-size: 10px; margin-bottom: 19px; }
h1 { margin: 0; font-size: clamp(35px, 3.6vw, 54px); font-weight: 500; line-height: 1.13; letter-spacing: -2px; }
.welcome-description { margin: 20px 0 35px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.examples { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; text-align: left; }
.example { display: flex; flex-direction: column; text-align: left; background: transparent; border: 1px solid #41443c; border-radius: 11px; padding: 16px 14px 14px; transition: background .15s, border-color .15s; }
.example:hover { background: #2b2e27; border-color: #77816b; }
.example-label { display: flex; justify-content: space-between; gap: 5px; width: 100%; font-size: 11px; color: #d9ddcf; }
.example-label > span { color: #919a84; }
.example code { display: block; margin: 16px 0 12px; font-size: 12px; line-height: 1.5; color: var(--accent); overflow-wrap: anywhere; }
.example-note { margin-top: auto; font-size: 10px; color: var(--muted); }
.conversation:empty { display: none; }
.conversation { padding-top: 10px; }
.exchange { margin-bottom: 36px; scroll-margin-top: 10px; }
.message { min-width: 0; overflow-wrap: anywhere; }
.user-message { width: fit-content; max-width: 85%; margin: 0 0 27px auto; padding: 14px 20px; border: 1px solid #40443a; border-radius: 18px 18px 4px 18px; background: #32362e; font: 14px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; }
.assistant-heading { display: flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 600; }
.assistant-mark { display: grid; place-items: center; width: 25px; height: 25px; background: var(--accent); color: var(--canvas); border-radius: 8px; font: 22px Georgia, serif; }
.assistant-heading small { color: var(--muted); font: 9px ui-monospace, monospace; text-transform: uppercase; letter-spacing: .6px; }
.assistant-body { margin: 16px 0 0 34px; padding: 20px; border: 1px solid var(--line); border-radius: 3px 14px 14px 14px; background: #242623; }
.thinking-text { margin: 0; color: var(--accent); font: 14px/1.8 ui-monospace, SFMono-Regular, Consolas, monospace; animation: thinking-pulse 1.1s ease-in-out infinite alternate; }
@keyframes thinking-pulse { from { opacity: .5; } to { opacity: 1; } }
.result-label { margin: 0 0 10px; font: 10px ui-monospace, monospace; text-transform: uppercase; letter-spacing: 1.3px; color: var(--muted); }
.result-value { display: block; margin: 0; font: 500 32px/1.35 ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--accent); overflow-wrap: anywhere; }
.result-equation { color: #b4bba9; font: 12px/1.7 ui-monospace, monospace; margin: 14px 0 0; }
.calculation-details { margin-top: 14px; font-size: 12px; color: var(--muted); line-height: 1.7; }
.calculation-details summary { cursor: pointer; }
.result-explanation, .error-text { color: #c6cbbf; font-size: 13px; line-height: 1.8; margin: 12px 0 0; }
.error-message .assistant-body { border-color: #675746; }
.error-message .result-label { color: #e5c59f; }
.copy-result { display: block; margin-top: 18px; padding: 6px 0; background: none; border: 0; color: var(--muted); font-size: 11px; }
.copy-result:hover { color: var(--accent); }
.composer-area { flex-shrink: 0; max-height: 65dvh; overflow-y: auto; width: min(100%, 864px); margin: 0 auto; padding: 15px 36px 18px; background: var(--canvas); }
.follow-ups { margin-bottom: 13px; }
.follow-ups > p { margin: 0 0 7px; font: 9px/1.6 ui-monospace, monospace; letter-spacing: .7px; color: var(--muted); }
.follow-up-options { display: flex; gap: 8px; overflow-x: auto; padding: 3px 3px 6px; }
.follow-up-button { flex-shrink: 0; min-width: 0; max-width: min(270px, calc(100vw - 42px)); min-height: 44px; padding: 9px 13px; border: 1px solid #4b5540; border-radius: 12px; background: #292e25; color: #d4dec8; font-size: 11px; text-align: left; white-space: nowrap; }
.follow-up-label { display: block; }
.follow-up-pair { display: block; margin-top: 5px; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: 10px; }
.follow-up-button:hover { background: #38432e; border-color: #81936f; color: var(--accent); }
.composer { padding: 18px 18px 12px; background: #2e302c; border: 1px solid #4c5145; border-radius: 18px; box-shadow: 0 6px 24px #00000012; }
.composer:focus-within { border-color: #9ba98b; }
textarea { display: block; resize: none; width: 100%; height: 30px; max-height: 130px; padding: 0; background: transparent; border: 0; border-radius: 0; outline: none; color: var(--text); font-size: 15px; line-height: 1.7; }
textarea::placeholder { color: #9b9f91; }
.composer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 9px; }
#input-hint { display: flex; align-items: center; gap: 8px; font-size: 10px; color: #b0b6a6; }
.input-symbol { font: 19px Georgia, serif; color: var(--accent); }
.send { display: grid; place-items: center; flex: 0 0 34px; height: 34px; padding: 7px; border: 0; border-radius: 10px; background: var(--accent); color: #262c21; }
.send svg { width: 21px; height: 21px; }
.send:hover { background: #e7f5d6; }
.composer-footnote { margin: 13px 0 0; text-align: center; font-size: 10px; color: #9da393; line-height: 1.5; }
.runtime-status, .no-script { font-size: 12px; line-height: 1.6; text-align: center; color: #e5c59f; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (min-width: 1500px) { .workspace, .composer-area { width: 900px; } }
@media (max-height: 820px) and (min-width: 821px) { .workspace { padding-top: 10px; } .welcome { padding-top: 5px; } .hero-symbol { margin-bottom: 12px; width: 52px; height: 52px; } .welcome-description { margin: 16px 0 25px; } .sidebar-body { margin-top: 28px; } }
@media (max-width: 1100px) { .sidebar { flex-basis: 236px; padding-left: 18px; padding-right: 18px; } .workspace { padding-left: 25px; padding-right: 25px; } .composer-area { padding-left: 25px; padding-right: 25px; } .topbar { padding: 0 25px; } .example { padding-left: 11px; padding-right: 11px; } }
@media (max-width: 820px) {
  .sidebar { display: none; }
  .mobile-chat-picker { display: block; flex-shrink: 0; margin: 0 25px 8px; font-size: 12px; border-bottom: 1px solid var(--line); }
  .mobile-chat-picker > summary { display: flex; gap: 12px; align-items: center; cursor: pointer; list-style: none; padding: 9px 0 12px; color: var(--muted); }
  .mobile-chat-picker > summary::-webkit-details-marker { display: none; }
  #current-chat-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
  .mobile-chat-content { max-height: 34dvh; overflow-y: auto; padding: 0 5px 12px; }
  .topbar { min-height: 75px; }
  .model-label { color: var(--accent); }
  .mobile-new, .mobile-guest { display: grid; place-items: center; height: 34px; width: 34px; background: transparent; border: 1px solid #4c5145; border-radius: 9px; font-size: 20px; }
  .mobile-guest { background: #30362b; color: var(--accent); font: 12px ui-monospace, monospace; }
  .mobile-guest[aria-expanded="true"] { background: #46533a; }
  .workspace { max-width: 720px; padding-top: 25px; }
  .composer-area { max-width: 720px; }
  .local-badge { font-size: 9px; }
}
@media (max-width: 520px) {
  .follow-up-button { min-height: 44px; }
  .mobile-chat-picker { margin-left: 18px; margin-right: 18px; }
  .topbar { min-height: 67px; padding: 0 18px; }
  .model-label > span { display: block; margin: 4px 0 0; font-size: 9px; }
  .topbar-actions { gap: 9px; }
  .local-badge { max-width: 80px; font-size: 9px; line-height: 1.5; }
  .local-badge > span { flex: 0 0 5px; }
  .workspace { padding: 18px 18px 20px; }
  .welcome { padding-top: 8px; padding-bottom: 12px; }
  .hero-symbol { height: 49px; width: 49px; border-radius: 15px; margin-bottom: 15px; }
  .hero-symbol span { font-size: 19px; }
  .welcome > .eyebrow { font-size: 8px; margin-bottom: 16px; }
  h1 { font-size: clamp(30px, 9vw, 36px); letter-spacing: -1.5px; }
  .welcome-description { margin: 16px 0 27px; font-size: 12px; }
  .examples { grid-template-columns: 1fr; gap: 8px; }
  .example { display: grid; align-items: center; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); column-gap: 12px; padding: 12px 14px; }
  .example-label { grid-column: 1; font-size: 11px; }
  .example-label > span { display: none; }
  .example code { grid-column: 2; grid-row: 1 / 3; text-align: right; font-size: 10px; margin: 0; }
  .example-note { margin-top: 6px; grid-column: 1; font-size: 9px; }
  .composer-area { padding: 12px 14px max(14px, env(safe-area-inset-bottom)); }
  .composer { padding: 14px 14px 10px; border-radius: 15px; }
  textarea { font-size: 16px; }
  textarea::placeholder { font-size: 13px; }
  #input-hint { font-size: 9px; gap: 5px; }
  .composer-footnote { margin-top: 11px; font-size: 9px; }
  .composer-footnote span { display: block; }
  .user-message { max-width: 94%; font-size: 12px; padding: 12px 15px; }
  .assistant-body { margin-left: 0; padding: 18px 16px; }
  .result-value { font-size: 28px; }
  .assistant-heading small { font-size: 8px; }
}

@media (max-width: 820px) and (max-height: 520px) {
  .composer-area { padding-top: 6px; padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .composer { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
  .composer textarea { flex: 1; min-width: 0; max-height: 64px; }
  .composer-bottom { margin-top: 0; flex-shrink: 0; }
  #input-hint, .composer-footnote, .follow-ups > p { display: none; }
  .mobile-guide { margin-top: 6px; }
  .follow-ups { margin-bottom: 6px; }
  .follow-up-button { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
