:root {
  color-scheme: dark;
  --bg: #08110f;
  --surface: rgba(17, 34, 30, 0.9);
  --surface-strong: #142b25;
  --border: rgba(176, 233, 208, 0.18);
  --text: #eefaf5;
  --muted: #9ab8ad;
  --accent: #76efb5;
  --accent-strong: #35d995;
  --danger: #ff9e9e;
  --amber: #f2c46d;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

.capture-frame-link {
  display: block;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #090b12;
}

.capture-frame {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 680px;
  object-fit: contain;
}

.capture-frame-full {
  overflow: auto;
  max-height: 78vh;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: #090b12;
  touch-action: pinch-zoom;
}

.capture-frame-full img {
  display: block;
  width: auto;
  min-width: 100%;
  max-width: none;
  margin: 0 auto;
}

.source-capture-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.source-capture-card {
  display: grid;
  gap: 7px;
  overflow: hidden;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 16px;
  color: inherit;
  text-decoration: none;
  background: var(--surface-soft);
}

.source-capture-card img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: top;
  border-radius: 10px;
  background: #090b12;
}

.source-capture-card span {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.75rem;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-list form {
  margin: 0;
}

button.chip {
  min-height: 36px;
  padding: 7px 12px;
  border-radius: 999px;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(53, 217, 149, 0.16), transparent 32rem),
    radial-gradient(circle at 90% 80%, rgba(54, 132, 255, 0.12), transparent 34rem),
    linear-gradient(145deg, #07100e 0%, #0a1814 55%, #07100e 100%);
  line-height: 1.55;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  color: #b4f9d8;
}

.site-header-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.site-header {
  width: min(1120px, calc(100% - 40px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Eyebrow+headline on the left, action icons (select all/none, delete
   all, etc.) pinned to the right of the same header band — used on
   every view that has page-level actions, so those actions land in one
   consistent place instead of a separate row or a bottom button-row. */
.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.page-header .eyebrow { margin-bottom: 4px; }
.page-header h1 { margin: 0; }
.page-header .icon-actions { margin-top: 4px; }

/* A disclaimer folded into the end of an explanatory paragraph rather
   than sitting as its own separate note — closed by default, expands
   inline when the ❗ is clicked. */
.disclaimer-inline {
  display: inline;
}
.disclaimer-inline summary {
  display: inline;
  cursor: pointer;
  list-style: none;
}
.disclaimer-inline summary::-webkit-details-marker { display: none; }
.disclaimer-inline summary::marker { content: ""; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(118, 239, 181, 0.55);
  border-radius: 10px;
  color: #062016;
  background: linear-gradient(145deg, #a3f7cf, var(--accent-strong));
  box-shadow: 0 8px 28px rgba(53, 217, 149, 0.2);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  font-size: 0.9rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--text);
}

.nav-minor {
  opacity: 0.65;
  font-size: 0.82rem;
}

.auth-shell,
.content-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.auth-shell {
  min-height: calc(100vh - 112px);
  display: grid;
  place-items: center;
  padding: 32px 0 80px;
}

.auth-card,
.content-card {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(155deg, rgba(24, 49, 42, 0.94), var(--surface));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.auth-card {
  width: min(100%, 480px);
  padding: clamp(28px, 6vw, 48px);
}

.content-shell {
  padding: 48px 0 80px;
}

.content-card {
  padding: clamp(28px, 5vw, 56px);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.025em;
}

h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 8vw, 3rem);
}

h2 {
  margin-top: 0;
}

p {
  color: var(--muted);
}

form {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

form p {
  display: grid;
  gap: 7px;
  margin: 0;
}

label {
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 650;
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  color: var(--text);
  background: rgba(4, 16, 13, 0.72);
  font: inherit;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 4px rgba(53, 217, 149, 0.13);
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-strong);
}

button,
input[type="submit"],
.button-link {
  min-height: 48px;
  padding: 11px 20px;
  border: 0;
  border-radius: 12px;
  color: #052016;
  background: linear-gradient(135deg, #a1f4cc, var(--accent-strong));
  box-shadow: 0 12px 32px rgba(53, 217, 149, 0.18);
  cursor: pointer;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

button:hover,
input[type="submit"]:hover {
  filter: brightness(1.08);
}

hr {
  height: 1px;
  margin: 32px 0;
  border: 0;
  background: var(--border);
}

ul {
  padding-left: 20px;
}

.auth-card > ul:not(.messages) {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;
}

.messages {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;
}

.messages li {
  padding: 12px 16px;
  border: 1px solid rgba(255, 158, 158, 0.3);
  border-radius: 12px;
  color: var(--danger);
  background: rgba(109, 30, 30, 0.25);
}

.messages li.success,
.messages li.info {
  border-color: rgba(118, 239, 181, 0.4);
  color: var(--accent);
  background: rgba(53, 217, 149, 0.12);
}

.messages li.warning {
  border-color: rgba(255, 206, 135, 0.4);
  color: #ffce87;
  background: rgba(120, 80, 10, 0.2);
}

.errorlist {
  padding: 12px 16px;
  border: 1px solid rgba(255, 158, 158, 0.3);
  border-radius: 12px;
  color: var(--danger);
  background: rgba(109, 30, 30, 0.25);
  list-style: none;
}

.helptext {
  color: var(--muted);
  font-size: 0.82rem;
}

.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;
}

.dismiss-form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.stats-grid,
.provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin: 24px 0;
}

.stats-grid > div,
.stats-grid > .stat-link,
.sub-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(4, 16, 13, 0.42);
}

.stat-link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: border-color 140ms ease, transform 140ms ease, background 140ms ease;
}

.stat-link:hover {
  border-color: rgba(118, 239, 181, 0.62);
  color: inherit;
  background: rgba(53, 217, 149, 0.08);
  transform: translateY(-2px);
}

/* The one stat meant to feel like a small win, not just a data point --
   same accent used for :hover on every other stat card, just always on. */
.stat-highlight {
  border-color: rgba(118, 239, 181, 0.45);
  background: rgba(53, 217, 149, 0.06);
}

.model-priority-list {
  margin: 8px 0 12px;
  padding-left: 22px;
}

.model-priority-list li + li {
  margin-top: 4px;
}

.memory-actions {
  flex-wrap: nowrap;
  justify-content: space-between;
}

.memory-actions > button,
.memory-actions > form {
  flex: 1;
}

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

.stats-grid strong,
.stats-grid span {
  display: block;
}

.stats-grid strong {
  color: var(--accent);
  font-size: 1.6rem;
}

.stats-grid span {
  color: var(--muted);
  font-size: 0.82rem;
}

.stats-grid.stats-compact {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.stats-grid.stats-compact > .stat-link {
  padding: 10px 12px;
  border-radius: 12px;
}

.stats-grid.stats-compact strong {
  font-size: 1.1rem;
}

.stats-grid.stats-compact span {
  font-size: 0.72rem;
}

.episode-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.callout {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(53, 217, 149, 0.06);
}

/* The deterministic Inbox/To-Do "latest" summary line -- quieter than a
   callout since it's routine status, not something needing attention. */
.inbox-summary {
  color: var(--muted);
  font-size: 0.92em;
  margin: -4px 0 12px;
}

.raw-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  margin-top: 28px;
}

/* Grid items get an implicit min-width:auto that falls back to their
   content's intrinsic minimum size — for a row containing a screenshot,
   that's the image's native pixel width, which can force the whole row
   (and the page) wider than the viewport even though the image itself
   has max-width:100%. minmax(0, 1fr) on the track above handles the
   track; this handles the item itself, since a grid item's own auto
   minimum is resolved independently of its track's sizing function. */
.raw-entry {
  min-width: 0;
}

.raw-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.raw-meta-grid div {
  min-width: 0;
}

.raw-meta-grid span,
.raw-meta-grid strong {
  display: block;
}

.raw-meta-grid span {
  color: var(--muted);
  font-size: 0.76rem;
}

.raw-meta-grid strong {
  overflow-wrap: anywhere;
}

.raw-entry pre {
  max-height: 32rem;
  margin: 0;
  padding: 16px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.28);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.pipeline-flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin: 26px 0 42px;
}

