/* The launcher (0046, 0065): quiet, a grid of icons, and beside it the
   person's notifications and agenda. Colours are the platform's palette
   (tokens.css, 0064), light or dark as <html data-theme> says. No rail on
   this page. /desarrollo links this file too. */
@import url("tokens.css");

:root {
  font-family:
    "Geist",
    "Inter",
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
}
* {
  box-sizing: border-box;
}
/* Hidden means hidden, whatever an element's own display says: a rule like
   `.connection { display: grid }` otherwise wins over the browser's
   [hidden], and the element shows anyway (as the rail does, rail.js). */
[hidden] {
  display: none !important;
}
html,
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
}
body {
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
button {
  font: inherit;
  color: inherit;
}
a {
  color: inherit;
}
code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.82rem;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
  word-break: break-all;
}

/* Top bar */
.bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 64px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--background) 80%, transparent);
  backdrop-filter: blur(12px);
}
/* The company's mark and name, as the rail draws them (rail/views.js). */
.brand {
  --brand-mark: 30px;
  display: flex;
  align-items: center;
  gap: calc(var(--brand-mark) * 0.42);
  color: var(--foreground);
  text-decoration: none;
}
.brand-mark {
  display: block;
  flex: none;
  width: var(--brand-mark);
  height: var(--brand-mark);
}
.brand-mark svg {
  display: block;
  width: 100%;
  height: 100%;
}
.brand-name {
  font:
    700 calc(var(--brand-mark) * 0.45) / 1.02 "Helvetica Neue",
    Helvetica,
    Arial,
    sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
/* The environment, anywhere but production: [DEVELOPER VERSION] in a
   dot-matrix face beside a red "on air" light. The letters light up in
   turn as the page loads, then a sheen sweeps across every few seconds. */
@font-face {
  font-family: "Doto";
  src: url("/fonts/doto.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
.env {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-left: 6px;
  font-family: "Doto", ui-monospace, "SF Mono", monospace;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.env-led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--destructive);
  box-shadow: 0 0 8px var(--destructive);
  animation: env-led 1.8s ease-in-out infinite;
}
.env-text {
  background: linear-gradient(
    100deg,
    color-mix(in srgb, var(--foreground) 80%, transparent) 0 40%,
    var(--primary) 50%,
    color-mix(in srgb, var(--foreground) 80%, transparent) 60% 100%
  );
  background-size: 260% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: env-sweep 6s ease-in-out 1.4s infinite;
}
.env-text span {
  opacity: 0;
  animation: env-boot 0.01s steps(1) forwards;
  animation-delay: calc(var(--i) * 38ms + 200ms);
}
@keyframes env-boot {
  to {
    opacity: 1;
  }
}
@keyframes env-led {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}
@keyframes env-sweep {
  0% {
    background-position: 100% 0;
  }
  35%,
  100% {
    background-position: 0 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .env-led,
  .env-text,
  .env-text span {
    animation: none;
    opacity: 1;
  }
}
@media (max-width: 640px) {
  .env {
    font-size: 12px;
  }
}
.actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.actions[hidden] {
  display: none;
}
.icon-button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  border: 1px solid var(--input);
  background: var(--card);
  font-size: 0.85rem;
  transition: border-color 0.15s;
}
.icon-button:hover {
  border-color: var(--muted-foreground);
}

/* Home: the apps, and beside them (below, on narrow screens) the
   notifications and the agenda. */
.home {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px 96px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
}
@media (min-width: 1000px) {
  .home {
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
  }
}
main {
  min-width: 0;
  padding-top: 8px;
}
/* A page whose main sits straight in the body (the guides /desarrollo and
   guide.html, which link this file): one centred column. */
body > main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 48px 24px 96px;
}
.side {
  display: grid;
  gap: 16px;
}
.side[hidden] {
  display: none;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding-bottom: 6px;
  font-size: 13px;
  line-height: 1.4;
  overflow: hidden;
}
@media (min-width: 1000px) {
  .card {
    max-height: 46vh;
    overflow-y: auto;
  }
}

/* Account: the avatar and its menu, as in the rail */
.avatar-button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  background: var(--primary);
  color: var(--primary-foreground);
  font-weight: 700;
  font-size: 0.85rem;
}
.avatar-button:empty {
  display: none;
}
.avatar-button:has(img) {
  padding: 0;
  overflow: hidden;
}
.avatar-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.menu {
  position: fixed;
  inset: 64px 16px auto auto;
  margin: 0;
  width: 260px;
  padding: 0 0 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--popover);
  color: var(--popover-foreground);
  box-shadow: var(--shadow-float);
  font-size: 13px;
  line-height: 1.4;
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 36px 20px;
}

/* Sections (0065): side by side, wrapping; each a quiet small-caps label
   over a hairline, its apps below. A section is as wide as its apps (up to
   four per row) or its label, whichever is wider. */
.sections {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 48px 64px;
}
.section {
  min-width: max-content;
}
.section-title {
  margin: 0 0 22px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: nowrap;
}
.section .grid {
  grid-template-columns: repeat(var(--columns, 4), 104px);
  gap: 30px 16px;
}
@media (max-width: 640px) {
  .sections {
    flex-direction: column;
    align-items: stretch;
    gap: 36px;
  }
  .section {
    min-width: 0;
  }
  .section .grid {
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  }
}
.app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.tile {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  transition:
    transform 0.15s ease,
    border-color 0.15s ease;
}
.tile svg {
  width: 58%;
  height: 58%;
}
/* The apps' artwork (0065) is a whole icon, plate included: no card around
   it, a soft shadow under it, and the rendering for the theme. */
