:root {
  color-scheme: light;
  --primary: #cc785c;
  --primary-hover: #a9583e;
  --ink: #141413;
  --ink-muted: #3d3d3a;
  --body-strong: #252523;
  --ink-subtle: #6c6a64;
  --ink-tertiary: #8e8b82;
  --canvas: #faf9f5;
  --surface-1: #f5f0e8;
  --surface-2: #efe9de;
  --surface-3: #e8e0d2;
  --hairline: #e6dfd8;
  --hairline-strong: #d2c9bd;
  --success: #5db872;
  --display: Garamond, Georgia, "Times New Roman", serif;
  --text: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

.agent-color-coral {
  --agent-color: #cc785c;
  --agent-rgb: 204 120 92;
}

.agent-color-violet {
  --agent-color: #8067b7;
  --agent-rgb: 128 103 183;
}

.agent-color-blue {
  --agent-color: #4f83b6;
  --agent-rgb: 79 131 182;
}

.agent-color-green {
  --agent-color: #4f9568;
  --agent-rgb: 79 149 104;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--text);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

body.legal-page {
  height: auto;
  min-height: 100%;
  overflow-y: auto;
}

button,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button,
a,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.topbar {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  height: 56px;
  padding: 0 16px 0 20px;
  border-bottom: 1px solid var(--hairline);
  background: var(--canvas);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  width: fit-content;
  color: var(--ink);
  text-decoration: none;
}

.brand-mobile {
  color: var(--primary);
  font-family: var(--display);
  font-size: 22px;
  font-style: italic;
  font-weight: 600;
  letter-spacing: -1.2px;
}

.brand-for {
  margin-left: 4px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.session-meta,
.connection {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-muted);
  font-size: 12px;
}

.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgb(39 166 68 / 12%);
}

.meta-divider {
  width: 1px;
  height: 12px;
  background: var(--hairline-strong);
}

.muted {
  color: var(--ink-subtle);
}

.top-actions,
.device-actions,
.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-actions {
  justify-self: end;
}

.account-actions {
  position: relative;
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 8px;
}

.account-button {
  display: flex;
  align-items: center;
  height: 34px;
  padding: 0 9px 0 5px;
  border: 1px solid var(--hairline-strong);
  border-radius: 9px;
  background: var(--surface-1);
  color: var(--ink-muted);
  cursor: pointer;
  gap: 7px;
  font-size: 12px;
}

.account-button:hover {
  border-color: var(--ink-tertiary);
  color: var(--ink);
}

.account-button > svg {
  width: 14px;
  height: 14px;
  color: var(--ink-tertiary);
}

.account-avatar {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border-radius: 7px;
  background: var(--primary);
  color: white;
  place-items: center;
}

.account-avatar svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.account-menu {
  position: absolute;
  z-index: 40;
  top: 42px;
  right: 0;
  width: 220px;
  padding: 6px;
  border: 1px solid var(--hairline);
  border-radius: 11px;
  background: #fffdfa;
  box-shadow: 0 10px 30px rgb(20 20 19 / 12%);
}

.account-summary {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
  padding: 9px;
  border-bottom: 1px solid var(--hairline);
  gap: 9px;
}

.account-summary div > strong,
.account-summary div > span {
  display: block;
}

.account-summary strong {
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
}

.account-summary div > span {
  color: var(--ink-tertiary);
  font-size: 10px;
}

.account-menu > button {
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  font-size: 12px;
  text-align: left;
}

.account-menu > button:hover {
  background: var(--surface-1);
  color: var(--ink);
}

.icon-button,
.secondary-button,
.compose-icon,
.send-button,
.suggestions button {
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface-1);
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease, transform 140ms ease;
}

.icon-button:hover,
.secondary-button:hover,
.compose-icon:hover,
.suggestions button:hover {
  border-color: var(--hairline-strong);
  background: var(--surface-2);
  color: var(--ink);
}

.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.icon-button:active,
.secondary-button:active,
.compose-icon:active,
.send-button:active,
.suggestions button:active {
  transform: translateY(1px);
}

.icon-button {
  display: grid;
  width: 32px;
  height: 32px;
  padding: 7px;
  place-items: center;
  color: var(--ink-subtle);
}

.icon-button svg {
  width: 17px;
  height: 17px;
}

.icon-button[aria-busy="true"] {
  opacity: 1;
}

.icon-button[aria-busy="true"] svg {
  display: none;
}

.icon-button[aria-busy="true"]::after {
  width: 13px;
  height: 13px;
  border: 2px solid var(--hairline-strong);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: working-spin 800ms linear infinite;
  content: "";
}

.scheduled-tasks-trigger {
  display: grid;
  width: 32px;
  height: 32px;
  padding: 7px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface-1);
  color: var(--ink-muted);
  cursor: pointer;
  place-items: center;
}

.scheduled-tasks-trigger:hover {
  border-color: var(--hairline-strong);
  background: var(--surface-2);
  color: var(--ink);
}

.scheduled-tasks-trigger svg {
  width: 16px;
  height: 16px;
}

.secondary-button {
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 500;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(290px, var(--device-width, 27%)) 10px minmax(640px, 1fr);
  height: calc(100vh - 56px);
  min-height: 0;
}

.device-pane,
.agent-pane {
  min-width: 0;
  min-height: 0;
  background: var(--canvas);
}

.device-pane {
  display: flex;
  flex-direction: column;
}

.resize-handle {
  position: relative;
  z-index: 12;
  width: 10px;
  cursor: col-resize;
  background: var(--canvas);
  touch-action: none;
}

.resize-handle::after {
  position: absolute;
  top: 84px;
  bottom: 0;
  left: 0;
  width: 50%;
  background: var(--surface-1);
  content: "";
}

.resize-handle::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  transform: translateX(-50%);
  z-index: 1;
  background: var(--hairline);
  content: "";
  transition: width 120ms ease, background 120ms ease;
}

.resize-handle span {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 32px;
  transform: translate(-50%, -50%) scaleY(0.75);
  border-radius: 999px;
  background: var(--primary);
  opacity: 0;
  transition: opacity 120ms ease, transform 120ms ease;
}

.resize-handle:hover::before,
.resize-handle:focus-visible::before,
.resize-handle.is-dragging::before {
  width: 2px;
  background: var(--primary);
}

.resize-handle:hover span,
.resize-handle:focus-visible span,
.resize-handle.is-dragging span {
  transform: translate(-50%, -50%) scaleY(1);
  opacity: 1;
}

.resize-handle:focus-visible {
  outline: 0;
}

body.is-resizing {
  cursor: col-resize;
  user-select: none;
}

.device-pane .pane-header {
  padding-inline: 12px;
}

.pane-header,
.agent-header {
  display: flex;
  height: 84px;
  flex: 0 0 84px;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--hairline);
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--ink-tertiary);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  margin-bottom: 0;
  font-family: var(--display);
  letter-spacing: -0.3px;
}

h1 {
  font-size: 15px;
  font-weight: 550;
}

.connection {
  height: 28px;
  padding: 0 9px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--surface-1);
  font-size: 11px;
}

.device-stage {
  position: relative;
  display: grid;
  flex: 1;
  min-height: 0;
  overflow: auto;
  place-items: start center;
  background-color: var(--surface-1);
}

.device-stage.is-paused:not(.is-quota-exhausted) .phone-front,
.device-stage.is-paused:not(.is-quota-exhausted) .phone-back,
.device-stage.is-paused:not(.is-quota-exhausted) .phone-shell-layer {
  filter: grayscale(0.7);
}

.device-stage.is-paused:not(.is-quota-exhausted) .phone-turntable {
  pointer-events: none;
}

.connection.is-paused .status-dot {
  background: var(--ink-tertiary);
  box-shadow: none;
}

.device-stage::before,
.device-stage::after {
  position: absolute;
  content: "";
  background: var(--hairline);
  opacity: 0.42;
}

.device-stage::before {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
}

.device-stage::after {
  top: 50%;
  right: 0;
  left: 0;
  height: 1px;
}

.stage-label {
  position: absolute;
  z-index: 2;
  color: var(--ink-tertiary);
  font-family: var(--mono);
  font-size: 10px;
}

.stage-label-top {
  top: 10px;
  left: 10px;
}

.device-visual {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  min-height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 0;
  -webkit-perspective: 760px;
  perspective: 760px;
  gap: 12px;
}

.phone-turntable {
  position: relative;
  height: 560px;
  max-width: calc(100% - 28px);
  flex: 0 0 560px;
  aspect-ratio: 9 / 19.5;
  perspective: 760px;
}

.phone {
  --phone-half-depth: 10px;
  position: absolute;
  z-index: 1;
  inset: 0;
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
}

.phone.is-flipped {
  transform: rotateY(180deg);
}

.phone.is-landscape {
  transform: rotate(90deg) scale(0.72);
}

.phone.is-landscape.is-flipped {
  transform: rotate(90deg) rotateY(180deg) scale(0.72);
}

.phone.is-turning-back {
  animation: turn-phone-back 1800ms linear both;
}

.phone.is-turning-front {
  animation: turn-phone-front 1800ms linear both;
}

.phone.is-landscape.is-turning-back {
  animation-name: turn-phone-back-landscape;
}

.phone.is-landscape.is-turning-front {
  animation-name: turn-phone-front-landscape;
}

@keyframes turn-phone-back {
  0% { transform: rotateY(0deg); }
  49.99% { transform: rotateY(89.25deg); }
  50% { transform: rotateY(90.75deg); }
  100% { transform: rotateY(180deg); }
}

@keyframes turn-phone-front {
  0% { transform: rotateY(180deg); }
  49.99% { transform: rotateY(90.75deg); }
  50% { transform: rotateY(89.25deg); }
  100% { transform: rotateY(0deg); }
}

@keyframes turn-phone-back-landscape {
  0% { transform: rotate(90deg) rotateY(0deg) scale(0.72); }
  49.99% { transform: rotate(90deg) rotateY(89.25deg) scale(0.72); }
  50% { transform: rotate(90deg) rotateY(90.75deg) scale(0.72); }
  100% { transform: rotate(90deg) rotateY(180deg) scale(0.72); }
}

