:root {
  --app-canvas: #f2f3f7;
  --app-sidebar: #e9ebf1;
  --app-surface: #fff;
  --app-inset: #e7e9ee;
  --app-ink: #0e1f33;
  --app-muted: #717b88;
  --app-line: rgba(14, 31, 51, .09);
  --app-green: #8cc72a;
  --app-green-wash: rgba(140, 199, 42, .13);
  --app-red: #c83b45;
  --app-red-wash: rgba(200, 59, 69, .09);
  --app-orange: #c17b1c;
  --app-orange-wash: rgba(193, 123, 28, .1);
  --app-r-control: 10px;
  --app-r-chip: 15px;
  --app-r-card: 20px;
  --app-r-pill: 999px;
  --app-font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

[hidden] { display: none !important; }
.app-entry-link {
  border: 1px solid rgba(255, 255, 255, .48);
  background: transparent;
  color: #fff;
  box-shadow: none;
}
.app-entry-link:hover { border-color: #fff; background: #fff; color: var(--app-ink); }
body.wiqo-app-open { overflow: hidden; }
.wiqo-app {
  position: fixed;
  z-index: 50;
  inset: 0;
  overflow: hidden;
  background: var(--app-canvas);
  color: var(--app-ink);
  font-family: var(--app-font);
  font-size: 15px;
  line-height: 1.48;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.wiqo-app *, .wiqo-app *::before, .wiqo-app *::after { box-sizing: border-box; }
.wiqo-app button, .wiqo-app input, .wiqo-app textarea, .wiqo-app select { font: inherit; }
.wiqo-app button, .wiqo-app a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.wiqo-app button { color: inherit; }
.wiqo-app button:focus-visible, .wiqo-app a:focus-visible, .wiqo-app input:focus-visible,
.wiqo-app textarea:focus-visible, .wiqo-app select:focus-visible {
  outline: 3px solid rgba(111, 158, 27, .55);
  outline-offset: 2px;
}
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Sign-in keeps the public site in this document and changes only its visible surface. */
.app-auth {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 76px 24px 32px;
  background: var(--app-canvas);
}
.auth-back {
  position: absolute;
  top: 24px;
  left: max(24px, calc((100vw - 1120px) / 2));
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  color: var(--app-muted);
  font-size: 14px;
  text-decoration: none;
}
.auth-back:hover { color: var(--app-ink); }
.auth-card {
  width: min(100%, 430px);
  padding: 36px;
  border-radius: var(--app-r-card);
  background: var(--app-surface);
  box-shadow: 0 8px 32px rgba(14, 31, 51, .08);
}
.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--app-ink);
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -.035em;
  text-decoration: none;
}
.app-brand img { width: 30px; height: 30px; object-fit: contain; }
.auth-brand { margin-bottom: 32px; }
.auth-brand img { width: 34px; height: 34px; }
.app-eyebrow {
  margin: 0 0 7px;
  color: var(--app-muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .09em;
  line-height: 1.35;
  text-transform: uppercase;
}
.auth-panel h1 {
  margin: 0;
  color: var(--app-ink);
  font-size: clamp(27px, 5vw, 34px);
  font-weight: 650;
  letter-spacing: -.04em;
  line-height: 1.12;
  text-wrap: balance;
}
.auth-copy { margin: 10px 0 25px; color: var(--app-muted); font-size: 14px; }
.auth-form { display: grid; gap: 15px; margin-top: 16px; }
.auth-form label, .project-dialog label { display: grid; gap: 7px; color: var(--app-ink); font-size: 13px; font-weight: 590; }
.auth-form label small { color: var(--app-muted); font-weight: 400; }
.auth-form input, .project-dialog input, .project-dialog select {
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid var(--app-line);
  border-radius: var(--app-r-control);
  background: var(--app-canvas);
  color: var(--app-ink);
}
.auth-form input::placeholder { color: #89919c; }
.app-primary-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 16px;
  border: 0;
  border-radius: var(--app-r-pill);
  background: var(--app-ink);
  color: #fff !important;
  cursor: pointer;
  font-size: 14px;
  font-weight: 610;
  transition: transform .14s ease, background-color .14s ease, opacity .14s ease;
}
.app-primary-button:hover { background: #183956; }
.app-primary-button:active { transform: scale(.96); }
.app-primary-button:disabled, .quiet-button:disabled, .icon-button:disabled { cursor: not-allowed; opacity: .45; }
.auth-form .app-primary-button { width: 100%; min-height: 48px; margin-top: 3px; }
.auth-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-top: 18px;
  color: var(--app-muted);
  font-size: 12px;
}
.auth-links button, .text-action {
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--app-ink);
  cursor: pointer;
  font-weight: 620;
  text-decoration: underline;
  text-decoration-color: rgba(14, 31, 51, .28);
  text-underline-offset: 3px;
}
.auth-privacy { margin: 25px 0 0; color: var(--app-muted); font-size: 11px; line-height: 1.55; }
.form-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--app-r-control);
  background: var(--app-red-wash);
  color: #9d2630;
  font-size: 13px;
  line-height: 1.45;
}
.reset-form { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--app-line); }