.tile:has(.at3w-icon) {
  background: none;
  border: 0;
  border-radius: 0;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.12)) drop-shadow(0 6px 14px rgba(0, 0, 0, 0.16));
}
:root[data-theme="dark"] .tile:has(.at3w-icon) {
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.5)) drop-shadow(0 8px 18px rgba(0, 0, 0, 0.45));
}
.tile .at3w-icon {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.at3w-icon [data-for="dark"] {
  display: none;
}
:root[data-theme="dark"] .at3w-icon [data-for="dark"] {
  display: inline;
}
:root[data-theme="dark"] .at3w-icon [data-for="light"] {
  display: none;
}
.app:hover .tile,
.app:focus-visible .tile {
  transform: translateY(-2px);
  border-color: var(--input);
}
.app:focus-visible {
  outline: none;
}
.app .name {
  font-size: 0.86rem;
  color: var(--muted-foreground);
  transition: color 0.15s;
}
.app:hover .name {
  color: var(--foreground);
}
/* An app the person can't open yet: dimmed; its detail says how to ask. */
.app.locked {
  opacity: 0.4;
  transition: opacity 0.15s;
}
.app.locked:hover,
.app.locked:focus-visible {
  opacity: 0.7;
}
.no-access {
  color: var(--muted-foreground);
}
.monogram {
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}

/* Detail */
.back {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--muted-foreground);
  text-decoration: none;
  font-size: 0.88rem;
  margin-bottom: 36px;
}
.back:hover {
  color: var(--foreground);
}
.detail {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: start;
}
.detail .tile {
  width: 112px;
  height: 112px;
  border-radius: 26px;
}
.detail h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
  margin: 4px 0 12px;
  font-weight: 700;
}
.detail p {
  color: var(--muted-foreground);
  font-size: 1.05rem;
  margin: 0 0 28px;
  max-width: 56ch;
  line-height: 1.55;
}
.open {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: 8px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  transition: opacity 0.15s;
}
.open:hover {
  opacity: 0.88;
}
.detail-main {
  animation: rise 0.35s ease both 0.08s;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
@media (max-width: 560px) {
  .detail {
    grid-template-columns: 1fr;
  }
}

/* The selected icon flies between the grid and the detail. */
::view-transition-group(app-icon) {
  animation-duration: 0.38s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
}
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.2s;
}

/* Messages */
.empty {
  color: var(--muted-foreground);
  text-align: center;
  padding: 80px 0;
}

/* Popovers */
[popover] {
  margin: 0;
  border: 1px solid var(--input);
  background: var(--card);
  color: var(--foreground);
}
.sheet {
  inset: 0;
  margin: auto;
  width: min(860px, calc(100% - 32px));
  max-height: calc(100% - 64px);
  overflow: auto;
  padding: 28px;
  border-radius: var(--radius);
}
.sheet::backdrop {
  background: rgb(0 0 0 / 0.6);
  backdrop-filter: blur(2px);
}
.sheet .copy-guide {
  float: right;
  margin-right: 10px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--input);
  background: var(--muted);
  color: var(--foreground);
  font-size: 0.82rem;
  cursor: pointer;
}
.sheet .copy-guide:hover {
  border-color: var(--muted-foreground);
}
.sheet .close {
  float: right;
  border: 0;
  background: none;
  color: var(--muted-foreground);
  font-size: 1.1rem;
  cursor: pointer;
}
.sheet h2 {
  font-size: 1.05rem;
  margin: 26px 0 8px;
  letter-spacing: -0.01em;
}
.sheet h2:first-of-type {
  margin-top: 0;
}
.sheet p,
.sheet li {
  color: var(--muted-foreground);
  line-height: 1.6;
  font-size: 0.92rem;
}
.sheet details {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 8px 0;
}
.sheet summary {
  cursor: pointer;
  font-weight: 500;
  font-size: 0.92rem;
}
.sheet .button,
.doc .button {
  display: inline-block;
  margin: 4px 0 8px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--input);
  background: var(--muted);
  color: var(--foreground);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.88rem;
}
.sheet .button:hover,
.doc .button:hover {
  border-color: var(--muted-foreground);
}