@keyframes turn-phone-front-landscape {
  0% { transform: rotate(90deg) rotateY(180deg) scale(0.72); }
  49.99% { transform: rotate(90deg) rotateY(90.75deg) scale(0.72); }
  50% { transform: rotate(90deg) rotateY(89.25deg) scale(0.72); }
  100% { transform: rotate(90deg) rotateY(0deg) scale(0.72); }
}

.phone-front,
.phone-back {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 2px solid #303136;
  border-radius: 36px;
  transition: opacity 120ms linear;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.phone-front {
  padding: 8px;
  transform: translateZ(var(--phone-half-depth));
  background: #17181a;
  box-shadow: inset 0 0 0 1px #5b5d62, 0 0 0 1px #111214, 0 16px 18px rgb(20 20 19 / 18%);
}

.phone-back {
  transform: translateZ(-10px) rotateY(180deg);
  background: #d8d2ca;
  color: #262523;
  opacity: 0;
  box-shadow: inset 0 0 0 8px #17181a, inset 0 0 0 10px #5b5d62, 0 0 0 1px #111214, 0 16px 18px rgb(20 20 19 / 18%);
}

.phone.show-back .phone-front {
  opacity: 0;
}

.phone.show-back .phone-back {
  opacity: 1;
}

.phone.is-turning-back .phone-front {
  animation: hide-phone-front 1800ms linear both;
}

.phone.is-turning-back .phone-back {
  animation: show-phone-back 1800ms linear both;
}

.phone.is-turning-front .phone-back {
  animation: hide-phone-back 1800ms linear both;
}

.phone.is-turning-front .phone-front {
  animation: show-phone-front 1800ms linear both;
}

@keyframes hide-phone-front {
  0%, 44% { transform: translateZ(10px); opacity: 1; }
  49.99% { transform: translateZ(0); opacity: 1; }
  50%, 100% { transform: translateZ(0); opacity: 0; }
}

@keyframes show-phone-back {
  0%, 49.99% { transform: translateZ(0) rotateY(180deg); opacity: 0; }
  50% { transform: translateZ(0) rotateY(180deg); opacity: 1; }
  56%, 100% { transform: translateZ(-10px) rotateY(180deg); opacity: 1; }
}

@keyframes hide-phone-back {
  0%, 44% { transform: translateZ(-10px) rotateY(180deg); opacity: 1; }
  49.99% { transform: translateZ(0) rotateY(180deg); opacity: 1; }
  50%, 100% { transform: translateZ(0) rotateY(180deg); opacity: 0; }
}

@keyframes show-phone-front {
  0%, 49.99% { transform: translateZ(0); opacity: 0; }
  50% { transform: translateZ(0); opacity: 1; }
  56%, 100% { transform: translateZ(10px); opacity: 1; }
}

.phone-shell {
  position: absolute;
  inset: 0;
  pointer-events: none;
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
}

.phone-shell-layer {
  position: absolute;
  inset: 0;
  transform: translateZ(var(--shell-z));
  border-radius: 36px;
  background: transparent;
  box-shadow: inset 0 0 0 10px #303136;
  -webkit-backface-visibility: visible;
  backface-visibility: visible;
}

.phone.is-pro-device .phone-front {
  border-color: #a65340;
  background: #8e4938;
  box-shadow: inset 0 0 0 1px #e59a7f, 0 0 0 1px #73392d, 0 18px 26px rgb(204 120 92 / 30%);
}

.phone.is-pro-device .phone-back {
  border-color: #9a4c39;
  background: #c9775b;
  box-shadow: inset 0 0 0 8px #8e4938, inset 0 0 0 10px #e59a7f, 0 0 0 1px #73392d, 0 18px 26px rgb(204 120 92 / 30%);
}

.phone.is-pro-device .phone-shell-layer {
  box-shadow: inset 0 0 0 10px #9a503d;
}

.phone.is-pro-device .phone-screen {
  border-color: #704237;
}

.phone.is-pro-device .phone-front::before,
.phone.is-pro-device .phone-front::after {
  background: #bd6a51;
}

.phone.is-pro-device .phone-back::after {
  position: absolute;
  right: 22px;
  bottom: 24px;
  padding: 4px 8px;
  border: 1px solid rgb(255 255 255 / 34%);
  border-radius: 999px;
  background: rgb(118 53 39 / 18%);
  color: rgb(255 248 244 / 82%);
  content: "PRO";
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.phone.is-capturing .phone-screen::after {
  position: absolute;
  z-index: 8;
  inset: 0;
  border-radius: 18px 18px 29px 29px;
  background: white;
  content: "";
  animation: camera-flash 280ms ease forwards;
}

@keyframes camera-flash {
  from { opacity: 0.9; }
  to { opacity: 0; }
}

.phone-front::before,
.phone-front::after {
  position: absolute;
  left: -3px;
  width: 2px;
  border-radius: 2px 0 0 2px;
  background: #4b4d53;
  content: "";
}

.phone-front::before {
  top: 110px;
  height: 52px;
}

.phone-front::after {
  top: 174px;
  height: 76px;
}

.phone-speaker {
  position: absolute;
  z-index: 4;
  top: 14px;
  left: 50%;
  width: 62px;
  height: 17px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #09090a;
}

.phone-screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border: 1px solid #55575c;
  border-radius: 18px 18px 29px 29px;
  background: #e9e8e5;
  color: #171718;
}

.device-screen {
  background: #08090a;
  touch-action: none;
  user-select: none;
}

#device-stream-canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  cursor: crosshair;
}

#device-stream-canvas[hidden] {
  display: none;
}

#device-stream-canvas:focus {
  outline: none;
}

#device-stream-canvas:focus-visible {
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 22%);
}

.device-screen-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 36px;
  background: radial-gradient(circle at 50% 42%, #25272b, #0d0e10 68%);
  color: #f5f0e8;
  text-align: center;
  gap: 8px;
}

