/* AbracaDone on the web: the app's soft color wash behind glass cards (Liquid Glass), in light
   and dark, laid out for a laptop or a phone. No inline styles anywhere (the page's
   Content-Security-Policy forbids them), so every look is a class here. */

:root {
  color-scheme: light dark;
  --ink: #1c1c1e;
  --muted: #4a4a52;
  --line: rgba(255, 255, 255, 0.65);
  --glass: rgba(255, 255, 255, 0.58);
  --glass-strong: rgba(255, 255, 255, 0.78);
  --shadow: 0 10px 34px rgba(40, 30, 90, 0.14);
  --accent: #5b3fe0;
  --accent-ink: #ffffff;
  --focus: #5b3fe0;
  --red: #d70015;
  --orange: #c93400;
  --yellow: #a05a00;
  --green: #248a3d;
  --blue: #0040dd;
  --purple: #8944ab;
  --gray: #6c6c70;
  --dot-red: #ff3b30;
  --dot-orange: #ff9500;
  --dot-yellow: #ffcc00;
  --dot-green: #34c759;
  --dot-blue: #007aff;
  --dot-purple: #af52de;
  --dot-gray: #8e8e93;
  /* The color wash itself, apart from --wash (the background showing), which a chosen
     background's .wp-<id> replaces: the picker's Color Wash swatch always shows the wash. */
  --wash: var(--color-wash);
  --color-wash:
    radial-gradient(at 0% 0%, rgb(255 219 189) 0, transparent 55%),
    radial-gradient(at 50% 0%, rgb(255 204 214) 0, transparent 50%),
    radial-gradient(at 100% 0%, rgb(209 214 255) 0, transparent 55%),
    radial-gradient(at 0% 50%, rgb(219 242 230) 0, transparent 50%),
    radial-gradient(at 100% 50%, rgb(204 230 255) 0, transparent 50%),
    radial-gradient(at 0% 100%, rgb(199 235 245) 0, transparent 55%),
    radial-gradient(at 50% 100%, rgb(237 219 255) 0, transparent 50%),
    radial-gradient(at 100% 100%, rgb(255 230 204) 0, transparent 55%),
    rgb(247 237 219);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f2f2f7;
    --muted: #c7c7cc;
    --line: rgba(255, 255, 255, 0.14);
    --glass: rgba(30, 28, 44, 0.55);
    --glass-strong: rgba(36, 34, 52, 0.82);
    --shadow: 0 10px 34px rgba(0, 0, 0, 0.45);
    --accent: #9d8cff;
    --accent-ink: #120a33;
    --focus: #b9adff;
    --red: #ff6961;
    --orange: #ffb340;
    --yellow: #ffd426;
    --green: #30db5b;
    --blue: #70a8ff;
    --purple: #da8fff;
    --gray: #aeaeb2;
    --dot-red: #ff453a;
    --dot-orange: #ff9f0a;
    --dot-yellow: #ffd60a;
    --dot-green: #30d158;
    --dot-blue: #0a84ff;
    --dot-purple: #bf5af2;
    --dot-gray: #98989d;
    --color-wash:
      radial-gradient(at 0% 0%, rgb(61 31 26) 0, transparent 55%),
      radial-gradient(at 50% 0%, rgb(51 20 46) 0, transparent 50%),
      radial-gradient(at 100% 0%, rgb(20 26 66) 0, transparent 55%),
      radial-gradient(at 0% 50%, rgb(15 46 41) 0, transparent 50%),
      radial-gradient(at 100% 50%, rgb(15 36 71) 0, transparent 50%),
      radial-gradient(at 0% 100%, rgb(10 41 56) 0, transparent 55%),
      radial-gradient(at 50% 100%, rgb(41 20 66) 0, transparent 50%),
      radial-gradient(at 100% 100%, rgb(56 31 15) 0, transparent 55%),
      rgb(26 26 36);
  }
}

/* A background chosen in Settings › Appearance (wallpaper.js, /web/wallpapers/wallpapers.css)
   brings its own light or dark text, whatever the system's mode, like the iPhone. */
html.theme-light {
  color-scheme: light;
  --ink: #1c1c1e;
  --muted: #4a4a52;
  --line: rgba(255, 255, 255, 0.65);
  --glass: rgba(255, 255, 255, 0.58);
  --glass-strong: rgba(255, 255, 255, 0.78);
  --shadow: 0 10px 34px rgba(40, 30, 90, 0.14);
  --accent: #5b3fe0;
  --accent-ink: #ffffff;
  --focus: #5b3fe0;
  --red: #d70015;
  --orange: #c93400;
  --yellow: #a05a00;
  --green: #248a3d;
  --blue: #0040dd;
  --purple: #8944ab;
  --gray: #6c6c70;
  --dot-red: #ff3b30;
  --dot-orange: #ff9500;
  --dot-yellow: #ffcc00;
  --dot-green: #34c759;
  --dot-blue: #007aff;
  --dot-purple: #af52de;
  --dot-gray: #8e8e93;
}