/* The developer guide (desarrollo.html, 0051): a page, the sheet's typography. */
.doc {
  max-width: 720px;
}
.doc h1 {
  font-size: 1.6rem;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
}
.doc h2 {
  font-size: 1.05rem;
  margin: 34px 0 10px;
  letter-spacing: -0.01em;
}
.doc p,
.doc td {
  color: var(--muted-foreground);
  line-height: 1.6;
  font-size: 0.92rem;
}
.doc b,
.doc td:first-child {
  color: var(--foreground);
}
.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 6px 0 10px;
}
.doc td {
  padding: 8px 12px 8px 0;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.doc td:first-child {
  white-space: nowrap;
  width: 1%;
  padding-right: 20px;
}
.doc .secret {
  font-size: 0.95rem;
  padding: 6px 10px;
  user-select: all;
}

/* Command and password boxes on /desarrollo, with a copy icon inside. */
.doc .cmd,
.sheet .cmd {
  position: relative;
  margin: 6px 0 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.doc .cmd code,
.sheet .cmd code {
  display: block;
  overflow-x: auto;
  white-space: pre;
  padding: 12px 44px 12px 14px;
  background: none;
  border: 0;
  font-size: 0.84rem;
  color: var(--foreground);
}
.doc .cmd button,
.sheet .cmd button {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  transition:
    color 0.15s,
    border-color 0.15s,
    background 0.15s;
}
.doc .cmd button:hover,
.sheet .cmd button:hover {
  color: var(--foreground);
  border-color: var(--input);
  background: var(--muted);
}
.doc .cmd button.done,
.sheet .cmd button.done {
  color: var(--done);
}
.doc .cmd-label,
.sheet .cmd-label {
  margin: 16px 0 0;
  font-size: 0.85rem;
}
.doc .cmd-label a {
  color: var(--muted-foreground);
}

/* Health and version under the description; Entrega below (developers). */
.tile {
  position: relative;
}
.tile .dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--background);
}
.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
  background: var(--muted-foreground);
}
.dot.up {
  background: var(--done);
}
.dot.down {
  background: var(--destructive);
}
.facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 20px;
  margin: 28px 0 0;
  font-size: 0.9rem;
}
.facts dt {
  color: var(--muted-foreground);
}
.facts dd {
  margin: 0;
  color: var(--muted-foreground);
}
.facts a {
  color: var(--foreground);
  text-decoration: none;
}
.facts a:hover {
  text-decoration: underline;
}
/* The agenda as a calendar (CIE-909): a card filling the window below the
   bar, without the side (it waits at home), inside a .feed root so its
   tabs and rows are the side card's. A month's weeks and a week's hours
   take what's left once the header is drawn. */
.home.wide {
  max-width: none;
  padding: 24px;
  grid-template-columns: minmax(0, 1fr);
}
.home.wide .side {
  display: none;
}
main:has(> .agenda) {
  padding-top: 0;
}
.agenda.card {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 64px - 48px);
  min-height: 560px;
  max-height: none;
  padding-bottom: 0;
  overflow: hidden;
}
.agenda-bar {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding: 10px 12px;
}
.agenda-bar h1 {
  flex: 1 1 auto;
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.agenda-bar h1::first-letter {
  text-transform: uppercase;
}
.agenda-nav {
  display: inline-flex;
  gap: 4px;
}
.agenda .nav-button {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--foreground);
  font-size: 13px;
  text-decoration: none;
}
.agenda .nav-button:hover {
  border-color: var(--muted-foreground);
}
.agenda .nav-button[aria-current] {
  color: var(--muted-foreground);
}
.agenda .tabs a {
  padding: 3px 10px;
  border-radius: 6px;
  color: var(--muted-foreground);
  font-size: 12px;
  text-decoration: none;
}
.agenda .tabs a[aria-selected="true"] {
  background: var(--card);
  color: var(--foreground);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
/* Over the side card's own (VIEW_STYLE comes after this file). */
.agenda.feed .warning {
  flex: none;
  margin: 0 14px 10px;
}
.agenda.feed .empty {
  flex: 1;
  padding: 48px 14px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.agenda-overdue {
  flex: none;
  border-top: 1px solid var(--border);
  padding: 4px 0;
}
.agenda-overdue summary {
  padding: 6px 14px;
  color: var(--destructive);
  font-weight: 600;
  cursor: pointer;
}
.agenda-overdue-list {
  max-height: 30vh;
  overflow-y: auto;
  padding-bottom: 6px;
}
.agenda .cell-day {
  align-self: flex-start;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-width: 24px;
  padding: 2px 6px;
  border-radius: 999px;
  color: var(--foreground);
  font-variant-numeric: tabular-nums;
  text-decoration: none;
}
.agenda .cell-day:hover {
  background: color-mix(in srgb, var(--foreground) 6%, transparent);
}
.agenda .today > .cell-day {
  background: var(--primary);
  color: var(--primary-foreground);
}
/* The month: its weeks share the height; the lines between days are the
   gap. A day shows what fits (agenda.js), and "+n más". */
.agenda .month {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: auto repeat(var(--weeks), minmax(0, 1fr));
  gap: 1px;
  border-top: 1px solid var(--border);
  background: var(--border);
}
.agenda .weekday {
  padding: 6px 8px;
  background: var(--muted);
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.agenda .cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  min-height: 0;
  padding: 4px;
  background: var(--card);
}
.agenda .cell.outside {
  background: color-mix(in srgb, var(--card) 55%, var(--background));
}
.agenda .cell.outside .cell-day {
  color: var(--muted-foreground);
}
.agenda .cell-items {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
}
.agenda .more {
  flex: none;
  padding: 0 5px;
  color: var(--link);
  font-size: 12px;
  text-decoration: none;
}
.agenda .more:hover {
  color: var(--link-hover);
}
.agenda .more[hidden] {
  display: none;
}
/* A week or a day: the days' heads, what has no time ("Todo el día"), and
   the hours, which scroll. One grid of columns for all three. */
.agenda .hours {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}
.agenda .hours-head,
.agenda .hours-allday,
.agenda .hours-body {
  display: grid;
  grid-template-columns: 52px repeat(var(--days), minmax(0, 1fr));
}
/* The same room for a scrollbar as the hours, so the columns line up. */
.agenda .hours-head,
.agenda .hours-allday {
  flex: none;
  overflow-y: hidden;
  scrollbar-gutter: stable;
  border-bottom: 1px solid var(--border);
}
.agenda .hours-allday {
  max-height: 30%;
  overflow-y: auto;
}
.agenda .gutter {
  padding: 6px 8px 0 0;
  color: var(--muted-foreground);
  font-size: 10.5px;
  text-align: right;
}
.agenda .hours-day {
  padding: 6px;
  border-left: 1px solid var(--border);
}
.agenda .hours-day .cell-day span {
  color: var(--muted-foreground);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.agenda .hours-day.today .cell-day span {
  color: inherit;
}
.agenda .hours-day .cell-day b {
  font-size: 16px;
}
.agenda .allday-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  min-height: 40px;
  padding: 6px;
  border-left: 1px solid var(--border);
}
.agenda .hours-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-gutter: stable;
}
.agenda .hours-body {
  position: relative;
  height: calc(24 * var(--hour));
}
.agenda .hours-labels {
  position: relative;
  padding: 0;
}
.agenda .hours-labels span {
  position: absolute;
  right: 8px;
  transform: translateY(-50%);
  font-variant-numeric: tabular-nums;
}
.agenda .hours-col {
  position: relative;
  border-left: 1px solid var(--border);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0 calc(var(--hour) - 1px),
    var(--border) calc(var(--hour) - 1px) var(--hour)
  );
}
.agenda .hours-col.today,
.agenda .allday-cell.today {
  background-color: color-mix(in srgb, var(--primary) 5%, transparent);
}
.agenda .now {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 2;
  height: 2px;
  margin-top: -1px;
  background: var(--destructive);
  pointer-events: none;
}
.agenda .now::before {
  content: "";
  position: absolute;
  left: -5px;
  top: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--destructive);
}
/* One thing: a card in its app's colour (--app, set by agenda.js). Events
   filled, deadlines outlined; overdue in red; what's past faded. */