.device-screen-placeholder svg {
  width: 36px;
  height: 36px;
  margin-bottom: 6px;
  fill: none;
  stroke: var(--primary);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.device-screen-placeholder strong {
  font-size: 13px;
}

.device-screen-placeholder span {
  color: #b8b5af;
  font-size: 10px;
  line-height: 1.4;
}

.device-screen.is-quota-exhausted > * {
  filter: blur(7px);
  transform: scale(1.04);
}

.device-quota-overlay {
  position: absolute;
  z-index: 10;
  inset: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 28px;
  border-radius: 29px;
  background: rgb(8 9 10 / 56%);
  color: #fffaf4;
  text-align: center;
  gap: 9px;
}

.device-quota-overlay[hidden] {
  display: none;
}

.device-quota-kicker {
  color: #ef9a7c;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.device-quota-overlay strong {
  max-width: 180px;
  font-family: var(--display);
  font-size: 22px;
  line-height: 1;
}

.device-quota-overlay > span:not(.device-quota-kicker) {
  max-width: 190px;
  color: #d2cec7;
  font-size: 10px;
  line-height: 1.45;
}

.device-quota-overlay button {
  position: relative;
  z-index: 1;
  margin-top: 5px;
  padding: 9px 14px;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: #21120e;
  cursor: pointer;
  font: 700 10px var(--sans);
  pointer-events: auto;
}

.device-quota-overlay button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.camera-bar {
  position: absolute;
  top: 34px;
  right: 12px;
  left: 12px;
  display: flex;
  height: 58px;
  align-items: center;
  padding: 0 13px;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 18px;
  background: #353638;
  box-shadow: 0 5px 14px rgb(20 20 19 / 20%);
  gap: 9px;
}

.camera-lens {
  width: 25px;
  height: 25px;
  border: 5px solid #111214;
  border-radius: 50%;
  background: #253044;
  box-shadow: inset 0 0 0 2px #687084, 0 0 0 1px #626366;
}

.camera-lens-main {
  width: 30px;
  height: 30px;
}

.camera-flash {
  width: 12px;
  height: 12px;
  margin-left: auto;
  border: 2px solid #b6b0a8;
  border-radius: 50%;
  background: #f3e4bd;
}

.phone-back-logo {
  position: absolute;
  top: 48%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgb(20 20 19 / 68%);
  font-family: var(--text);
  font-size: 26px;
  font-weight: 600;
}

.flip-device-button {
  display: flex;
  min-height: 34px;
  padding: 0 12px;
  align-items: center;
  border: 1px solid var(--hairline-strong);
  border-radius: 9px;
  background: #fffdfa;
  color: var(--ink-muted);
  cursor: pointer;
  box-shadow: 0 3px 10px rgb(20 20 19 / 6%);
  font-size: 11px;
  gap: 7px;
}

.flip-device-button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.flip-device-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.flip-device-button svg {
  width: 15px;
  height: 15px;
}

.android-status {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 36px;
  padding: 0 17px;
  font-size: 9px;
  font-weight: 650;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 4px;
}

.status-icons svg {
  width: 12px;
  height: 12px;
  stroke-width: 1.8;
}

.battery {
  width: 15px;
  height: 7px;
  padding: 1px;
  border: 1px solid currentColor;
  border-radius: 2px;
}

.battery::after {
  position: absolute;
  width: 1px;
  height: 3px;
  margin: 1px 0 0 2px;
  border-radius: 0 1px 1px 0;
  background: currentColor;
  content: "";
}

.battery span {
  display: block;
  width: 70%;
  height: 100%;
  background: currentColor;
}

.home-content {
  display: flex;
  height: calc(100% - 36px);
  flex-direction: column;
  padding: 30px 17px 44px;
  background: #d8d6d2;
  transition: opacity 180ms ease, transform 180ms ease;
}

.weather {
  display: flex;
  flex-direction: column;
  margin: 6px 0 auto;
  color: #2c2b2a;
  font-size: 9px;
}

.weather-temp {
  margin-bottom: 2px;
  font-family: var(--display);
  font-size: 31px;
  font-weight: 450;
  letter-spacing: -1.4px;
}

.phone-search {
  display: flex;
  align-items: center;
  width: 100%;
  height: 38px;
  margin-bottom: 23px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: rgb(250 250 249 / 88%);
  color: #555350;
  cursor: pointer;
  gap: 8px;
}

.phone-search span {
  flex: 1;
  text-align: left;
  font-size: 9px;
}

.phone-search svg {
  width: 14px;
  height: 14px;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 17px 9px;
}

.app {
  display: flex;
  min-width: 0;
  padding: 0;
  flex-direction: column;
  align-items: center;
  border: 0;
  background: transparent;
  color: #252423;
  cursor: pointer;
  gap: 5px;
  font-size: 7px;
}

.app-icon {
  display: grid;
  width: 34px;
  height: 34px;
  border: 1px solid rgb(23 23 24 / 10%);
  border-radius: 10px;
  background: rgb(255 255 255 / 72%);
  place-items: center;
}

.app-icon svg {
  width: 18px;
  height: 18px;
}

.spotify-icon {
  border: 0;
  border-radius: 50%;
  background: #171718;
  color: #d8d6d2;
}

.spotify-icon svg {
  width: 28px;
  height: 28px;
}

.app-target.is-active .app-icon {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  animation: target-pulse 900ms ease-in-out infinite alternate;
}

@keyframes target-pulse {
  to { outline-color: rgb(204 120 92 / 25%); }
}

.spotify-preview {
  position: absolute;
  inset: 36px 0 0;
  display: none;
  padding: 28px 18px 36px;
  flex-direction: column;
  background: #121212;
  color: white;
  opacity: 0;
}

.spotify-brand {
  display: flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  gap: 7px;
}

.spotify-brand svg {
  width: 22px;
  height: 22px;
}

.spotify-copy {
  margin-top: auto;
  text-align: center;
}

.spotify-copy h3 {
  margin: 0 0 20px;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.8px;
}

.spotify-copy button {
  width: 100%;
  height: 34px;
  margin-top: 8px;
  border: 0;
  border-radius: 999px;
  background: #f7f8f8;
  color: #121212;
  font-size: 9px;
  font-weight: 700;
}

.spotify-copy .spotify-secondary {
  border: 1px solid #5a5a5a;
  background: transparent;
  color: white;
}

.spotify-copy p {
  margin: 14px 0 0;
  color: #8a8f98;
  font-size: 8px;
}

.phone-screen.spotify-open .home-content {
  opacity: 0;
  transform: scale(0.98);
}

.phone-screen.spotify-open .spotify-preview {
  display: flex;
  animation: app-open 220ms ease forwards;
}

@keyframes app-open {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

.gesture-bar {
  position: absolute;
  bottom: 7px;
  left: 50%;
  width: 74px;
  height: 3px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgb(23 23 24 / 72%);
}

.agent-pane {
  position: relative;
  display: grid;
  overflow: hidden;
  grid-template-rows: 84px minmax(0, 1fr) auto;
}

.agent-identity {
  display: flex;
  align-items: center;
  gap: 11px;
}

.agent-mark {
  display: grid;
  width: 38px;
  height: 38px;
  border: 1px solid rgb(var(--agent-rgb) / 35%);
  border-radius: 10px;
  background: rgb(var(--agent-rgb) / 10%);
  color: var(--agent-color);
  place-items: center;
}

.agent-mark svg {
  width: 29px;
  height: 29px;
}

.chat-title-button {
  display: flex;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  gap: 5px;
}

.chat-title-button h2,
.agent-identity h2 {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -0.3px;
}

.chat-title-button svg {
  width: 16px;
  height: 16px;
  color: var(--ink-subtle);
  transition: transform 140ms ease;
}

.chat-title-button[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.agent-identity p {
  display: flex;
  align-items: center;
  margin: 3px 0 0;
  color: var(--ink-subtle);
  font-size: 11px;
  gap: 6px;
}

.agent-identity .status-dot {
  width: 5px;
  height: 5px;
  box-shadow: none;
}

.agent-identity.is-working p {
  color: var(--ink);
  font-weight: 600;
}

.agent-identity.is-working .status-dot {
  background: var(--primary);
  box-shadow: 0 0 0 3px rgb(204 120 92 / 14%);
  animation: agent-working-pulse 900ms ease-in-out infinite;
}

@keyframes agent-working-pulse {
  50% { opacity: 0.35; }
}

.demo-label {
  margin: 0;
}

.header-tools {
  position: relative;
}

.thread-menu {
  position: absolute;
  z-index: 30;
  top: 40px;
  right: 0;
  width: 156px;
  padding: 5px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: #fffdfa;
  box-shadow: 0 8px 24px rgb(20 20 19 / 10%);
}

.thread-menu button {
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  font-size: 12px;
  text-align: left;
}

.thread-menu button:hover {
  background: var(--surface-1);
  color: var(--ink);
}

.thread-menu .danger-button {
  color: #c64545;
}

.drawer-scrim {
  position: absolute;
  z-index: 25;
  inset: 84px 0 0;
  background: rgb(20 20 19 / 18%);
}

.chat-drawer {
  display: flex;
  width: min(340px, 88%);
  height: 100%;
  padding: 18px;
  flex-direction: column;
  border-right: 1px solid var(--hairline);
  background: var(--canvas);
  box-shadow: 12px 0 32px rgb(20 20 19 / 8%);
  animation: drawer-enter 160ms ease both;
}

@keyframes drawer-enter {
  from { transform: translateX(-12px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.drawer-header h2 {
  font-size: 22px;
  font-weight: 400;
}

.new-thread-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  cursor: pointer;
  gap: 8px;
  font-weight: 500;
}

.new-thread-button:hover {
  background: var(--primary-hover);
}

.new-thread-button svg,
.drawer-search svg {
  width: 16px;
  height: 16px;
}

.drawer-search {
  display: flex;
  align-items: center;
  height: 40px;
  margin: 12px 0;
  padding: 0 11px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  color: var(--ink-tertiary);
  gap: 8px;
}

.drawer-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(204 120 92 / 12%);
}

.drawer-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.thread-list {
  min-height: 0;
  overflow-y: auto;
}

.thread-item {
  display: block;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  text-align: left;
}

.thread-item:hover,
.thread-item.is-active {
  background: var(--surface-1);
  color: var(--ink);
}

.thread-item strong,
.thread-item span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thread-item strong {
  margin-bottom: 3px;
  font-size: 13px;
  font-weight: 500;
}

.thread-item span {
  color: var(--ink-tertiary);
  font-size: 10px;
}

.drawer-note {
  margin: auto 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
  color: var(--ink-tertiary);
  font-size: 10px;
  text-align: center;
}

.conversation {
  display: flex;
  min-height: 0;
  overflow-y: auto;
  padding: 34px max(40px, 8vw) 40px;
  flex-direction: column;
  scrollbar-color: var(--hairline-strong) transparent;
}

.conversation > * {
  flex-shrink: 0;
}

.scroll-latest-button {
  position: absolute;
  bottom: 112px;
  left: 50%;
  z-index: 4;
  display: grid;
  width: 38px;
  height: 38px;
  border: 1px solid var(--hairline-strong);
  border-radius: 50%;
  background: #fffdfa;
  box-shadow: 0 8px 24px rgb(65 51 43 / 16%);
  color: var(--ink-muted);
  cursor: pointer;
  transform: translateX(-50%);
  place-items: center;
  transition: border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.scroll-latest-button:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translate(-50%, 2px);
}

.scroll-latest-button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.scroll-latest-button svg {
  width: 17px;
  height: 17px;
}

.empty-chat {
  display: flex;
  max-width: 420px;
  margin: auto;
  flex-direction: column;
  align-items: center;
  color: var(--ink-subtle);
  text-align: center;
}

.empty-chat .agent-mark {
  margin-bottom: 16px;
}

.empty-chat h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.5px;
}

.empty-chat p {
  max-width: 340px;
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.date-rule {
  display: flex;
  align-items: center;
  margin: 1px 0 28px;
  color: var(--ink-tertiary);
  font-size: 10px;
  gap: 12px;
}

.date-rule::before,
.date-rule::after {
  height: 1px;
  flex: 1;
  background: var(--hairline);
  content: "";
}

.message {
  display: flex;
  max-width: 76%;
  margin-bottom: 22px;
  flex-direction: column;
}

.message-user {
  align-self: flex-end;
  align-items: flex-end;
}

.message-agent {
  align-self: flex-start;
}

.bubble {
  padding: 11px 14px;
  border: 1px solid var(--hairline);
  font-size: 13px;
  line-height: 1.5;
}

.user-bubble {
  border-color: rgb(204 120 92 / 28%);
  border-radius: 12px 12px 3px;
  background: rgb(204 120 92 / 10%);
  color: var(--body-strong);
}

.agent-bubble {
  border-radius: 3px 12px 12px;
  background: var(--surface-1);
  color: var(--ink-muted);
}

.bubble > :first-child { margin-top: 0; }
.bubble > :last-child { margin-bottom: 0; }

.bubble p,
.bubble ul,
.bubble ol,
.bubble blockquote,
.bubble pre,
.bubble h1,
.bubble h2,
.bubble h3,
.bubble h4,
.bubble h5,
.bubble h6 {
  margin: 0 0 9px;
}

.bubble h1,
.bubble h2,
.bubble h3,
.bubble h4,
.bubble h5,
.bubble h6 {
  color: var(--body-strong);
  font-size: 1em;
  line-height: 1.35;
}

.bubble ul,
.bubble ol {
  padding-left: 20px;
}

.bubble .task-list-item {
  display: flex;
  align-items: flex-start;
  list-style: none;
  gap: 6px;
}

.bubble .task-list-item input {
  width: 14px;
  height: 14px;
  margin: 3px 0 0;
  flex: none;
  accent-color: var(--primary);
  opacity: 1;
}

.bubble blockquote {
  padding-left: 10px;
  border-left: 2px solid var(--primary-soft);
  color: var(--ink-tertiary);
}

.bubble code {
  padding: 1px 4px;
  border-radius: 4px;
  background: rgb(44 39 36 / 7%);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.9em;
}

.bubble pre {
  overflow-x: auto;
  padding: 10px;
  border-radius: 7px;
  background: rgb(44 39 36 / 7%);
  white-space: pre;
}

.bubble pre code {
  padding: 0;
  background: none;
}

.bubble a {
  color: var(--primary-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bubble hr {
  margin: 10px 0;
  border: 0;
  border-top: 1px solid var(--hairline);
}

.markdown-table-wrap {
  overflow-x: auto;
  margin: 0 0 9px;
}

.markdown-table-wrap table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
}

.markdown-table-wrap th,
.markdown-table-wrap td {
  padding: 6px 8px;
  border: 1px solid var(--hairline);
  vertical-align: top;
}

.markdown-table-wrap th {
  color: var(--body-strong);
  background: var(--surface-2);
  font-weight: 600;
}

.working-bubble {
  display: flex;
  align-items: center;
  min-width: 112px;
  gap: 9px;
}

.working-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgb(204 120 92 / 24%);
  flex: none;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: working-spin 700ms linear infinite;
}

.typing-bubble::after {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 3px;
  background: var(--primary);
  vertical-align: -2px;
  content: "";
  animation: typing-caret 700ms steps(1) infinite;
}

@keyframes working-spin {
  to { transform: rotate(360deg); }
}

@keyframes typing-caret {
  50% { opacity: 0; }
}

.message-time {
  margin-top: 6px;
  color: var(--ink-tertiary);
  font-size: 10px;
}

.message-author {
  display: flex;
  align-items: center;
  margin-bottom: 7px;
  color: var(--ink-subtle);
  font-size: 10px;
  gap: 6px;
}

.message-attachments {
  display: grid;
  width: min(88%, 420px);
  margin-top: 8px;
  gap: 6px;
}

.message-attachment {
  display: flex;
  align-items: center;
  min-height: 50px;
  padding: 8px 11px;
  border: 1px solid var(--hairline-strong);
  border-radius: 10px;
  background: var(--surface-1);
  color: var(--ink);
  text-decoration: none;
  gap: 10px;
}

.message-attachment:hover {
  border-color: var(--primary);
}

.message-attachment-icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 7px;
  background: var(--primary-soft);
  color: var(--primary-deep);
  place-items: center;
}

.message-attachment-icon svg {
  width: 16px;
  height: 16px;
}

.message-attachment > span:last-child,
.message-attachment strong,
.message-attachment small {
  display: block;
  min-width: 0;
}

.message-attachment strong {
  overflow: hidden;
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-attachment small {
  margin-top: 2px;
  color: var(--ink-tertiary);
  font-size: 9px;
}

.mini-agent-mark {
  width: 13px;
  height: 13px;
  border: 1px solid rgb(var(--agent-rgb) / 42%);
  border-radius: 4px;
  background: rgb(var(--agent-rgb) / 12%);
}

.tool-run {
  width: min(88%, 560px);
  margin: 0 0 24px;
  overflow: hidden;
  align-self: flex-start;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: #fffdfa;
}

.tool-run-header {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 42px;
  padding: 0 13px;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  background: transparent;
  color: var(--ink-tertiary);
  font-family: var(--mono);
  font-size: 10px;
  text-align: left;
  cursor: pointer;
}

.tool-run.is-collapsed .tool-run-header {
  border-bottom: 0;
}

.tool-run-header:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.tool-run-header > span {
  margin-left: auto;
}

.tool-run-header::after {
  margin-left: 8px;
  content: "›";
  font-size: 15px;
  transition: transform 140ms ease;
}

.tool-run-header[aria-expanded="true"]::after {
  transform: rotate(90deg);
}

.tool-run-header > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-run-header strong {
  color: var(--ink-muted);
  font-family: var(--text);
  font-size: 11px;
  font-weight: 500;
}

.tool-icon {
  display: grid;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink-subtle);
  place-items: center;
}

.tool-icon svg {
  width: 12px;
  height: 12px;
}

.tool-steps {
  margin: 0;
  padding: 6px 0;
  list-style: none;
}

.tool-steps li {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  min-height: 48px;
  padding: 6px 13px;
  color: var(--ink-muted);
  column-gap: 9px;
}

.step-marker {
  display: grid;
  width: 18px;
  height: 18px;
  border: 1px solid rgb(39 166 68 / 38%);
  border-radius: 50%;
  background: rgb(39 166 68 / 9%);
  color: #55bb6c;
  place-items: center;
}

.step-marker svg {
  width: 11px;
  height: 11px;
  stroke-width: 2.2;
}

.tool-steps li.running .step-marker {
  border-color: rgb(var(--agent-rgb) / 35%);
  background: rgb(var(--agent-rgb) / 9%);
  animation: tool-pulse 1s ease-in-out infinite;
}

.tool-steps li.running .step-marker svg {
  display: none;
}

.tool-steps li.error .step-marker {
  border-color: rgb(190 63 63 / 35%);
  background: rgb(190 63 63 / 9%);
  color: #be3f3f;
}

.tool-steps li.error .step-marker svg {
  display: none;
}

@keyframes tool-pulse {
  50% { opacity: 0.45; }
}

.tool-steps strong {
  display: block;
  margin-bottom: 3px;
  font-size: 11px;
  font-weight: 500;
}

.tool-steps code {
  color: var(--ink-tertiary);
  font-family: var(--mono);
  font-size: 9px;
}

.step-time {
  color: var(--ink-tertiary);
  font-family: var(--mono);
  font-size: 9px;
}

.composer-wrap {
  padding: 12px max(40px, 8vw) 17px;
  border-top: 1px solid var(--hairline);
  background: var(--canvas);
}

.composer-shell {
  position: relative;
}

.composer-shell.is-quota-exhausted .composer {
  filter: blur(4px);
  pointer-events: none;
}

.composer-quota-overlay {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  padding: 7px 9px 7px 13px;
  border: 1px solid var(--hairline-strong);
  border-radius: 12px;
  background: rgb(255 253 250 / 78%);
  color: var(--ink);
  gap: 12px;
}

.composer-quota-overlay[hidden] {
  display: none;
}

.composer-quota-overlay span {
  font-size: 10px;
  line-height: 1.35;
}

.composer-quota-overlay button {
  min-height: 36px;
  padding: 0 13px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: #21120e;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.composer-quota-overlay button:disabled {
  cursor: wait;
}

.suggestions {
  display: flex;
  min-width: 0;
  margin-bottom: 9px;
  overflow-x: auto;
  gap: 6px;
  scrollbar-width: none;
}

.suggestions::-webkit-scrollbar {
  display: none;
}

.suggestions button {
  min-height: 28px;
  padding: 0 10px;
  flex: 0 0 auto;
  color: var(--ink-subtle);
  font-size: 10px;
}

.composer {
  display: flex;
  align-items: flex-end;
  min-height: 52px;
  padding: 7px;
  border: 1px solid var(--hairline-strong);
  border-radius: 12px;
  background: var(--surface-1);
  gap: 7px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.composer:focus-within,
.composer.is-agent-running {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(204 120 92 / 12%);
}

.compose-icon,
.send-button {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  padding: 9px;
  place-items: center;
}

.compose-icon {
  border-color: transparent;
  background: transparent;
  color: var(--ink-tertiary);
}

.compose-icon svg,
.send-button svg {
  width: 17px;
  height: 17px;
}

.send-button .stop-icon,
.send-button.is-stop .send-icon {
  display: none;
}

.send-button.is-stop .stop-icon {
  display: block;
  fill: currentcolor;
  stroke: none;
}

.composer textarea {
  min-height: 35px;
  max-height: 110px;
  padding: 8px 2px 6px;
  flex: 1;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  line-height: 1.45;
}

.composer textarea::placeholder {
  color: var(--ink-tertiary);
}

.shortcut {
  margin: 0 2px 12px 0;
  color: var(--ink-tertiary);
  font-family: var(--mono);
  font-size: 9px;
}

.send-button {
  border: 0;
  background: var(--primary);
  color: white;
}

.send-button:hover {
  background: var(--primary-hover);
}

.send-button.is-stop {
  background: var(--ink);
}

.send-button.is-stop:hover {
  background: #090807;
}

.composer.is-agent-running textarea,
.composer.is-agent-running .compose-icon {
  cursor: not-allowed;
}

.composer.is-agent-running .shortcut {
  visibility: hidden;
}

.send-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.composer-note {
  margin: 8px 0 0;
  color: var(--ink-tertiary);
  font-size: 9px;
  text-align: center;
}

.action-dialog {
  width: min(420px, calc(100% - 32px));
  padding: 24px;
  border: 1px solid var(--hairline-strong);
  border-radius: 14px;
  background: #fffdfa;
  color: var(--ink);
  box-shadow: 0 24px 64px rgb(20 20 19 / 18%);
}

.action-dialog[open] {
  animation: dialog-enter 140ms ease both;
}

.action-dialog::backdrop {
  background: rgb(20 20 19 / 28%);
  backdrop-filter: blur(2px);
}

@keyframes dialog-enter {
  from { opacity: 0; transform: translateY(6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.dialog-icon {
  display: grid;
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  border-radius: 10px;
  background: #fff1f1;
  color: #c64545;
  place-items: center;
}

.dialog-icon svg {
  width: 21px;
  height: 21px;
}

.action-dialog.has-input .dialog-icon {
  display: none;
}

.dialog-copy h2 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
}

.dialog-copy p {
  margin: 0;
  color: var(--ink-subtle);
  font-size: 13px;
  line-height: 1.5;
}

.dialog-input {
  display: block;
  margin-top: 18px;
}

.dialog-input[hidden] {
  display: none;
}

.dialog-input input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--hairline-strong);
  border-radius: 8px;
  outline: 0;
  background: var(--canvas);
  color: var(--ink);
}

.dialog-input input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(204 120 92 / 12%);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
  gap: 8px;
}

.dialog-actions button {
  min-height: 38px;
  padding: 0 15px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
}

.dialog-cancel {
  border: 1px solid var(--hairline-strong);
  background: #fffdfa;
  color: var(--ink-muted);
}

.dialog-confirm {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: white;
}

.action-dialog.is-danger .dialog-confirm {
  border-color: #c64545;
  background: #c64545;
}

.account-dialog {
  width: min(460px, calc(100% - 32px));
}

.scheduled-tasks-dialog {
  width: min(620px, calc(100% - 32px));
  max-height: min(760px, calc(100vh - 32px));
  overflow: auto;
}

.scheduled-tasks-header,
.scheduled-task-form-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.new-scheduled-task-button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 42px;
  margin-top: 22px;
  padding: 0 14px;
  border: 1px solid var(--primary-soft);
  border-radius: 9px;
  background: var(--primary-faint);
  color: var(--primary-deep);
  cursor: pointer;
  gap: 8px;
  font-weight: 600;
}

.new-scheduled-task-button:hover {
  border-color: var(--primary);
}

.new-scheduled-task-button svg {
  width: 17px;
  height: 17px;
}

.scheduled-task-list {
  display: grid;
  margin-top: 14px;
  gap: 10px;
}

.scheduled-task-item {
  padding: 15px 16px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: var(--canvas);
}

.scheduled-task-item header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.scheduled-task-item h3,
.scheduled-task-form-heading h3,
.scheduled-task-empty h3 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.scheduled-task-periodicity {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgb(var(--agent-rgb) / 10%);
  color: var(--agent-color);
  font-size: 10px;
  font-weight: 600;
}

.scheduled-task-item > p {
  display: -webkit-box;
  margin: 8px 0 0;
  overflow: hidden;
  color: var(--ink-subtle);
  font-size: 12px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.scheduled-task-item footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  gap: 12px;
}

.scheduled-task-history-toggle {
  display: flex;
  align-items: center;
  padding: 5px 7px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-subtle);
  cursor: pointer;
  gap: 6px;
  font-size: 11px;
}

.scheduled-task-history-toggle:hover,
.scheduled-task-history-toggle[aria-expanded="true"] {
  background: var(--surface-2);
  color: var(--ink);
}

.scheduled-task-history-toggle svg {
  width: 14px;
  height: 14px;
}

.scheduled-task-history-toggle small {
  display: grid;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--surface-3);
  place-items: center;
  font-size: 9px;
}