.pipeline-flow > .sub-card > span:first-child {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #052016;
  background: var(--accent);
  font-weight: 800;
}

.pipeline-flow form {
  display: block;
  margin-top: 14px;
}

.spaced-section {
  margin-top: 30px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button-row form {
  display: block;
  margin: 0;
}

button.secondary {
  color: var(--text);
  background: var(--surface-strong);
}

.button-link.secondary {
  color: var(--text);
  background: var(--surface-strong);
  box-shadow: none;
}

button.danger {
  color: #2b0505;
  background: var(--danger);
}

.preserve-lines {
  white-space: pre-wrap;
}

.sensitive-note {
  padding: 12px 14px;
  border-left: 3px solid var(--danger);
  background: rgba(109, 30, 30, 0.18);
}

.raw-observation summary,
.help-panel summary {
  color: var(--text);
  cursor: pointer;
  font-weight: 650;
}

.raw-observation pre {
  max-height: 24rem;
  overflow: auto;
  white-space: pre-wrap;
  color: var(--text);
}

.topic-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 24px 0 36px;
}

.topic-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topic-chips span {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(53, 217, 149, 0.08);
  font-size: 0.82rem;
}

.help-panel {
  margin: 18px 0;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.inline-fields {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(120px, 1fr);
  gap: 14px;
}

.provider-setup {
  display: grid;
  gap: 18px;
  max-width: 760px;
}

.setup-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(150px, 1fr);
  gap: 14px;
}

