:root {
  color-scheme: dark;
  --ink: #111414;
  --ink-deep: #0d1010;
  --panel: #181b1b;
  --panel-raised: #1c2020;
  --ivory: #eeeae1;
  --stone: #aaa69e;
  --stone-dim: #918d85;
  --brass: #ccba98;
  --brass-dim: rgba(204, 186, 152, 0.35);
  --hairline: rgba(238, 234, 225, 0.13);
  --hairline-strong: rgba(238, 234, 225, 0.22);
  --serif: Georgia, 'Times New Roman', serif;
  --sans: Arial, Helvetica, sans-serif;
  --rail-width: 17rem;
  --content-width: 46rem;
  --page-pad: 1.25rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--ink);
}

body {
  min-height: 100dvh;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(204, 186, 152, 0.025), transparent 24rem),
    var(--ink);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: rgba(204, 186, 152, 0.24);
  color: var(--ivory);
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

.button,
.filter,
.forget-button,
.nav-item,
.tab,
.text-button {
  touch-action: manipulation;
}

button:disabled {
  cursor: default;
  opacity: 0.48;
}

a {
  color: var(--brass);
}

:focus-visible {
  outline: 1px solid var(--brass);
  outline-offset: 3px;
}

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

.eyebrow {
  margin: 0;
  color: var(--stone);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  line-height: 1.4;
  text-transform: uppercase;
}

.wordmark,
.rail-wordmark,
.mobile-wordmark {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: 0.12em;
  line-height: 1;
}

.wordmark {
  margin: 1.1rem 0 0.4rem;
  font-size: clamp(3.6rem, 16vw, 5.6rem);
}

.tagline {
  margin: 0;
  color: var(--brass);
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}

/* Lock screen */

.lock-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 2rem var(--page-pad);
}

.lock-inner {
  width: min(100%, 27rem);
  padding: 2rem 0;
}

.unlock-form {
  margin-top: 3rem;
  display: grid;
  gap: 0.8rem;
}

.field-label {
  color: var(--stone);
  font-size: 0.77rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.text-input,
.textarea-input,
.select-input {
  width: 100%;
  border: 1px solid var(--hairline);
  border-radius: 1px;
  background: var(--panel);
  color: var(--ivory);
  padding: 0.78rem 0.85rem;
  transition: border-color 140ms ease;
}

.text-input:hover,
.textarea-input:hover,
.select-input:hover {
  border-color: var(--hairline-strong);
}

.text-input:focus,
.textarea-input:focus,
.select-input:focus {
  border-color: var(--brass-dim);
  outline: none;
}

.textarea-input {
  min-height: 6.5rem;
  resize: vertical;
}

.select-input {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--stone) 50%),
    linear-gradient(135deg, var(--stone) 50%, transparent 50%);
  background-position:
    calc(100% - 1.1rem) 50%,
    calc(100% - 0.8rem) 50%;
  background-size: 0.3rem 0.3rem;
  background-repeat: no-repeat;
  padding-right: 2.2rem;
}

.check-row,
.switch-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--stone);
  font-size: 0.88rem;
  line-height: 1.45;
  cursor: pointer;
}

.check-row input,
.switch-row input {
  appearance: none;
  width: 1rem;
  height: 1rem;
  margin: 0;
  flex: 0 0 auto;
  border: 1px solid var(--hairline-strong);
  border-radius: 1px;
  background: transparent;
  display: grid;
  place-content: center;
}

.check-row input::before,
.switch-row input::before {
  content: '';
  width: 0.48rem;
  height: 0.48rem;
  transform: scale(0);
  background: var(--brass);
  transition: transform 100ms ease;
}

.check-row input:checked::before,
.switch-row input:checked::before {
  transform: scale(1);
}

.button {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid var(--hairline-strong);
  border-radius: 1px;
  background: transparent;
  padding: 0.6rem 1rem;
  color: var(--ivory);
  font-size: 0.78rem;
  letter-spacing: 0.11em;
  line-height: 1.2;
  text-transform: uppercase;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease;
}

.button:hover {
  border-color: var(--brass-dim);
}

.button-primary {
  border-color: var(--brass);
  background: var(--brass);
  color: var(--ink-deep);
}

.button-primary:hover {
  background: #d6c5a6;
  border-color: #d6c5a6;
}

.button-quiet {
  color: var(--stone);
}

.button-quiet:hover {
  color: var(--ivory);
}

.button-send {
  min-width: 5.5rem;
  border-color: var(--brass-dim);
  color: var(--brass);
}

.button-send:hover {
  border-color: var(--brass);
}