.agenda .entry {
  flex: none;
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  min-width: 0;
  padding: 2px 6px 2px 5px;
  border: 0;
  border-left: 3px solid var(--app);
  border-radius: 5px;
  background: color-mix(in srgb, var(--app) 16%, var(--card));
  color: inherit;
  font: inherit;
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.agenda .entry[hidden] {
  display: none;
}
.agenda .entry:hover,
.agenda .entry[aria-expanded="true"] {
  background: color-mix(in srgb, var(--app) 28%, var(--card));
}
.agenda .entry.deadline {
  background: var(--card);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--app) 40%, var(--border));
}
.agenda .entry.deadline:hover,
.agenda .entry.deadline[aria-expanded="true"] {
  background: color-mix(in srgb, var(--app) 10%, var(--card));
}
.agenda .entry.overdue {
  --app: var(--destructive) !important;
  color: var(--destructive);
}
.agenda :is(.cell, .allday-cell, .hours-col).past:not(.today) .entry:not(.overdue) {
  opacity: 0.62;
}
.agenda .entry-icon,
.agenda-popover .entry-icon {
  display: grid;
  flex: none;
  width: 14px;
  height: 14px;
  place-items: center;
}
.agenda .entry-icon .tile-icon,
.agenda .entry-icon svg,
.agenda-popover .entry-icon .tile-icon,
.agenda-popover .entry-icon svg {
  width: 14px;
  height: 14px;
}
.agenda .entry-icon .monogram,
.agenda-popover .entry-icon .monogram {
  font-size: 8px;
  font-weight: 700;
}
.agenda .entry-body {
  display: flex;
  gap: 5px;
  min-width: 0;
}
.agenda .entry-when {
  flex: none;
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
}
.agenda .entry.overdue .entry-when {
  color: inherit;
}
.agenda .entry-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* On the hours: placed by agenda.js, the time above a title that wraps
   between words; a short one in a line. */
.agenda .entry.block {
  position: absolute;
  z-index: 1;
  align-items: flex-start;
  margin-left: 2px;
  padding: 3px 6px 3px 5px;
  overflow: hidden;
}
/* Its app's icon beside the first line, as in a month's day; above it
   where three or more are side by side, so the text keeps the width. */
.agenda .block .entry-icon {
  margin-top: 1px;
}
.agenda .block.narrow:not(.short) {
  flex-direction: column;
  gap: 2px;
}
.agenda .block .entry-body {
  display: block;
}
.agenda .block .entry-when {
  display: block;
  font-size: 11px;
}
/* Whole words only: one too long for its card is cut at its edge (the
   popover has it all). */
.agenda .block .entry-title {
  display: block;
  white-space: normal;
  overflow-wrap: normal;
}
.agenda .block.short {
  align-items: center;
  padding-block: 2px;
}
.agenda .block.short .entry-icon {
  margin-top: 0;
}
.agenda .block.short .entry-body {
  display: flex;
}
.agenda .block.short .entry-when {
  font-size: 12px;
}
.agenda .block.short .entry-title {
  white-space: nowrap;
}
/* In a week or a day there's room: cards of two or three lines, the title
   first, then its app and what it is. */