.setup-row p,
.connection-actions p {
  margin: 0;
}

.connection-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.model-radio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.model-radio {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(4, 16, 13, 0.32);
  cursor: pointer;
}

.model-radio:has(input:checked) {
  border-color: var(--accent);
  background: rgba(53, 217, 149, 0.09);
}

.model-queue-list {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.model-queue-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px 9px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(4, 16, 13, 0.32);
}

.model-queue-name {
  overflow-wrap: anywhere;
  font-weight: 700;
}

.model-queue-role,
.model-queue-empty {
  color: var(--muted);
  font-size: 0.78rem;
}

.model-queue-actions {
  display: flex;
  gap: 5px;
}

.model-queue-actions button {
  min-width: 34px;
  min-height: 34px;
  padding: 4px 8px;
}

.model-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.model-discovery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.model-discovery-grid button {
  min-height: 40px;
  padding: 8px 12px;
  overflow-wrap: anywhere;
}

@media (max-width: 560px) {
  .model-queue-item {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .model-queue-role {
    grid-column: 1;
  }

  .model-queue-actions {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .model-add-row {
    grid-template-columns: 1fr;
  }
}

.wizard-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 24px 0;
  padding: 0;
  list-style: none;
}

.wizard-steps li,
.wizard-panel {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(4, 16, 13, 0.42);
}

.wizard-steps li {
  display: grid;
  gap: 5px;
  padding: 14px;
}

.wizard-steps strong {
  color: var(--text);
  font-size: 0.86rem;
}

.wizard-steps span,
.auth-choice small {
  color: var(--muted);
  font-size: 0.78rem;
}

.wizard-panel {
  display: grid;
  gap: 16px;
  margin-top: 14px;
  padding: clamp(18px, 3vw, 26px);
}

.wizard-panel h3,
.wizard-panel p,
.wizard-panel .button-row {
  margin: 0;
}

.step-kicker {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.auth-methods,
.oauth-connect-panel {
  display: grid;
  gap: 10px;
}

.auth-choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(4, 16, 13, 0.32);
  cursor: pointer;
}

.auth-choice span,
.auth-choice strong,
.auth-choice small {
  display: block;
}

.connection-state {
  padding: 10px 12px;
  border-left: 3px solid var(--border);
  background: rgba(4, 16, 13, 0.3);
}

.connection-state.is-success {
  border-left-color: var(--accent-strong);
  color: var(--text);
}

.connection-state.is-error {
  border-left-color: var(--danger);
  color: var(--text);
}

[hidden] {
  display: none !important;
}

.checkbox-row {
  display: flex;
  align-items: center;
}

code {
  overflow-wrap: anywhere;
  color: var(--accent);
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(53, 217, 149, 0.1);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.88em;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 999px;
  color: #052016;
  background: var(--accent);
  font-size: 0.72rem;
  font-weight: 750;
}

.badge.urgent {
  color: #2b0505;
  background: var(--danger);
}

.badge.important {
  color: #052016;
  background: var(--accent);
}

/* minmax(0, 1fr) and min-width: 0 let the chat shrink to the page: a grid
   column otherwise grows to its longest URL or code line (2026-10-14). */
.chat-thread {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin: 24px 0;
}

.chat-message {
  max-width: 100%;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(4, 16, 13, 0.42);
}

.chat-message.chat-user {
  justify-self: stretch;
  background: rgba(53, 217, 149, 0.1);
}

.chat-message.chat-assistant {
  justify-self: stretch;
}

.ai-chat-view {
  max-width: 900px;
  margin-inline: auto;
}

.chat-question {
  color: var(--muted);
}

/* Answer actions, like Android's chat (2026-10-14): the asked-for message in
   its own card, the reminder an answer set (with Undo), the To-Do's ⏰/📍. */
.chat-draft {
  border-color: rgba(118, 239, 181, 0.5);
  background: rgba(118, 239, 181, 0.1);
}

.ai-reminder-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0;
  color: var(--accent);
}

.commitment-row[hidden] {
  display: none;
}