.text-button {
  border: 0;
  border-bottom: 1px solid transparent;
  background: none;
  padding: 0.2rem 0;
  color: var(--stone);
  font-size: 0.79rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.text-button:hover {
  border-bottom-color: var(--hairline-strong);
  color: var(--ivory);
}

.form-message {
  min-height: 1.4em;
  margin: 0;
  color: var(--stone);
  font-size: 0.82rem;
  line-height: 1.45;
}

.form-message.is-error {
  color: var(--brass);
}

.fine-print {
  margin: 1rem 0 0;
  color: var(--stone-dim);
  font-size: 0.79rem;
  line-height: 1.6;
  max-width: 34rem;
}

/* App frame */

.app-frame {
  min-height: 100dvh;
  height: 100dvh;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
  overscroll-behavior: none;
}

.rail {
  display: none;
}

.workspace {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

.mobile-head {
  flex: 0 0 auto;
  min-height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--hairline);
  padding: 0.4rem var(--page-pad);
  padding-top: calc(0.4rem + env(safe-area-inset-top));
}

.mobile-wordmark {
  font-size: 1.28rem;
}

.mobile-head-actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.views {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
}

.view {
  height: 100%;
  min-height: 0;
}

.view-chat {
  display: flex;
  flex-direction: column;
}

.view:not(.view-chat) {
  overflow: hidden;
}

.view-scroll {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.5rem var(--page-pad) 4rem;
}

.view-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 1rem 0 1.5rem;
}

.view-heading h1 {
  margin: 0.2rem 0 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 7vw, 2.8rem);
  font-weight: 400;
  letter-spacing: 0.015em;
  line-height: 1.1;
  text-wrap: balance;
}

.view-note {
  margin: 0;
  max-width: 17rem;
  color: var(--stone-dim);
  font-size: 0.76rem;
  line-height: 1.5;
}

/* Navigation */

.rail-nav {
  margin-top: 3.25rem;
  display: grid;
}

.nav-item {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  background: none;
  padding: 0.95rem 0;
  color: var(--stone);
  text-align: left;
  font-size: 0.9rem;
  letter-spacing: 0.015em;
  transition: color 140ms ease;
}

.nav-item:first-child {
  border-top: 1px solid var(--hairline);
}

.nav-item:hover,
.nav-item.is-active {
  color: var(--ivory);
}

.nav-mark {
  color: var(--stone-dim);
  font-family: var(--serif);
  font-size: 0.79rem;
  letter-spacing: 0.08em;
}

.nav-item.is-active .nav-mark {
  color: var(--brass);
}

.nav-badge {
  min-width: 1.25rem;
  margin-left: auto;
  border: 1px solid var(--brass-dim);
  border-radius: 50%;
  padding: 0.02rem 0.28rem;
  color: var(--brass);
  font-size: 0.71rem;
  line-height: 1.4;
  text-align: center;
}

.rail-foot {
  margin-top: auto;
  padding-top: 2rem;
}

.rail-head {
  padding-top: 0.4rem;
}

.rail-wordmark {
  margin: 1rem 0 0.55rem;
  font-size: 2.1rem;
}

.rail-tagline {
  margin: 0;
  color: var(--brass);
  font-family: var(--serif);
  font-size: 0.92rem;
  line-height: 1.5;
}

.connection-state {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.8rem;
  color: var(--stone-dim);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.connection-dot {
  display: inline-block;
  width: 0.38rem;
  height: 0.38rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--stone-dim);
  transition: background 180ms ease;
}

.is-online .connection-dot {
  background: var(--brass);
}

.tabbar {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--hairline);
  background: rgba(17, 20, 20, 0.96);
  padding-bottom: env(safe-area-inset-bottom);
}

.tab {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.16rem;
  border: 0;
  background: none;
  padding: 0.62rem 0.25rem 0.72rem;
  color: var(--stone-dim);
  font-size: 0.73rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tab.is-active {
  color: var(--ivory);
}

.tab-mark {
  color: var(--stone-dim);
  font-family: var(--serif);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
}

.tab.is-active .tab-mark {
  color: var(--brass);
}

.tab .nav-badge {
  position: absolute;
  top: 0.4rem;
  left: calc(50% + 0.35rem);
  margin: 0;
}

/* Chat */

.chat-heading {
  flex: 0 0 auto;
  padding: 1.15rem var(--page-pad) 1rem;
  border-bottom: 1px solid var(--hairline);
}

.chat-log {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.5rem var(--page-pad) 2rem;
}

.chat-empty {
  max-width: var(--content-width);
  margin: 1rem auto 0;
  padding: 1rem 0;
}

.chat-empty .serif-line {
  margin: 0 0 0.8rem;
  font-family: var(--serif);
  font-size: clamp(1.55rem, 5vw, 2rem);
  line-height: 1.25;
}

.chat-empty > p:last-child {
  margin: 0;
  max-width: 31rem;
  color: var(--stone);
  font-size: 0.94rem;
  line-height: 1.75;
}

.message {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto 1.65rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--hairline);
}