html.theme-dark {
  color-scheme: dark;
  --ink: #f2f2f7;
  --muted: #c7c7cc;
  --line: rgba(255, 255, 255, 0.14);
  --glass: rgba(30, 28, 44, 0.55);
  --glass-strong: rgba(36, 34, 52, 0.82);
  --shadow: 0 10px 34px rgba(0, 0, 0, 0.45);
  --accent: #9d8cff;
  --accent-ink: #120a33;
  --focus: #b9adff;
  --red: #ff6961;
  --orange: #ffb340;
  --yellow: #ffd426;
  --green: #30db5b;
  --blue: #70a8ff;
  --purple: #da8fff;
  --gray: #aeaeb2;
  --dot-red: #ff453a;
  --dot-orange: #ff9f0a;
  --dot-yellow: #ffd60a;
  --dot-green: #30d158;
  --dot-blue: #0a84ff;
  --dot-purple: #bf5af2;
  --dot-gray: #98989d;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--wash);
  background-attachment: fixed;
}

/* A photo background (--wallpaper, from wallpapers.css) is shown whole: the phone's wallpapers
   are tall, and stretched across a wide window only a band from the middle showed (owner,
   2026-10-21). A blurred, enlarged copy fills the sides. Both stay put behind everything. */
body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
}

body::before {
  inset: -80px;
  z-index: -2;
  background: var(--wallpaper, none) center / cover no-repeat;
  filter: blur(48px);
}

body::after {
  inset: 0;
  z-index: -1;
  background: var(--wallpaper, none) center / contain no-repeat;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0;
}

h1 {
  font-size: 1.75rem;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 0.6rem;
}

.small {
  font-size: 0.85rem;
  color: var(--muted);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 0.5rem;
  top: -3rem;
  padding: 0.5rem 0.8rem;
  background: var(--glass-strong);
  border-radius: 10px;
  z-index: 10;
}

.skip:focus {
  top: 0.5rem;
}

/* Glass */

.glass {
  background: var(--glass);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  backdrop-filter: blur(22px) saturate(170%);
}

.card {
  border-radius: 24px;
  padding: 1rem 1.1rem;
  margin: 0 0 1rem;
}

.narrow {
  max-width: 30rem;
  width: 100%;
}

/* Signed out, not set up, switched off */

.center {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0;
}

.brand img {
  border-radius: 7px;
}

.center .brand {
  margin-bottom: 1rem;
}

.center h1 {
  margin-bottom: 0.75rem;
}

.notice {
  background: var(--glass-strong);
  border-radius: 12px;
  padding: 0.6rem 0.8rem;
  font-weight: 600;
}

.apple-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  margin: 1.25rem 0 1rem;
  padding: 0 1.25rem;
  border-radius: 999px;
  background: #000;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
}

@media (prefers-color-scheme: dark) {
  .apple-button {
    background: #fff;
    color: #000;
  }
}

.apple-logo {
  width: 1.15rem;
  height: 1.15rem;
}

/* The app's frame */

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem max(1rem, env(safe-area-inset-left));
  border-width: 0 0 1px;
  border-radius: 0;
}

.topbar nav {
  display: flex;
  gap: 0.25rem;
  flex: 1;
  justify-content: center;
}

.topbar nav a {
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

.topbar nav a[aria-current="page"] {
  background: var(--accent);
  color: var(--accent-ink);
}

main {
  max-width: 52rem;
  margin: 0 auto;
  padding: 1.25rem 1rem 6rem;
}

main:focus {
  outline: none;
}

.loading {
  color: var(--muted);
}

.screen-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0.25rem 0 1rem;
}

.screen-head p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 640px) {
  .topbar {
    flex-wrap: wrap;
    padding-top: max(0.5rem, env(safe-area-inset-top));
  }

  .topbar nav {
    order: 3;
    flex-basis: 100%;
    justify-content: space-between;
  }

  .topbar nav a {
    padding: 0.4rem 0.6rem;
    font-size: 0.95rem;
  }

  .signout {
    margin-left: auto;
  }

  h1 {
    font-size: 1.45rem;
  }
}

/* Buttons and fields */

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 40px;
  padding: 0 1rem;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.button.secondary {
  background: var(--glass-strong);
  color: var(--ink);
  border: 1px solid var(--line);
}

.button.danger {
  background: transparent;
  color: var(--red);
  border: 1px solid currentColor;
}

.button:disabled {
  opacity: 0.55;
  cursor: default;
}

.link {
  background: none;
  border: 0;
  padding: 0.35rem 0.5rem;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
}