.list-search {
  width: 100%;
  margin: 0 0 8px;
}

.chat-todo-plan {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.chat-answer {
  padding: 20px;
  border-color: rgba(118, 239, 181, 0.35);
  background: rgba(118, 239, 181, 0.06);
}

.chat-model-hint,
.chat-answer-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.chat-answer-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.answer-sources {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  word-break: break-all;
}

.chat-answer-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.chat-answer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
  margin-top: 0;
}

.chat-answer-actions form {
  margin: 0;
}

.chat-answer-actions button {
  min-height: 36px;
  padding: 6px 10px;
}

.chat-answer-actions .copy-answer {
  margin-left: auto;
}

.chat-answer-actions svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chat-working {
  color: var(--muted);
}

.chat-send-state {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.chat-send-state:empty {
  display: none;
}

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

.ai-handoff-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  width: 100%;
  max-width: 100%;
  gap: 10px;
  margin: 18px 0;
  padding: 7px;
  border: 1px solid rgba(176, 233, 208, 0.14);
  border-radius: 15px;
  background: rgba(4, 16, 13, 0.55);
  overflow-x: auto;
}

.clipboard-button,
.ai-handoff-link {
  width: 100%;
  min-height: 44px;
  padding: 10px 15px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  color: var(--text);
  background: var(--surface-strong);
  box-shadow: none;
}

.clipboard-button svg,
.ai-handoff-link svg {
  width: 20px;
  height: 20px;
}

.clipboard-button svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ai-handoff-link svg {
  fill: currentColor;
}

.clipboard-button.copied {
  color: var(--accent);
  border-color: var(--accent);
}

.ai-handoff-link {
  gap: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: transform 120ms ease, filter 120ms ease, border-color 120ms ease;
}

.ai-handoff-link:hover,
.clipboard-button:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.ai-handoff-link:focus-visible,
.clipboard-button:focus-visible {
  outline: 3px solid rgba(118, 239, 181, 0.45);
  outline-offset: 2px;
}

.ai-handoff-link.launching {
  opacity: 0.78;
}

.chatgpt-link {
  color: #f5f7f6;
  background: #202123;
}

.claude-link {
  color: #2d211c;
  background: #da7756;
}