.message-meta {
  margin: 0 0 0.5rem;
  color: var(--stone-dim);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  line-height: 1.5;
  text-transform: uppercase;
}

.message-night .message-meta strong {
  color: var(--brass);
  font-weight: 400;
}

.message-body {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--ivory);
  font-size: 1rem;
  line-height: 1.72;
}

.message-user {
  max-width: 39rem;
  margin-left: auto;
  text-align: right;
}

.message-user .message-meta {
  text-align: right;
}

.message-user .message-body {
  color: var(--stone);
}

.message-error .message-body {
  color: #c7b9a8;
}

.message-system {
  border-bottom-style: dashed;
}

.is-streaming .message-body::after {
  content: '';
  display: inline-block;
  width: 0.42rem;
  height: 0.9em;
  margin-left: 0.15rem;
  vertical-align: -0.08em;
  border-right: 1px solid var(--brass);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.composer-wrap {
  flex: 0 0 auto;
  border-top: 1px solid var(--hairline);
  background: rgba(17, 20, 20, 0.96);
  padding: 0.8rem var(--page-pad) calc(0.65rem + env(safe-area-inset-bottom));
}

.composer {
  display: flex;
  align-items: flex-end;
  gap: 0.55rem;
  max-width: var(--content-width);
  margin: 0 auto;
  border: 1px solid var(--hairline);
  background: var(--panel);
  padding: 0.42rem 0.42rem 0.42rem 0.85rem;
  transition: border-color 140ms ease;
}

.composer:focus-within {
  border-color: var(--brass-dim);
}

.composer-input {
  flex: 1 1 auto;
  min-height: 2.6rem;
  max-height: 9rem;
  border: 0;
  background: transparent;
  padding: 0.52rem 0;
  color: var(--ivory);
  font-size: 0.96rem;
  line-height: 1.5;
  resize: none;
  field-sizing: content;
}

.composer-input::placeholder {
  color: var(--stone-dim);
}

.composer-input:focus {
  outline: none;
}

.composer .button-send {
  flex: 0 0 auto;
  min-height: 2.5rem;
  font-size: 0.77rem;
}

.composer-note {
  max-width: var(--content-width);
  margin: 0.48rem auto 0;
  color: var(--stone-dim);
  font-size: 0.71rem;
  letter-spacing: 0.035em;
  line-height: 1.4;
}

/* Voice call */

.call-stage {
  display: grid;
  justify-items: center;
  gap: 1.25rem;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 2.25rem 0 2rem;
  margin-bottom: 2rem;
}

.call-support {
  min-height: 1.4em;
  max-width: 32rem;
  margin: 0;
  color: var(--stone);
  font-size: 0.82rem;
  line-height: 1.6;
  text-align: center;
}

.call-button {
  width: clamp(9.5rem, 38vw, 12rem);
  aspect-ratio: 1;
  border: 1px solid var(--brass-dim);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 42%, rgba(204, 186, 152, 0.08), transparent 58%),
    var(--panel);
  padding: 1rem;
  color: var(--ivory);
  font-family: var(--serif);
  font-size: 1rem;
  letter-spacing: 0.015em;
  line-height: 1.35;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.call-button:hover:not(:disabled) {
  border-color: var(--brass);
  box-shadow: 0 0 0 0.4rem rgba(204, 186, 152, 0.035);
}

.call-button.is-listening {
  border-color: var(--brass);
  background:
    radial-gradient(circle at 50% 42%, rgba(204, 186, 152, 0.13), transparent 62%),
    var(--panel);
  animation: listen-pulse 2.4s ease-in-out infinite;
}

.call-button.is-speaking {
  border-color: var(--brass);
}

@keyframes listen-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(204, 186, 152, 0.08);
  }
  50% {
    box-shadow: 0 0 0 0.65rem rgba(204, 186, 152, 0.03);
  }
}

.call-status {
  min-height: 1.5em;
  margin: 0;
  color: var(--stone);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  line-height: 1.5;
  text-align: center;
  text-transform: uppercase;
}

.call-interim {
  min-height: 1.4em;
  max-width: 30rem;
  margin: 0;
  color: var(--stone-dim);
  font-family: var(--serif);
  font-size: 0.98rem;
  font-style: italic;
  line-height: 1.55;
  text-align: center;
}

.call-transcript-section {
  margin-bottom: 1.5rem;
}

.call-transcript-list {
  border-top: 1px solid var(--hairline);
}

.call-line {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--hairline);
}