.scheduled-task-actions {
  display: flex;
  gap: 4px;
}

.scheduled-task-action {
  display: grid;
  width: 28px;
  height: 28px;
  padding: 6px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-tertiary);
  cursor: pointer;
  place-items: center;
}

.scheduled-task-action:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.scheduled-task-action.is-danger:hover {
  background: #fff0ee;
  color: #b9473d;
}

.scheduled-task-action svg {
  width: 15px;
  height: 15px;
}

.scheduled-task-history {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--hairline);
}

.scheduled-task-run {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) minmax(120px, auto) 42px;
  align-items: center;
  min-height: 34px;
  color: var(--ink-subtle);
  gap: 12px;
  font-size: 11px;
}

.scheduled-task-run span {
  display: flex;
  align-items: center;
  color: var(--ink-muted);
  gap: 7px;
  font-weight: 500;
}

.scheduled-task-run span::before {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #58a66b;
  content: "";
}

.scheduled-task-run.is-failed span::before {
  background: #c45a50;
}

.scheduled-task-run time,
.scheduled-task-run small {
  color: var(--ink-tertiary);
  font-size: 10px;
}

.scheduled-task-run small {
  text-align: right;
}

.scheduled-task-history-empty {
  margin: 0;
  padding: 10px 0 2px;
  color: var(--ink-tertiary);
  font-size: 11px;
  text-align: center;
}