/* App shell: a recessed navigation rail around the same quiet card language used on iPhone. */
.app-workspace { display: flex; width: 100%; height: 100%; min-height: 0; }
.app-sidebar {
  position: relative;
  z-index: 3;
  display: flex;
  width: 264px;
  min-width: 264px;
  flex-direction: column;
  padding: 19px 14px 12px;
  background: var(--app-sidebar);
}
.app-sidebar > .app-brand { margin: 1px 7px 23px; }
.new-chat-button {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border: 1px solid rgba(14, 31, 51, .08);
  border-radius: var(--app-r-chip);
  background: var(--app-surface);
  cursor: pointer;
  font-size: 13px;
  font-weight: 580;
  text-align: left;
  transition: transform .14s ease, background-color .14s ease;
}
.new-chat-button span:first-child { font-size: 19px; line-height: 1; }
.new-chat-button:hover { background: #f9fafc; }
.new-chat-button:active { transform: scale(.96); }
.workspace-nav { display: grid; gap: 3px; margin: 16px 0 20px; }
.workspace-nav-item {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 11px;
  padding: 8px 11px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #515d6b;
  cursor: pointer;
  font-size: 13px;
  text-align: left;
  transition: transform .14s ease, background-color .14s ease, color .14s ease;
}
.workspace-nav-item > span:first-child { display: grid; width: 18px; place-items: center; font-size: 16px; }
.workspace-nav-item:hover { background: rgba(255,255,255,.56); color: var(--app-ink); }
.workspace-nav-item:active { transform: scale(.96); }
.workspace-nav-item.is-selected { background: rgba(255,255,255,.82); color: var(--app-ink); font-weight: 620; }
.sidebar-section-label, .project-rail-heading {
  color: var(--app-muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.sidebar-section-label { padding: 0 10px 8px; }
.conversation-list { display: grid; align-content: start; gap: 2px; min-height: 0; overflow-y: auto; }
.conversation-item {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #4f5a68;
  cursor: pointer;
  font-size: 12px;
  text-align: left;
  transition: background-color .14s ease, color .14s ease;
}
.conversation-item:hover { background: rgba(255,255,255,.5); color: var(--app-ink); }
.conversation-item.is-selected { background: rgba(255,255,255,.76); color: var(--app-ink); }
.conversation-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-item::before { width: 5px; height: 5px; flex: 0 0 auto; border-radius: 50%; background: currentColor; content: ""; opacity: .42; }
.conversation-loading, .conversation-empty { padding: 9px 10px; color: var(--app-muted); font-size: 11px; }
.sidebar-bottom { display: grid; gap: 8px; margin-top: auto; padding-top: 12px; }
.device-presence {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 9px;
  padding: 11px 9px;
  border-radius: 13px;
  background: rgba(255,255,255,.48);
}
.presence-dot { width: 8px; height: 8px; border-radius: 50%; background: #9aa3ae; }
.device-presence.is-online .presence-dot { background: #4d9d32; box-shadow: 0 0 0 3px rgba(77,157,50,.12); }
.device-presence.is-offline .presence-dot { background: #c17b1c; }
.device-presence.is-unpaired .presence-dot { background: #9aa3ae; }
.device-presence strong, .device-presence small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-presence strong { font-size: 11px; font-weight: 630; }
.device-presence small { margin-top: 2px; color: var(--app-muted); font-size: 10px; }
.account-row { display: flex; min-height: 43px; align-items: center; gap: 9px; padding: 5px 6px; }
.account-avatar { display: grid; width: 29px; height: 29px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--app-green-wash); color: #507414; font-size: 12px; font-weight: 700; }
.account-email { min-width: 0; flex: 1; overflow: hidden; color: #4d5866; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.icon-button {
  display: grid;
  width: 36px;
  min-width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--app-muted);
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
  transition: transform .14s ease, background-color .14s ease, color .14s ease;
}
.icon-button:hover { background: rgba(14,31,51,.06); color: var(--app-ink); }
.icon-button:active { transform: scale(.92); }

.app-main { position: relative; display: flex; min-width: 0; min-height: 0; flex: 1; flex-direction: column; background: var(--app-canvas); }
.app-topbar {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid var(--app-line);
}
.topbar-title .app-eyebrow { margin-bottom: 1px; font-size: 9px; }
.topbar-title h1 { margin: 0; font-size: 17px; font-weight: 630; letter-spacing: -.02em; line-height: 1.3; }
.topbar-site-link { display: inline-flex; min-height: 38px; align-items: center; gap: 9px; padding: 7px 10px; border-radius: var(--app-r-pill); color: var(--app-muted); font-size: 12px; text-decoration: none; }
.topbar-site-link:hover { background: rgba(255,255,255,.65); color: var(--app-ink); }
.mobile-menu-button { display: none; }
.app-view { display: flex; min-height: 0; flex: 1; flex-direction: column; }

/* Messages are separated by voice and context; the compact plan stays inside its task. */
.chat-view { position: relative; overflow: hidden; }
.message-list {
  display: flex;
  width: min(100%, 980px);
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 22px;
  align-self: center;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 34px clamp(18px, 4vw, 48px) 28px;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}
.chat-empty { display: flex; min-height: 100%; flex-direction: column; align-items: center; justify-content: center; padding: 28px 0 48px; text-align: center; }
.empty-mark { display: grid; width: 62px; height: 62px; place-items: center; margin-bottom: 19px; border-radius: 20px; background: var(--app-surface); box-shadow: 0 1px 3px rgba(14,31,51,.1); color: var(--app-ink); font-size: 24px; }
.empty-mark img { width: 40px; height: 40px; object-fit: contain; }
.chat-empty .app-eyebrow { color: #688e28; }
.chat-empty h2 { margin: 0; font-size: clamp(25px, 4vw, 33px); font-weight: 640; letter-spacing: -.04em; line-height: 1.16; text-wrap: balance; }
.chat-empty > p:not(.app-eyebrow) { max-width: 470px; margin: 11px 0 0; color: var(--app-muted); font-size: 14px; text-wrap: pretty; }
.suggestion-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 26px; }
.suggestion-row button {
  display: inline-flex;
  min-height: 41px;
  align-items: center;
  gap: 12px;
  padding: 8px 13px;
  border: 1px solid var(--app-line);
  border-radius: var(--app-r-pill);
  background: rgba(255,255,255,.66);
  color: #4d5866;
  cursor: pointer;
  font-size: 12px;
  transition: transform .14s ease, background-color .14s ease;
}
.suggestion-row button:hover { background: #fff; }
.suggestion-row button:active { transform: scale(.96); }
.chat-message { display: flex; width: 100%; flex-direction: column; align-items: flex-start; gap: 7px; animation: message-in .28s cubic-bezier(.16,1,.3,1) both; }
.chat-message.is-user { align-items: flex-end; }
.message-label { color: var(--app-muted); font-size: 10px; font-weight: 610; }
.message-body {
  max-width: min(84%, 760px);
  padding: 13px 16px;
  border-radius: var(--app-r-card);
  background: var(--app-surface);
  box-shadow: 0 1px 3px rgba(14,31,51,.1);
  color: var(--app-ink);
  font-size: 14px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.is-user .message-body { background: #e7ebf1; box-shadow: none; }
.is-assistant .message-body { align-self: stretch; max-width: min(100%, 820px); background: transparent; box-shadow: none; padding: 2px 0; }
.message-pending .message-body { display: inline-flex; min-height: 37px; align-items: center; gap: 8px; color: var(--app-muted); font-size: 12px; }
.pending-dots { display: inline-flex; gap: 3px; }
.pending-dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--app-green); animation: pulse-dot 1.1s ease-in-out infinite; }
.pending-dots i:nth-child(2) { animation-delay: .12s; }
.pending-dots i:nth-child(3) { animation-delay: .24s; }
.live-status { width: min(100%, 860px); min-height: 17px; align-self: center; margin: 4px auto 8px; padding: 0 clamp(18px, 4vw, 48px); color: var(--app-muted); font-size: 11px; }
.chat-compose-wrap { z-index: 1; width: min(100%, 980px); align-self: center; padding: 0 clamp(18px, 4vw, 48px) 13px; }
.chat-composer {
  padding: 12px 14px 10px 17px;
  border: 1px solid rgba(14,31,51,.1);
  border-radius: 24px;
  background: var(--app-surface);
  box-shadow: 0 2px 10px rgba(14,31,51,.08);
}
.composer-input-row { display: flex; align-items: end; gap: 8px; }
.chat-composer textarea { display: block; width: 100%; min-width: 0; min-height: 32px; max-height: 180px; flex: 1; resize: none; border: 0; outline: 0; background: transparent; color: var(--app-ink); font-size: 14px; line-height: 1.55; }
.chat-composer textarea:focus-visible { outline: 0; }
.chat-composer textarea::placeholder { color: #89919c; }
.composer-tool-button { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border: 0; border-radius: 50%; background: #f0f2f5; color: #536171; cursor: pointer; font-size: 20px; line-height: 1; transition: transform .14s ease, background-color .14s ease; }
.composer-tool-button:hover { background: var(--app-inset); }
.composer-tool-button:active { transform: scale(.93); }
.composer-tool-button:disabled { opacity: .45; cursor: wait; }
.voice-input-button { font-size: 17px; }
.voice-input-button.is-listening { background: var(--app-red-wash); color: var(--app-red); }
.composer-footer { display: flex; min-height: 24px; align-items: end; justify-content: space-between; gap: 12px; padding-top: 8px; }
.composer-footer > span { padding-bottom: 2px; color: var(--app-muted); font-size: 9px; }
.composer-shortcut { text-align: right; }
.pending-upload-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 0 9px 42px; }
.upload-chip { display: inline-flex; max-width: min(100%, 245px); min-height: 28px; align-items: center; gap: 7px; padding: 4px 6px 4px 9px; border-radius: 9px; background: #f1f3f6; color: #536171; font-size: 10px; }
.upload-chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-chip button { display: grid; width: 19px; height: 19px; flex: 0 0 auto; place-items: center; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.upload-chip button:hover { background: rgba(14,31,51,.09); }
.message-attachments { display: flex; flex-wrap: wrap; gap: 6px; }
.message-attachment-chip { padding: 5px 9px; border-radius: 8px; background: rgba(14,31,51,.06); color: #586473; font-size: 10px; }
.send-button { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; border: 0; border-radius: 50%; background: var(--app-ink); color: #fff; cursor: pointer; font-size: 20px; line-height: 1; transition: transform .14s ease, background-color .14s ease, opacity .14s ease; }
.send-button:hover { background: #183956; }
.send-button:active { transform: scale(.92); }
.send-button:disabled { opacity: .42; cursor: wait; }
.task-plan-card, .task-result-card, .confirmation-card, .artifact-card, .code-change-card {
  width: min(100%, 560px);
  margin-top: 8px;
  overflow: hidden;
  border-radius: var(--app-r-card);
  background: var(--app-surface);
  box-shadow: 0 1px 3px rgba(14,31,51,.1);
}
.plan-heading, .task-result-heading, .confirmation-heading, .artifact-heading, .code-change-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px 10px; }
.plan-heading strong, .task-result-heading strong, .confirmation-heading strong, .artifact-heading strong, .code-change-heading strong { min-width: 0; font-size: 13px; font-weight: 630; }
.plan-meta, .task-result-meta, .artifact-meta { color: var(--app-muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.plan-steps { display: grid; gap: 0; padding: 1px 10px 11px; }
.plan-step { display: grid; grid-template-columns: 23px minmax(0,1fr) auto; align-items: start; gap: 9px; padding: 8px 7px; }
.plan-step:not(:last-child) .plan-step-main { border-bottom: 1px solid var(--app-line); padding-bottom: 9px; }
.plan-step-marker { display: grid; width: 21px; height: 21px; place-items: center; border-radius: 50%; background: var(--app-inset); color: var(--app-muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.plan-step.is-running .plan-step-marker { background: var(--app-green-wash); color: #557d15; }
.plan-step.is-verified .plan-step-marker { background: var(--app-green-wash); color: #51791a; }
.plan-step.is-failed .plan-step-marker { background: var(--app-red-wash); color: #a32d34; }
.plan-step.is-waiting .plan-step-marker, .plan-step.is-approval .plan-step-marker { background: var(--app-orange-wash); color: #9d6311; }
.plan-step-main { min-width: 0; }
.plan-step-main strong { display: block; font-size: 12px; font-weight: 580; line-height: 1.45; }
.plan-step-main small { display: block; margin-top: 3px; color: var(--app-muted); font-size: 10px; line-height: 1.4; }
.plan-step-status { padding-top: 2px; color: var(--app-muted); font-size: 9px; white-space: nowrap; }
.plan-step.is-verified .plan-step-status { color: #56831c; }
.plan-step.is-failed .plan-step-status { color: #ab3138; }
.plan-step.is-running .plan-step-status, .plan-step.is-waiting .plan-step-status, .plan-step.is-approval .plan-step-status { color: #a56e1d; }
.task-result-heading { justify-content: flex-start; }
.result-marker { display: grid; width: 27px; height: 27px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--app-green-wash); color: #4f7819; }
.task-result-card.is-partial .result-marker, .task-result-card.is-waiting .result-marker { background: var(--app-orange-wash); color: #965f12; }
.task-result-card.is-failed .result-marker { background: var(--app-red-wash); color: #a42e36; }
.task-result-copy { min-width: 0; }
.task-result-copy small { display: block; margin-top: 2px; color: var(--app-muted); font-size: 11px; }
.confirmation-card { padding-bottom: 13px; background: #fffaf0; }
.confirmation-heading { justify-content: flex-start; }
.confirmation-heading > span { display: grid; width: 28px; height: 28px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--app-orange-wash); color: #9d6416; }
.confirmation-card > p { margin: 0; padding: 0 16px 13px 58px; color: #5e5444; font-size: 11px; line-height: 1.5; }
.confirmation-actions { display: flex; gap: 8px; padding: 0 16px 0 58px; }
.confirmation-actions button { min-height: 36px; padding: 7px 13px; border: 0; border-radius: var(--app-r-pill); cursor: pointer; font-size: 11px; font-weight: 600; }
.confirm-yes { background: var(--app-ink); color: #fff !important; }
.confirm-no { background: rgba(14,31,51,.07); color: var(--app-ink); }
.confirm-note { margin: 10px 16px 0 58px; color: var(--app-muted); font-size: 10px; }
.artifact-card, .code-change-card { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px; }
.artifact-symbol { display: grid; width: 38px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 10px; background: var(--app-inset); font-size: 16px; }
.artifact-copy { min-width: 0; flex: 1; }
.artifact-copy strong, .artifact-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.artifact-copy strong { font-size: 12px; font-weight: 610; }
.artifact-copy small { margin-top: 3px; color: var(--app-muted); font-size: 10px; }
.artifact-download { min-height: 36px; padding: 7px 12px; border: 0; border-radius: var(--app-r-pill); background: var(--app-green-wash); color: #496f12; cursor: pointer; font-size: 11px; font-weight: 620; }
.artifact-download:active { transform: scale(.96); }
.artifact-preview { width: 100%; flex: 0 0 100%; overflow: hidden; border-radius: 12px; background: var(--app-canvas); }
.artifact-preview iframe { display: block; width: 100%; height: min(68vh, 640px); border: 0; background: #fff; }
.artifact-preview img { display: block; max-width: 100%; max-height: 68vh; margin: 0 auto; object-fit: contain; }
.artifact-card > .widget-table-wrap { width: 100%; flex: 0 0 100%; }
.source-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.source-link { display: inline-flex; min-height: 32px; align-items: center; padding: 5px 10px; border-radius: var(--app-r-pill); background: var(--app-surface); color: #4e5d6c; font-size: 10px; text-decoration: underline; text-underline-offset: 2px; }
.inline-app-frame { display: block; width: 100%; border: 0; border-top: 1px solid var(--app-line); background: #fff; }
.widget-card { width: min(100%, 620px); }
.widget-content { display: grid; gap: 7px; padding: 2px 14px 14px; }
.widget-subtitle { margin: 0; color: var(--app-muted); font-size: 11px; line-height: 1.5; }
.widget-badge { padding: 4px 8px; border-radius: var(--app-r-pill); background: var(--app-inset); color: var(--app-muted); font-size: 9px; font-weight: 650; }
.widget-value { margin: 0; padding: 7px 9px; border-radius: 9px; background: #f7f8fa; color: var(--app-ink); font-size: 11px; line-height: 1.5; }
.widget-kv { display: grid; grid-template-columns: minmax(80px, .7fr) minmax(0, 1.3fr); align-items: start; gap: 12px; padding: 7px 2px; border-bottom: 1px solid var(--app-line); font-size: 11px; }
.widget-kv > span { color: var(--app-muted); }
.widget-kv > strong { min-width: 0; font-weight: 590; text-align: right; overflow-wrap: anywhere; }
.widget-list-row { display: flex; min-height: 48px; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 9px 2px; border-bottom: 1px solid var(--app-line); color: inherit; text-decoration: none; }
.widget-list-row > span:first-child { display: grid; min-width: 0; gap: 2px; }
.widget-list-row strong { font-size: 11px; font-weight: 610; line-height: 1.4; }
.widget-list-row small { display: -webkit-box; overflow: hidden; color: var(--app-muted); font-size: 10px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.widget-row-meta { flex: 0 0 auto; padding-top: 1px; color: var(--app-muted); font-size: 9px; }
.market-row { display: flex; min-width: 0; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1px solid var(--app-line); }
.market-label, .market-value { display: grid; min-width: 0; gap: 2px; }
.market-label { flex: 1; }
.market-label strong, .market-value strong { overflow: hidden; color: var(--app-ink); font-size: 11px; font-weight: 620; text-overflow: ellipsis; white-space: nowrap; }
.market-label small, .market-change { color: var(--app-muted); font-size: 9px; }
.market-value { flex: 0 0 auto; justify-items: end; }
.market-change.is-up { color: #43862e; }
.market-change.is-down { color: #b54c48; }
.market-sparkline { width: 64px; height: 26px; flex: 0 0 64px; overflow: visible; }
.market-sparkline.is-up { color: #43862e; }
.market-sparkline.is-down { color: #b54c48; }
.market-sparkline.is-neutral { color: var(--app-muted); }
.contact-actions { display: flex; min-height: 42px; align-items: center; flex-wrap: wrap; gap: 7px; padding: 5px 0; border-bottom: 1px solid var(--app-line); }
.contact-actions > span { flex: 1; color: var(--app-ink); font-size: 11px; }
.contact-actions > a { display: inline-flex; align-items: center; text-decoration: none; }
.widget-table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--app-line); border-radius: 12px; }
.widget-table { width: 100%; border-collapse: collapse; color: var(--app-ink); font-size: 10px; }
.widget-table th, .widget-table td { padding: 6px 8px; border-bottom: 1px solid var(--app-line); text-align: left; white-space: nowrap; }
.widget-table th { background: #f7f8fa; font-weight: 650; }
.weather-current { display: flex; align-items: baseline; gap: 11px; padding: 3px 2px 8px; }
.weather-current strong { font-size: 36px; font-weight: 520; letter-spacing: -.05em; }
.weather-current span { color: var(--app-muted); font-size: 12px; }
.weather-hourly { display: flex; gap: 6px; overflow-x: auto; padding: 5px 0 7px; scrollbar-width: thin; }
.weather-hourly > span { min-width: 60px; padding: 8px 6px; border-radius: 11px; background: #f7f8fa; font-size: 10px; line-height: 1.55; text-align: center; white-space: pre-line; }
.widget-action { justify-self: start; min-height: 33px; padding: 6px 11px; border: 0; border-radius: var(--app-r-pill); background: var(--app-green-wash); color: #496f12; cursor: pointer; font-size: 10px; font-weight: 630; }
.widget-action:active { transform: scale(.96); }
.widget-action:disabled { cursor: default; opacity: .55; }
.widget-timer { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 9px 2px; }
.widget-timer > strong { font-size: 28px; font-weight: 530; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.widget-check { display: flex; align-items: flex-start; gap: 9px; padding: 7px 2px; border-bottom: 1px solid var(--app-line); cursor: pointer; font-size: 11px; line-height: 1.45; }
.widget-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--app-green); }
.widget-check input:checked + span { color: var(--app-muted); text-decoration: line-through; }
.widget-details { border-bottom: 1px solid var(--app-line); }
.widget-details > summary { padding: 9px 2px; cursor: pointer; font-size: 11px; font-weight: 620; }
.location-form { display: flex; gap: 8px; padding: 0 16px 2px 58px; }
.location-form input { min-width: 0; min-height: 36px; flex: 1; padding: 7px 10px; border: 1px solid var(--app-line); border-radius: var(--app-r-control); background: #fff; color: var(--app-ink); font-size: 11px; }
.location-form button { min-height: 36px; padding: 7px 13px; border: 0; border-radius: var(--app-r-pill); cursor: pointer; font-size: 11px; font-weight: 600; }
.writer-change-row { display: grid; gap: 6px; }
.writer-change-row strong { font-size: 10px; }
.writer-change-row pre { max-height: 260px; margin: 0; padding: 10px; overflow: auto; border-radius: 9px; background: #f3f5f7; color: var(--app-ink); font: 10px/1.5 ui-monospace, "SFMono-Regular", Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-error { margin-top: 7px; padding: 9px 12px; border-radius: var(--app-r-control); background: var(--app-red-wash); color: #972a33; font-size: 11px; }

/* Act project surface mirrors the phone's encrypted, revision-based project model. */
.act-view { gap: 20px; overflow: auto; padding: clamp(20px, 3vw, 34px) clamp(18px, 4vw, 48px) 35px; }
.act-heading { display: flex; width: min(100%, 1160px); align-items: center; justify-content: space-between; gap: 20px; align-self: center; }
.act-heading h2 { margin: 0; font-size: clamp(23px, 3vw, 29px); font-weight: 640; letter-spacing: -.035em; line-height: 1.2; }
.act-heading p:not(.app-eyebrow) { margin: 6px 0 0; color: var(--app-muted); font-size: 12px; }
.act-add-button { min-height: 40px; flex: 0 0 auto; }
.act-unlock {
  width: min(100%, 560px);
  align-self: center;
  margin: auto 0;
  padding: 28px;
  border-radius: var(--app-r-card);
  background: var(--app-surface);
  box-shadow: 0 1px 3px rgba(14,31,51,.1);
  text-align: center;
}
.unlock-symbol { display: grid; width: 48px; height: 48px; place-items: center; margin: 0 auto 15px; border-radius: 16px; background: var(--app-green-wash); color: #547d17; font-size: 25px; }
.act-unlock h3 { margin: 0; font-size: 19px; font-weight: 630; letter-spacing: -.025em; }
.act-unlock > p { max-width: 440px; margin: 8px auto 19px; color: var(--app-muted); font-size: 12px; line-height: 1.55; }
.act-unlock form { display: flex; gap: 9px; }
.act-unlock input { min-width: 0; min-height: 43px; flex: 1; padding: 9px 12px; border: 1px solid var(--app-line); border-radius: var(--app-r-control); background: var(--app-canvas); color: var(--app-ink); font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 12px; letter-spacing: .05em; }
.act-unlock .form-error { margin-top: 12px; text-align: left; }
.act-project-layout {
  display: grid;
  width: min(100%, 1160px);
  min-height: 0;
  flex: 1;
  grid-template-columns: minmax(190px, 245px) minmax(0, 1fr);
  align-self: center;
  overflow: hidden;
  border-radius: var(--app-r-card);
  background: var(--app-surface);
  box-shadow: 0 1px 3px rgba(14,31,51,.1);
}
.act-project-rail { display: flex; min-height: 410px; flex-direction: column; border-right: 1px solid var(--app-line); background: #fafbfc; }
.project-rail-heading { display: flex; min-height: 49px; align-items: center; justify-content: space-between; padding: 6px 11px 6px 16px; border-bottom: 1px solid var(--app-line); }
.act-project-list { display: grid; align-content: start; gap: 3px; padding: 9px; overflow-y: auto; }
.act-project-item { display: grid; min-height: 57px; gap: 3px; padding: 9px 10px; border: 0; border-radius: 12px; background: transparent; color: var(--app-ink); cursor: pointer; text-align: left; }
.act-project-item:hover { background: var(--app-canvas); }
.act-project-item.is-selected { background: var(--app-green-wash); }
.act-project-item strong { overflow: hidden; font-size: 12px; font-weight: 620; text-overflow: ellipsis; white-space: nowrap; }
.act-project-item small { color: var(--app-muted); font-size: 10px; }
.act-project-empty { padding: 14px 10px; color: var(--app-muted); font-size: 11px; line-height: 1.5; }
.act-project-workspace { position: relative; display: flex; min-width: 0; min-height: 410px; flex-direction: column; overflow: auto; }
.act-project-empty { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; padding: 28px; text-align: center; }
.act-project-empty .empty-mark { width: 52px; height: 52px; margin-bottom: 14px; }
.act-project-empty h3 { margin: 0; font-size: 18px; font-weight: 620; }
.act-project-empty p { max-width: 390px; margin: 8px 0 0; color: var(--app-muted); font-size: 12px; }
.act-editor { display: flex; min-height: 0; flex: 1; flex-direction: column; }
.act-editor-header { display: flex; min-height: 60px; align-items: center; justify-content: space-between; gap: 15px; padding: 9px 14px 9px 18px; border-bottom: 1px solid var(--app-line); }
.act-editor-header > div:first-child { display: grid; min-width: 0; gap: 3px; }
.act-editor-header input { width: min(42vw, 360px); min-height: 30px; padding: 0; border: 0; background: transparent; color: var(--app-ink); font-size: 14px; font-weight: 630; letter-spacing: -.02em; }
.act-editor-header span { color: var(--app-muted); font-size: 10px; }
.act-editor-actions { display: flex; align-items: center; gap: 4px; }
.quiet-button { display: inline-flex; min-height: 37px; align-items: center; justify-content: center; gap: 7px; padding: 7px 12px; border: 1px solid var(--app-line); border-radius: var(--app-r-pill); background: var(--app-surface); color: var(--app-ink); cursor: pointer; font-size: 11px; font-weight: 580; transition: transform .14s ease, background-color .14s ease; }
.quiet-button:hover { background: var(--app-canvas); }
.quiet-button:active { transform: scale(.96); }
.act-editor-body { display: grid; min-height: 250px; flex: 1; grid-template-columns: 170px minmax(0,1fr); }
.act-file-list { display: grid; align-content: start; gap: 2px; padding: 9px 7px; border-right: 1px solid var(--app-line); background: #fafbfc; }
.act-file-item { display: flex; min-height: 34px; align-items: center; gap: 7px; padding: 6px 8px; overflow: hidden; border: 0; border-radius: 8px; background: transparent; color: #596371; cursor: pointer; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 10px; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.act-file-item:hover { background: var(--app-canvas); }
.act-file-item.is-selected { background: var(--app-inset); color: var(--app-ink); }
.act-file-editor { display: flex; min-width: 0; min-height: 0; flex-direction: column; }
.file-editor-toolbar, .file-editor-footer { display: flex; min-height: 39px; align-items: center; justify-content: space-between; gap: 12px; padding: 5px 12px; }
.file-editor-toolbar { border-bottom: 1px solid var(--app-line); }
.file-editor-toolbar span { overflow: hidden; color: var(--app-muted); font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.file-editor-toolbar button { min-height: 30px; padding: 5px 8px; border: 0; border-radius: 8px; background: transparent; color: #567d1e; cursor: pointer; font-size: 10px; font-weight: 620; }
.file-editor-toolbar button:hover { background: var(--app-green-wash); }
.act-file-editor textarea { width: 100%; min-height: 205px; flex: 1; resize: vertical; padding: 15px 16px; border: 0; background: #fff; color: #263747; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace !important; font-size: 12px; line-height: 1.6; tab-size: 2; }
.act-file-editor textarea:disabled { background: #fafbfc; color: var(--app-muted); }
.file-editor-footer { min-height: 51px; border-top: 1px solid var(--app-line); }
.file-editor-footer > span { color: var(--app-muted); font-size: 10px; }
.file-editor-footer .app-primary-button { min-height: 34px; padding: 6px 12px; font-size: 10px; }
.act-writer { display: grid; grid-template-columns: 200px minmax(0,1fr); align-items: start; gap: 13px; padding: 15px 17px 16px; border-top: 1px solid var(--app-line); background: #fafbfc; }
.act-writer > div strong { font-size: 11px; font-weight: 650; }
.act-writer > div p { margin: 3px 0 0; color: var(--app-muted); font-size: 10px; line-height: 1.45; }
.act-writer form { display: flex; align-items: end; gap: 9px; }
.act-writer textarea { min-width: 0; min-height: 58px; flex: 1; resize: vertical; padding: 9px 11px; border: 1px solid var(--app-line); border-radius: var(--app-r-control); background: var(--app-surface); color: var(--app-ink); font-size: 11px; line-height: 1.5; }
.act-writer .quiet-button { flex: 0 0 auto; }
.writer-status, .writer-result { grid-column: 1 / -1; margin: 0; color: var(--app-muted); font-size: 10px; }
.writer-result { display: grid; gap: 10px; padding-top: 11px; border-top: 1px solid var(--app-line); }
.writer-result p { margin: 0; color: var(--app-ink); line-height: 1.5; }
.writer-changes { display: grid; gap: 5px; color: #4f5e6a; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 10px; }
.writer-warning { padding: 9px 11px; border-radius: var(--app-r-control); background: var(--app-orange-wash); color: #835411; line-height: 1.45; }
.writer-apply { justify-self: start; }
.act-error { margin: 7px 0; padding: 9px 11px; border-radius: var(--app-r-control); background: var(--app-red-wash); color: #9d2630; font-size: 11px; }

.app-toast { position: absolute; z-index: 8; right: 22px; bottom: 19px; max-width: min(420px, calc(100% - 44px)); padding: 11px 14px; border-radius: var(--app-r-chip); background: var(--app-ink); box-shadow: 0 5px 18px rgba(14,31,51,.18); color: #fff; font-size: 12px; }
.project-dialog { width: min(100% - 32px, 420px); padding: 0; overflow: visible; border: 0; border-radius: var(--app-r-card); background: var(--app-surface); color: var(--app-ink); box-shadow: 0 18px 60px rgba(7,19,33,.22); }
.project-dialog::backdrop { background: rgba(12,24,37,.34); }
.project-dialog form { position: relative; display: grid; gap: 15px; padding: 27px; }
.project-dialog h2 { margin: -8px 0 3px; font-size: 23px; font-weight: 630; letter-spacing: -.03em; }
.project-dialog .dialog-close { position: absolute; top: 10px; right: 10px; }

@keyframes message-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse-dot { 0%, 80%, 100% { opacity: .32; transform: scale(.85); } 40% { opacity: 1; transform: scale(1); } }

@media (max-width: 850px) {
  .app-sidebar { width: 232px; min-width: 232px; }
  .act-project-layout { grid-template-columns: minmax(160px, 200px) minmax(0,1fr); }
  .act-editor-body { grid-template-columns: 135px minmax(0,1fr); }
  .act-writer { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 700px) {
  .app-entry-link { order: 2; }
  .app-sidebar { position: fixed; inset: 0 auto 0 0; width: min(82vw, 290px); min-width: 0; transform: translateX(-102%); box-shadow: 8px 0 30px rgba(14,31,51,.12); transition: transform .2s cubic-bezier(.16,1,.3,1); }
  .app-sidebar.is-open { transform: translateX(0); }
  .mobile-menu-button { display: grid; }
  .app-topbar { min-height: 61px; justify-content: flex-start; padding: 8px 13px; }
  .topbar-title { flex: 1; }
  .topbar-title .app-eyebrow { display: none; }
  .topbar-site-link { padding-inline: 8px; }
  .message-list { gap: 15px; padding: 21px 16px 20px; }
  .chat-empty { padding: 10px 0 35px; }
  .chat-empty h2 { font-size: 26px; }
  .chat-empty > p:not(.app-eyebrow) { max-width: 350px; font-size: 12px; }
  .suggestion-row { gap: 6px; margin-top: 19px; }
  .suggestion-row button { min-height: 38px; padding: 7px 10px; font-size: 10px; }
  .message-body { max-width: 94%; padding: 11px 13px; font-size: 13px; }
  .is-assistant .message-body { max-width: 100%; }
  .chat-compose-wrap { padding: 0 12px max(10px, env(safe-area-inset-bottom)); }
  .chat-composer { padding: 10px 10px 8px 11px; border-radius: 20px; }
  .composer-input-row { gap: 6px; }
  .composer-tool-button { width: 32px; height: 32px; }
  .composer-footer { align-items: start; flex-direction: column; gap: 3px; }
  .composer-shortcut { display: none; }
  .pending-upload-list { padding-left: 0; }
  .live-status { padding: 0 14px; }
  .widget-card, .task-plan-card, .task-result-card, .confirmation-card, .artifact-card, .code-change-card { width: 100%; }
  .widget-content { padding-inline: 12px; }
  .widget-kv { grid-template-columns: minmax(72px, .65fr) minmax(0, 1.35fr); }
  .location-form { padding: 0 12px 2px; }
  .location-card > p { padding: 0 12px 11px; }
  .act-view { gap: 14px; padding: 18px 12px max(17px, env(safe-area-inset-bottom)); }
  .act-heading { align-items: flex-start; }
  .act-heading h2 { font-size: 22px; }
  .act-heading p:not(.app-eyebrow) { max-width: 250px; font-size: 10px; }
  .act-add-button { min-height: 36px; padding: 8px 11px; font-size: 11px; }
  .act-unlock { margin: auto 0; padding: 21px 16px; }
  .act-unlock form { flex-direction: column; align-items: stretch; }
  .act-project-layout { min-height: 0; grid-template-columns: 1fr; overflow: visible; background: transparent; box-shadow: none; }
  .act-project-rail { min-height: 0; max-height: 165px; border: 1px solid var(--app-line); border-radius: 15px; background: #fff; }
  .project-rail-heading { min-height: 40px; }
  .act-project-list { grid-template-columns: repeat(2, minmax(0,1fr)); overflow: auto; }
  .act-project-item { min-height: 49px; padding: 7px; }
  .act-project-workspace { min-height: 430px; border-radius: 15px; background: #fff; box-shadow: 0 1px 3px rgba(14,31,51,.1); }
  .act-editor-header { min-height: 55px; padding: 8px 8px 8px 12px; }
  .act-editor-header input { width: min(42vw, 210px); font-size: 12px; }
  .act-editor-body { min-height: 260px; grid-template-columns: 102px minmax(0,1fr); }
  .act-file-list { padding: 6px 4px; }
  .act-file-item { padding: 5px; font-size: 9px; }
  .file-editor-toolbar, .file-editor-footer { padding-inline: 7px; }
  .file-editor-toolbar span { max-width: 58%; font-size: 9px; }
  .file-editor-toolbar button { padding-inline: 5px; font-size: 9px; }
  .act-file-editor textarea { min-height: 210px; padding: 10px; font-size: 10px; }
  .file-editor-footer > span { max-width: 47%; font-size: 9px; }
  .file-editor-footer .app-primary-button { padding-inline: 9px; font-size: 9px; }
  .act-writer { padding: 12px; }
  .act-writer form { align-items: stretch; flex-direction: column; }
  .act-writer .quiet-button { align-self: flex-end; }
  .auth-card { padding: 26px 22px; }
  .auth-brand { margin-bottom: 25px; }
}
@media (max-width: 390px) {
  .auth-card { padding: 22px 18px; }
  .app-eyebrow { font-size: 10px; }
  .act-heading { gap: 8px; }
  .act-add-button { gap: 6px; padding-inline: 9px; }
  .act-heading p:not(.app-eyebrow) { max-width: 210px; }
}
@media (prefers-reduced-motion: reduce) {
  .wiqo-app *, .wiqo-app *::before, .wiqo-app *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