.handoff-state {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.handoff-state:empty {
  display: none;
}

.markdown-table-wrap {
  max-width: 100%;
  margin: 12px 0;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.markdown-table {
  width: 100%;
  border-collapse: collapse;
  white-space: normal;
  background: rgba(4, 16, 13, 0.38);
}

.markdown-table th,
.markdown-table td {
  padding: 10px 12px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.markdown-table th:last-child,
.markdown-table td:last-child {
  border-right: 0;
}

.markdown-table tbody tr:last-child td {
  border-bottom: 0;
}

.markdown-table th {
  color: var(--accent);
  background: rgba(53, 217, 149, 0.09);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.markdown-table .align-left { text-align: left; }
.markdown-table .align-center { text-align: center; }
.markdown-table .align-right { text-align: right; }

.markdown-heading {
  margin: 14px 0 4px;
  color: var(--text);
}

.markdown-list {
  margin: 8px 0;
  padding-left: 22px;
}

.markdown-content {
  overflow-wrap: anywhere;
}

.markdown-list li {
  margin: 4px 0;
}

.markdown-code {
  display: block;
  margin: 12px 0;
  padding: 12px 14px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(4, 16, 13, 0.5);
  white-space: pre;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.86rem;
}

.markdown-code .code-lang {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: inherit;
}

.markdown-code code {
  padding: 0;
  background: transparent;
}

.markdown-quote {
  margin: 10px 0;
  padding: 4px 0 4px 14px;
  border-left: 3px solid var(--border);
  color: var(--muted);
  font-style: italic;
  white-space: pre-wrap;
}

.chat-form {
  display: grid;
  gap: 10px;
}

.chat-form textarea {
  min-height: 90px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  background: rgba(4, 16, 13, 0.72);
  font: inherit;
  resize: vertical;
}

.badge.stage-active {
  color: #052016;
  background: var(--accent);
}

.badge.stage-nascent {
  color: var(--text);
  background: var(--surface-strong);
}

.badge.stage-dormant {
  color: var(--muted);
  background: rgba(154, 184, 173, 0.18);
}

.badge.stage-resolved {
  color: #062016;
  background: rgba(118, 239, 181, 0.4);
}

.card-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0;
}

.button-link.disabled {
  opacity: 0.35;
  pointer-events: none;
}

.raw-entry-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.raw-entry-title {
  margin: 2px 0 8px;
  color: var(--accent);
  font-weight: 600;
}

.delete-x-form {
  margin: 0;
  flex-shrink: 0;
}

.delete-x {
  min-height: 34px;
  min-width: 34px;
  padding: 0;
  border-radius: 999px;
  color: var(--danger);
  background: rgba(109, 30, 30, 0.25);
  box-shadow: none;
  font-size: 1.2rem;
  line-height: 1;
}

.delete-x:hover {
  background: rgba(109, 30, 30, 0.4);
  filter: none;
}

.provider-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  margin: 24px 0;
}

.provider-columns h2 {
  margin-bottom: 12px;
  font-size: 1.05rem;
}

.provider-columns .provider-grid {
  margin: 0;
  grid-template-columns: 1fr;
}

.storage-categories {
  display: grid;
  gap: 16px;
  margin: 24px 0;
}

.storage-category-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.storage-category-header h2 {
  margin: 0;
  font-size: 1.1rem;
}

.storage-heaviest {
  margin: 6px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.86rem;
}

.screen-canvas {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 20px 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.screen-node {
  position: absolute;
  padding: 1px 2px;
  overflow: hidden;
  border: 1px solid rgba(118, 239, 181, 0.35);
  background: rgba(53, 217, 149, 0.08);
}

.screen-node span {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 0.62rem;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Material-style briefing surfaces shared with the Android app. */
.page-heading,
.briefing-toolbar,
.topic-card-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.lead {
  max-width: 68ch;
  font-size: 1.05rem;
}

.briefing-form {
  margin-top: 24px;
}

.focus-prompt {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(118, 239, 181, 0.07);
}

.focus-row {
  display: flex;
  gap: 10px;
}

.focus-row input {
  flex: 1;
}

/* Editing a commitment's wording: a one-line input was cramped for
   anything longer than a few words, especially now that voice capture
   can hand you a whole rambling sentence to tidy up. */
.focus-row-textarea {
  align-items: flex-end;
}
.focus-row-textarea textarea {
  flex: 1;
  min-height: 4.5em;
  resize: vertical;
  font: inherit;
}

#chat-send {
  width: 46px;
  min-width: 46px;
  padding: 11px;
}

#chat-send svg {
  display: block;
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.briefing-toolbar {
  position: sticky;
  top: 8px;
  z-index: 5;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(20, 43, 37, 0.96);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(18px);
}

.briefing-list {
  display: grid;
  gap: 12px;
}

.briefing-group {
  margin: 26px 2px 2px;
  color: var(--text);
  font-size: 1rem;
}

.briefing-card {
  position: relative;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(25, 48, 42, 0.96), rgba(10, 27, 22, 0.94));
  box-shadow: 0 12px 42px rgba(0, 0, 0, 0.22);
}

.briefing-card.priority-4,
.briefing-card.priority-5 {
  border-color: rgba(118, 239, 181, 0.52);
  background: linear-gradient(145deg, rgba(35, 67, 57, 0.98), rgba(12, 35, 28, 0.96));
}

.briefing-card.priority-1,
.briefing-card.priority-2 {
  opacity: 0.78;
}

.topic-card-main {
  align-items: flex-start;
  justify-content: flex-start;
}

.topic-glyph {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #052016;
  background: var(--accent);
  font-size: 1.25rem;
  font-weight: 850;
}

.topic-copy {
  min-width: 0;
  flex: 1;
}

.topic-copy h3,
.topic-copy p {
  margin: 4px 0 8px;
}

.topic-select {
  position: absolute;
  top: 16px;
  right: 16px;
}

.topic-select span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.star-rating,
.compact-stars {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 10px;
}

.compact-stars form {
  display: block;
  margin: 0;
}

button.star {
  min-width: 34px;
  min-height: 34px;
  padding: 2px;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
  font-size: 1.15rem;
}

button.star.selected {
  color: #ffd76a;
}

.star-static {
  color: var(--muted);
}

.star-static.selected {
  color: #ffd76a;
}

.trace-box {
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(118, 239, 181, 0.07);
}

.trace-box p,
.trace-link {
  margin: 5px 0;
  font-size: 0.88rem;
}

.button-row.compact button {
  min-height: 38px;
  padding: 7px 12px;
}

.mobile-nav {
  display: none;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f5fbf8;
    --surface: rgba(250, 255, 252, 0.94);
    --surface-strong: #dcefe7;
    --border: rgba(22, 72, 55, 0.18);
    --text: #10251e;
    --muted: #536b62;
    --amber: #b7791f;
    --shadow: 0 20px 60px rgba(20, 68, 51, 0.12);
  }

  body {
    background: linear-gradient(145deg, #f4fbf7, #eaf6f0);
  }

  .content-card,
  .auth-card,
  .briefing-card {
    background: rgba(255, 255, 255, 0.88);
  }

  .briefing-toolbar {
    background: rgba(245, 253, 249, 0.96);
  }
}

@media (max-width: 620px) {
  /* .site-nav is already hidden at this width (dashboard pages have the
     bottom mobile-nav instead; login/signup pages need no nav at all) —
     dropping the brand mark too leaves nothing in this bar, so hide the
     whole header rather than leave an empty strip taking up space. */
  .site-header {
    display: none;
  }

  .auth-shell,
  .content-shell {
    width: min(100% - 24px, 1120px);
  }

  .auth-card,
  .content-card {
    border-radius: 18px;
    padding: 20px 16px;
  }

  .inline-fields {
    grid-template-columns: 1fr;
  }

  .content-shell {
    padding: 20px 0 104px;
  }

  .mobile-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 7px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: rgba(12, 31, 25, 0.96);
    box-shadow: 0 12px 42px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(20px);
  }

  .mobile-nav a {
    display: grid;
    gap: 1px;
    place-items: center;
    padding: 6px 2px;
    color: var(--muted);
    font-size: 0.68rem;
    text-decoration: none;
  }

  /* Icon glyph only -- .badge is also a <span> here, and this rule's
     color/font-size used to apply to it too, forcing badge text to the
     same color as its own accent-colored pill background (invisible
     number) at a size that read as a plain solid dot rather than a count. */
  .mobile-nav span:not(.badge) {
    color: var(--accent);
    font-size: 1.15rem;
  }

  .mobile-nav .badge {
    font-size: 0.62rem;
    padding: 0 5px;
  }

  .briefing-toolbar,
  .page-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .focus-row {
    align-items: stretch;
    flex-direction: column;
  }

  .briefing-toolbar {
    top: 4px;
  }

  .topic-card-main {
    padding-right: 20px;
  }

  .topic-glyph {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    border-radius: 15px;
  }
}

/* Icon-only actions. min-height:48px from the global button rule is what
   was still eating space here — icon buttons don't need a 48px tap target
   stack, just a comfortable square. */
/* Reminder chip + action icons share one wrapping row so they read as
   one control line on a wide-enough card, and only spill onto a second
   line (together, not as two separate always-stacked rows) when the
   card is too narrow to fit both. */
.commitment-row-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.commitment-row-controls .icon-actions {
  margin-top: 0;
  flex-shrink: 0;
  margin-left: auto;
}
/* Reminder/location toggles now live inside .icon-actions as plain
   icon buttons (their own date/label text moved to the eyebrow line
   above), so they read as one control line with Done/Ask AI/Delete
   instead of a separate, wider chip row. Collapsed, they're compact
   like their siblings; opened, the revealed form (a datetime picker or
   a search box) takes the full row width on its own wrapped line
   rather than squeezing in beside the icons. */
.icon-actions .inline-field {
  display: inline-flex;
  flex: 0 0 auto;
  min-width: 0;
}
.icon-actions .inline-field .field-toggle {
  min-height: 34px;
  min-width: 34px;
  padding: 0.25rem;
  font-size: 1rem;
  line-height: 1;
}
.icon-actions .inline-field.is-open {
  flex-basis: 100%;
}

.bulk-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

/* Mirror Android's selected-Inbox command overlay. One selection retains its
   per-row actions; two or more keep the batch commands within reach. */
.ajax-zone:has(.selection-command-bar) {
  padding-bottom: 96px;
}

.selection-command-bar {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  width: min(calc(100vw - 32px), 720px);
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface-strong) 92%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.selection-command-bar[hidden] {
  display: none;
}

.selection-command-count {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 650;
  white-space: nowrap;
}

.row-select {
  align-self: center;
  margin: 0;
}

.icon-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}
.icon-actions form { display: inline-flex; margin: 0; }
.icon-actions button {
  min-height: 34px;
  min-width: 34px;
  padding: 0.25rem;
  font-size: 1rem;
  line-height: 1;
  box-shadow: none;
}