.call-line-label {
  margin: 0 0 0.3rem;
  color: var(--stone-dim);
  font-size: 0.7rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.call-line.night .call-line-label {
  color: var(--brass);
}

.call-line-text {
  margin: 0;
  color: var(--ivory);
  font-size: 0.94rem;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.call-line.user .call-line-text {
  color: var(--stone);
}

.call-line.error .call-line-text {
  color: #c7b9a8;
}

.call-privacy {
  border-top: 1px solid var(--hairline);
  padding-top: 1rem;
}

.voice-field {
  max-width: 24rem;
}

/* Memory */

.memory-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1.15rem;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 1.5rem;
}

.filter {
  border: 0;
  border-bottom: 1px solid transparent;
  background: none;
  margin-bottom: -1px;
  padding: 0 0 0.65rem;
  color: var(--stone-dim);
  font-size: 0.79rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.filter:hover {
  color: var(--ivory);
}

.filter.is-active {
  border-bottom-color: var(--brass);
  color: var(--ivory);
}

.panel {
  border: 1px solid var(--hairline);
  background: var(--panel);
  padding: 1.2rem;
}

.memory-form h2,
.settings-section h2,
.section-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.memory-form {
  margin-bottom: 2.2rem;
}

.memory-form h2 {
  margin-bottom: 1.1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--hairline);
}

.form-grid {
  display: grid;
  gap: 0.9rem;
}

.field {
  display: grid;
  gap: 0.38rem;
  min-width: 0;
}

.memory-form .check-row {
  margin: 1rem 0;
}

.memory-form .button {
  width: 100%;
}

.memory-form .form-message {
  margin-top: 0.7rem;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.count-note {
  margin: 0;
  color: var(--stone-dim);
  font-size: 0.77rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.memory-list {
  border-top: 1px solid var(--hairline);
}

.memory-item {
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--hairline);
}

.memory-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  margin-bottom: 0.55rem;
  color: var(--stone-dim);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  line-height: 1.5;
  text-transform: uppercase;
}

.domain-chip {
  color: var(--stone);
}

.rule-chip {
  border: 1px solid var(--brass-dim);
  padding: 0.02rem 0.35rem;
  color: var(--brass);
  font-size: 0.67rem;
  letter-spacing: 0.08em;
}

.memory-content {
  margin: 0 0 0.7rem;
  color: var(--ivory);
  font-size: 0.94rem;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.memory-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.memory-source {
  color: var(--stone-dim);
  font-size: 0.75rem;
}

.forget-button {
  border: 0;
  border-bottom: 1px solid transparent;
  background: none;
  padding: 0.1rem 0;
  color: var(--stone-dim);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

.forget-button:hover {
  border-bottom-color: var(--brass-dim);
  color: var(--brass);
}

.empty-state {
  margin: 2rem 0;
  color: var(--stone-dim);
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* Inbox */

.inbox-list {
  border-top: 1px solid var(--hairline);
}

.inbox-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--hairline);
}

.inbox-item.unread {
  border-left: 1px solid var(--brass);
  padding-left: 1rem;
}

.inbox-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  margin-bottom: 0.4rem;
  color: var(--stone-dim);
  font-size: 0.71rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.level-mark {
  color: var(--brass);
}

.inbox-title {
  margin: 0 0 0.35rem;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.4;
}

.inbox-body {
  margin: 0 0 0.6rem;
  color: var(--stone);
  font-size: 0.9rem;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.inbox-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Settings */

.settings-form {
  max-width: 42rem;
}

.settings-section {
  border-top: 1px solid var(--hairline);
  padding: 1.5rem 0 1.75rem;
}

.settings-section:first-of-type {
  border-top: 0;
}

.settings-section .section-head {
  margin-bottom: 0.55rem;
}

.section-copy {
  max-width: 35rem;
  margin: 0 0 1.1rem;
  color: var(--stone);
  font-size: 0.87rem;
  line-height: 1.7;
}

.time-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  max-width: 20rem;
}

.subject-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem 1rem;
}

.compact-field {
  max-width: 10rem;
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  border-top: 1px solid var(--hairline);
  padding: 1.5rem 0;
}

.settings-actions .form-message {
  flex: 1 1 12rem;
}

.call-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: end;
  max-width: 32rem;
  margin-bottom: 1rem;
}

.call-log-title {
  margin: 1.6rem 0 0.4rem;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 400;
}

.call-log {
  border-top: 1px solid var(--hairline);
}

.call-log-item {
  display: grid;
  gap: 0.3rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--hairline);
}

.call-log-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
  color: var(--stone-dim);
  font-size: 0.71rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.call-log-outcome {
  color: var(--brass);
}

.call-log-value {
  margin: 0;
  color: var(--stone);
  font-size: 0.84rem;
  line-height: 1.55;
/* Telegram — Reach me */

.telegram-switch-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.8rem 1rem;
  margin: 0.9rem 0 0.4rem;
}

.telegram-block {
  margin-top: 0.6rem;
  border-top: 1px solid var(--hairline);
  padding-top: 1rem;
}

.telegram-block .switch-row {
  margin-bottom: 0.35rem;
}

.telegram-status {
  margin-top: 0.55rem;
  overflow-wrap: anywhere;
}