.scheduled-task-run {
  cursor: pointer;
}

.scheduled-task-run:hover {
  background: var(--surface-1);
}

.scheduled-task-run-button,
.scheduled-task-run-now {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.scheduled-task-run-now {
  display: flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 7px;
  color: var(--primary-deep);
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
}

.scheduled-task-run-now:hover {
  background: var(--primary-faint);
}

.scheduled-task-run-now svg {
  width: 13px;
  height: 13px;
}

.scheduled-run-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 0 20px;
  padding: 14px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: var(--canvas);
  gap: 12px;
}

.scheduled-run-meta div {
  display: grid;
  gap: 4px;
}

.scheduled-run-meta dt {
  color: var(--ink-tertiary);
  font-size: 10px;
}

.scheduled-run-meta dd {
  margin: 0;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 600;
}

.scheduled-run-content h4 {
  margin: 18px 0 7px;
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 600;
}

.scheduled-run-content pre {
  max-height: 240px;
  margin: 0;
  overflow: auto;
  padding: 13px;
  border: 1px solid var(--hairline);
  border-radius: 9px;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.scheduled-task-empty {
  display: grid;
  padding: 44px 24px 28px;
  color: var(--ink-subtle);
  place-items: center;
  text-align: center;
}

.scheduled-task-empty > span {
  display: grid;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink-tertiary);
  place-items: center;
}

.scheduled-task-empty svg {
  width: 22px;
  height: 22px;
}

.scheduled-task-empty p,
.scheduled-task-form-heading p {
  margin: 6px 0 0;
  color: var(--ink-subtle);
  font-size: 12px;
  line-height: 1.45;
}

.scheduled-task-back {
  display: grid;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  padding: 7px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface-1);
  color: var(--ink-subtle);
  cursor: pointer;
  place-items: center;
}

.scheduled-task-back svg {
  width: 17px;
  height: 17px;
}

.scheduled-task-form-heading {
  justify-content: flex-start;
  margin-bottom: 20px;
}

.scheduled-task-weekdays {
  margin: 16px 0 0;
  padding: 0;
  border: 0;
}

.scheduled-task-weekdays legend,
.scheduled-task-field > span {
  margin-bottom: 7px;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 500;
}

.scheduled-task-weekdays > div {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.scheduled-task-weekdays label {
  cursor: pointer;
}

.scheduled-task-weekdays input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.scheduled-task-weekdays span {
  display: grid;
  min-height: 36px;
  border: 1px solid var(--hairline-strong);
  border-radius: 8px;
  background: var(--canvas);
  color: var(--ink-subtle);
  place-items: center;
  font-size: 10px;
}

.scheduled-task-weekdays input:checked + span {
  border-color: var(--primary);
  background: var(--primary-faint);
  color: var(--primary-deep);
  font-weight: 600;
}

.scheduled-task-weekdays input:focus-visible + span {
  box-shadow: 0 0 0 3px rgb(204 120 92 / 12%);
}

.scheduled-task-timezone-note {
  margin: 8px 0 0;
  color: var(--ink-tertiary);
  font-size: 10px;
}

.scheduled-task-timezone-note strong {
  color: var(--ink-muted);
  font-weight: 600;
}

.scheduled-task-field {
  display: grid;
  margin-top: 14px;
  gap: 7px;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 500;
}

.scheduled-task-field input,
.scheduled-task-field textarea,
.scheduled-task-field select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--hairline-strong);
  border-radius: 8px;
  outline: 0;
  background: var(--canvas);
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}

.scheduled-task-field select {
  min-height: 42px;
}

.scheduled-task-field textarea {
  min-height: 116px;
  resize: vertical;
  line-height: 1.5;
}

.scheduled-task-field input:focus,
.scheduled-task-field textarea:focus,
.scheduled-task-field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(204 120 92 / 12%);
}

.account-dialog form {
  margin: 0;
}

.account-field {
  display: grid;
  margin-top: 22px;
  gap: 7px;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 500;
}

.account-field input,
.account-field select,
.settings-language-field select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--hairline-strong);
  border-radius: 8px;
  outline: 0;
  background: var(--canvas);
  color: var(--ink);
}

.account-field input[readonly] {
  background: var(--surface-1);
  color: var(--ink-subtle);
  cursor: default;
}

.account-field input:focus,
.account-field select:focus,
.settings-language-field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(204 120 92 / 12%);
}

.avatar-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
}

.avatar-choice {
  position: relative;
  display: grid;
  justify-items: center;
  padding: 10px 6px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  cursor: pointer;
  gap: 6px;
}

.avatar-choice input,
.settings-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.robot-avatar {
  display: grid;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgb(var(--agent-rgb) / 14%);
  color: var(--agent-color);
  place-items: center;
}

.robot-avatar svg {
  width: 31px;
  height: 31px;
}

.avatar-choice input:checked + .robot-avatar,
.avatar-choice input:focus-visible + .robot-avatar {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.avatar-choice small {
  color: var(--ink-subtle);
  font-size: 10px;
}

.device-skin-picker {
  margin: 22px 0 0;
  padding: 0;
  border: 0;
}

.device-skin-picker legend {
  margin-bottom: 9px;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 500;
}

.device-skin-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.device-skin-choice {
  position: relative;
  cursor: pointer;
}

.device-skin-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.device-skin-choice > span {
  display: grid;
  grid-template-columns: 34px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  min-height: 58px;
  padding: 8px 10px;
  border: 1px solid var(--hairline);
  border-radius: 9px;
  column-gap: 9px;
}

.device-skin-choice input:checked + span {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgb(204 120 92 / 10%);
}

.device-skin-choice input:focus-visible + span {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.device-skin-choice:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.45;
}

.skin-swatch {
  display: block;
  grid-row: 1 / 3;
  width: 24px;
  height: 38px;
  border: 4px solid;
  border-radius: 8px;
  background: #e9e8e5;
}

.skin-graphite {
  border-color: #303136;
}

.skin-coral {
  border-color: #a65340;
  background: #fff4ef;
  box-shadow: 0 5px 10px rgb(204 120 92 / 22%);
}

.device-skin-choice strong {
  align-self: end;
  font-size: 11px;
}

.device-skin-choice small,
.device-skin-note {
  color: var(--ink-subtle);
  font-size: 9px;
}

.device-skin-note {
  margin: 8px 0 0;
}

.settings-dialog {
  width: min(920px, calc(100% - 32px));
  height: min(82vh, 800px);
  max-height: calc(100vh - 32px);
  overflow: hidden;
}

.settings-dialog > form {
  display: grid;
  height: 100%;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.settings-layout {
  display: grid;
  min-height: 0;
  margin-top: 20px;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 18px;
}

.settings-toc {
  display: flex;
  min-width: 0;
  padding-right: 14px;
  border-right: 1px solid var(--hairline);
  flex-direction: column;
  gap: 4px;
}

.settings-toc button {
  min-height: 36px;
  padding: 0 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-subtle);
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}

.settings-toc button:hover,
.settings-toc button.is-active {
  background: var(--surface-1);
  color: var(--ink);
}

.settings-toc button.is-active {
  font-weight: 600;
}

.settings-sections {
  display: grid;
  min-height: 0;
  margin: 0;
  padding-right: 8px;
  overflow-y: auto;
  scroll-behavior: smooth;
  gap: 12px;
}

.settings-section {
  scroll-margin-top: 2px;
}

.settings-section {
  padding: 16px;
  border: 1px solid var(--hairline);
  border-radius: 11px;
}

.settings-section-heading {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.settings-section-heading h3,
.settings-section-heading p {
  margin: 0;
}

.settings-section-heading h3 {
  font-size: 14px;
  font-weight: 600;
}

.settings-section-heading p {
  margin-top: 3px;
  color: var(--ink-subtle);
  font-size: 11px;
}

.settings-section-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  align-items: center;
  gap: 16px;
}

.settings-locale-fields {
  display: grid;
  gap: 9px;
}

.settings-language-field {
  display: grid;
  width: 210px;
  gap: 4px;
}

.settings-language-field > span {
  color: var(--ink-tertiary);
  font-size: 10px;
}

.settings-language-field select {
  height: 36px;
  padding: 0 10px;
  font-size: 12px;
}

.language-note {
  margin-left: 41px;
}

.language-note span {
  display: block;
}

.language-note span + span {
  margin-top: 2px;
}

.settings-section-icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 8px;
  background: var(--canvas-strong);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  place-items: center;
}