@media (max-width: 620px) {
  .ajax-zone:has(.selection-command-bar) {
    padding-bottom: 166px;
  }

  .selection-command-bar {
    bottom: 86px;
    gap: 6px;
    padding: 8px;
    border-radius: 16px;
  }

  .selection-command-bar button {
    min-height: 36px;
    padding: 0.35rem 0.5rem;
    font-size: 0.8rem;
  }
}

/* The "also ask AI" checkbox riding alongside Accept -- same row height
   as the icon buttons next to it, opacity fades in on check so a
   checked state actually reads as "on" at a glance. */
.accept-form {
  align-items: center;
  gap: 4px;
}
.ai-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 2px;
  font-size: 1rem;
  opacity: 0.45;
  cursor: pointer;
}
.ai-toggle:has(input:checked) {
  opacity: 1;
}
.ai-toggle input {
  margin: 0 2px 0 0;
}

/* A field that's a static display by default, toggled into its <form>
   by data-field-toggle — the edit box / reminder picker no longer sit
   permanently open on every row. */
.inline-field .field-form,
.inline-field.is-open .field-display {
  display: none;
}
.inline-field.is-open .field-form {
  display: flex;
}
.field-toggle {
  display: inline-block;
  padding: 0;
  border: 0;
  color: inherit;
  background: none;
  box-shadow: none;
  cursor: pointer;
  text-align: left;
}
.location-field-form { display: flex; flex-direction: column; gap: 6px; }
.location-suggestions { display: flex; flex-direction: column; gap: 4px; }
.location-suggestion-form { margin: 0; }
.location-suggestion {
  width: 100%;
  text-align: left;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--text);
  font-size: 0.82rem;
  box-shadow: none;
}
.inline-field-title .field-toggle {
  display: block;
  width: 100%;
  min-height: 0;
}
.inline-field-title h3 { margin: 0; }
.commitment-row .eyebrow { margin: 4px 0 0; }
.commitment-row .field-form { margin-top: 6px; }
.commitment-row-date { text-align: right; }