.telegram-code {
  overflow-wrap: anywhere;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
}

.telegram-privacy-reminder {
  color: var(--brass);
}

@media (min-width: 640px) {
  .telegram-switch-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.budget-line {
  margin: 0.25rem 0 0.8rem;
  color: var(--ivory);
  font-family: var(--serif);
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}

.budget-progress {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  max-width: 28rem;
  height: 2px;
  border: 0;
  background: var(--hairline);
}

.budget-progress::-webkit-progress-bar {
  background: var(--hairline);
}

.budget-progress::-webkit-progress-value {
  background: var(--brass);
}

.budget-progress::-moz-progress-bar {
  background: var(--brass);
}

.install-section,
.settings-section:last-child {
  border-top: 1px solid var(--hairline);
}

.install-section {
  margin-top: 0.5rem;
}

.install-section .button,
.settings-section:last-child .button {
  margin-top: 0.25rem;
}

/* Dialog and toast */

.dialog {
  width: min(calc(100% - 2rem), 30rem);
  max-width: 30rem;
  border: 1px solid var(--hairline-strong);
  border-radius: 1px;
  background: var(--panel);
  padding: 0;
  color: var(--ivory);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.5);
}

.dialog::backdrop {
  background: rgba(8, 10, 10, 0.78);
}

.dialog-inner {
  padding: 1.6rem;
}

.dialog h2 {
  margin: 0.35rem 0 0.7rem;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.3;
}