.agenda .entry.rich,
.agenda .entry.block {
  border-radius: 6px;
  font-size: 12.5px;
}
.agenda .entry.rich:not(.block) {
  align-items: flex-start;
  gap: 7px;
  padding: 6px 8px 7px 7px;
}
.agenda .rich:not(.block) .entry-icon,
.agenda .rich:not(.block) .entry-icon .tile-icon,
.agenda .rich:not(.block) .entry-icon svg {
  width: 16px;
  height: 16px;
}
.agenda .rich:not(.block) .entry-icon {
  margin-top: 1px;
}
.agenda .rich .entry-body {
  display: block;
}
.agenda .rich:not(.block) .entry-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
  overflow-wrap: break-word;
}
.agenda .rich .entry-title,
.agenda .block .entry-title {
  font-weight: 500;
}
.agenda .entry-meta {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted-foreground);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agenda .entry.overdue .entry-meta {
  color: inherit;
  opacity: 0.85;
}
.agenda .entry.block {
  padding: 5px 8px 5px 7px;
}
.agenda .entry.block.short {
  padding-block: 4px;
}
/* An entry's popover: beside it (agenda.js places it), on a phone a sheet
   at the bottom. */
.agenda-popover {
  position: fixed;
  inset: auto;
  width: 300px;
  max-width: calc(100vw - 24px);
  padding: 12px 14px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--popover);
  color: var(--popover-foreground);
  box-shadow: var(--shadow-float);
  font-size: 13px;
  line-height: 1.4;
}
.agenda-popover-head {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-foreground);
  font-size: 12px;
}
.agenda-popover-head span:nth-child(2) {
  flex: 1;
}
.agenda-popover-close {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin: -4px -6px -4px 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--muted-foreground);
  cursor: pointer;
}
.agenda-popover-close:hover {
  background: color-mix(in srgb, var(--foreground) 6%, transparent);
  color: var(--foreground);
}
.agenda-popover-close svg {
  width: 14px;
  height: 14px;
}
.agenda-popover h2 {
  margin: 8px 0 4px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.agenda-popover p {
  margin: 0;
  color: var(--muted-foreground);
}
.agenda-popover-when::first-letter {
  text-transform: uppercase;
}
.agenda-popover-when.overdue {
  color: var(--destructive);
}
.agenda-popover-detail {
  margin-top: 2px;
  overflow-wrap: anywhere;
}
.agenda-popover-open {
  display: flex;
  justify-content: center;
  margin-top: 12px;
  padding: 7px 14px;
  border-radius: 8px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-weight: 500;
  text-decoration: none;
}
.agenda-popover-open:hover {
  filter: brightness(1.08);
}
/* On a phone a month's days keep only the apps' icons, a week's columns
   scroll sideways, and the popover is a sheet. */
@media (max-width: 640px) {
  .home.wide {
    padding: 16px;
  }
  .agenda.card {
    height: calc(100dvh - 64px - 32px);
  }
  .agenda .cell {
    padding: 2px;
  }
  .agenda .month .entry {
    padding: 1px 1px 1px 2px;
  }
  .agenda .month .entry-body {
    display: none;
  }
  .agenda .month .more {
    padding: 0 1px;
    font-size: 10px;
  }
  .agenda .hours {
    overflow-x: auto;
  }
  .agenda .hours > * {
    min-width: calc(52px + var(--days) * 96px);
  }
  .agenda-popover {
    inset: auto 0 0 0;
    width: auto;
    max-width: none;
    padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
    border-radius: 14px 14px 0 0;
  }
}
/* Photos (0082): every uploaded one, for user-admins to remove */
.photos {
  max-width: 640px;
}
.photos h1 {
  margin: 0 0 6px;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}
.photos ul {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}
.photos li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.photos .photo {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}
.photos span.photo {
  background: var(--muted);
}
.photos .who {
  display: grid;
  flex: 1;
  min-width: 0;
  font-size: 0.9rem;
}
.photos .who span {
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}
.photos button {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: none;
  color: var(--destructive);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}
.photos button:hover {
  border-color: var(--destructive);
}
.photos button:disabled {
  opacity: 0.6;
  cursor: default;
}

/* An app's tabs (infra 0092): Problemas for everyone who may open it,
   Entrega for developers, greyed out for the rest. */
.detail-tabs {
  margin-top: 48px;
  animation: rise 0.35s ease both 0.08s;
}
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
}
.tabs [role="tab"] {
  padding: 10px 14px;
  margin-bottom: -1px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted-foreground);
}
.tabs [role="tab"]:hover {
  color: var(--foreground);
}
.tabs [role="tab"][aria-selected="true"] {
  color: var(--foreground);
  border-bottom-color: var(--primary);
}
.tabs [role="tab"][aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
}
.tabs [role="tab"][aria-disabled="true"]:hover {
  color: var(--muted-foreground);
}
.tab-panel {
  padding-top: 20px;
}
.tab-panel .facts {
  margin-top: 0;
}

/* Problemas: where to report one (from inside the app, with the rail's
   icon), then a state chip, the title, and when it last changed. */