/* Answer model picker ("Run with…"), web toggle and earlier versions. */
.run-with {
  position: relative;
}

.run-with > summary {
  list-style: none;
  cursor: pointer;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
}

.run-with > summary::-webkit-details-marker {
  display: none;
}

.run-with-menu {
  position: absolute;
  z-index: 5;
  min-width: 240px;
  max-height: 60vh;
  overflow-y: auto;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-strong);
}

.run-with-connection + .run-with-connection {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.run-with-menu .eyebrow {
  margin: 4px 0;
}

.run-with-menu .link-button {
  display: block;
  width: 100%;
  min-height: 0;
  padding: 4px 2px;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.run-with-menu .link-button:hover,
.run-with-menu .link-button:focus-visible {
  text-decoration: underline;
}

.web-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.answer-versions {
  margin-top: 8px;
  color: var(--muted);
}

.answer-versions > summary {
  cursor: pointer;
}

.answer-version {
  margin-top: 8px;
  padding-left: 10px;
  border-left: 2px solid var(--border);
}

/* Per-chat AI usage (task detail). */
.ai-usage {
  margin: 8px 0;
  color: var(--muted);
}

.ai-usage > summary {
  cursor: pointer;
}

.ai-usage-totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 6px 16px;
  margin: 8px 0;
}

.ai-usage-totals dt {
  font-size: 0.8rem;
}

.ai-usage-totals dd {
  margin: 0;
  color: inherit;
}

.ai-usage-calls {
  width: 100%;
  font-size: 0.85rem;
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
}

.ai-usage-calls th,
.ai-usage-calls td {
  padding: 3px 8px 3px 0;
  text-align: left;
  white-space: nowrap;
}

/* The original question frames the chat at the top in the button green,
   more emphasized than the first answer (user request, 2026-09-27). */
.chat-question {
  margin-bottom: 14px;
  padding: 12px 16px;
  border: 1px solid var(--accent);
  border-radius: 12px;
  background: rgba(118, 239, 181, 0.14);
  color: var(--text);
}

.chat-question > summary {
  cursor: pointer;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.chat-question[open] .chat-question-preview {
  display: none;
}

.chat-question-label {
  color: var(--accent);
  font-weight: 700;
}

.question-edit {
  margin-top: 10px;
}

.question-edit > summary {
  cursor: pointer;
  color: var(--accent);
}

.question-edit textarea {
  width: 100%;
  margin-top: 8px;
}

.question-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.question-suggestion {
  margin-top: 10px;
  padding: 10px;
  border: 1px dashed var(--accent);
  border-radius: 8px;
}

/* One prominent "Run with…" control; its suggested entry is highlighted. */
.run-with > summary {
  border-color: var(--accent);
  background: var(--accent);
  color: #06231a;
  font-weight: 700;
}

.run-with-suggested {
  margin-bottom: 6px;
  padding: 4px 6px;
  border-radius: 6px;
  background: rgba(118, 239, 181, 0.16);
}

.run-with-menu .run-with-suggested .link-button {
  color: var(--accent);
  font-weight: 700;
}

.chat-origin {
  margin-top: 18px;
}

/* Settings › System health */
.health-status { list-style: none; padding: 0; }
.health-status li { display: flex; justify-content: space-between; align-items: center; gap: 1em; padding: 2px 0; }
.health-status li .muted { text-align: right; }
.health-line-clock { stroke: var(--muted); stroke-dasharray: 4 3; }
.health-key-temperature { color: var(--accent); font-weight: 600; }
.health-key-clock { font-weight: 600; }
.health-axis-right { text-align: left; }
.table-scroll { overflow-x: auto; }
.health-apps td:not(:first-child), .health-apps th { text-align: right; }
.health-apps th[rowspan], .health-apps td:first-child { text-align: left; }
.health-status .health-down strong { color: var(--danger); }
.health-chart { width: 100%; height: 120px; display: block; background: var(--surface-strong); border-radius: 8px; }
.health-line { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.health-mark { stroke: var(--muted); stroke-width: 1; vector-effect: non-scaling-stroke; }
.health-chart-box { display: flex; gap: 6px; align-items: stretch; }
.health-axis-y { display: flex; flex-direction: column; justify-content: space-between; font-size: 0.75em; color: var(--muted); white-space: nowrap; text-align: right; width: 5.5em; flex: none; }
.health-chart-wrap { position: relative; flex: 1; min-width: 0; touch-action: pan-y; cursor: crosshair; }
.health-axis-x { position: relative; height: 1.4em; margin: 2px calc(5.5em + 8px) 1em; font-size: 0.75em; color: var(--muted); }
.health-axis-x span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.health-axis-x span:first-child { transform: none; }
.health-axis-x span:last-child { transform: translateX(-100%); }
.health-guide { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--text); opacity: 0.5; pointer-events: none; }
.health-dot { position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); pointer-events: none; }
.health-tooltip { position: absolute; top: 4px; padding: 6px 8px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); font-size: 0.8em; width: max-content; max-width: min(18em, 100%); z-index: 2; cursor: pointer; }
.health-tooltip strong { display: block; }
.health-hours { width: 100%; }
.health-bar-cell { position: relative; min-width: 120px; width: 40%; }
.health-bar { display: inline-block; height: 0.8em; vertical-align: middle; }
.health-bar-chat { background: var(--accent); }
.health-bar-background { background: var(--muted); }
.health-baseline { position: absolute; top: 15%; bottom: 15%; width: 2px; background: var(--text); }
@media (max-width: 600px) { .health-hours th:nth-child(5), .health-hours td:nth-child(5) { display: none; } }