.dialog-text {
  margin: 0;
  color: var(--stone);
  font-size: 0.92rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.dialog .fine-print {
  margin-top: 0.8rem;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  margin-top: 1.5rem;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(5rem + env(safe-area-inset-bottom));
  z-index: 20;
  width: max-content;
  max-width: calc(100% - 2rem);
  transform: translateX(-50%);
  margin: 0;
  border: 1px solid var(--hairline-strong);
  background: var(--panel-raised);
  padding: 0.6rem 0.9rem;
  color: var(--ivory);
  font-size: 0.8rem;
  line-height: 1.4;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

/* Scrollbars */

* {
  scrollbar-width: thin;
  scrollbar-color: var(--hairline-strong) transparent;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-thumb {
  background: var(--hairline-strong);
}

*::-webkit-scrollbar-track {
  background: transparent;
}

/* Desktop */

@media (min-width: 860px) {
  .app-frame {
    grid-template-columns: var(--rail-width) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
  }

  .rail {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-right: 1px solid var(--hairline);
    background: rgba(18, 21, 21, 0.62);
    padding: 2.5rem 1.8rem 2rem;
  }

  .workspace {
    grid-column: 2;
    height: 100%;
  }

  .mobile-head {
    display: none;
  }

  .tabbar {
    display: none;
  }

  .view-scroll {
    padding: 2.4rem clamp(2rem, 5vw, 5rem) 5rem;
  }

  .view-scroll > * {
    max-width: 50rem;
  }

  .chat-heading {
    padding: 1.8rem clamp(2rem, 5vw, 5rem) 1.2rem;
  }

  .chat-heading > * {
    max-width: 50rem;
  }

  .chat-heading {
    display: grid;
    grid-template-columns: minmax(0, 50rem);
  }

  .chat-heading .view-note {
    margin-top: -0.25rem;
  }

  .chat-log {
    padding: 2rem clamp(2rem, 5vw, 5rem) 2.5rem;
  }

  .composer-wrap {
    padding: 0.9rem clamp(2rem, 5vw, 5rem) 0.8rem;
  }

  .view-heading {
    padding-top: 0;
    padding-bottom: 2rem;
  }

  .view-heading h1 {
    font-size: 3rem;
  }

  .view-note {
    max-width: 20rem;
    text-align: right;
    padding-bottom: 0.3rem;
  }

  .form-grid {
    grid-template-columns: 10rem minmax(0, 1fr);
    align-items: start;
  }

  .subject-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .time-grid {
    max-width: 21rem;
  }

  .memory-form {
    padding: 1.4rem;
  }

  .memory-form .button {
    width: auto;
  }

  .message {
    max-width: 42rem;
  }

  .message-user {
    max-width: 36rem;
    margin-left: auto;
    margin-right: max(0px, calc((100% - 42rem) / 2));
  }

  .toast {
    bottom: 2rem;
  }
}

@media (min-width: 1200px) {
  :root {
    --rail-width: 19rem;
  }

  .rail {
    padding: 3.2rem 2.2rem 2.2rem;
  }

  .rail-wordmark {
    font-size: 2.35rem;
  }

  .chat-log {
    padding-top: 2.4rem;
  }
}

/* Touch and motion */

@media (hover: none) {
  .forget-button,
  .text-button {
    display: inline-flex;
    min-height: 2.75rem;
    align-items: center;
    padding: 0.5rem 0;
  }

  .tab {
    min-height: 3.75rem;
  }

  .filter {
    min-height: 2.75rem;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
  }
}

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

/* Rich replies: bold, lists and headings inside NIGHT's messages */
.message-rich {
  white-space: normal;
}

.message-rich .rich-paragraph {
  margin: 0 0 0.85rem;
}

.message-rich > :last-child {
  margin-bottom: 0;
}

.message-rich strong {
  color: var(--ivory);
  font-weight: 700;
}

.message-rich em {
  font-style: italic;
}

.message-rich code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.9em;
  padding: 0.05rem 0.3rem;
  border: 1px solid var(--hairline);
  background: var(--panel);
}

.message-rich .rich-heading {
  margin: 1.1rem 0 0.5rem;
  font-family: var(--serif);
  font-size: 1.12rem;
  color: var(--ivory);
}

.message-rich .rich-heading:first-child {
  margin-top: 0;
}

.message-rich .rich-list {
  margin: 0 0 0.85rem;
  padding-left: 1.35rem;
}

.message-rich .rich-list li {
  margin: 0.3rem 0;
  padding-left: 0.2rem;
}

.message-rich ul.rich-list {
  list-style: disc;
}

.message-rich ol.rich-list {
  list-style: decimal;
}

.message-rich .rich-list li::marker {
  color: var(--brass);
}

.history-divider {
  margin: 0.5rem 0 1.5rem;
  text-align: center;
  color: var(--stone-dim);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.message-cut {
  margin: 0.9rem 0 0;
  color: var(--stone);
  font-size: 0.86rem;
}

.message-continue {
  margin-left: 0.4rem;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--brass-dim);
  background: transparent;
  color: var(--brass);
  font: inherit;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
  cursor: pointer;
}

.message-continue:hover:not(:disabled) {
  border-color: var(--brass);
}

.message-continue:disabled {
  opacity: 0.5;
  cursor: default;
}

/* Price alerts (Inbox) */
.alerts-head {
  margin-top: 2.75rem;
}

.alert-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.alert-form .field {
  margin-bottom: 1rem;
}

.alert-footnote {
  margin: 0.9rem 0 0;
  color: var(--stone-dim);
  font-size: 0.8rem;
  line-height: 1.6;
}

.alert-fired .memory-content {
  color: var(--stone);
}

@media (max-width: 640px) {
  .alert-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* Proposal cards: a pending internal change, never an executed one. */
.proposal-card {
  margin-top: 1.1rem;
  padding: 1.1rem 1.15rem 1rem;
  border: 1px solid var(--brass-dim);
  background: linear-gradient(180deg, rgba(204, 186, 152, 0.04), transparent 70%), var(--panel);
}

.proposal-card .eyebrow {
  margin: 0 0 0.5rem;
  color: var(--brass);
}

.proposal-summary {
  margin: 0 0 0.65rem;
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--ivory);
  overflow-wrap: anywhere;
}

.proposal-note {
  margin: 0;
  color: var(--stone-dim);
  font-size: 0.82rem;
  line-height: 1.55;
}

.proposal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.proposal-actions .button {
  min-width: 7.5rem;
}

.proposal-status {
  min-height: 1.3em;
  margin: 0.7rem 0 0;
  color: var(--stone);
  font-size: 0.86rem;
}

.proposal-status.is-error {
  color: #d7a3a0;
}

.push-actions {
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.push-section .fine-print {
  margin-top: 0.8rem;
}

/* Trading rulebook: owner-written forms, quiet accordions. */
.rulebook-section {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hairline);
}

.rulebook-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.rulebook-item {
  border: 1px solid var(--hairline);
  background: var(--panel);
}

.rulebook-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  cursor: pointer;
  list-style: none;
}

.rulebook-summary::-webkit-details-marker {
  display: none;
}

.rulebook-summary::before {
  content: '+';
  color: var(--brass);
  font-family: var(--serif);
  margin-right: 0.35rem;
}

.rulebook-item[open] .rulebook-summary::before {
  content: '−';
}

.rulebook-name {
  flex: 1;
  font-family: var(--serif);
  font-size: 1.02rem;
}

.rulebook-form {
  padding: 0 1rem 1rem;
}

.rulebook-field {
  margin-bottom: 0.75rem;
}

.rulebook-missing {
  margin: 0.4rem 0 0.9rem;
  color: var(--stone-dim);
  font-size: 0.8rem;
  line-height: 1.55;
}

.rulebook-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.35rem;
}

.rulebook-form .form-message {
  margin-top: 0;
}

/* Journal review: paste or upload, map columns, read the result. */
.journal-section {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hairline);
}

.journal-csv {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.82rem;
}

.file-input {
  padding: 0.7rem 0.8rem;
}

.journal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.4rem;
}

.journal-mapping-wrap {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--hairline);
}

.journal-mapping-wrap h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.05rem;
}

