/* Additions to Tabler — only what Tabler does not bring along.
 *
 * Layout, cards, forms, tables and buttons come entirely from Tabler. What
 * lives here are the chart colour roles and the few building blocks there is no
 * Tabler component for (a group's colour dot, the mindmap, the context map
 * grid).
 *
 * The categorical colours come from a palette checked for colour vision
 * deficiency and are deliberately NOT the Tabler colours. Roles 1-8 are the
 * documented default palette, 9-12 were computed against them: largest minimum
 * distance in OKLab, including under protanopia and deuteranopia.
 *
 * What is verified is the neighbourhood comparison (stacked bar, legend) on a
 * light ground. Five roles fall below 3:1 contrast against the surface — which
 * is why every coloured mark carries a visible label.
 */
:root {
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --series-5: #e87ba4;
  --series-6: #008300;
  --series-7: #4a3aa7;
  --series-8: #e34948;
  --series-9: #7c4003;
  --series-10: #9b0170;
  --series-11: #60b5e7;
  --series-12: #b17eff;

  /* Chart chrome tied to Tabler so that areas and lines match the rest of the
     page. */
  --surface:        var(--tblr-bg-surface, #fff);
  --text-primary:   var(--tblr-body-color, #182433);
  /* Chart labels stay neutral: in the ATIP theme --tblr-secondary is a blue
     (#2858a5) and would read like a link on an axis. */
  --text-secondary: var(--tblr-secondary-color, #667382);
  --grid:           var(--tblr-border-color, #e6e7e9);
  --axis:           var(--tblr-border-color-active, #c8cbcf);
  --neutral-mark:   #c8cbcf;
}

/* ---------- SVG charts ---------- */
svg { display: block; max-width: 100%; }
svg text { fill: var(--text-secondary); font-size: 11px; }

/* ---------- A group's colour dot ---------- */
/* Identity is carried by the dot next to the text, never by the text colour. */
.group-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex: none;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .8125rem;
  color: var(--text-secondary);
  margin-right: 1rem;
}

/* ---------- Visibility ---------- */
/* Bootstrap's utilities are !important: an element with .d-flex would stay
   visible despite the hidden attribute (the start page's error alert, for one).
   Hence the counter rule — it applies to every hidden element on the page. */
[hidden] { display: none !important; }

/* ---------- Pita's stage ---------- */
/* Pita large, its speech bubble below and "Go PITA" (_pita_stage.html): the
   one place that says what Pita is doing. The Lottie file is square, Pita
   stands in its middle. */
.pita-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  padding: 1rem;
  border-radius: var(--tblr-border-radius-lg, 8px);
  background: var(--tblr-bg-surface-tertiary, #f6f7f9);
}
.pita-animation { flex: none; width: 11rem; height: 11rem; }
/* The bubble keeps its height while the lines change, so the button below
   does not jump; its tail points up to Pita. */
.pita-say {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 4.5rem;
  padding: .75rem 1rem;
  border: 1px solid var(--tblr-border-color);
  border-radius: var(--tblr-border-radius-lg, 8px);
  background: var(--tblr-bg-surface, #fff);
  text-align: center;
}
.pita-say::before {
  content: "";
  position: absolute;
  top: -.5rem;
  left: 50%;
  width: 1rem;
  height: 1rem;
  margin-left: -.5rem;
  border-top: 1px solid var(--tblr-border-color);
  border-left: 1px solid var(--tblr-border-color);
  background: inherit;
  transform: rotate(45deg);
}
@keyframes pita-say-in { from { opacity: 0; } }
/* How far a run got (_pita_progress.html): one striped bar under the bubble,
   above "Go PITA". The stage centres its items, each as wide as its content —
   a bar without words has none, so the run that holds it takes the full width. */
.pita-stage #pita-run { align-self: stretch; }
.pita-progress { margin-top: .75rem; }
/* While a run goes on, its suggestions are hidden — it replaces the open ones
   at its end — and a note stands in their place (_tab_pita.html). */
.pita-suggestions-waiting { display: none; }
#tab-pita:has(#pita-run[data-pita-state="running"]) #pita-suggestions { display: none; }
/* Flex, as Tabler's .empty is: "block" would leave the icon's box on the left. */
#tab-pita:has(#pita-run[data-pita-state="running"]) .pita-suggestions-waiting { display: flex; }
.pita-say-fresh { animation: pita-say-in .3s ease-out; }


/* A suggestion as a card (_pita_suggestion.html): a large icon for its
   kind, the text block — title, sources, the explanation cut to one line,
   "Details". Details and the solutions below line up with the text block,
   past the icon. */
/* Every suggestion a card of its own, with room between them: one ends where
   its frame does, and its solutions plainly belong to it. */
.pita-suggestion-list { display: grid; gap: .75rem; }
/* The kind as a square grey tile, the weight right under it, as wide as the
   tile — the weight is the row's only colour. */
.pita-suggestion-mark {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: stretch;
  gap: .375rem;
  width: 3rem;
}
.pita-suggestion-icon {
  width: 3rem;
  height: 3rem;
  border-radius: var(--tblr-border-radius, 4px);
}
.pita-suggestion-mark .badge { width: 100%; justify-content: center; }
/* Lets the text block shrink, so that its lines truncate instead of pushing
   out of the row — and, narrow, keeps it next to the icon instead of wrapping
   under it. */
.pita-suggestion-text { flex: 1 1 0; min-width: 0; }
.pita-suggestion-icon .ti { font-size: 1.5rem; }
/* The explanation and "Details" share a line: cut to it while folded, the
   whole sentence once unfolded — in its place, not again below. */
.pita-suggestion-summary { display: flex; align-items: baseline; gap: .75rem; margin-top: .25rem; }
.pita-suggestion-teaser {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
}
.pita-suggestion:has(.pita-suggestion-toggle[aria-expanded="true"]) .pita-suggestion-teaser {
  white-space: normal;
}
.pita-suggestion-toggle {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--tblr-primary);
  font-size: .8125rem;
}
.pita-chevron { transition: transform .15s ease-in-out; }
.pita-suggestion-toggle[aria-expanded="true"] .pita-chevron { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .pita-chevron { transition: none; } }
.pita-suggestion-details { padding: 1rem 0 0 4rem; }
/* The solutions of a suggestion's kind (ADR 0012): cards in a grid, as many
   side by side as fit — icon, name, what happens in a sentence. A card is a
   button: the card's looks, a button's behaviour. The one whose panel is open
   shows it with the primary border; the panel unfolds under the cards. */
.pita-solutions { padding: 1rem 0 0 4rem; }
.pita-solution-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: .5rem;
}
/* The grid's gap is the only space between the cards: Bootstrap's
   ".card-link + .card-link" would push every one after the first aside. */
.pita-solution-cards .card-link { margin-left: 0; }
.pita-solution {
  width: 100%;
  margin: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: start;
}
.pita-solution[aria-expanded="true"] {
  border-color: var(--tblr-primary);
  box-shadow: 0 0 0 1px var(--tblr-primary);
}
.pita-solution-text { min-width: 0; }
.pita-solution-panel {
  margin-top: .75rem;
  padding: 1rem;
  border: 1px solid var(--tblr-border-color);
  border-radius: var(--tblr-border-radius);
  background: var(--tblr-bg-surface-secondary);
}
/* A choice between the two sides of a contradiction: the source and its quote,
   left-aligned on two lines. */
.pita-choice {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: .25rem;
  text-align: start;
  white-space: normal;
}
.pita-rewrite-old del { text-decoration-color: var(--tblr-red); }
/* The spinner takes no room while Pita is not writing. */
.pita-rewrite-busy:not(.htmx-request) { display: none; }
/* Narrow, the details and the solutions start at the edge. */
@media (max-width: 575.98px) {
  .pita-suggestion-details,
  .pita-solutions { padding-left: 0; }
}

/* What Pita reads (_pita_articles.html): the active articles as soft badges
   that wrap, a title too long for the column cut with an ellipsis. */
.pita-article-list { display: flex; flex-wrap: wrap; gap: .375rem; }
.pita-article { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

/* A result as a toast (_toast.html): green or red throughout, the header as
   well — Tabler gives it a ground of its own. The colour comes from the soft
   background class (bg-green-lt, bg-red-lt), the border follows it. */
.app-toast { border-color: color-mix(in srgb, currentColor 35%, transparent); }
.app-toast .toast-header {
  background: transparent;
  color: inherit;
  border-bottom-color: color-mix(in srgb, currentColor 25%, transparent);
}
.app-toast .toast-body { color: var(--tblr-body-color); }

/* ---------- Knowledge base (ADR 0013) ---------- */
/* The list (_tab_knowledgebase.html): the title takes the room, its excerpt
   cut to one line; an inactive article fades — Pita does not read it. */
.knowledge-table .knowledge-title { max-width: 32rem; min-width: 14rem; }
.knowledge-inactive .knowledge-title,
.knowledge-inactive td:nth-child(2),
.knowledge-inactive td:nth-child(3) { opacity: .55; }
/* An article's dialog (_knowledge_article_view.html). An HTML article is read
   in a sandboxed frame: its own styles stay inside, its document scrolls
   itself. The frame, the source and the extracted text take the same height
   — most of the dialog's —, so that switching tabs does not make it jump. */
.knowledge-preview {
  display: block;
  width: 100%;
  height: 65vh;
  border: 1px solid var(--tblr-border-color);
  border-radius: var(--tblr-border-radius);
  background: #fff;
}
.knowledge-source { height: 65vh; }
/* What Pita took from an article: its facts, as high as the other panes. */
.knowledge-facts { overflow: auto; border: 1px solid var(--tblr-border-color);
                   border-radius: var(--tblr-border-radius); }
.knowledge-content { font-family: var(--tblr-font-monospace); font-size: .8125rem; }
/* What Pita reads of an article: plain text, wrapped, in the page's font —
   not in the light colour and limited height Tabler gives a pre. */
.knowledge-readable {
  max-height: none;
  overflow: auto;
  color: var(--tblr-body-color);
  padding: .75rem 1rem;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: .8125rem;
  background: var(--tblr-bg-surface-secondary);
  border-radius: var(--tblr-border-radius);
}
/* Pita's preview of an article rewritten (_pita_rewrite_preview.html): high
   enough to read the change within its section; frame and box scroll to it
   themselves (knowledge.js), the box measuring from its own top. */
.knowledge-preview.pita-preview-frame,
.pita-preview-text { height: 22rem; }
/* A text framed like a document, apart from the panel's grey. */
.pita-preview-text {
  position: relative;
  border: 1px solid var(--tblr-border-color);
  background: var(--tblr-bg-surface);
}

/* ---------- Passages (Pita's contradictions) ---------- */
/* A passage is quoted with the rest of its paragraph: the context muted, the
   text range itself in the theme's <mark> — the reference shows instead of
   being claimed. An address too long for its column breaks rather than
   spilling over. */
.passage-source { font-size: .875rem; overflow-wrap: anywhere; }
.passage-text {
  margin: .375rem 0 0;
  padding-left: .75rem;
  border-left: 2px solid var(--tblr-border-color);
  font-size: .875rem;
  color: var(--text-secondary);
}
.passage-text mark { padding: 0 .125em; }

/* ---------- Context Map (Concierge) ---------- */
/* Rebuild of the cross table from the aBF frontend so that participants
   recognise the same view: CSS grid instead of a table, first column 181px,
   data columns 2.5rem, row height 2.5rem, header row 129px — the same
   measurements as there. Colours and borders come from Tabler. */
.context-map-scroll {
  overflow-x: auto;
  border: 1px solid var(--tblr-border-color);
  border-radius: var(--tblr-border-radius);
}

.context-map-grid {
  display: grid;
  grid-template-columns: 181px repeat(calc(var(--grid-columns) - 1), 2.5rem);
  grid-template-rows: 129px;
  grid-auto-rows: 2.5rem;
  width: fit-content;
  min-width: 100%;
}

.context-map-grid .grid-cell {
  display: flex;
  align-items: center;
  gap: .25rem;
  padding: 0 .5rem;
  min-width: 0;
  border-right: 1px solid var(--tblr-border-color);
  border-bottom: 1px solid var(--tblr-border-color);
  background: var(--tblr-bg-surface);
  transition: background-color .15s ease;
}

/* Header row and first column stay put while scrolling. */
.context-map-grid .column-header,
.context-map-grid .grid-corner {
  position: sticky;
  top: 0;
  z-index: 2;
}
.context-map-grid .sticky-left {
  position: sticky;
  left: 0;
  z-index: 3;
  overflow: hidden;
}
.context-map-grid .grid-corner { z-index: 4; }

/* Axis labels: upright in the column headers (as in the aBF frontend's
   concierge) and toned down — they are the grid, not the content. The content
   is the ticks. */
.context-map-grid .column-header,
.context-map-grid .row-header,
.context-map-grid .grid-corner { background: var(--tblr-bg-surface-tertiary, #f6f7f9); }
.context-map-grid .column-header span,
.context-map-grid .row-header span {
  font-size: .8125rem;
  color: var(--tblr-secondary-color);
}
.context-map-grid .column-header {
  align-items: flex-end;
  justify-content: center;
  padding: .5rem .25rem;
}
/* vertical-rl reads top to bottom; the half turn flips it so the text runs
   bottom to top and starts at the cell edge. */
.context-map-grid .column-header span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  max-height: 100%;
}

/* The ⋮ of a row or column (_entry_menu.html), always there as in the aBF
   frontend: at the end of a row header, at the top of a column header above
   the upright name. The names give way to it — without min-size 0 a long one
   would push it out of its cell. A column without a menu ("ohne Intention")
   keeps its name at the bottom. */
.context-map-grid .row-header span { min-width: 0; }
.context-map-grid .row-header .context-map-entry-menu { margin-left: auto; flex-shrink: 0; }
.context-map-grid .column-header { flex-direction: column; justify-content: flex-end; }
.context-map-grid .column-header span { min-height: 0; }
.context-map-grid .column-header .context-map-entry-menu { margin-bottom: auto; flex-shrink: 0; }

/* Crosshair: shows on hover which pair a cell belongs to. */
.context-map-grid .grid-cell.crosshair { background: var(--tblr-active-bg, #f5f6f7); }

/* The cell itself: a green tick means taken, otherwise a dashed plus appears
   on hover as an invitation. It is a button — it opens the dialog of its
   pair — so the browser's button look goes; the grid lines stay. */
.context-map-grid .intent-cell {
  justify-content: center;
  cursor: pointer;
  padding: 0;
  border-top: 0;
  border-left: 0;
  font: inherit;
  color: inherit;
  appearance: none;
}
.context-map-grid .intent-cell .intent-on,
.context-map-grid .intent-cell .intent-off {
  font-size: 1.125rem;
  transition: transform 120ms ease-in-out, opacity 120ms ease-in-out;
}
.context-map-grid .intent-cell .intent-on { color: var(--tblr-green); display: none; }
.context-map-grid .intent-cell .intent-off { color: var(--tblr-secondary-color); opacity: 0; }
.context-map-grid .intent-cell.is-active .intent-on { display: inline-flex; }
.context-map-grid .intent-cell.is-active .intent-off { display: none; }
.context-map-grid .intent-cell:hover .intent-off,
.context-map-grid .intent-cell:focus-visible .intent-off { opacity: 1; }
.context-map-grid .intent-cell:hover .intent-on,
.context-map-grid .intent-cell:focus-visible .intent-on { transform: scale(1.3); }
.context-map-grid .intent-cell.is-busy { opacity: .4; pointer-events: none; }

/* The search field in the corner sits flush in the 181px column. */
.context-map-grid .grid-corner .input-icon { width: 100%; }
.context-map-grid .grid-corner .form-control { border: 0; background: transparent; padding-left: 1.75rem; }
.context-map-grid .grid-corner .form-control:focus { box-shadow: none; }

/* The filter panel above the map, taken from the aBF frontend's concierge
   (context-map-filter-panel): 42 × 32rem, the dimensions in a grey column on
   the left, the ticks on the right under a header that stays while the list
   scrolls. On a phone the dimensions move above the ticks. */
.context-map-filter-panel { width: 42rem; max-width: calc(100vw - 2rem); }
.context-map-filter-body { display: flex; height: 32rem; }
.context-map-filter-nav {
  display: flex;
  flex-direction: column;
  width: 14rem;
  flex-shrink: 0;
  border-right: 1px solid var(--tblr-border-color);
  background: var(--tblr-bg-surface-tertiary, #f6f7f9);
}
.context-map-filter-nav .nav-link { justify-content: space-between; }
.context-map-filter-nav .nav-link .badge {
  background: var(--tblr-bg-surface-secondary);
  color: var(--tblr-secondary-color);
}
.context-map-filter-nav .nav-link.active .badge { background: #fff; color: var(--tblr-primary); }
.context-map-filter-reset {
  padding: 1rem;
  text-align: center;
  border-top: 1px solid var(--tblr-border-color);
}
.context-map-filter-controls {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.context-map-filter-controls .tab-content { flex: 1; min-height: 0; overflow-y: auto; }
.context-map-filter-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.5rem;
  padding: 0 1.25rem;
  border-bottom: 1px solid var(--tblr-border-color);
  background: var(--tblr-bg-surface);
}
.context-map-filter-footer {
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
  padding: 1rem;
  border-top: 1px solid var(--tblr-border-color);
}
@media (max-width: 575.98px) {
  .context-map-filter-body { flex-direction: column; height: auto; max-height: 80vh; }
  .context-map-filter-nav {
    flex-direction: row;
    align-items: center;
    width: auto;
    border-right: 0;
    border-bottom: 1px solid var(--tblr-border-color);
  }
  .context-map-filter-reset { padding: .5rem; border-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .context-map-grid .intent-cell .intent-on,
  .context-map-grid .intent-cell .intent-off { transition: none; }
}


/* ---------- Partner row in the hero ---------- */
/* Genesys and atip host the hackathon together and therefore stand side by
   side as equals: same optical height, same surroundings, no ranking. They sit
   top left, before title and text. Sizing through height only — the original
   files stay untouched (see img/README.md). The two marks are cropped
   differently, hence two values: the atip PNG carries padding at top and
   bottom, the Genesys SVG fills its box. */
.partner-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  /* No character between the marks: a × reads like a delete icon, a slash like
     an alternative. The gap alone separates them. */
  gap: 1.25rem 3rem;
}
.partner-logo { width: auto; height: 2.25rem; }
.partner-logo-atip { height: 3.25rem; }

/* The hero illustration carries no information — it shows the way of working.
   So it sits on the right, scales along and stays limited in width so that it
   does not outshout the text. unDraw art is recoloured to the primary colour
   (see img/README.md), never left in its original violet. */
.hero-illustration {
  display: block;
  width: 100%;
  max-width: 24rem;
  height: auto;
  margin-inline: auto;
}


/* ---------- Participant logos ---------- */
/* Uploaded files come in every crop and aspect ratio, so the height is fixed
   and the width follows — a logo must not push the row it sits in. */
.participant-logo {
  width: auto;
  height: 2rem;
  max-width: 10rem;
  object-fit: contain;
  vertical-align: middle;
}
.participant-logo-sm { height: 1.25rem; max-width: 6rem; }
.participant-logo-lg { height: 3rem; max-width: 14rem; }

/* ---------- Cards inside a tab ---------- */
/* Tabler squares the top left corner of the card under a row of tabs, where
   it meets the first tab — but with a descendant selector, so every card
   inside that one loses the corner too. Only the pane meets the tab; the
   cards in it keep their corners. */
.card-tabs .nav-tabs + .tab-content .card .card {
  border-top-left-radius: var(--tblr-card-border-radius);
}

/* ---------- Drag handle ---------- */
/* A row is only dragged by its handle, not by the whole row: the cells contain
   links and buttons that have to stay clickable. */
.drag-handle {
  display: inline-flex;
  color: var(--tblr-secondary-color);
  cursor: grab;
}
.drag-handle:active { cursor: grabbing; }
tr.is-dragging { opacity: .4; }

/* ---------- Mindmap ---------- */
/* Root on the left, branches to the right (planning page, drawn by
   mindmap.js). One series colour per branch on links and dots; the
   text stays in the body colour so the map reads without colour. The SVG keeps a minimum
   width and scrolls sideways on narrow screens — shrinking it would make the
   labels unreadable. */
.mindmap { overflow-x: auto; }
.mindmap svg {
  display: block;
  max-width: 100%;
  min-width: 36rem;
  height: auto;
  font-size: .875rem;
}
.mindmap .link { fill: none; stroke: currentColor; stroke-width: 1.5; opacity: .6; }
.mindmap .node circle { fill: currentColor; }
/* A halo in the surface colour keeps a label legible where a line still
   crosses it. */
.mindmap .node text {
  fill: var(--text-primary);
  paint-order: stroke;
  stroke: var(--surface);
  stroke-width: 3px;
  stroke-linejoin: round;
}
.mindmap .node.depth-0 text,
.mindmap .node.depth-1 text { font-weight: 600; }
/* A label with sources is a link: the marker behind it says so, hovering
   underlines the text. The marker is the Tabler icon as a webfont inside a
   foreignObject — the one way to keep icons a webfont inside SVG (point 3 of
   the idiom checklist). */
.mindmap a { cursor: pointer; }
.mindmap a:hover text { text-decoration: underline; }
.mindmap .marker { overflow: visible; }
.mindmap .marker i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: .8125rem;
  color: var(--tblr-secondary-color);
}

/* ---------- Corner ribbon ---------- */
/* A diagonal band across the top right corner of a card: it carries the
   number or kind of the card ("Idee 1"), so the title stays free for what the
   card is about. Tabler's .ribbon is a straight tag on the edge; this is the
   corner variant. The box clips the rotated band at the card's edges — the
   card itself keeps its overflow, so nothing else inside gets cut. */
.ribbon-corner {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
  width: 5.5rem;
  height: 5.5rem;
  overflow: hidden;
  pointer-events: none;
  border-top-right-radius: var(--tblr-card-border-radius, var(--tblr-border-radius, 4px));
}
.ribbon-corner span {
  position: absolute;
  top: 1.25rem;
  right: -2.1rem;
  width: 8rem;
  padding: .25rem 0;
  transform: rotate(45deg);
  text-align: center;
  font-size: .6875rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--tblr-primary-fg, #fff);
  background: var(--tblr-primary);
}
/* Whatever opens the card body — title or placeholder — must not run under
   the band. */
.ribbon-corner + .card-body > :first-child { padding-right: 3.25rem; }

/* ---------- Sign-in page ---------- */
/* The atip background from the AI Lab behind the sign-in card. #021B2C is the
   ground while the image loads — the darkest blue of the image, so the white
   footer stays legible from the first paint. The wordmark is part of the
   image, hence nothing above the card. */
.login-page {
  background: #021b2c url("img/atip_background.png") center / cover no-repeat;
}

/* ---------- Copy on click ---------- */
/* A masked secret is a button (copy.js): it keeps the look of the code next
   to it and shows by the cursor and the hover that a click does something. */
.copy-secret code { cursor: copy; }
.copy-secret:hover code,
.copy-secret:focus-visible code { background: var(--tblr-primary-lt, #e8eef7); }

/* ---------- Run sheet ---------- */
/* The plan is edited in place, so its fields have to read as a table first and
   as a form second: Tabler's .form-control-flush takes the border away, the
   row's hover shows what can be typed in, the focus makes the field a field.
   The inner padding is given back as an outer negative margin, otherwise the
   text would jump sideways when the field takes focus. */
.schedule-table .form-control-flush {
  padding-inline: .25rem;
  margin-inline: -.25rem;
  border-radius: var(--tblr-border-radius, 4px);
}
.schedule-table tr:hover .form-control-flush {
  background: var(--tblr-bg-surface-secondary, #f6f8fb) !important;
}
.schedule-table .form-control-flush:focus {
  background: var(--tblr-bg-surface, #fff) !important;
  border-color: var(--tblr-primary) !important;
  box-shadow: 0 0 0 2px var(--tblr-primary-lt, #e8eef7) !important;
}
/* A unit is a section heading, not a line of the plan: its cell runs through,
   tinted and written in the colour of the house — that is enough to find the
   acts among twenty lines, and a rule would only cut the table apart. It also
   sits tighter than the lines it groups, the way a heading does. */
.schedule-table .schedule-unit > td,
.schedule-table .schedule-end > td { font-weight: 600; }
.schedule-table .schedule-unit > td {
  padding-top: .25rem;
  padding-bottom: .25rem;
}
.schedule-table .schedule-unit > td,
.schedule-table .schedule-unit .schedule-unit-title {
  color: var(--tblr-primary);
  background: var(--tblr-primary-lt, #e8eef7);
}
.schedule-table .schedule-unit .form-control-flush { font-weight: 600; }
.schedule-table .schedule-unit:hover .form-control-flush {
  background: rgba(255, 255, 255, .6) !important;
}
/* The name is the heading of its section: bold and centred over the whole
   running cell, without an icon — the tint already says what the line is. */
.schedule-table .schedule-unit .schedule-unit-title {
  text-align: center;
  font-weight: 700;
}

/* Whatever may run long — who acts, the note — wraps in its column: the field
   grows with its content (field-sizing) and starts at one row. It never
   scrolls: a scrollbar inside a table cell hides text behind a gesture nobody
   expects there, so the row gets taller instead. */
.schedule-table textarea {
  field-sizing: content;
  overflow: hidden;
}

/* ---------- A paragraph as a field ---------- */
/* Running text that is edited where it stands, like a cell of the run sheet:
   no border until it is touched, growing with what is written into it. Blank
   lines part the paragraphs — it is text, not markup. */
.inline-text {
  field-sizing: content;
  padding-inline: .25rem;
  margin-inline: -.25rem;
  border-radius: var(--tblr-border-radius, 4px);
}
.inline-text:hover {
  background: var(--tblr-bg-surface-secondary, #f6f8fb) !important;
}
.inline-text:focus {
  background: var(--tblr-bg-surface, #fff) !important;
  border-color: var(--tblr-primary) !important;
  box-shadow: 0 0 0 2px var(--tblr-primary-lt, #e8eef7) !important;
}

/* Top aligned: a note may grow over several lines, and everything else in the
   row belongs to its first one. */
.schedule-table > tbody > tr > td { vertical-align: top; }

/* The start is set where it is read — in the first time cell. Chrome's clock
   button would make that column restless, so it goes; the time is typed. */
.schedule-start { width: 3.6rem; }
.schedule-start::-webkit-calendar-picker-indicator { display: none; }

/* The columns are measured, not negotiated (table-layout: fixed): a field that
   grows with its content would otherwise let one long note pull its column
   wide and squeeze the activity beside it. The head row sets the widths, the
   activity takes whatever is left — it is the column one reads. */
.schedule-table { table-layout: fixed; }
/* With fixed widths a heading that is too long would run into the next column
   instead of widening its own, so it is cut off rather than allowed to overlap. */
.schedule-table th {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.schedule-table .schedule-handle { width: 2.5rem; }
/* Time and duration belong together and sit close: what they give up here is
   what the activity gains. */
.schedule-table .schedule-time { width: 4.25rem; padding-inline: .25rem; }
.schedule-table .schedule-minutes { width: 3.5rem; padding-inline: .25rem; }
.schedule-table .schedule-who { width: 9rem; }
.schedule-table .schedule-remark { width: 42%; }
.schedule-table .schedule-bin { width: 3rem; }
/* A fixed width for the minutes and no spinner: the arrows would only appear
   on hover and make the column jump, and the times next to it must stay put. */
.schedule-duration { width: 3rem; text-align: right; }
.schedule-duration::-webkit-outer-spin-button,
.schedule-duration::-webkit-inner-spin-button { appearance: none; margin: 0; }

/* ---------- Teammate cards ---------- */
/* Taken over from the ABF frontend (shared-bot-card): every kind of ora
   teammate has its colour — the circle behind its mark and the badge of a
   preconfigured teammate. The values are the ABF frontend's, as roles here so
   that no template carries a colour of its own. Orchestrator is Genesys
   orange: it hands over to the Genesys Cloud. */
:root {
  --teammate-concierge:          #23c6c8;
  --teammate-concierge-lt:       #d3f4f4;
  --teammate-concierge-text:     #0e4f50;
  --teammate-info:               #14387f;
  --teammate-info-lt:            #e7f5fd;
  --teammate-info-text:          #14387f;
  --teammate-mission:            #aa23c8;
  --teammate-mission-lt:         rgba(238, 211, 244, .3);
  --teammate-mission-text:       #aa23c8;
  --teammate-orchestrator:       #ff451a;
  --teammate-orchestrator-lt:    #fff4f2;
  --teammate-orchestrator-text:  #ff451a;
}
.teammate-concierge    { --teammate: var(--teammate-concierge);    --teammate-lt: var(--teammate-concierge-lt);    --teammate-text: var(--teammate-concierge-text); }
.teammate-info         { --teammate: var(--teammate-info);         --teammate-lt: var(--teammate-info-lt);         --teammate-text: var(--teammate-info-text); }
.teammate-mission      { --teammate: var(--teammate-mission);      --teammate-lt: var(--teammate-mission-lt);      --teammate-text: var(--teammate-mission-text); }
.teammate-orchestrator { --teammate: var(--teammate-orchestrator); --teammate-lt: var(--teammate-orchestrator-lt); --teammate-text: var(--teammate-orchestrator-text); }

.teammates-heading { font-size: 1.375rem; font-weight: 600; }
.teammates-subheading { font-size: 1.0625rem; font-weight: 600; }

.teammate-card { border-radius: .625rem; }
.teammate-card-title { font-size: 1.0625rem; font-weight: 600; }
.teammate-card-md .teammate-card-title { font-size: .875rem; }
.teammate-card-description { line-height: 1.5; }

/* The mark sits white on the kind's colour. Each mark has its own size, as in
   the ABF frontend: they are drawn to different boxes. */
.teammate-mark {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--teammate);
}
.teammate-mark img {
  display: block;
  object-fit: contain;
  filter: brightness(0) invert(1);
}
.teammate-concierge .teammate-mark img    { width: 1.75rem; height: 1.75rem; }
.teammate-info .teammate-mark img         { width: 1rem; height: 1rem; object-position: 65% center; }
.teammate-mission .teammate-mark img      { width: 1.25rem; height: 1.25rem; }
.teammate-orchestrator .teammate-mark img { width: 1.5rem; height: 1.5rem; }

.teammate-badge {
  padding: 3px 8px;
  border-radius: .25rem;
  background: var(--teammate-lt);
  color: var(--teammate-text);
  font-size: .6875rem;
  font-weight: 600;
}