.report-hint {
  margin: 0;
}
.report-hint a {
  color: var(--link);
  text-decoration: none;
}
.report-hint a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}
.report-hint .glyph svg {
  width: 1.1em;
  height: 1.1em;
  vertical-align: -0.2em;
  color: var(--foreground);
}
.problems {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}
.problem {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}
.problem-title {
  min-width: 0;
  overflow-wrap: anywhere;
}
.problem-meta {
  color: var(--muted-foreground);
  font-size: 0.82rem;
  white-space: nowrap;
}
.problem-meta a {
  color: var(--link);
  text-decoration: none;
}
.problem-meta a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}
.problem-meta .mine {
  color: var(--foreground);
  font-weight: 600;
}
.chip {
  /* One width for every state, so the titles line up. */
  display: inline-block;
  box-sizing: border-box;
  min-width: 5.8rem;
  text-align: center;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--muted);
  font-size: 0.76rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--muted-foreground);
}
.chip.state-en-curso {
  color: var(--running);
  border-color: color-mix(in srgb, var(--running) 40%, transparent);
}
.chip.state-resuelto {
  color: var(--done);
  border-color: color-mix(in srgb, var(--done) 40%, transparent);
}
.chip.state-descartado {
  text-decoration: line-through;
}
@media (max-width: 560px) {
  .problem {
    grid-template-columns: auto 1fr;
  }
  .problem-meta {
    grid-column: 2;
  }
}

/* The report sheet: a shell around the form the rail draws too
   (rail/views.js), which brings its own padding. */
.sheet.report {
  width: min(560px, calc(100% - 32px));
  padding: 0;
  border: 1px solid var(--border);
  background: var(--popover);
  color: var(--popover-foreground);
}
.version-info .report-launcher {
  margin: 4px 0 12px;
}
/* A native app's downloads (0074): the visitor's platform is the one main
   action (.open); the others are neutral beside it. */
.downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.downloads p {
  margin: 0;
}
.download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid var(--input);
  background: var(--muted);
  color: var(--foreground);
  font-size: 0.92rem;
  text-decoration: none;
}
.download:hover {
  border-color: var(--muted-foreground);
}
.downloads .size {
  font-weight: 400;
  opacity: 0.75;
}
/* Instalación (infra 0101): a native app's steps and video per platform. */
.install-guides {
  max-width: 72ch;
}
.install-guides h2 {
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}
.install-guides h2:not(:first-child) {
  margin-top: 32px;
}
.install-guides ol {
  margin: 12px 0;
  padding-left: 22px;
  line-height: 1.6;
}
.install-guides li + li {
  margin-top: 4px;
}
.install-guides video {
  display: block;
  width: 100%;
  max-width: 640px;
  margin-top: 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--muted);
  aspect-ratio: 16 / 9;
}
/* Novedades: the release's notes, in their tab. */
.release-notes {
  max-width: 72ch;
}
.release-notes h2 {
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}
.notes {
  font-size: 0.95rem;
  line-height: 1.6;
}
.notes h2,
.notes h3 {
  font-size: 0.95rem;
  margin: 20px 0 6px;
}
.notes p,
.notes ul,
.notes ol {
  margin: 0 0 10px;
}
.notes ul,
.notes ol {
  padding-left: 20px;
}
.notes img,
.notes video {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 0 10px;
}
.notes-video {
  position: relative;
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 10px;
}
.notes .notes-video video {
  margin: 0;
}
.notes-video-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--muted-foreground);
  opacity: 0.6;
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .notes-video-progress {
    display: none;
  }
}
.notes code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.85em;
  background: var(--muted);
  padding: 1px 5px;
  border-radius: 4px;
}
/* A DataCore Next filter in its notes (notes-filter.js), coloured as its
   filter editor colours it: in dark its own colours, in light the same hues
   darker. */
