:root {
  font-family: var(--neco-font-body);
  color: var(--neco-color-ink);
  background: var(--neco-color-paper);
  font-synthesis: none;
  --composer-height: 128px;
  --keyboard-inset: 0px;
}
html {
  scroll-padding-top: 84px;
  scroll-padding-bottom: calc(var(--composer-height) + var(--keyboard-inset) + 32px);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 650;
  color: inherit;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #6083ff;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #f5f3ecf5;
  border-bottom: 1px solid #1727470d;
  padding: 14px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--blue);
  text-decoration: none;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -1.4px;
  line-height: 1;
}
.brand img {
  width: 36px;
  height: 42px;
  object-fit: contain;
}
.brand small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  margin-top: 5px;
}
nav {
  display: flex;
  align-items: center;
  gap: 2px;
}
.quiet {
  background: transparent;
  font-size: 13px;
}
#activity-count:not(:empty) {
  font-size: 11px;
  color: var(--blue);
  margin-left: 4px;
}
main {
  max-width: 720px;
  margin: auto;
  padding: 22px 24px 160px;
  min-height: calc(100dvh - 76px);
}
.intro {
  text-align: center;
  padding-top: clamp(30px, 8vh, 90px);
  max-width: 620px;
  margin: auto;
}
.character {
  display: inline-block;
  position: relative;
  width: 110px;
  height: 124px;
  margin-bottom: 10px;
}
.character > img { width: 100%; height: 100%; object-fit: contain; }
.character-lettering {
  position: absolute;
  inset: 0;
  background: var(--blue);
  mask: url("/neco.png") center / contain no-repeat;
  -webkit-mask: url("/neco.png") center / contain no-repeat;
  /* The same three lettering regions used by native, mapped to the contain-fit image. */
  clip-path: polygon(0 0, 64.45% 0, 64.45% 30.77%, 36.70% 30.77%, 36.70% 35.13%, 37.60% 35.13%, 37.60% 38.98%, 35.56% 38.98%, 35.56% 38.72%, 0 38.72%);
}
.eyebrow {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 1.5px;
  color: #3157c4;
}
h1 {
  font-size: clamp(33px, 5vw, 46px);
  letter-spacing: -1.8px;
  line-height: 1.08;
  margin: 18px 0;
}
h2 {
  font-size: 23px;
  letter-spacing: -0.7px;
  margin: 0;
}
p {
  line-height: 1.55;
}
.intro > p:last-of-type {
  font-size: 15px;
  color: #6c7281;
}
.examples {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 25px 0;
}
.examples button {
  background: transparent;
  border: 1px solid #d9dce2;
  font-size: 13px;
  padding: 12px 15px;
  min-height: var(--neco-size-touch, 44px);
}
#chat {
  display: flex;
  flex-direction: column;
  gap: 27px;
  padding-top: 10px;
}
.bubble {
  max-width: 94%;
  scroll-margin-bottom: 170px;
}
.bubble.user {
  align-self: flex-end;
  background: #e8edfc;
  border-radius: 19px 19px 5px 19px;
  padding: 13px 17px;
}
.bubble.user strong {
  display: none;
}
.bubble.assistant {
  align-self: stretch;
  padding: 0;
}
.bubble.assistant strong {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #3157c4;
  font-size: 12px;
  margin-bottom: 8px;
}
.bubble.assistant strong img {
  width: 20px;
  height: 24px;
  object-fit: contain;
}
.bubble p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 15px;
}
.compose {
  position: fixed;
  left: 50%;
  bottom: max(35px, calc(env(safe-area-inset-bottom) + 17px));
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 700px;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  padding: 9px;
  gap: 8px;
  border: 1px solid #d4d9e4;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 6px 28px #17274712;
}
.compose textarea {
  resize: none;
  min-height: 44px;
  max-height: 150px;
  flex: 1;
  width: 100%;
  padding: 12px 10px;
  border: 0;
  margin: 0;
  background: transparent;
  font-size: 16px;
  line-height: 1.4;
  color: inherit;
}
.compose button {
  background: var(--blue);
  color: #fff;
  min-height: 44px;
  font-size: 13px;
  padding: 12px 16px;
}
.working {
  margin: 25px 0;
  color: var(--muted);
  font-size: 13px;
}
.working > p {
  display: flex;
  align-items: center;
  gap: 8px;
}
.working > p::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  animation: breathe 1.5s ease-in-out infinite;
}
.working-step {
  border-left: 2px solid #c9d5f5;
  padding: 4px 12px;
  margin: 6px 0;
  color: #536174;
  font-size: 12px;
}
.working-step:last-child {
  color: #3157c4;
}
.action-receipt {
  margin-top: 14px;
  padding: 13px 15px;
  background: #ffffffb8;
  border: 1px solid #dbe0e9;
  border-radius: 14px;
  max-width: 400px;
}
.action-receipt .receipt-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #3157c4;
  margin-bottom: 6px;
}
.action-receipt h3 {
  font-size: 14px;
  font-weight: 650;
  margin: 0;
  overflow-wrap: anywhere;
}
.action-receipt p {
  font-size: 12px;
  color: var(--muted);
  margin: 5px 0;
}
.action-receipt button {
  background: #ecf0fb;
  color: #214be4;
  padding: 10px 14px;
  font-size: 13px;
  margin-top: 8px;
  min-height: var(--neco-size-touch, 44px);
}
.receipt-note {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 0;
}
.receipt-actions {
  display: flex;
  gap: 8px;
}
.sheet {
  width: calc(100% - 24px);
  max-width: 520px;
  max-height: 85dvh;
  border: 0;
  border-radius: 24px;
  padding: 24px;
  background: #f5f3ec;
  color: inherit;
  box-shadow: 0 18px 100px #17274735;
}
.sheet::backdrop {
  background: #17274755;
}
.sheet-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.sheet-heading h2 {
  font-size: 21px;
}
.sheet-copy {
  font-size: 13px;
  color: var(--muted);
}
.card {
  padding: 20px;
  background: #fff;
  border: 1px solid #dce0e6;
  border-radius: 18px;
  margin: 18px 0;
}
.card h2 {
  font-size: 20px;
}
.card p {
  font-size: 13px;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
}
input,
select {
  display: block;
  width: 100%;
  padding: 13px;
  border-radius: 12px;
  border: 1px solid #c4cbd6;
  margin: 8px 0 18px;
  font-size: 16px;
  color: inherit;
  background: #fff;
  min-width: 0;
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.primary {
  background: var(--blue);
  color: #fff;
}
.secondary {
  background: #e7edff;
  color: var(--blue);
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.list-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
}
.list-heading h2 {
  font-size: 15px;
}
.reminder {
  padding: 17px 0;
  border-bottom: 1px solid #d5dae4;
}
.reminder h3 {
  font-size: 15px;
  margin: 0 0 7px;
  overflow-wrap: anywhere;
}
.reminder p {
  font-size: 12px;
  margin: 7px 0;
}
.reminder .quiet {
  padding: 10px 13px;
  font-size: 13px;
  border: 1px solid #d4dae6;
  min-height: var(--neco-size-touch, 44px);
}
.badge {
  font-size: 12px;
  background: #e8edfb;
  border-radius: 6px;
  padding: 4px 7px;
  display: inline-block;
}
.empty {
  padding: 24px 0;
  font-size: 14px;
  color: var(--muted);
}
details {
  margin-top: 22px;
  font-size: 13px;
}
summary {
  cursor: pointer;
}
output {
  display: block;
  font-size: 28px;
  letter-spacing: 4px;
  margin: 18px 0;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
#status:not(:empty) {
  font-size: 12px;
  color: #536174;
  margin: 14px 0;
  padding: 10px 0;
}
#status.error {
  color: #9e3426;
}
#status:empty {
  display: none;
}
.memory-entry {
  border-bottom: 1px solid #d5dae4;
  padding: 18px 0;
}
.memory-entry h3 {
  font-size: 14px;
  margin: 0 0 7px;
}
.memory-entry p {
  font-size: 13px;
  color: #536174;
  margin: 0;
}
.memory-entry .quiet {
  padding: 8px 0;
  color: #3157c4;
}
.memory-kind {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  margin-bottom: 8px;
}
@keyframes breathe {
  50% {
    opacity: 0.3;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
@media (max-width: 480px) {
  .app-header {
    padding: 12px 14px;
  }
  .brand {
    font-size: 27px;
  }
  .brand img {
    width: 28px;
    height: 34px;
  }
  .brand small {
    font-size: 9px;
  }
  nav {
    gap: 0;
  }
  nav button {
    font-size: 11px;
    padding: 10px 8px;
  }
  .brand {
    gap: 6px;
  }
  main {
    padding: 22px 18px 160px;
  }
  .intro {
    padding-top: 30px;
  }
  .intro p {
    font-size: 14px;
  }
  .desktop-break {
    display: none;
  }
  .sheet {
    position: fixed;
    margin: auto auto 0;
    border-radius: 24px 24px 0 0;
    max-height: 88dvh;
    width: 100%;
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }
  .sheet-heading h2 {
    font-size: 20px;
  }
  .fields {
    grid-template-columns: 1fr;
  }
  .bubble {
    max-width: 96%;
  }
  .compose {
    bottom: max(32px, calc(env(safe-area-inset-bottom) + 12px));
  }
}

@media (max-width: 480px) {
  .brand small {
    display: none;
  }
}
.sheet-status.error {
  color: #9e3426;
}

.plan-card {
  margin-top: 16px;
  padding: 18px;
  background: #ffffffb8;
  border: 1px solid #dbe0e9;
  border-radius: 18px;
  max-width: 600px;
}
.plan-state {
  font-size: 12px;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: #3157c4;
}
.plan-card h3 {
  font-size: 17px;
  margin: 8px 0 16px;
  line-height: 1.35;
}
.plan-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: steps;
}
.plan-steps > li {
  counter-increment: steps;
  position: relative;
  margin-top: 15px;
  padding: 0 0 15px 28px;
  border-bottom: 1px solid #dbe0e980;
}
.plan-steps > li:last-child {
  border: 0;
  padding-bottom: 0;
}
.plan-steps > li::before {
  content: counter(steps);
  position: absolute;
  left: 0;
  font-size: 11px;
  color: #3157c4;
  line-height: 22px;
}
.step-label {
  font-size: 13px;
  font-weight: 650;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}
.step-state {
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  color: #617184;
}
.plan-steps > li[data-state="awaiting_approval"] {
  background: #fcf6e9;
  border-radius: 12px;
  padding: 12px 12px 12px 28px;
  margin-left: -10px;
}
.plan-steps > li[data-state="awaiting_approval"]::before {
  left: 9px;
}
.step-reason,
.approval-preview {
  font-size: 12px !important;
  margin: 8px 0 !important;
  color: #617184;
}
.approval-preview {
  font-weight: 600;
  color: #172747;
}
.approval-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.approval-actions button {
  font-size: 14px;
  padding: 10px 14px;
  min-height: var(--neco-size-touch, 44px);
}
.result-details {
  margin-top: 12px !important;
  font-size: 13px;
}
.result-details p {
  font-size: 13px;
  white-space: pre-wrap;
  margin: 10px 0;
}
.result-details summary {
  font-size: 13px;
  font-weight: 650;
  color: #3157c4;
  line-height: 1.4;
}
.checklist-item {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  margin-top: 10px;
  overflow-wrap: anywhere;
}
.checklist-item input {
  appearance: auto;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin: 2px 0 0;
  accent-color: #214be4;
  padding: 0;
  border-radius: 3px;
}
.plans-list .plan-card {
  margin-top: 22px;
}
.plan-card .action-receipt {
  margin-top: 10px;
  padding: 10px 12px;
  background: transparent;
}

/* A completed request reads like an answer; its execution remains inspectable. */
.plan-results-card {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  margin-top: 12px;
}
.plan-observations > :first-child { margin-top: 0; }
.plan-observations > * + * { margin-top: 20px; }
.plan-results-card .research-summary {
  margin: 0 0 18px !important;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.research-source-heading {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}
.plan-results-card .research-sources { margin-top: 6px; }
.plan-results-card .research-sources li {
  padding: 6px 0;
  margin: 0;
}
.plan-artifacts:not(:empty) {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}
.plan-results-card .plan-artifacts > * {
  margin: 0 !important;
  padding: 14px 16px;
  background: #ffffff80;
  border: 1px solid #dbe0e9;
  border-radius: 14px;
}
.plan-artifacts .result-details summary {
  font-size: 14px;
  color: #172747;
}
.plan-execution {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid #17274712;
}
.plan-execution > summary {
  width: 100%;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
  padding: 12px 0;
  min-height: var(--neco-size-touch, 44px);
}
.plan-execution > summary:focus-visible {
  outline: 2px solid #6083ff;
  outline-offset: 4px;
  border-radius: 3px;
}
.plan-execution .execution-goal {
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  margin: 12px 0 0;
}
.plan-execution .plan-steps > li {
  margin-top: 10px;
  padding-bottom: 10px;
}
.plan-execution .step-label { font-size: 12px; }

/* A conversation surface: utility controls stay out of its way. */
.app-header {
  border: 0;
  padding: 18px 24px;
  background: #f5f3ec;
}
.brand {
  font-size: 28px;
}
.brand img {
  width: 30px;
  height: 36px;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 11px;
  border-radius: 50%;
  background: transparent;
  color: #737b89;
}
.icon-button svg,
.voice-entry svg,
.send-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.more-button svg {
  fill: currentColor;
  stroke: none;
}
main {
  padding-bottom: calc(var(--composer-height) + var(--keyboard-inset) + 48px);
}
.compose {
  display: block;
  padding: 9px 10px 8px;
  border-radius: 26px;
  bottom: calc(var(--keyboard-inset) + max(12px, env(safe-area-inset-bottom)));
  border-color: #e2e1db;
  box-shadow: 0 8px 32px #1727470a;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.compose:has(textarea:focus) {
  border-color: #8dace7;
  box-shadow: 0 0 0 2px #214be40d, 0 8px 32px #1727470a;
}
.compose textarea {
  display: block;
  width: 100%;
  padding: 12px 12px 8px;
  min-height: 48px;
  outline: none;
  border-radius: 16px;
  caret-color: var(--blue);
}
.compose textarea::placeholder {
  color: #838998;
  opacity: 1;
}
.composer-tools,
.input-tools,
.send-tools {
  display: flex;
  align-items: center;
  gap: 4px;
}
.composer-tools {
  justify-content: space-between;
  margin-top: 2px;
}
.send-tools {
  gap: 8px;
}
.compose .icon-button {
  background: transparent;
  color: #73808c;
  padding: 11px;
}
.compose .voice-entry {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 22px;
  background: #edf0fa;
  color: #214be4;
  font-size: 13px;
}
.compose .send-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 11px;
  border-radius: 50%;
}
.compose .send-button:disabled {
  background: #e9ebef;
  color: #929aa5;
  opacity: 1;
  cursor: default;
}
.options-sheet {
  max-width: 380px;
}
.personal-options {
  margin-top: 24px;
}
.personal-options button {
  display: block;
  width: 100%;
  padding: 18px 8px;
  text-align: left;
  background: transparent;
  border-bottom: 1px solid #dedfd9;
  border-radius: 0;
  font-size: 15px;
}
.personal-options button:last-child {
  border: 0;
}
@media (hover: hover) and (pointer: fine) {
  .examples button:hover { border-color: #8da7ec; color: var(--blue); }
  .quiet:hover,
  .icon-button:hover { background: #e9e7e1; }
  .icon-button:hover { color: #172747; }
  .compose .icon-button:hover { background: #f2f3f6; }
  .compose .voice-entry:hover { background: #e2e8fa; }
  .compose .send-button:not(:disabled):hover { background: #163cc5; }
  .personal-options button:hover { color: var(--blue); }
}
.compose button:active:not(:disabled) { opacity: .78; }
.compose button:focus-visible { outline-width: 2px; outline-offset: 2px; }
.research-summary { margin: 14px 0 !important; line-height: 1.6; }
.research-sources { padding: 0; margin: 12px 0 0; list-style: none; }
.research-sources li { margin: 8px 0; padding: 0; }
.research-sources a { color: var(--blue); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.research-sources span { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.personal-options span {
  display: block;
  color: #808793;
  font-size: 12px;
  font-weight: 400;
  margin-top: 5px;
}
.personal-options b {
  font-weight: 500;
}
.compose textarea:focus,
.compose textarea:focus-visible { outline: none; box-shadow: none; }
.compose.has-audio textarea,
.compose.has-audio .composer-tools { display: none; }
.compose.has-audio { padding: 8px; min-height: 64px; }
.audio-draft { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.audio-draft-content { flex: 1; min-width: 0; }
.audio-draft .icon-button,
.audio-draft .record-stop,
.audio-draft .audio-send-button { flex: 0 0 44px; width: 44px; height: 44px; padding: 11px; border-radius: 50%; }
.audio-draft .icon-button { color: #748092; background: transparent; }
.audio-draft .record-stop,
.audio-draft .audio-send-button { display: flex; align-items: center; justify-content: center; color: #fff; background: var(--blue); }
.audio-draft button svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.audio-draft .record-stop svg { fill: currentColor; stroke: none; }
#audio-wave { display: block; width: 100%; height: 30px; }
#audio-caption { display: block; font-size: 12px; line-height: 1.4; color: #6c7281; }
#audio-caption.recording-caption { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.audio-recording-time { font-size: 12px; font-variant-numeric: tabular-nums; color: #738099; white-space: nowrap; }
#audio-preview-player { margin-top: 4px; }
#audio-preview-player .audio-player { min-width: 0; gap: 6px; }
#audio-preview-player .audio-player button { flex-basis: 44px; width: 44px; height: 44px; padding: 12px; }
#audio-preview-player .audio-time { font-size: 10px; }
.audio-message { width: min(100%, 320px); margin: 5px 0 0; }
.audio-player { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; min-width: min(250px, 60vw); }
.audio-player button { display: flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 12px; border-radius: 50%; color: var(--blue); background: #dce4fc; }
.audio-player button svg { width: 20px; height: 20px; fill: currentColor; }
.audio-player input[type="range"] { flex: 1; min-width: 54px; width: 70px; padding: 0; margin: 0; height: 28px; accent-color: var(--blue); border: 0; background: transparent; cursor: pointer; }
.audio-time { color: #667a9a; font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.audio-error { flex-basis: 100%; color: #9c3640; font-size: 12px; }
.audio-error:empty { display: none; }
.audio-message details { margin-top: 7px; font-size: 12px; font-weight: 400; }
.audio-message p { font-size: 13px; margin-top: 9px; }
.audio-message summary { color: #667a9a; }
.compose.is-recording { border-color: #e2e1db; box-shadow: 0 8px 32px #1727470a; }
.voice-dialog {
  margin: 0;
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: none;
  border: 0;
  padding: 24px;
  color: #172747;
  background: #f5f3ec;
}
.voice-dialog[open] {
  display: flex;
  flex-direction: column;
}
.voice-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 650;
  color: #727b8a;
}
.voice-top .icon-button {
  font-size: 28px;
}
.voice-surface {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 500px;
  width: 100%;
  margin: auto;
  overflow-y: auto;
}
.voice-character {
  width: clamp(110px, 22vh, 180px);
  height: clamp(130px, 26vh, 210px);
  object-fit: contain;
  filter: drop-shadow(0 12px 12px #224be412);
}
.voice-surface h2 {
  font-size: clamp(30px, 5vw, 40px);
  letter-spacing: -1px;
  margin: 22px 0 4px;
}
#voice-status {
  color: #7a8190;
  font-size: 14px;
  margin: 10px 0;
  max-width: 320px;
}
#voice-reply {
  font-size: 16px;
  max-width: 450px;
  margin: 20px 0;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
#voice-reply:empty {
  display: none;
}
.voice-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 20px 0 max(18px, env(safe-area-inset-bottom));
}
.voice-controls .primary {
  min-width: 190px;
  border-radius: 30px;
  padding: 18px 26px;
}
.voice-meter {
  display: flex;
  gap: 4px;
  align-items: center;
  height: 28px;
  margin-top: 22px;
  opacity: 0;
}
.voice-meter i {
  width: 4px;
  height: 12px;
  background: #214be4;
  border-radius: 4px;
}
.voice-surface[data-state="recording"] .voice-meter {
  opacity: 1;
}
.voice-surface[data-state="recording"] .voice-meter i {
  animation: voice-wave 800ms ease-in-out infinite alternate;
}
.voice-meter i:nth-child(2) {
  animation-delay: 160ms !important;
}
.voice-meter i:nth-child(3) {
  animation-delay: 320ms !important;
}
.voice-meter i:nth-child(4) {
  animation-delay: 120ms !important;
}
.voice-meter i:nth-child(5) {
  animation-delay: 240ms !important;
}
@keyframes voice-wave {
  to {
    height: 26px;
  }
}
@media (max-width: 480px) {
  .app-header {
    padding: 12px 16px;
  }
  .compose {
    width: calc(100% - 24px);
  }
  .voice-dialog {
    padding: 16px 20px;
  }
}

#voice-player {
  width: min(100%, 330px);
  margin: 12px 0;
}

/* One mission, optional clarification, and an explicit stop while it continues. */
.continuation-controls { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:12px 0; }
.continuation-controls input { flex:1 1 180px; min-width:0; margin:0; font-size:16px; }
.continuation-controls button { min-height:44px; padding:10px 14px; font-size:13px; }
.continuation-controls input + button { background:var(--blue); color:white; }

/* Mail stays in the conversation; only the exact prepared reply asks for approval. */
.gmail-message { border-top: 1px solid var(--line, #dedfdc); padding: 14px 0; }
.gmail-message summary { cursor: pointer; list-style-position: outside; margin-left: 16px; }
.gmail-message summary strong, .gmail-message summary span { display: block; overflow-wrap: anywhere; }
.gmail-message summary span { margin-top: 4px; font-size: 13px; opacity: .7; }
.gmail-message a { display: inline-block; margin-top: 12px; font-size: 14px; }
.gmail-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; font-size: 15px; }
.gmail-draft .gmail-body { border-block: 1px solid var(--line, #dedfdc); padding-block: 16px; margin-block: 16px; }
.gmail-recipient, .gmail-subject, .gmail-snippet { overflow-wrap: anywhere; font-size: 14px; }
.gmail-draft h4, .gmail-receipt h4, .gmail-settings h4 { margin: 0 0 12px; }
.gmail-draft .calendar-primary { min-height: 44px; width: 100%; margin-top: 12px; }
.gmail-settings button { min-height: 44px; margin: 6px 6px 0 0; }

/* Execution evidence is available on demand, secondary to the answer. */
.plan-diagnostics { margin-top: 16px; border-top: 1px solid var(--line, #dedfdc); font-size: 13px; color: var(--muted, #6e7686); }
.plan-diagnostics > summary { min-height: 44px; padding: 14px 0; cursor: pointer; }
.plan-diagnostics > summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
.diagnostics-content { overflow-wrap: anywhere; line-height: 1.55; }
.diagnostics-content p { font-size: 13px; margin: 0 0 10px; }
.diagnostics-content ol { padding-left: 20px; margin: 0 0 12px; }
.diagnostics-content li { padding: 4px 0; }
.diagnostics-reason { color: var(--ink, #1b294b); }

/* Gmail is an assistant result, with source mail behind deliberate disclosure. */
.plan-mail-card.plan-results-card { padding: 0; border: 0; background: transparent; }
.plan-mail-card .plan-state { font-size: 14px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--muted); margin: 0 0 8px; }
.plan-mail-card .continuation-controls { margin: 0 0 12px; }
.plan-mail-card .continuation-controls .quiet { font-size: 12px; padding: 4px 0; min-height: 44px; color: var(--muted); }
.plan-mail-card .plan-artifacts:empty, .plan-mail-card .plan-observations:empty { display: none; }
.gmail-receipt { border: 0; border-bottom: 1px solid var(--line, #dedfdc); padding: 0; margin: 8px 0; }
.gmail-receipt > summary { display: flex; align-items: center; gap: 8px; padding: 13px 0; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--muted); list-style: none; }
.gmail-receipt > summary::before { content: '›'; font-size: 20px; line-height: 1; transition: transform .15s; }
.gmail-receipt[open] > summary::before { transform: rotate(90deg); }
.gmail-count { margin-left: auto; font-size: 12px; background: var(--line, #dedfdc); border-radius: 20px; min-width: 24px; padding: 2px 7px; text-align: center; }
.gmail-receipt-content { padding: 0 0 12px; }
.gmail-receipt .calendar-coverage-warning { font-size: 12px; border: 0; padding: 0; line-height: 1.5; color: var(--muted); }
.gmail-message { padding: 10px 0; }
.gmail-message summary strong { font-size: 14px; font-weight: 500; }
.gmail-message summary span { font-size: 12px; }
.gmail-draft { padding: 16px; border-radius: 20px; margin: 10px 0; }
.gmail-draft h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--blue); margin-bottom: 8px; }
.gmail-review > summary { cursor: pointer; list-style: none; display: grid; gap: 8px; }
.gmail-review > summary strong { font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; }
.gmail-review-hint { color: var(--blue); font-size: 13px; }
.gmail-review[open] .gmail-review-hint { display: none; }
.gmail-review-content { padding-top: 12px; }
.gmail-draft > .calendar-notice { font-size: 12px; margin-top: 10px; }
.gmail-review-content .gmail-body { font-size: 14px; }
@media (prefers-reduced-motion: reduce) { .gmail-receipt > summary::before { transition: none; } }

/* Welcome says what this instance actually does; chips follow config.connections. */
.capabilities {
  font-size: 14px;
  line-height: 1.5;
  color: #5d6472;
  margin: -12px 0 0;
}
.capabilities:empty {
  display: none;
}

/* A failed send keeps its bubble, its text and one honest retry. */
.bubble.user[data-state="failed"] {
  background: #f3e4e0;
}
.send-failure {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.5;
}
.send-failure > span {
  color: #9e3426;
  overflow-wrap: anywhere;
}
.send-retry {
  background: #fff;
  color: #214be4;
  border: 1px solid #d4d9e4;
  font-size: 13px;
  padding: 10px 14px;
  min-height: var(--neco-size-touch, 44px);
}
#status .status-retry {
  background: transparent;
  color: #214be4;
  border: 1px solid #d4d9e4;
  font-size: 13px;
  padding: 10px 14px;
  margin-left: 10px;
  min-height: var(--neco-size-touch, 44px);
}