.field {
  min-height: 42px;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--glass-strong);
  min-width: 0;
}

textarea.field {
  resize: vertical;
  line-height: 1.4;
}

.row-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.row-form .field.grow {
  flex: 1 1 12rem;
}

.row-form label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Groups */

.dot {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  flex: none;
  background: var(--dot-gray);
}

.dot.red { background: var(--dot-red); }
.dot.orange { background: var(--dot-orange); }
.dot.yellow { background: var(--dot-yellow); }
.dot.green { background: var(--dot-green); }
.dot.blue { background: var(--dot-blue); }
.dot.purple { background: var(--dot-purple); }

.block-card {
  border-left: 6px solid var(--dot-gray);
}

.block-card.red { border-left-color: var(--dot-red); }
.block-card.orange { border-left-color: var(--dot-orange); }
.block-card.yellow { border-left-color: var(--dot-yellow); }
.block-card.green { border-left-color: var(--dot-green); }
.block-card.blue { border-left-color: var(--dot-blue); }
.block-card.purple { border-left-color: var(--dot-purple); }

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

.block-head h2 {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.block-time {
  color: var(--muted);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.section-title {
  margin: 1.5rem 0 0.75rem;
  font-size: 1rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.note-card {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  font-size: 0.95rem;
}

/* Appointments (My Day's timeline, Upcoming): big start time, the calendar's color, the title */

.event-card {
  padding: 0.55rem 0.8rem;
}

.event-card.waiting {
  border-style: dashed;
}

.event-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  padding: 0.35rem 0;
  border: 0;
  background: transparent;
  text-align: left;
  color: inherit;
  font: inherit;
}

button.event-row {
  cursor: pointer;
  border-radius: 12px;
}

.event-list > .event-row + .event-row {
  border-top: 1px solid var(--line);
}

.event-times {
  flex: none;
  width: 5.2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.event-start {
  font-weight: 700;
}

.event-end {
  font-size: 0.85rem;
  color: var(--muted);
}

.event-bar {
  flex: none;
  align-self: stretch;
  width: 4px;
  border-radius: 2px;
  background: var(--dot-gray);
}

.event-bar.red { background: var(--dot-red); }
.event-bar.orange { background: var(--dot-orange); }
.event-bar.yellow { background: var(--dot-yellow); }
.event-bar.green { background: var(--dot-green); }
.event-bar.blue { background: var(--dot-blue); }
.event-bar.purple { background: var(--dot-purple); }

.event-bar.waiting {
  background: transparent;
  border: 2px dashed var(--muted);
  width: 0;
}

.event-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.event-title {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.event-sub {
  font-size: 0.85rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.event-sub.warn {
  color: var(--orange);
}

.event-pending {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--purple);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.75rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--glass-strong);
  color: var(--ink);
  font-size: 0.9rem;
  cursor: pointer;
}

.now-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: -0.4rem 0 0.6rem;
  color: var(--red);
  font-size: 0.8rem;
  font-weight: 700;
}

.now-line::after {
  content: "";
  flex: 1;
  height: 2px;
  background: var(--red);
  border-radius: 1px;
}

.day-card .chips {
  margin-top: 0.25rem;
}

.day-card .tasks {
  margin-top: 0.25rem;
}

.day-card .event-list + .tasks,
.day-card .chips + .tasks {
  border-top: 1px solid var(--line);
}

/* Sheets: an appointment's details, New Appointment, Change */

.sheet {
  width: min(34rem, calc(100% - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 0;
  border-radius: 24px;
  color: var(--ink);
  background: var(--glass-strong);
  overflow: auto;
}

.sheet::backdrop {
  background: rgba(20, 16, 40, 0.35);
}

.sheet-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem 0.25rem;
}

.sheet-head h2 {
  overflow-wrap: anywhere;
}

.sheet-body {
  padding: 0.5rem 1.1rem 1.1rem;
}

.sheet-form {
  display: grid;
  gap: 0.75rem;
}

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

.form-field label {
  font-weight: 600;
  font-size: 0.9rem;
}

.form-field .small {
  margin: 0;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: end;
}

.form-row > .form-field {
  flex: 1 1 8rem;
}

[hidden] {
  display: none !important;
}

.check-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 42px;
}

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

.details {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.4rem 1rem;
  margin: 0 0 0.75rem;
}

.details dt {
  font-weight: 600;
  color: var(--muted);
}

.details dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.event-notes h3 {
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
}

@media (max-width: 640px) {
  .event-times {
    width: 4.4rem;
  }

  .details {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }

  .details dd {
    margin-bottom: 0.4rem;
  }
}

/* Tasks (My Day tiles, search results) */

.tasks {
  list-style: none;
  margin: 0;
  padding: 0;
}

.task {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.6rem 0;
  border-top: 1px solid var(--line);
}

.tasks > .task:first-child {
  border-top: 0;
}

.task-body {
  flex: 1;
  min-width: 0;
}

.task-title {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.task.done .task-title {
  text-decoration: line-through;
  color: var(--muted);
}

.task-path,
.task-next {
  font-size: 0.85rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.check {
  flex: none;
  width: 28px;
  height: 28px;
  margin-top: 0.05rem;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--accent-ink);
  font-size: 0.9rem;
  line-height: 1;
}

.check[aria-pressed="true"] {
  background: var(--accent);
}

.check:disabled {
  border-style: dashed;
  cursor: default;
  opacity: 0.6;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.25rem;
}

.badge {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--glass-strong);
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}

.badge.overdue { color: var(--red); }
.badge.soon { color: var(--orange); }
.badge.tag { color: var(--blue); }
.badge.shared { color: var(--purple); }

/* My Life */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.toolbar label {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
}

.tree,
.tree ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tree ul {
  margin-left: 1.15rem;
  padding-left: 0.6rem;
  border-left: 2px solid var(--line);
}

.tree-row {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  padding: 0.35rem 0;
}

.disclosure {
  flex: none;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--ink);
}

.disclosure.spacer {
  visibility: hidden;
}

.more {
  flex: none;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
  color: var(--muted);
  font-weight: 700;
}

.task-panel {
  margin: 0.25rem 0 0.6rem 2.2rem;
  padding: 0.75rem;
  border-radius: 16px;
  display: grid;
  gap: 0.6rem;
}

.task-notes {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.92rem;
}

/* Search */

.search-box {
  width: 100%;
  font-size: 1.1rem;
}

.status-line {
  color: var(--muted);
  margin: 0.75rem 0;
}

/* Agent */

.agent-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1rem;
}