.settings-section-icon svg {
  width: 16px;
  height: 16px;
}

.agent-settings-icon {
  background: rgb(var(--agent-rgb) / 12%);
  color: var(--agent-color);
}

.settings-account-field,
.settings-device-skin-picker {
  margin-top: 14px;
}

.settings-agent-color-picker {
  margin: 14px 0 0;
  padding: 0;
  border: 0;
}

.settings-agent-color-picker legend {
  margin-bottom: 9px;
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 500;
}

.settings-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
  gap: 9px;
}

.settings-choice {
  position: relative;
  cursor: pointer;
}

.settings-choice > span {
  display: grid;
  min-height: 58px;
  padding: 11px 12px;
  border: 1px solid var(--hairline);
  border-radius: 9px;
  gap: 3px;
}

.settings-choice input:checked + span {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgb(204 120 92 / 10%);
}

.settings-choice input:focus-visible + span {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.settings-choice strong {
  font-size: 12px;
  font-weight: 600;
}

.settings-choice em {
  color: var(--ink);
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
}

.settings-choice small,
.settings-note {
  color: var(--ink-subtle);
  font-size: 10px;
  line-height: 1.4;
}

.settings-note {
  margin: 11px 0 0;
}

.billing-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  color: var(--ink-subtle);
  font-size: 11px;
}

.billing-status strong {
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff1eb;
  color: var(--primary);
  font-size: 11px;
}

.billing-change-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding: 10px 11px;
  border: 1px solid #f1c9b9;
  border-radius: 9px;
  background: #fff5f0;
  gap: 12px;
}

.billing-change-notice[hidden] {
  display: none;
}

.billing-change-notice p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.45;
}

.billing-change-notice button {
  padding: 7px 10px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: #21120e;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.usage-overview {
  display: grid;
  margin-top: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.usage-overview > div {
  display: grid;
  padding: 10px 11px;
  border: 1px solid var(--hairline);
  border-radius: 9px;
  background: var(--surface-1);
  grid-template-columns: 1fr auto;
  gap: 7px;
}

.usage-overview span,
.usage-period {
  color: var(--ink-subtle);
  font-size: 10px;
}

.usage-overview strong {
  font-size: 10px;
  font-weight: 600;
}

.usage-overview progress {
  width: 100%;
  height: 5px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  grid-column: 1 / -1;
  accent-color: var(--primary);
}

.usage-period {
  margin: 8px 0 0;
  text-align: right;
}

.billing-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  gap: 12px;
}

.manage-billing,
.cancel-subscription {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
}

.manage-billing {
  color: var(--ink-muted);
}

.cancel-subscription {
  color: #b74444;
}

.manage-billing:disabled,
.cancel-subscription:disabled {
  color: var(--ink-tertiary);
  cursor: default;
}

.settings-dialog-actions {
  margin: 16px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
  background: #fffdfa;
}

.logout-menu-item {
  border-top: 1px solid var(--hairline) !important;
  color: #b74444 !important;
}

.magic-confirmation {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px;
  background: var(--canvas);
  place-items: center;
}

.magic-confirmation .auth-card {
  width: min(420px, 100%);
}

.magic-confirmation form {
  margin-top: 24px;
}

.auth-view {
  display: grid;
  grid-template-columns: minmax(420px, 1.05fr) minmax(420px, 0.95fr);
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--canvas);
}

.auth-story {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 34px 42px 30px;
  border-right: 1px solid rgb(204 120 92 / 22%);
  background: #efe2d8;
  flex-direction: column;
}

.auth-story-copy {
  max-width: 560px;
  margin: auto 0;
}

.auth-story-copy .eyebrow {
  margin: 0 0 18px;
  color: var(--primary);
}

.auth-story-copy h1 {
  max-width: 520px;
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(46px, 5.2vw, 72px);
  font-weight: 400;
  letter-spacing: -2.4px;
  line-height: 0.98;
}

.auth-story-copy > p:last-child {
  max-width: 470px;
  margin: 24px 0 0;
  color: var(--ink-muted);
  font-size: 16px;
  line-height: 1.6;
}

.auth-story-foot {
  margin: 0;
  color: var(--ink-subtle);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.03em;
}

.auth-panel {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 56px;
  background: #fffdfa;
  place-items: center;
}

.auth-card {
  width: min(440px, 100%);
}

.auth-brand {
  display: none;
}

.registration-view {
  min-height: 100vh;
  min-height: 100dvh;
  background: #fffdfa;
}

.registration-view[hidden] {
  display: none;
}

.registration-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 36px;
  border-bottom: 1px solid var(--hairline);
}

.registration-header p {
  margin: 0;
  color: var(--ink-subtle);
  font-size: 12px;
}

.registration-header button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  font-weight: 600;
}

.registration-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 640px);
  justify-content: center;
  min-height: calc(100vh - 72px);
  min-height: calc(100dvh - 72px);
  padding: 72px 32px;
  gap: 72px;
}

.registration-progress {
  padding-top: 8px;
}

.registration-progress > .eyebrow {
  margin: 0 0 24px;
}

.registration-progress ol {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  gap: 4px;
}

.registration-progress li {
  color: var(--ink-tertiary);
}

.registration-progress li button {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  width: 100%;
  min-height: 42px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  gap: 9px;
}

.registration-progress li button:not(:disabled) {
  cursor: pointer;
}

.registration-progress li button:not(:disabled):hover strong {
  color: var(--primary);
}

.registration-progress li button:focus-visible {
  border-radius: 7px;
  box-shadow: 0 0 0 2px rgb(204 120 92 / 28%);
}

.registration-progress li button:disabled {
  cursor: not-allowed;
}

.registration-progress li span {
  font-family: var(--mono);
  font-size: 9px;
}

.registration-progress li strong {
  font-size: 12px;
  font-weight: 500;
}

.registration-progress li.is-current {
  color: var(--ink);
}

.registration-progress li.is-current span,
.registration-progress li.is-complete span {
  color: var(--primary);
}

.registration-progress li.is-complete strong {
  color: var(--ink-subtle);
}

.registration-card {
  width: 100%;
  padding: 42px 48px;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  background: var(--canvas);
  align-self: start;
}

.registration-step[hidden] {
  display: none;
}

.registration-step > .eyebrow {
  margin: 0 0 12px;
  color: var(--primary);
}

.registration-scene {
  position: relative;
  height: 118px;
  margin: 0 0 26px;
  overflow: hidden;
  border: 1px solid rgb(204 120 92 / 18%);
  border-radius: 12px;
  background: #f1e5dc;
}

.registration-scene::before,
.registration-scene::after {
  position: absolute;
  border: 1px solid rgb(204 120 92 / 14%);
  border-radius: 50%;
  content: "";
}

.registration-scene::before {
  width: 150px;
  height: 150px;
  top: -78px;
  right: -38px;
}

.registration-scene::after {
  width: 90px;
  height: 90px;
  bottom: -58px;
  left: -20px;
}

.scene-device {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 58px;
  display: grid;
  width: 54px;
  height: 92px;
  border: 4px solid #343432;
  border-radius: 14px;
  background: #fffdfa;
  box-shadow: 0 10px 18px rgb(20 20 19 / 12%);
  place-items: center;
  animation: scene-float 2.8s ease-in-out infinite;
}

.scene-device::before {
  position: absolute;
  top: 5px;
  width: 18px;
  height: 4px;
  border-radius: 999px;
  background: #343432;
  content: "";
}

.scene-device::after {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #54bd73;
  content: "";
}

.scene-device b {
  color: var(--agent-color);
  font-weight: 500;
}

.scene-device b svg {
  width: 26px;
  height: 26px;
}