.notes-filter {
  --filter-keyword: hsl(310 50% 72%);
  --filter-name: hsl(198 55% 72%);
  --filter-text: hsl(101 42% 62%);
  --filter-number: hsl(32 62% 68%);
  --filter-operator: hsl(0 0% 82%);
  --filter-punctuation: hsl(0 0% 62%);
  margin: 0 0 12px;
  padding: 10px 12px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
}
:root[data-theme="light"] .notes-filter {
  --filter-keyword: hsl(310 50% 38%);
  --filter-name: hsl(198 75% 30%);
  --filter-text: hsl(101 55% 27%);
  --filter-number: hsl(32 85% 34%);
  --filter-operator: hsl(215 25% 25%);
  --filter-punctuation: hsl(215 12% 45%);
}
.notes-filter-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
}
.notes-filter-where {
  flex: 1;
  min-width: 0;
  font-size: 0.8rem;
  color: var(--muted-foreground);
}
.notes-filter-where.refused {
  color: var(--destructive);
}
.notes-filter-copy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted-foreground);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}
.notes-filter-copy:hover {
  color: var(--foreground);
  border-color: var(--input);
  background: var(--muted);
}
.notes-filter-copy.done {
  color: var(--done);
}
.notes-filter pre {
  margin: 0;
  overflow-x: auto;
}
.notes .notes-filter code {
  display: block;
  padding: 0;
  background: none;
  border: 0;
  white-space: pre;
  word-break: normal;
  font-size: 0.84rem;
  color: var(--foreground);
}
.token-keyword {
  color: var(--filter-keyword);
}
.token-name {
  color: var(--filter-name);
}
.token-text {
  color: var(--filter-text);
}
.token-number {
  color: var(--filter-number);
}
.token-operator {
  color: var(--filter-operator);
}
.token-punctuation {
  color: var(--filter-punctuation);
}
.token-error {
  color: var(--destructive);
  text-decoration: underline wavy;
}
.notes a {
  color: var(--link);
}
.notes a:hover {
  color: var(--link-hover);
}
.commits {
  grid-column: 2;
  list-style: none;
  margin: -2px 0 6px;
  padding: 0;
  font-size: 0.84rem;
  color: var(--muted-foreground);
}
.commits li {
  padding: 3px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.muted {
  color: var(--muted-foreground);
}
.help-button {
  margin-left: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid var(--input);
  background: var(--muted);
  font-size: 0.78rem;
  color: var(--foreground);
}
.help-button:hover {
  border-color: var(--muted-foreground);
}
/* The launcher's version, bottom right (everyone); for developers a button
   to its Entrega, which opens above it. */
.version {
  position: fixed;
  right: 16px;
  bottom: 12px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--background);
  color: var(--muted-foreground);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
}
.version[hidden] {
  display: none;
}
.version button {
  margin: -3px -9px;
  padding: 3px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.version button:hover,
.version button:focus-visible {
  border-color: var(--input);
  color: var(--foreground);
  outline: none;
}
/* A panel developers glance at: small type, one line per item, colour only
   for what's wrong. */
.menu.version-info {
  inset: auto 16px 44px auto;
  width: min(560px, calc(100% - 32px));
  max-height: calc(100% - 88px);
  overflow: auto;
  padding: 14px 16px 12px;
  font-size: 12px;
}
.version-info code {
  font-size: 11px;
}
.version-info h1 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}
.version-info h1 code {
  margin-left: 4px;
  font-weight: 400;
  color: var(--muted-foreground);
}
.version-info h2 {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
}
.version-info .facts {
  /* Long commit titles end in an ellipsis instead of widening the panel. */
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 14px;
  margin-top: 6px;
  font-size: inherit;
}
.version-info .commits {
  margin: 0 0 2px;
  font-size: inherit;
}
.version-info .commits li {
  padding: 1px 0;
}
.version-info p {
  margin: 6px 0 0;
}
/* In the panel, how-to buttons are links: they're help, not actions. */
.version-info .help-button {
  margin-left: 6px;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-weight: 400;
  color: var(--muted-foreground);
  text-decoration: underline dotted;
  text-underline-offset: 2px;
}
.version-info .help-button:hover {
  color: var(--foreground);
}
/* The runs after the last full one: when, what, commit, where from. */
.runs {
  display: grid;
  grid-template-columns: auto auto auto minmax(0, 1fr);
  gap: 3px 12px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}
.runs li {
  display: contents;
}
.runs a {
  color: var(--foreground);
  text-decoration: none;
}
.runs a:hover {
  text-decoration: underline;
}
.provenance {
  color: var(--muted-foreground);
}
.runs .provenance {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.version-info .warn {
  color: var(--warn);
}
.sheet.help {
  width: min(640px, calc(100% - 32px));
}
.sheet.help ol {
  padding-left: 20px;
}
.sheet.help a {
  color: var(--foreground);
}

/* Apps the MCP connector reaches (0079, 0080): a robot on the tile. */
.tile .mcp {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--background);
  color: var(--foreground);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}
.tile .mcp svg {
  width: 16px;
  height: 16px;
}
/* The MCP connector (0080): a row in an app's facts, and its dialog. */
.mcp-button {
  display: grid;
  place-items: center;
  color: var(--foreground);
}
.mcp-button[hidden] {
  display: none;
}
.mcp-button svg {
  width: 17px;
  height: 17px;
}
.fact-link {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}
.fact-link:hover {
  color: var(--foreground);
}
.access {
  display: inline-flex;
  align-items: center;
}
.dot.off {
  background: none;
  box-shadow: inset 0 0 0 1.5px var(--muted-foreground);
}
.sheet .mcp-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sheet .mcp-title svg {
  width: 22px;
  height: 22px;
}
.sheet .mcp-subtitle {
  margin: 0 0 18px;
  font-size: 0.85rem;
}
.mcp-endpoint {
  display: grid;
  grid-template-columns: max-content 1fr;
  align-items: center;
  gap: 8px 16px;
  margin: 0 0 8px;
}
.mcp-endpoint dt {
  color: var(--muted-foreground);
  font-size: 0.85rem;
}
.mcp-endpoint dd {
  margin: 0;
}
.sheet .mcp-endpoint .cmd {
  margin: 0;
}
.sheet .mcp-endpoint .cmd code {
  padding: 8px 44px 8px 12px;
}
.sheet .mcp-endpoint .cmd button {
  top: 3px;
}
.sheet h3 {
  font-size: 0.95rem;
  margin: 22px 0 6px;
}
.sheet .harness .cmd {
  margin: 0 0 6px;
}
.sheet .harness .hint {
  margin: 0;
  font-size: 0.85rem;
}
.sheet .harness .hint code {
  white-space: nowrap;
}
.sheet .harness .hint + .hint {
  margin-top: 6px;
}
.sheet .hint .link {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--foreground);
  text-decoration: underline;
  cursor: pointer;
}
.mcp-apps {
  list-style: none;
  padding: 0;
  margin: 14px 0 18px;
  display: grid;
  gap: 8px;
}
.mcp-apps li {
  display: grid;
  grid-template-columns: 20px auto 1fr;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
}
.mcp-apps .tile {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  filter: none;
}
.mcp-apps .access {
  color: var(--muted-foreground);
  font-size: 0.88rem;
}

