 :root {
  color-scheme: light;
  --paper: #f4f3ed; --paper-deep: #ebeae2; --ink: #20221e; --muted: #777a70;
  --line: #ddded4; --mint: #b9d9c6; --mint-deep: #527b65; --white: #fffefa;
  --serif: Georgia, "Times New Roman", serif; --sans: "Manrope", Arial, sans-serif;
  --mono: "DM Mono", monospace; --radius: 18px;
}
* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #8bb99b; outline-offset: 3px; }
.hidden { display: none !important; }
.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; }
.wordmark { display: inline-flex; align-items: center; gap: 9px; color: inherit; font-size: 14px; letter-spacing: .13em; font-weight: 800; text-decoration: none; white-space: nowrap; }
.wordmark-light { font-weight: 500; color: #8b8d82; margin-left: -7px; }
.brand-mark { display: grid; place-items: center; width: 28px; height: 28px; background: var(--ink); color: var(--mint); border-radius: 50% 50% 50% 10%; font-family: var(--serif); font-size: 21px; font-weight: 400; letter-spacing: 0; }
.eyebrow, .micro-label, .art-footer, .section-index, .mode-number, .selected-mode-label, .composer-hints, .response-bottom, .recent-count, .workspace-footer, .menu-label, .auth-side-footer { font-family: var(--mono); font-size: 9px; letter-spacing: .12em; }
.eyebrow { margin: 0; color: var(--muted); display: flex; align-items: center; gap: 9px; }
.status-dot, .hint-dot { display: inline-block; width: 6px; height: 6px; background: #6e9b7c; border-radius: 50%; box-shadow: 0 0 0 3px rgba(110,155,124,.13); flex: 0 0 auto; }
.button { border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 16px; border-radius: 10px; min-height: 48px; padding: 0 18px; font-size: 12px; font-weight: 700; transition: transform .18s ease, background .18s ease, border-color .18s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .65; transform: none; }
.button-dark { background: var(--ink); color: var(--white); }
.button-dark:hover { background: #34372f; }
.button-outline { border-color: var(--line); background: transparent; color: var(--ink); }
.button-outline:hover { background: var(--white); border-color: #bfc2b5; }
.button-full { width: 100%; }
.button-small { min-height: 38px; padding: 0 13px; font-size: 11px; border-radius: 9px; gap: 8px; }
.text-button { padding: 0; background: none; border: 0; color: #4e765d; font-size: 11px; font-weight: 800; }
.text-button:hover { text-decoration: underline; }
.toast-region { position: fixed; z-index: 50; top: 18px; right: 18px; width: min(360px, calc(100% - 36px)); display: grid; gap: 8px; }
.toast { padding: 13px 15px; border: 1px solid var(--line); border-left: 3px solid #71977e; background: var(--white); box-shadow: 0 12px 35px #1e241710; border-radius: 10px; font-size: 12px; line-height: 1.5; animation: toast-in .2s ease both; }
.toast.error { border-left-color: #b75c50; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

/* Authentication */
.auth-view { min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(390px, .95fr); }
.auth-art { min-height: 100svh; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 34px clamp(28px, 5vw, 74px) 28px; background: #e4e8dd; isolation: isolate; }
.auth-art::before { content: ""; position: absolute; width: 680px; height: 680px; border-radius: 50%; background: radial-gradient(circle, rgba(183,211,189,.58), rgba(228,232,221,0) 68%); right: -160px; bottom: -150px; z-index: -1; }
.art-topline, .art-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.micro-label { color: #858c7d; font-size: 8px; }
.art-copy { position: relative; z-index: 2; margin-top: 20px; }
.art-copy h1 { font-size: clamp(43px, 5.5vw, 76px); line-height: 1.05; letter-spacing: -.075em; font-weight: 600; margin: 24px 0 18px; }
.art-copy h1 em, .hero-copy h1 em { font-family: var(--serif); font-weight: 400; letter-spacing: -.07em; }
.art-description { color: #696f63; max-width: 310px; font-size: 13px; line-height: 1.9; }
.orbit-art { position: absolute; width: min(52vw, 560px); aspect-ratio: 1; right: -50px; bottom: 4%; display: grid; place-items: center; opacity: .85; }
.orbit { position: absolute; border: 1px solid rgba(79,112,87,.26); border-radius: 50%; transform: rotate(-25deg) scaleY(.64); }
.orbit-one { width: 86%; height: 86%; }
.orbit-two { width: 68%; height: 68%; transform: rotate(43deg) scaleY(.7); }
.orbit-three { width: 49%; height: 49%; transform: rotate(-65deg) scaleY(.76); }
.orbit-core { display: grid; place-items: center; width: 106px; height: 106px; border-radius: 50%; background: radial-gradient(circle at 35% 25%, #d3e7d4, #8eaf95 72%); box-shadow: inset 0 0 0 1px #ffffff7a, 0 20px 65px #648b6b40; }
.orbit-core span { font-family: var(--serif); font-size: 49px; color: #294635; }
.orbit-point { position: absolute; display: block; width: 9px; height: 9px; border-radius: 50%; background: #668a6d; box-shadow: 0 0 0 5px #668a6d1c; }
.point-one { top: 16%; left: 27%; }.point-two { top: 57%; right: 12%; width: 6px; height: 6px; }.point-three { bottom: 13%; left: 32%; width: 5px; height: 5px; }
.art-footer { color: #7d8576; font-size: 8px; position: relative; z-index: 2; }
.auth-side { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 38px clamp(22px, 5vw, 76px) 22px; position: relative; min-width: 0; }
.auth-mobile-brand { display: none; }
.auth-card { width: min(100%, 370px); }
.auth-card-heading { margin-bottom: 28px; }
.auth-card-heading h2 { margin: 13px 0 8px; font-size: 31px; letter-spacing: -.06em; font-weight: 700; }
.auth-card-heading > p:last-child { color: var(--muted); font-size: 12px; line-height: 1.7; margin: 0; }
#auth-form { display: grid; gap: 9px; }
#auth-form label { font-size: 11px; font-weight: 800; margin-top: 5px; }
#auth-form input { height: 46px; width: 100%; padding: 0 13px; border: 1px solid var(--line); background: #fbfaf6; border-radius: 9px; color: var(--ink); font-size: 12px; }
#auth-form input::placeholder { color: #a4a69c; }
.field-row { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.field-row label { margin: 0 !important; }
#auth-submit { margin-top: 10px; justify-content: space-between; }
.divider-label { display: flex; align-items: center; gap: 12px; margin: 23px 0 17px; color: #a0a196; }
.divider-label span { height: 1px; background: var(--line); flex: 1; }
.divider-label small { font-family: var(--mono); font-size: 8px; letter-spacing: .1em; white-space: nowrap; }
.button-google { border-color: var(--line); background: transparent; color: var(--ink); }
.button-google:hover { background: #fffefa; }
.google-g { font-size: 15px; font-weight: 800; color: #4285f4; }
.auth-switch { text-align: center; margin: 24px 0 0; color: var(--muted); font-size: 11px; }
.auth-switch .text-button { margin-left: 4px; }
.auth-note { text-align: center; margin: 23px auto 0; max-width: 290px; color: #a0a196; font-size: 9px; line-height: 1.7; }
.auth-side-footer { width: min(100%, 370px); display: flex; justify-content: space-between; gap: 12px; color: #a2a398; font-size: 7px; margin-top: 52px; }

/* Workspace */
.workspace-view { min-height: 100svh; }
.topbar { height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 clamp(20px, 5.4vw, 84px); border-bottom: 1px solid var(--line); }
.workspace-context { display: flex; align-items: center; gap: 10px; color: #878a7e; font-family: var(--mono); font-size: 9px; letter-spacing: .1em; }
.context-line { display: inline-block; width: 22px; height: 1px; background: #9aa292; }
.context-count { color: #b2b4aa; }
.topbar-actions { display: flex; align-items: center; gap: 20px; }
.account-wrap { position: relative; }
.account-button { display: flex; align-items: center; gap: 9px; border: 0; background: transparent; padding: 4px 0; color: var(--ink); font-size: 10px; font-weight: 700; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--mint); color: #315340; font-family: var(--serif); font-size: 17px; }
.account-email { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chevron { color: var(--muted); font-size: 14px; }
.account-menu { position: absolute; z-index: 10; right: 0; top: calc(100% + 13px); width: 245px; padding: 17px; background: var(--white); border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 16px 45px #20221e12; }
.menu-label { color: #929589; margin: 0 0 8px; font-size: 8px; }
.account-full-email { font-size: 11px; overflow-wrap: anywhere; margin: 0; }
.menu-divider { height: 1px; background: var(--line); margin: 15px 0 8px; }
.menu-action { width: 100%; padding: 9px 0 3px; display: flex; justify-content: space-between; border: 0; background: transparent; color: #9b4e43; font-size: 11px; font-weight: 800; }
.workspace-shell { max-width: 1150px; margin: 0 auto; padding: 66px clamp(20px, 5.5vw, 76px) 35px; }
.hero-row { display: flex; justify-content: space-between; align-items: center; gap: 30px; min-height: 240px; }
.hero-copy h1 { margin: 20px 0 16px; font-size: clamp(44px, 6vw, 72px); line-height: 1.03; letter-spacing: -.085em; font-weight: 600; }
.hero-copy h1 em { color: #64816b; }
.hero-description { max-width: 420px; color: #777a70; font-size: 12px; line-height: 1.9; margin: 0; }
.hero-signal { flex: 0 0 190px; width: 190px; height: 190px; position: relative; display: grid; place-items: center; margin-right: 25px; }
.signal-ring { position: absolute; border: 1px solid #d2d9cb; border-radius: 50%; transform: rotate(35deg) scaleY(.65); }
.ring-a { width: 185px; height: 185px; }.ring-b { width: 143px; height: 143px; transform: rotate(-42deg) scaleY(.72); }.ring-c { width: 104px; height: 104px; transform: rotate(70deg) scaleY(.8); }
.signal-center { display: grid; place-items: center; width: 67px; height: 67px; border-radius: 50%; background: linear-gradient(145deg, #d3e5d3, #8caf95); color: #365b42; font-family: var(--serif); font-size: 35px; box-shadow: 0 12px 32px #5b856522; }
.signal-caption { position: absolute; bottom: -5px; font-family: var(--mono); font-size: 7px; color: #9b9f91; letter-spacing: .13em; white-space: nowrap; }
.mode-section { margin-top: 55px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-heading h2 { margin: 8px 0 0; font-size: 20px; letter-spacing: -.055em; font-weight: 700; }
.section-index { color: #a4a69b; font-size: 8px; }
.mode-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }
.mode-card { min-width: 0; min-height: 168px; position: relative; text-align: left; display: flex; flex-direction: column; align-items: flex-start; padding: 17px 16px 15px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,254,250,.42); color: var(--ink); transition: border-color .18s, background .18s, transform .18s; }
.mode-card:hover { transform: translateY(-2px); border-color: #bdc8b9; }
.mode-card.is-active { background: #e7eee4; border-color: #9db6a1; box-shadow: inset 0 0 0 1px #d0dfd0; }
.mode-number { color: #999c90; font-size: 8px; letter-spacing: .08em; }
.mode-icon { position: absolute; top: 12px; right: 15px; display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: #e6e9df; color: #54775d; font-size: 17px; }
.icon-create { color: #8a7751; background: #eee9dc; }.icon-code { color: #626b82; background: #e5e8ee; }.icon-research { color: #7e6d8a; background: #ece6ee; }
.mode-card strong { font-size: 16px; letter-spacing: -.04em; margin: 21px 0 7px; }
.mode-description { max-width: 170px; font-size: 10px; color: #7d8075; line-height: 1.65; padding-right: 6px; }
.mode-arrow { position: absolute; right: 14px; bottom: 12px; font-size: 13px; color: #7c927e; }
.composer-section { margin-top: 38px; }
.composer-label { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 11px; }
.selected-mode-label { color: #6c8d73; font-size: 8px; }
.composer-card { background: var(--white); border: 1px solid #d9dbd0; border-radius: 15px; padding: 17px 18px 13px; box-shadow: 0 10px 30px #282c2110; transition: border-color .2s; }
.composer-card:focus-within { border-color: #a6bda9; }
#prompt-input { width: 100%; min-height: 90px; resize: vertical; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; line-height: 1.8; }
#prompt-input::placeholder { color: #a1a397; }
#prompt-input:focus-visible { outline: 0; }
.composer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding-top: 12px; border-top: 1px solid #eeeee8; }
.composer-hints { display: flex; align-items: center; gap: 6px; color: #9b9e92; font-size: 8px; letter-spacing: 0; }
.composer-hints .hint-dot { width: 5px; height: 5px; margin-right: 4px; }
kbd { padding: 3px 5px; border: 1px solid #e6e7df; border-radius: 4px; background: #f7f7f2; font: 8px var(--mono); color: #777a70; }
.run-button { min-width: 160px; min-height: 42px; border-radius: 9px; font-size: 11px; justify-content: space-between; }
.run-arrow { font-size: 15px; }
.composer-footnote { margin: 10px 2px 0; font-size: 9px; color: #9b9e92; }
.response-panel { margin-top: 27px; background: #eeefe8; border: 1px solid #d8dbd0; border-radius: 15px; padding: 24px; animation: panel-in .25s ease both; }
@keyframes panel-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
.response-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; border-bottom: 1px solid #d9dbd0; padding-bottom: 18px; }
.response-top h2 { font-size: 19px; letter-spacing: -.05em; margin: 9px 0 0; }
.icon-button { width: 34px; height: 34px; border: 1px solid #d6d9ce; background: transparent; border-radius: 50%; color: #6e7167; font-size: 22px; line-height: 1; }
.icon-button:hover { background: #fffefa; }
.response-content { padding: 20px 0; font-size: 12px; line-height: 1.85; overflow-wrap: anywhere; }
.response-content p { margin: 0 0 13px; }.response-content p:last-child { margin-bottom: 0; }
.response-content h1, .response-content h2, .response-content h3 { font-size: 15px; margin: 19px 0 8px; }
.response-content ul, .response-content ol { padding-left: 22px; margin: 8px 0 14px; }
.response-content pre { overflow-x: auto; background: #252923; color: #eef1e8; padding: 15px; border-radius: 9px; font-size: 11px; }
.response-content code { font-family: var(--mono); font-size: .92em; background: #e2e5da; padding: 2px 4px; border-radius: 4px; }
.response-content pre code { background: transparent; padding: 0; }
.response-loading { display: flex; align-items: center; gap: 12px; color: #777a70; }
.loading-orbit { width: 24px; height: 24px; border: 2px solid #d2d8cb; border-top-color: #668d70; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.response-bottom { border-top: 1px solid #d9dbd0; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 15px; color: #989b8f; font-size: 8px; }
.recent-section { margin-top: 52px; }
.recent-heading { margin-bottom: 15px; }
.recent-heading h2 { font-size: 22px; }
.recent-count { color: #a3a69a; font-size: 8px; }
.history-list { border-top: 1px solid var(--line); }
.history-empty, .history-item { min-height: 83px; display: flex; align-items: center; gap: 15px; border-bottom: 1px solid var(--line); }
.empty-mark { width: 38px; height: 38px; border: 1px solid #d9ddd1; border-radius: 50%; display: grid; place-items: center; color: #7e9b82; font-size: 17px; flex: 0 0 auto; }
.history-empty strong { font-size: 11px; font-weight: 800; }.history-empty p { margin: 5px 0 0; color: #93968a; font-size: 10px; }
.history-item { width: 100%; padding: 13px 3px; border-left: 0; border-right: 0; border-top: 0; background: transparent; text-align: left; transition: padding .15s; }
.history-item:hover { padding-left: 9px; }
.history-item-icon { display: grid; place-items: center; flex: 0 0 auto; width: 35px; height: 35px; border-radius: 10px; background: #e8ebe1; color: #68866d; font-size: 15px; }
.history-item-main { flex: 1; min-width: 0; }.history-item-title { display: block; font-size: 11px; font-weight: 800; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }.history-item-meta { display: block; margin-top: 5px; color: #96998e; font: 8px var(--mono); letter-spacing: .04em; }
.history-item-arrow { color: #8a9b87; font-size: 14px; }
.history-notice { color: #8b8062; font-size: 10px; line-height: 1.6; margin: 11px 0 0; }
.workspace-footer { max-width: 1150px; margin: 0 auto; padding: 22px clamp(20px, 5.5vw, 76px) 25px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 15px; color: #a1a498; font-size: 8px; }
.footer-separator { padding: 0 7px; color: #c0c2b8; }.footer-spark { color: #729779; margin-left: 5px; }

@media (max-width: 900px) {
  .auth-view { grid-template-columns: minmax(0, .9fr) minmax(370px, 1.1fr); }
  .auth-art { padding: 28px 30px 24px; }.micro-label { display: none; }
  .orbit-art { width: 440px; right: -140px; bottom: 6%; }
  .mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mode-card { min-height: 145px; }
  .workspace-shell { padding-top: 50px; }
  .hero-signal { margin-right: 0; transform: scale(.88); }
}
@media (max-width: 650px) {
  .auth-view { display: flex; flex-direction: column; min-height: 100svh; }
  .auth-art { display: none; }
  .auth-side { flex: 1; justify-content: center; padding: 27px 22px 20px; }
  .auth-mobile-brand { display: flex; align-items: center; gap: 8px; align-self: flex-start; margin: 0 0 35px; font-size: 12px; letter-spacing: .12em; font-weight: 800; }
  .auth-card { width: 100%; max-width: 420px; }
  .auth-card-heading h2 { font-size: 29px; }
  .auth-side-footer { margin-top: 45px; max-width: 420px; }
  .topbar { height: 65px; padding: 0 17px; gap: 10px; }
  .topbar .wordmark { gap: 6px; font-size: 11px; }.brand-mark { width: 25px; height: 25px; font-size: 19px; }
  .workspace-context { display: none; }
  .topbar-actions { gap: 11px; }
  .topbar-actions > .button { padding: 0 9px; font-size: 10px; min-height: 34px; }
  .account-email, .chevron { display: none; }
  .account-button { gap: 0; }.avatar { width: 29px; height: 29px; }
  .workspace-shell { padding: 43px 17px 28px; }
  .hero-row { min-height: auto; }
  .hero-copy h1 { font-size: clamp(39px, 11vw, 55px); margin: 17px 0 13px; }
  .hero-description { max-width: 330px; font-size: 11px; }
  .hero-signal { display: none; }
  .mode-section { margin-top: 39px; }
  .section-heading h2 { font-size: 17px; }.section-index { display: none; }
  .mode-grid { gap: 8px; }
  .mode-card { min-height: 145px; padding: 14px 12px; border-radius: 11px; }
  .mode-number { font-size: 7px; }.mode-icon { width: 23px; height: 23px; right: 10px; top: 10px; font-size: 14px; }
  .mode-card strong { margin-top: 22px; font-size: 15px; }.mode-description { font-size: 9px; line-height: 1.55; }
  .composer-section { margin-top: 30px; }
  .composer-card { padding: 14px 12px 11px; }
  #prompt-input { min-height: 100px; font-size: 12px; }
  .composer-bottom { align-items: flex-end; gap: 8px; }
  .composer-hints { max-width: 58%; flex-wrap: wrap; font-size: 7px; gap: 4px; }.composer-hints .hint-dot { display: none; }
  .run-button { min-width: 132px; padding: 0 11px; gap: 8px; min-height: 40px; font-size: 10px; }
  .composer-footnote { font-size: 8px; line-height: 1.6; }
  .response-panel { padding: 17px 13px; margin-top: 20px; }
  .response-top h2 { font-size: 17px; }.response-content { font-size: 11px; }
  .response-bottom { flex-wrap: wrap; }
  .recent-section { margin-top: 39px; }
  .recent-heading h2 { font-size: 20px; }
  .workspace-footer { padding: 17px; font-size: 7px; flex-wrap: wrap; line-height: 1.6; }
}
@media (max-width: 360px) {
  .topbar { padding: 0 12px; }.topbar .wordmark { font-size: 10px; }.topbar-actions { gap: 8px; }
  .topbar-actions > .button { font-size: 9px; padding: 0 7px; }
  .workspace-shell { padding-left: 13px; padding-right: 13px; }
  .mode-card { padding: 12px 10px; }.mode-description { font-size: 8.5px; }
  .composer-hints kbd { font-size: 7px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