.scene-device small {
  position: absolute;
  bottom: 10px;
  left: 50%;
  padding: 2px 4px;
  border-radius: 999px;
  background: var(--canvas-strong);
  color: var(--ink-subtle);
  font-family: var(--mono);
  font-size: 5px;
  line-height: 1;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.registration-scene.is-pro {
  border-color: rgb(204 120 92 / 34%);
  background: #efdbd0;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 34%);
}

.registration-scene.is-pro .scene-device {
  --scene-scale: 1.08;
  border-color: var(--primary);
  outline: 3px solid rgb(204 120 92 / 14%);
  background: #fff4ef;
  box-shadow: 0 16px 30px rgb(204 120 92 / 34%);
}

.registration-scene.is-pro .scene-device b::after {
  position: absolute;
  top: -7px;
  right: -18px;
  color: var(--primary);
  content: "✦";
  font-size: 15px;
  text-shadow: -72px 50px 0 rgb(204 120 92 / 58%), -8px 78px 0 rgb(204 120 92 / 34%);
  animation: scene-pulse 1.6s ease-in-out infinite;
}

.registration-scene.is-pro .scene-device small {
  padding-right: 6px;
  padding-left: 6px;
  background: var(--primary);
  color: white;
  font-weight: 700;
}

.scene-mail {
  position: absolute;
  z-index: 2;
  top: 39px;
  left: 62px;
  width: 62px;
  height: 42px;
  border: 2px solid var(--primary);
  border-radius: 7px;
  background: #fffdfa;
  animation: scene-deliver 2.8s ease-in-out infinite alternate;
}

.scene-mail::before,
.scene-mail::after {
  position: absolute;
  top: 7px;
  width: 34px;
  height: 2px;
  background: var(--primary);
  content: "";
}

.scene-mail::before {
  left: 2px;
  transform: rotate(32deg);
}

.scene-mail::after {
  right: 2px;
  transform: rotate(-32deg);
}

.scene-route {
  position: absolute;
  top: 58px;
  right: 128px;
  left: 145px;
  border-top: 2px dashed rgb(204 120 92 / 45%);
}

.scene-agent-ring {
  position: absolute;
  top: 15px;
  left: 50%;
  width: 88px;
  height: 88px;
  margin-left: -44px;
  border: 1px solid rgb(var(--agent-rgb) / 42%);
  border-radius: 50%;
  box-shadow: inset 0 0 0 12px rgb(255 253 250 / 30%);
  animation: scene-pulse 2.4s ease-in-out infinite;
}

.scene-agent-token {
  position: absolute;
  z-index: 2;
  top: 39px;
  left: 50%;
  display: grid;
  width: 48px;
  height: 48px;
  margin-left: -24px;
  border-radius: 14px;
  background: rgb(var(--agent-rgb) / 14%);
  color: var(--agent-color);
  place-items: center;
  animation: scene-float 2.8s ease-in-out infinite;
}

.scene-agent-token svg {
  width: 33px;
  height: 33px;
}

.scene-plan .scene-device {
  right: auto;
  left: 50%;
  margin-left: -27px;
}

.scene-signal {
  position: absolute;
  top: 46px;
  right: 78px;
  color: var(--agent-color);
  font-family: var(--mono);
  font-size: 12px;
  font-style: normal;
  letter-spacing: 2px;
  animation: scene-pulse 1.8s ease-in-out infinite;
}

.scene-plan-ticket {
  position: absolute;
  z-index: 2;
  top: 31px;
  left: 54px;
  display: grid;
  min-width: 92px;
  padding: 12px;
  border: 1px solid rgb(204 120 92 / 30%);
  border-radius: 9px;
  background: #fffdfa;
  gap: 4px;
}

.scene-plan-ticket b {
  font-size: 11px;
}

.scene-plan-ticket small {
  color: var(--ink-subtle);
  font-size: 9px;
}

@keyframes scene-float {
  0%, 100% { transform: translateY(0) scale(var(--scene-scale, 1)); }
  50% { transform: translateY(-4px) scale(var(--scene-scale, 1)); }
}

@keyframes scene-deliver {
  to { transform: translateX(8px); }
}

@keyframes scene-pulse {
  50% { opacity: 0.45; transform: scale(0.92); }
}

.registration-step h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -0.8px;
  line-height: 1.08;
}

.registration-lead {
  max-width: 500px;
  margin: 12px 0 28px;
  color: var(--ink-subtle);
  font-size: 13px;
  line-height: 1.55;
}

.registration-step form {
  margin: 0;
}

.registration-field {
  display: grid;
  gap: 7px;
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 500;
}

.registration-field input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  border: 1px solid var(--hairline-strong);
  border-radius: 9px;
  outline: 0;
  background: #fffdfa;
  color: var(--ink);
}

.registration-field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(204 120 92 / 12%);
}

.registration-verified-email {
  display: grid;
  padding: 11px 13px;
  border: 1px solid var(--hairline);
  border-radius: 9px;
  background: var(--surface-1);
  gap: 3px;
}

.registration-verified-email span {
  color: var(--ink-subtle);
  font-size: 10px;
}

.registration-verified-email strong {
  overflow: hidden;
  color: var(--body-strong);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.registration-name-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  gap: 8px;
}

.registration-name-control button {
  display: grid;
  width: 46px;
  height: 46px;
  padding: 12px;
  border: 1px solid var(--hairline-strong);
  border-radius: 9px;
  background: #fffdfa;
  color: var(--primary);
  cursor: pointer;
  place-items: center;
}

.registration-name-control button:hover {
  border-color: var(--primary);
  background: #fff4ef;
}

.registration-name-control button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.registration-name-control button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.registration-primary,
.registration-secondary {
  min-height: 42px;
  padding: 0 17px;
  border-radius: 9px;
  cursor: pointer;
  font-weight: 600;
}

.registration-primary {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: white;
}

.registration-secondary {
  border: 1px solid var(--hairline-strong);
  background: #fffdfa;
  color: var(--ink-muted);
}

#registration-email-form {
  display: grid;
  gap: 14px;
}

#registration-email-form .registration-primary {
  min-width: 120px;
  justify-self: end;
}

.registration-color-picker {
  margin: 22px 0 0;
  padding: 0;
  border: 0;
}

.registration-color-picker legend {
  margin-bottom: 10px;
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 500;
}

.registration-plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.registration-plan {
  position: relative;
  cursor: pointer;
}

.registration-plan input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.registration-plan > span {
  position: relative;
  display: grid;
  min-height: 112px;
  padding: 16px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: #fffdfa;
  gap: 5px;
}

.registration-plan input:checked + span {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgb(204 120 92 / 10%);
}

.registration-plan input[value="pro"] + span {
  border-color: rgb(204 120 92 / 28%);
  background: #fff9f6;
}

.registration-plan input[value="pro"]:checked + span {
  background: #fff3ed;
  box-shadow: 0 0 0 2px rgb(204 120 92 / 14%), 0 12px 24px rgb(204 120 92 / 14%);
  transform: translateY(-2px);
}

.registration-plan mark {
  position: absolute;
  top: 9px;
  right: 9px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #f7ded3;
  color: var(--primary);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.registration-plan input:focus-visible + span {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.registration-plan strong {
  font-size: 14px;
}

.registration-plan em {
  color: var(--ink);
  font-size: 13px;
  font-style: normal;
  font-weight: 600;
}

.registration-plan small {
  color: var(--ink-subtle);
  font-size: 11px;
  line-height: 1.4;
}

.registration-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 28px;
  gap: 9px;
}

.registration-summary {
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: #fffdfa;
}

.registration-summary div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 14px;
  color: var(--ink-subtle);
  font-size: 12px;
}

.registration-summary div + div {
  border-top: 1px solid var(--hairline);
}

.registration-summary strong {
  color: var(--ink);
  font-weight: 600;
}

.registration-disclaimer {
  margin: 10px 0 0;
  color: var(--ink-tertiary);
  font-size: 10px;
}

.registration-complete {
  text-align: center;
}

.registration-phone {
  position: relative;
  display: grid;
  width: 96px;
  height: 156px;
  margin: 0 auto 28px;
  border: 5px solid #272725;
  border-radius: 22px;
  background: #ece8e2;
  box-shadow: 0 18px 30px rgb(20 20 19 / 14%);
  place-items: center;
  animation: registration-boot 700ms ease both;
}

.registration-phone::before {
  position: absolute;
  top: 7px;
  width: 30px;
  height: 7px;
  border-radius: 999px;
  background: #272725;
  content: "";
}

.registration-phone span {
  color: var(--agent-color);
}

.registration-phone span svg {
  width: 38px;
  height: 38px;
}

.registration-phone small {
  position: absolute;
  bottom: 22px;
  left: 50%;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--canvas-strong);
  color: var(--ink-subtle);
  font-family: var(--mono);
  font-size: 6px;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.registration-phone.is-pro {
  border-color: var(--primary);
  outline: 5px solid rgb(204 120 92 / 12%);
  background: #fff4ef;
  box-shadow: 0 24px 42px rgb(204 120 92 / 34%);
}

.registration-phone.is-pro span::after {
  position: absolute;
  top: 14px;
  right: -25px;
  color: var(--primary);
  content: "✦";
  font-size: 17px;
  text-shadow: -105px 74px 0 rgb(204 120 92 / 45%);
  animation: scene-pulse 1.6s ease-in-out infinite;
}

.registration-phone.is-pro small {
  padding-right: 8px;
  padding-left: 8px;
  background: var(--primary);
  color: white;
  font-weight: 700;
}

.registration-phone i {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #54bd73;
  box-shadow: 0 0 0 4px rgb(84 189 115 / 14%);
}

.registration-complete .registration-primary {
  margin-top: 2px;
}

@keyframes registration-boot {
  from { opacity: 0; transform: translateY(12px) rotate(-3deg); }
  to { opacity: 1; transform: translateY(0) rotate(0); }
}

.access-gate {
  position: fixed;
  z-index: 9;
  inset: 56px 0 0;
  display: grid;
  padding: 24px;
  background: rgb(247 244 238 / 94%);
  backdrop-filter: blur(8px);
  place-items: center;
}

.access-gate[hidden] {
  display: none;
}

.access-gate-card {
  display: grid;
  justify-items: center;
  width: min(420px, 100%);
  padding: 32px;
  border: 1px solid var(--hairline-strong);
  border-radius: 18px;
  background: #fffdfa;
  box-shadow: 0 24px 70px rgb(20 20 19 / 10%);
  text-align: center;
}

.access-gate-card h1,
.access-gate-card p {
  margin: 0;
}

.access-gate-card h1 {
  font-size: 25px;
}

.access-gate-card p {
  max-width: 330px;
  margin: 8px 0 22px;
  color: var(--ink-subtle);
  font-size: 13px;
  line-height: 1.5;
}

.access-gate-card .primary-button {
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 9px;
  background: var(--primary);
  color: white;
  cursor: pointer;
  font-weight: 600;
}

.auth-heading {
  margin: 0 0 28px;
  text-align: center;
}

.auth-heading h1,
.auth-heading p {
  margin: 0;
}

.auth-heading h1 {
  font-family: var(--display);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.5px;
  line-height: 1.08;
  white-space: nowrap;
}

.login-form,
.login-form label {
  display: grid;
  gap: 8px;
}

.login-form {
  width: min(360px, 100%);
  margin-inline: auto;
  gap: 14px;
}

#auth-alternatives,
.magic-link-sent {
  width: min(360px, 100%);
  margin-inline: auto;
}

.login-form[hidden],
#auth-alternatives[hidden] {
  display: none;
}

.login-form label span {
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 500;
}

.login-form input {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  border: 1px solid var(--hairline-strong);
  border-radius: 9px;
  outline: 0;
  background: var(--canvas);
  color: var(--ink);
}

.login-form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(204 120 92 / 12%);
}

.login-submit {
  width: 100%;
  height: 46px;
  border-radius: 9px;
  cursor: pointer;
  font-weight: 600;
}

.login-submit {
  display: grid;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: white;
  place-items: center;
  text-decoration: none;
}

.magic-link-sent {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 12px;
}

.magic-link-sent[hidden] {
  display: none;
}

.magic-link-sent h2,
.magic-link-sent p {
  margin: 0;
}

.magic-link-sent h2 {
  font-family: var(--display);
  font-size: 23px;
}

