:root {
  color-scheme: light;
  --canvas: #f7f8f9;
  --paper: #fff;
  --ink: #192638;
  --muted: #526274;
  --line: #dce2e8;
  --accent: #173c6d;
  --soft: #edf2f8;
  --danger: #852e31;
  font: 1rem/1.55 -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

*, *::after, *::before { box-sizing: border-box; }
body { margin: 0; }
button, textarea, select { font: inherit; color: inherit; }
button, .google-button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .52; }
button:focus-visible, a:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid #37639a;
  outline-offset: 3px;
}
[hidden] { display: none !important; }
h1, p { margin: 0; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}
.wordmark { display: flex; align-items: center; gap: .45rem; width: max-content; }
.wordmark span { font-size: 1.15rem; font-weight: 750; letter-spacing: .14em; }
.wordmark img { object-fit: contain; }

.login-layout { min-height: 100svh; display: grid; grid-template-columns: minmax(19rem, 1fr) minmax(19rem, .9fr); background: var(--paper); }
.login-content { min-height: 32rem; display: grid; align-content: start; padding: clamp(1.5rem, 5vw, 5.5rem); }
.login-card { width: min(100%, 29rem); padding-block: clamp(5rem, 18vh, 12rem) 4rem; }
.login-card h1, .welcome h1 { font: normal clamp(2.4rem, 4.4vw, 4.65rem)/1.03 Georgia, "Times New Roman", serif; letter-spacing: -.052em; }
.login-card p { margin-top: 1.1rem; color: var(--muted); }
.login-error { padding: .75rem 1rem; border-left: 3px solid var(--danger); background: #f9eeee; }
.login-card .login-error { color: var(--danger); }
.google-button {
  display: inline-flex;
  gap: .75rem;
  align-items: center;
  justify-content: center;
  min-height: 3.2rem;
  margin-top: 1.6rem;
  border: 1px solid #d0d9e3;
  border-radius: .55rem;
  padding: .65rem 1.25rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 650;
}
.google-button:hover { border-color: #9eafc2; background: var(--soft); }
.google-letter { color: #245db7; font-size: 1.12rem; font-weight: 750; }
.login-art {
  min-height: 100%;
  position: relative;
  overflow: hidden;
  background: linear-gradient(156deg, #294860 0%, #152c43 57%, #101f30 100%);
}
.material { position: absolute; border: 1px solid #9bb3c12e; box-shadow: 0 2rem 6rem #07131d48; }
.material-one {
  inset: 10% 7% 15% 18%;
  transform: skewY(-13deg) rotate(-4deg);
  background: repeating-linear-gradient(0deg, #ffffff00 0 5.85rem, #bcced02b 5.85rem 5.95rem),
    repeating-linear-gradient(90deg, #ffffff00 0 6.85rem, #bcced030 6.85rem 6.95rem),
    radial-gradient(ellipse at 5% 10%, #658495, #274358 62%, #15283b 100%);
}
.material-two {
  inset: 60% -16% -19% 6%;
  transform: skewY(-13deg) rotate(-4deg);
  background: repeating-linear-gradient(90deg, #ffffff00 0 4.9rem, #f4efe965 4.9rem 5rem),
    linear-gradient(130deg, #d7cfc2, #a79a89 60%, #776c61);
}
.material-three {
  inset: 11% 29% 63% 55%;
  transform: skewY(-13deg) rotate(-4deg);
  background: linear-gradient(135deg, #e0ddcf, #a9a99b);
}

.workbench { display: grid; min-height: 100svh; grid-template-columns: 15rem minmax(0, 1fr); }
.sidebar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1.55rem;
  padding: 1.25rem;
  background: #eef2f6;
  border-right: 1px solid var(--line);
}
.new-chat, .primary-button, .text-button {
  padding: .55rem .95rem;
  border: 1px solid var(--line);
  border-radius: .5rem;
  font-size: .92rem;
  font-weight: 650;
  background: var(--paper);
}
.new-chat { text-align: left; color: var(--accent); }
.new-chat span { display: inline-block; margin-right: .22rem; font-size: 1.15rem; line-height: 1; }
.new-chat:hover, .text-button:hover { background: var(--soft); }
.account { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--line); }
.account-address { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .88rem; }
.account .text-button { margin-top: .4rem; margin-left: -.55rem; border-color: transparent; background: transparent; }
.work-main { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100svh; min-width: 0; }
.workspace-heading { display: flex; align-items: center; gap: .8rem; padding: 1.1rem 1.7rem; border-bottom: 1px solid var(--line); background: var(--paper); font-weight: 650; }
.menu-toggle { display: none; }
.room { overflow: auto; overscroll-behavior: contain; padding: 0 1.3rem; }
.welcome, .messages, .composer-area { width: min(100%, 48rem); margin-inline: auto; }
.welcome { padding-top: clamp(2.6rem, 12vh, 7.8rem); padding-bottom: 2rem; }
.welcome img { display: block; margin-left: -.65rem; margin-bottom: .65rem; }
.welcome h1 { font-size: clamp(2.25rem, 5vw, 3.85rem); }
.welcome > p { margin-top: .85rem; color: var(--muted); }
.suggestions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; margin-top: 1.65rem; }
.suggestions button { min-width: 0; padding: .85rem .95rem; text-align: left; border-radius: .6rem; border: 1px solid var(--line); background: var(--paper); }
.suggestions button:hover { border-color: #a6b4c5; background: var(--soft); }
.suggestions strong, .suggestions span { display: block; }
.suggestions strong { font-size: .95rem; }
.suggestions span { margin-top: .2rem; font-size: .83rem; color: var(--muted); }
.composer-area { padding: .8rem 1.25rem .9rem; width: min(100%, 50.5rem); }
.composer { display: flex; align-items: end; gap: .65rem; padding: .65rem .65rem .65rem 1rem; background: var(--paper); border: 1px solid #cbd5e0; border-radius: .75rem; box-shadow: 0 .35rem 1.3rem #1a2b3b0a; }
.composer:focus-within { border-color: #7b97b8; }
.composer textarea { border: 0; min-height: 3.1rem; max-height: 11rem; min-width: 0; flex: 1; resize: vertical; outline: none; }
.composer textarea:focus-visible { outline: none; }
.primary-button { color: white; background: var(--accent); border-color: transparent; }
.primary-button:hover:not(:disabled) { background: #285486; }
.status { min-height: 1.35rem; margin-top: .35rem; font-size: .85rem; color: var(--muted); }
.status[data-error] { color: var(--danger); }
.messages { display: grid; gap: 1.15rem; padding-block: 1.5rem; }
.turn { display: grid; gap: .65rem; }
.user-message, .planner-message { white-space: pre-wrap; overflow-wrap: anywhere; }
.user-message { justify-self: end; max-width: 87%; margin-left: 2rem; padding: .6rem .9rem; border-radius: .75rem .75rem .15rem .75rem; background: var(--soft); }
.planner-message { width: 100%; }
.planner-message:empty { display: none; }
.activity { color: var(--muted); font-size: .9rem; }
.activity details + details { margin-top: .35rem; }
summary { cursor: pointer; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.review { border: 1px solid #bdcce0; border-radius: .65rem; padding: 1rem; background: var(--paper); }
.review h2 { margin: 0 0 .6rem; font-size: 1rem; }
.review fieldset { margin: 0 0 .65rem; border: 1px solid var(--line); border-radius: .55rem; min-width: 0; }
.review legend { padding: 0 .25rem; font-size: .94rem; font-weight: 650; }
.review label { display: grid; gap: .3rem; font-size: .9rem; }
.review select, .review textarea { border: 1px solid var(--line); border-radius: .35rem; padding: .38rem; background: var(--paper); }
.review textarea { width: 100%; }
.review pre { color: var(--muted); font-size: .84rem; }
.review .field-error { min-height: 1rem; margin: .45rem 0; color: var(--danger); }

@media (max-width: 760px) {
  .login-layout { grid-template-columns: 1fr; }
  .login-content { min-height: min(70svh, 39rem); }
  .login-card { padding-block: 4.2rem 2rem; }
  .login-art { min-height: 16rem; }
  .workbench { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; z-index: 1; inset: 3.6rem auto 0 0; width: min(83vw, 17rem); display: none; box-shadow: .5rem 0 1.5rem #1021371f; }
  .sidebar[data-open] { display: flex; }
  .workspace-heading { padding: .58rem .9rem; }
  .menu-toggle { display: inline-block; }
  .suggestions { grid-template-columns: 1fr; }
  .room { padding-inline: .95rem; }
  .composer-area { padding-inline: .85rem; }
}