.journal-map-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 0.8rem;
}

.journal-map-field {
  margin: 0;
}

.journal-result {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--hairline);
  overflow-wrap: anywhere;
}

.journal-result .rich-heading {
  margin-top: 1.4rem;
}

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

/* Tasks, devices and link actions */

.tabbar {
  grid-template-columns: repeat(6, 1fr);
}

.tab {
  padding-left: 0.12rem;
  padding-right: 0.12rem;
  font-size: 0.68rem;
}

.task-section {
  margin: 0 0 2rem;
}

.task-list {
  display: grid;
  gap: 0.8rem;
}

.task-item {
  border: 1px solid var(--hairline);
  background: var(--panel);
  padding: 1rem 1.05rem;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.45rem;
  color: var(--stone-dim);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tier-chip {
  border: 1px solid var(--brass-dim);
  color: var(--brass);
  padding: 0.1rem 0.4rem;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
}

.tier-chip.is-one-tap {
  border-color: rgba(204, 186, 152, 0.55);
}

.task-title {
  margin: 0 0 0.4rem;
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 400;
  line-height: 1.35;
}

.task-copy,
.task-result,
.task-error {
  margin: 0.4rem 0 0;
  color: var(--stone);
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.task-error {
  color: #c7b9a8;
}

.task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.task-actions .button {
  min-height: 2.35rem;
}

.notes-list {
  display: grid;
  gap: 0.6rem;
}

.note-item {
  border-left: 1px solid var(--brass-dim);
  padding: 0.15rem 0 0.15rem 0.9rem;
}

.note-copy {
  margin: 0;
  color: var(--ivory);
  font-size: 0.92rem;
  white-space: pre-wrap;
}

.note-date {
  margin: 0.3rem 0 0;
  color: var(--stone-dim);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.device-list {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.device-item {
  border: 1px solid var(--hairline);
  padding: 0.8rem 0.9rem;
}

.device-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: baseline;
}

.device-name {
  margin: 0;
  font-family: var(--serif);
  font-size: 1rem;
}

.device-state {
  margin: 0;
  color: var(--stone);
  font-size: 0.8rem;
}

.device-state.is-online {
  color: var(--brass);
}

.device-name-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.55rem;
}

.device-platform {
  border: 1px solid var(--hairline);
  padding: 0.1rem 0.45rem;
  color: var(--stone-dim);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.device-platform.is-android {
  color: var(--brass);
  border-color: var(--brass-dim);
}

.device-status-line {
  margin: 0.35rem 0 0;
  color: var(--stone);
  font-size: 0.82rem;
}

.device-capabilities {
  margin-top: 0.75rem;
  border-top: 1px solid var(--hairline);
  padding-top: 0.65rem;
  display: grid;
  gap: 0.35rem;
}

.device-capabilities-title {
  margin: 0 0 0.2rem;
  color: var(--stone-dim);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.device-capability {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  cursor: pointer;
}

.device-capability input {
  margin-top: 0.2rem;
}

.device-capability-copy {
  display: grid;
  gap: 0.1rem;
}

.device-capability-name {
  color: var(--ivory);
  font-size: 0.86rem;
}

.device-capability-note {
  color: var(--stone-dim);
  font-size: 0.74rem;
}

.device-capability-note.is-on {
  color: var(--brass);
}

.device-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.device-kill-row {
  margin: 0.7rem 0 0.4rem;
}

.pairing-code {
  margin: 0.8rem 0;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--brass-dim);
  color: var(--brass);
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: 0.16em;
}

.tokens-once {
  font-family: var(--sans);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
  user-select: all;
}

.proposal-details {
  display: grid;
  gap: 0.55rem;
  margin: 0.8rem 0;
  border-top: 1px solid var(--hairline);
  padding-top: 0.75rem;
}

.proposal-detail-label {
  margin: 0;
  color: var(--stone-dim);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.proposal-detail-value {
  margin: 0.15rem 0 0;
  color: var(--ivory);
  font-size: 0.9rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.link-action-wrap {
  margin-top: 0.9rem;
}

.link-action {
  display: inline-block;
  text-decoration: none;
}

.link-action-fallback {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--stone);
  overflow-wrap: anywhere;
}

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

@media (max-width: 390px) {
  .tab {
    font-size: 0.6rem;
    letter-spacing: 0.03em;
  }

  .tab-mark {
    font-size: 0.58rem;
  }
}

/* Routines, connections and activity */

.tabbar {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.tab {
  flex: 0 0 auto;
  min-width: 4.6rem;
}

.pause-section {
  border-color: var(--brass-dim);
}

.day-profile-week {
  display: grid;
  gap: 0.6rem;
  margin: 1rem 0 1.2rem;
}

.day-row {
  border: 1px solid var(--hairline);
  background: var(--panel);
  padding: 0.8rem 0.9rem;
}

.day-row.is-set {
  border-color: var(--brass-dim);
}

.day-row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.55rem;
}

.day-name {
  font-family: var(--serif);
  font-size: 1.02rem;
  color: var(--ivory);
}

.day-row-fields {
  display: grid;
  grid-template-columns: minmax(8rem, 1.4fr) 1fr 1fr;
  gap: 0.55rem;
}

.override-block {
  border-top: 1px solid var(--hairline);
  margin-top: 1rem;
  padding-top: 1rem;
}

.moved-head {
  margin-top: 1.4rem;
}

.moved-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--stone);
  font-size: 0.9rem;
}

.moved-list li {
  margin: 0.25rem 0;
}

.routine-list {
  display: grid;
  gap: 0.8rem;
  margin-top: 0.9rem;
}

.routine-item {
  border: 1px solid var(--hairline);
  background: var(--panel);
  padding: 1rem 1.05rem;
}

.routine-item.is-on {
  border-color: var(--brass-dim);
}

.routine-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.routine-title h3,
.connection-head h3,
.helper-item h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.12rem;
  color: var(--ivory);
}

.routine-description,
.connection-detail,
.helper-knows,
.helper-may {
  margin: 0.35rem 0 0;
  color: var(--stone);
  font-size: 0.88rem;
}

.routine-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.7rem 0 0;
}