.magic-link-sent p {
  margin-bottom: 4px;
  color: var(--ink-subtle);
  font-size: 12px;
  line-height: 1.5;
}

.magic-link-back {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  font-size: 11px;
}

.register-copy {
  margin: 18px 0 0;
  color: var(--ink-subtle);
  font-size: 11px;
  text-align: center;
}

.register-copy button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
}

.toast {
  position: fixed;
  z-index: 50;
  right: 20px;
  bottom: 20px;
  max-width: 320px;
  padding: 10px 14px;
  border: 1px solid var(--hairline-strong);
  border-radius: 8px;
  background: #fffdfa;
  color: var(--ink-muted);
  box-shadow: 0 8px 24px rgb(20 20 19 / 10%);
  font-size: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.preview-tool {
  animation: enter 200ms ease both;
}

@keyframes enter {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 980px) {
  .auth-view {
    display: block;
  }

  .auth-story {
    display: none;
  }

  .auth-panel {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 28px;
  }

  .auth-brand {
    display: inline-flex;
    margin-bottom: 48px;
  }

  .registration-layout {
    grid-template-columns: 180px minmax(0, 1fr);
    padding: 48px 28px;
    gap: 32px;
  }
}

@media (max-width: 980px) {
  body {
    overflow: auto;
  }

  .workspace {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
  }

  .resize-handle {
    display: none;
  }

  .device-pane {
    height: calc(100vh - 56px);
    min-height: 640px;
    border-right: 0;
    border-bottom: 1px solid var(--hairline);
  }

  .agent-pane {
    min-height: 720px;
  }

  .conversation,
  .composer-wrap {
    padding-right: max(28px, 12vw);
    padding-left: max(28px, 12vw);
  }
}

@media (max-width: 640px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .session-meta,
  .secondary-button,
  .connection,
  .shortcut {
    display: none;
  }

  .workspace {
    display: block;
  }

  .device-pane {
    min-height: 600px;
  }

  .pane-header,
  .agent-header {
    padding: 0 14px;
  }

  .agent-pane {
    grid-template-rows: 84px minmax(520px, auto) auto;
  }

  .conversation,
  .composer-wrap {
    padding-right: 16px;
    padding-left: 16px;
  }

  .message,
  .tool-run {
    max-width: 92%;
    width: auto;
  }

  .demo-label,
  .account-label {
    display: none;
  }

  .chat-title-button h2,
  .agent-identity h2 {
    max-width: 190px;
    overflow: hidden;
    font-size: 17px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .auth-panel {
    padding: 24px 20px;
    place-items: start center;
  }

  .auth-card {
    margin-top: max(24px, 8vh);
  }

  .auth-brand {
    margin-bottom: 38px;
  }

  .auth-heading h1 {
    font-size: clamp(22px, 7vw, 26px);
  }

  .registration-header {
    height: 60px;
    padding: 0 20px;
  }

  .registration-header p span {
    display: none;
  }

  .registration-layout {
    display: block;
    min-height: calc(100dvh - 60px);
    padding: 24px 16px;
  }

  .registration-progress {
    padding: 0 8px 22px;
  }

  .registration-progress > .eyebrow,
  .registration-progress li strong {
    display: none;
  }

  .registration-progress ol {
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
  }

  .registration-progress li {
    display: block;
    min-height: 3px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--hairline);
    color: transparent;
  }

  .registration-progress li button {
    display: block;
    min-height: 3px;
  }

  .registration-progress li span {
    display: block;
    width: 100%;
    height: 3px;
    color: transparent;
  }

  .registration-progress li.is-current,
  .registration-progress li.is-complete {
    background: var(--primary);
  }

  .registration-card {
    padding: 28px 22px;
  }

  .registration-step h1 {
    font-size: 30px;
  }

  .registration-plans {
    grid-template-columns: 1fr;
  }

  .avatar-options,
  .settings-choice-grid {
    grid-template-columns: 1fr 1fr;
  }

  .settings-dialog,
  .scheduled-tasks-dialog {
    max-height: calc(100vh - 20px);
    padding: 18px;
  }

  .settings-dialog {
    width: calc(100% - 20px);
    height: calc(100vh - 20px);
  }

  .settings-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 10px;
  }

  .settings-toc {
    padding: 0 0 8px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--hairline);
    flex-direction: row;
  }

  .settings-toc button {
    flex: none;
  }

  .scheduled-run-meta {
    grid-template-columns: 1fr;
  }

  .settings-section-row {
    grid-template-columns: 1fr;
  }

  .settings-locale-fields {
    margin-left: 41px;
  }

  .settings-language-field {
    width: min(210px, 100%);
  }

  .language-note {
    margin-left: 0;
  }
}

.auth-legal,
.registration-legal {
  margin: 18px 0 0;
  color: var(--ink-tertiary);
  font-size: 10px;
  line-height: 1.55;
  text-align: center;
}

.auth-legal a,
.registration-legal a,
.settings-legal-links a {
  color: var(--ink-muted);
  text-decoration-color: var(--hairline-strong);
  text-underline-offset: 3px;
}

.settings-legal-links {
  display: flex;
  margin: 14px 0 0 41px;
  flex-wrap: wrap;
  gap: 8px;
}

.settings-legal-links a {
  padding: 8px 11px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface-1);
  font-size: 11px;
  text-decoration: none;
}

.legal-view {
  min-height: 100vh;
  padding: clamp(22px, 5vw, 64px);
  background: var(--canvas);
}

.legal-header {
  display: flex;
  align-items: center;
  width: min(100%, 900px);
  margin: 0 auto 42px;
  justify-content: space-between;
}

.legal-header nav {
  display: flex;
  gap: 18px;
}

.legal-header nav a {
  color: var(--ink-subtle);
  font-size: 12px;
  text-decoration: none;
}

.legal-document {
  width: min(100%, 820px);
  margin: 0 auto;
  padding: clamp(26px, 6vw, 64px);
  border: 1px solid var(--hairline);
  border-radius: 20px;
  background: #fffdfa;
  box-shadow: 0 20px 60px rgb(65 51 43 / 7%);
}

.legal-document > h1 {
  margin: 8px 0 6px;
  font-family: var(--display);
  font-size: clamp(34px, 6vw, 54px);
  letter-spacing: -1.8px;
}

.legal-updated {
  margin: 0 0 40px;
  color: var(--ink-tertiary);
  font-size: 11px;
}

.legal-document section {
  padding: 28px 0;
  border-top: 1px solid var(--hairline);
}

.legal-document h2 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 17px;
}

.legal-document p,
.legal-document li {
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.75;
}

.legal-document ul {
  padding-left: 20px;
}

.legal-document [lang="en"] {
  padding-left: 12px;
  border-left: 2px solid var(--surface-2);
  color: var(--ink-subtle);
}

.legal-document a {
  color: var(--primary-hover);
}

.legal-table-wrap {
  overflow-x: auto;
}

.legal-document table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.legal-document th,
.legal-document td {
  padding: 12px;
  border: 1px solid var(--hairline);
  text-align: left;
  vertical-align: top;
}

.legal-document th {
  background: var(--surface-1);
}

.not-found-view {
  display: grid;
  min-height: 100vh;
  padding: clamp(24px, 5vw, 64px);
  background:
    radial-gradient(circle at 72% 20%, rgb(204 120 92 / 14%), transparent 28%),
    var(--canvas);
  grid-template-rows: auto 1fr;
}

.not-found-view > .brand {
  width: max-content;
}

.not-found-card {
  width: min(100%, 520px);
  margin: auto;
  padding: clamp(30px, 6vw, 54px);
  border: 1px solid var(--hairline);
  border-radius: 22px;
  background: rgb(255 253 250 / 88%);
  box-shadow: 0 24px 70px rgb(65 51 43 / 10%);
}

.not-found-code {
  display: block;
  margin-bottom: 24px;
  color: var(--primary-soft);
  font-family: var(--display);
  font-size: clamp(72px, 16vw, 128px);
  font-style: italic;
  font-weight: 600;
  letter-spacing: -8px;
  line-height: 0.7;
}

.not-found-card h1 {
  margin: 8px 0 10px;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(30px, 5vw, 44px);
  letter-spacing: -1.6px;
}

.not-found-card > p:not(.eyebrow) {
  margin: 0 0 24px;
  color: var(--ink-subtle);
  line-height: 1.6;
}

.not-found-card .primary-button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 9px;
  background: var(--primary);
  color: white;
  font-weight: 600;
  text-decoration: none;
}

.analytics-consent {
  position: fixed;
  right: 20px;
  bottom: 20px;
  left: 20px;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 960px;
  margin: auto;
  padding: 18px;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  background: #fffdfa;
  box-shadow: 0 18px 60px rgba(32, 26, 22, 0.18);
  gap: 24px;
}

.analytics-consent strong {
  display: block;
  margin-bottom: 5px;
  font-size: 15px;
}

.analytics-consent p {
  max-width: 640px;
  margin: 0;
  color: var(--ink-subtle);
  font-size: 13px;
  line-height: 1.5;
}

.analytics-consent a {
  color: inherit;
}

.analytics-consent-actions {
  display: grid;
  min-width: 310px;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.analytics-consent-actions button,
.analytics-settings-button,
.analytics-policy-settings {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--hairline-strong);
  border-radius: 9px;
  background: #fffdfa;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.analytics-consent-actions button:hover,
.analytics-settings-button:hover,
.analytics-policy-settings:hover {
  border-color: var(--primary);
  color: var(--primary-hover);
}

.analytics-settings-button {
  position: fixed;
  bottom: 12px;
  left: 12px;
  z-index: 9000;
  min-height: 32px;
  padding: 0 10px;
  background: rgba(255, 253, 250, 0.94);
  color: var(--ink-subtle);
  font-size: 11px;
  font-weight: 600;
}

@media (max-width: 700px) {
  .analytics-consent {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .analytics-consent-actions {
    min-width: 0;
  }
}

@media (max-width: 420px) {
  .settings-choice-grid,
  .usage-overview {
    grid-template-columns: 1fr;
  }

  .settings-legal-links {
    margin-left: 0;
  }

  .legal-header {
    align-items: flex-start;
    margin-bottom: 26px;
    flex-direction: column;
    gap: 18px;
  }

  .legal-document {
    border-radius: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