/* Your own problems open their conversation. */
.problem.opens {
  grid-template-columns: auto 1fr auto auto;
  cursor: pointer;
}
.problem.opens:hover .problem-title,
.problem.opens:focus-visible .problem-title {
  text-decoration: underline;
}
.problem .chevron {
  color: var(--muted-foreground);
  font-size: 1.1rem;
  line-height: 1;
}

/* A problem's conversation (infra 0092), drawn as the data pipeline draws
   a thread: one card, its messages one under another, each with who wrote
   it and when, and the reply box as its last row. */
.back-to-list {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--muted-foreground);
  text-decoration: none;
}
.back-to-list:hover {
  color: var(--foreground);
}
.conversation-head h2 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 14px 0 4px;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}
.conversation-head p {
  margin: 0;
  font-size: 0.82rem;
}
.conversation-head a {
  color: var(--link);
  text-decoration: none;
}
.thread {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  font-size: 0.9rem;
}
.thread .messages > p.muted {
  margin: 0;
  padding: 12px 14px;
  font-size: 0.85rem;
}
.message {
  padding: 10px 14px;
}
.message + .message {
  border-top: 1px solid var(--border);
}
.message-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
}
.message-photo {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.message-photo.initials {
  display: grid;
  place-items: center;
  background: var(--muted);
  color: var(--muted-foreground);
  font-size: 0.68rem;
  font-weight: 600;
}
.message-author {
  font-weight: 600;
}
.message-body {
  margin: 4px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.5;
}
.message-body a {
  color: var(--link);
}
.thread .closed-note {
  margin: 0;
  padding: 8px 14px 0;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
}
.thread .closed-note + .reply {
  border-top: 0;
}
.reply {
  border-top: 1px solid var(--border);
}
.reply-box {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 6px 8px 6px 14px;
}
.reply-box textarea {
  flex: 1;
  min-width: 0;
  max-height: 50vh;
  min-height: 28px;
  box-sizing: border-box;
  padding: 4px 0;
  border: 0;
  outline: none;
  resize: none;
  overflow-y: auto;
  background: none;
  color: var(--foreground);
  font: inherit;
  line-height: 1.45;
}
.reply-box .send {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  margin-bottom: 2px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-foreground);
  cursor: pointer;
}
.reply-box .send:disabled {
  background: var(--muted);
  color: var(--muted-foreground);
  cursor: default;
}
.reply .error {
  margin: 0;
  padding: 0 14px 8px;
  font-size: 0.8rem;
  color: var(--destructive);
}

/* Connectors (infra 0092, 0113, 0114): a quiet row of their own at the top
   of home, not tiles. Each pill is the platform's mark joined to the
   service's by a line that says the state: solid connected, dashed not
   connected, both neutral; only expired, which needs the person, in amber. */
.connections {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
}
.connections-title {
  margin-right: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.connection {
  --link: var(--muted-foreground);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 12px 3px 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--foreground);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.connection[data-state="expired"] {
  --link: var(--warn);
}
.connection:hover,
.connection:focus-visible {
  border-color: color-mix(in srgb, var(--foreground) 28%, transparent);
  background: var(--accent);
}
.connection .bridge {
  display: flex;
  align-items: center;
}
.connection .end {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--link);
  color: var(--foreground);
}
.connection .end svg {
  width: 12px;
  height: 12px;
}
/* A service's own coloured icon reads at a touch more. */
.connection[data-provider="outlook"] .end.service svg {
  width: 14px;
  height: 14px;
}
.connection .line {
  width: 10px;
  border-top: 1.5px solid var(--link);
}
.connection[data-state="none"] .line {
  border-top-style: dashed;
}
.connection .name {
  font-weight: 600;
}
.connection .state {
  color: var(--muted-foreground);
}
.connection[data-state="expired"] .state {
  color: var(--warn);
}
.sheet.connectors {
  width: min(480px, calc(100% - 32px));
  border: 1px solid var(--border);
  background: var(--popover);
  color: var(--popover-foreground);
}
.connectors h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 0;
}
.connectors .connector-mark {
  display: grid;
}
.connectors p {
  font-size: 0.9rem;
  line-height: 1.55;
}
.connectors .explain {
  color: var(--muted-foreground);
}
.connectors .outcome {
  color: var(--done);
}
.connectors .outcome.error {
  color: var(--destructive);
}
.connectors .actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}
.connectors .button {
  margin: 0;
  cursor: pointer;
}
/* A connector where apps have tiles: its mark, centred, in the tile's size. */
.connector-tile {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--foreground);
}
.connector-tile svg {
  width: 60%;
  height: 60%;
}
.connectors .button.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
}