.routine-when,
.need-chip {
  border: 1px solid var(--hairline);
  padding: 0.12rem 0.45rem;
  color: var(--stone-dim);
  font-size: 0.7rem;
  letter-spacing: 0.03em;
}

.need-chip {
  border-style: dashed;
}

.routine-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.routine-output {
  border-top: 1px solid var(--hairline);
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  color: var(--stone);
  font-size: 0.9rem;
}

.routine-output p {
  margin: 0.3rem 0;
  white-space: pre-wrap;
}

.routine-preview-title {
  color: var(--ivory);
  font-weight: 600;
}

.routine-preview-steps {
  margin: 0.4rem 0;
  padding-left: 1.2rem;
}

.routine-preview-steps li {
  margin: 0.35rem 0;
}

.routine-tool-section {
  border-top: 1px solid var(--hairline);
  padding-top: 1.5rem;
}

.debrief-form,
.style-fields {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.8rem;
}

.connections-list {
  display: grid;
  gap: 0.9rem;
  margin: 1rem 0 2rem;
}

.connection-item {
  border: 1px solid var(--hairline);
  background: var(--panel);
  padding: 1rem 1.05rem;
}

.connection-item.is-connected {
  border-color: var(--brass-dim);
}

.connection-item.is-missing {
  opacity: 0.92;
}

.connection-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.connection-status {
  color: var(--brass);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.connection-item.is-missing .connection-status {
  color: var(--stone-dim);
}

.connection-list-block {
  margin-top: 0.8rem;
}

.connection-bullets {
  margin: 0.3rem 0 0;
  padding-left: 1.1rem;
  color: var(--stone);
  font-size: 0.85rem;
}

.helpers-section {
  border-top: 1px solid var(--hairline);
  padding-top: 1.5rem;
}

.helpers-list {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}

.helper-item {
  border: 1px solid var(--hairline);
  background: var(--panel);
  padding: 1rem 1.05rem;
}

.activity-list {
  display: grid;
  gap: 0.7rem;
  margin-top: 1rem;
}

.activity-item {
  border: 1px solid var(--hairline);
  background: var(--panel);
  padding: 0.85rem 1rem;
}

.activity-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--stone-dim);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.activity-summary {
  margin: 0.4rem 0 0.6rem;
  color: var(--ivory);
  font-size: 0.92rem;
}

.style-fields textarea {
  min-height: 4.5rem;
}

@media (max-width: 640px) {
  .day-row-fields {
    grid-template-columns: 1fr 1fr;
  }

  .day-row-fields .field:first-child {
    grid-column: 1 / -1;
  }

  .routine-head,
  .connection-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
  }
}

.recall-row {
  border-top: 1px solid var(--hairline);
  margin-top: 0.7rem;
  padding-top: 0.7rem;
}

.recall-question {
  margin: 0.2rem 0;
  color: var(--ivory);
  font-size: 0.92rem;
}

.connection-head,
.routine-head {
  flex-wrap: wrap;
}

.phone-links .button {
  min-width: 9rem;
}

.budget-routines {
  border-top: 1px solid var(--hairline);
  margin-top: 0.9rem;
  padding-top: 0.8rem;
}

.budget-routines p {
  margin: 0.25rem 0;
}

.tts-samples {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.tts-sample {
  border: 1px solid var(--hairline);
  background: var(--panel);
  padding: 0.7rem 0.8rem;
}

.tts-sample-text {
  margin: 0 0 0.5rem;
  color: var(--stone);
  font-size: 0.86rem;
}