.agent-bar select {
  flex: 1 1 14rem;
}

.messages {
  display: grid;
  gap: 0.75rem;
}

.message {
  border-radius: 22px;
  padding: 0.8rem 1rem;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.message.user {
  justify-self: end;
  max-width: 85%;
  background: var(--accent);
  color: var(--accent-ink);
  border: 0;
}

.message.user a {
  color: inherit;
}

.message p:last-child,
.message ul:last-child {
  margin-bottom: 0;
}

.message ul {
  margin: 0 0 0.6rem;
  padding-left: 1.2rem;
}

.message .who {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.75;
  margin-bottom: 0.25rem;
}

/* New email in a conversation: a heading, then the emails behind a tap (agent-words.js). */
.digest-heading {
  font-weight: 600;
}

.digest summary {
  cursor: pointer;
  font-weight: 600;
}

.digest-list > ul {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}

.digest-list li {
  border-top: 1px solid currentColor;
  border-top-color: color-mix(in srgb, currentColor 25%, transparent);
  padding: 0.45rem 0;
}

.digest-item summary {
  display: grid;
  font-weight: 400;
}

.digest-title {
  font-weight: 600;
}

.digest-subtitle {
  font-size: 0.8rem;
  opacity: 0.85;
}

.digest-item p {
  margin: 0.4rem 0 0;
}

.show-more {
  background: none;
  border: 0;
  padding: 0.25rem 0;
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.working {
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
}

.sources {
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.sources ul {
  margin: 0.2rem 0 0;
}

.agent-card {
  margin-top: 0.6rem;
  padding: 0.7rem 0.8rem;
  border-radius: 16px;
  background: var(--glass-strong);
  border: 1px solid var(--line);
}

.agent-card h3 {
  font-size: 0.98rem;
  margin-bottom: 0.3rem;
}

.agent-card ul {
  margin: 0 0 0.4rem;
  padding-left: 1.1rem;
  font-size: 0.92rem;
}

.agent-card .actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}

.card-state {
  font-size: 0.88rem;
  font-weight: 600;
}

.card-state.applied { color: var(--green); }
.card-state.failed { color: var(--red); }
.card-state.dismissed { color: var(--muted); }

.warning {
  color: var(--orange);
  font-size: 0.88rem;
}

.composer {
  position: sticky;
  bottom: 0.75rem;
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
  padding: 0.6rem;
  border-radius: 24px;
}

.composer textarea {
  flex: 1;
  min-height: 44px;
  max-height: 12rem;
}

/* Toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: max(1rem, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  max-width: min(32rem, calc(100% - 2rem));
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.65rem 0.9rem;
  border-radius: 16px;
  background: var(--glass-strong);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
  z-index: 20;
}

.toast[hidden] {
  display: none;
}

.error-text {
  color: var(--red);
  font-weight: 600;
}

@media (prefers-reduced-motion: no-preference) {
  .button,
  .check,
  .topbar nav a {
    transition: background-color 0.15s, color 0.15s, opacity 0.15s;
  }
}