/* Body page (wellbeing/body.html): 30-day bar charts and the "Now" tiles. */
.body-tiles { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9em, 1fr)); gap: 8px; }
.body-tiles li { background: var(--surface-strong); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.body-tiles strong { font-size: 1.2em; }
.body-chart-box { display: flex; gap: 6px; align-items: stretch; }
.body-chart { position: relative; flex: 1; min-width: 0; height: 120px; display: flex; align-items: flex-end; gap: 2px; padding: 0 2px; background: var(--surface-strong); border-radius: 8px; touch-action: pan-y; cursor: crosshair; }
.body-day { flex: 1; min-width: 0; height: 100%; display: flex; align-items: flex-end; }
.body-day.is-active { background: var(--border); }
.body-bar { width: 100%; background: var(--accent); border-radius: 2px 2px 0 0; }
.body-tooltip { position: absolute; top: 4px; padding: 4px 8px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); font-size: 0.8em; width: max-content; max-width: min(18em, 100%); pointer-events: none; z-index: 2; }
.body-bar-over { background: var(--danger); }
.body-bar-under { background: var(--amber); }
/* Nothing measured: a faint slot, never mistaken for a low value. */
.body-bar-empty { background: repeating-linear-gradient(135deg, var(--border) 0 3px, transparent 3px 7px); opacity: 0.6; }
/* Every chart's name left, its value right, in one line; same size everywhere. */
.body-chart-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 18px 0 4px; }
.body-chart-title h3 { margin: 0; font-size: 1.05rem; }
.body-readout { margin: 0; text-align: right; font-size: 0.95rem; color: var(--text); font-variant-numeric: tabular-nums; }
.body-note { margin: 0 0 4px; font-size: 0.85rem; }
.icon-actions a.icon-button { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; min-height: 34px; font-size: 1.2rem; text-decoration: none; border-radius: 8px; border: 1px solid var(--border); }
.body-marker { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--muted); pointer-events: none; }
.body-readings { padding-left: 1.2em; }
