/* ==========================================================================
   Plán prác – Reg-Inteligence (views/plan.js renderRegInteligence, docs/design-v2/RegInteligence.dc.html) — prefix .ri-
   Colours only through tokens: Nova 2 (v2.css) gives paper #F6F4EE, white cards with a hairline, green = farm (animals,
   fields, the active tab), brown = production and community, grey = administration, amber = legal duties; the classic
   look and dark mode follow app.css. Phone first: one column, nothing wider than the phone, ≥ 44 px targets on touch,
   inputs 16 px, rows keyed and updated in place. Linked by views/plan.js at run time unless index.html links it.
   ========================================================================== */

.ri {
  gap: 12px;
  /* amber of a legal duty (design: row #FFF4E5 / #F3DDB5, badge #FFE4B8 / #7A4F00) */
  --ri-legal-bg: var(--warning-soft, #fff4e5);
  --ri-legal-line: #f3ddb5;
  --ri-legal-badge: #ffe4b8;
  --ri-legal-text: var(--warning-text, #7a4f00);
  --ri-red: var(--critical, #d03b3b);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ri { --ri-legal-line: #4a3a1a; --ri-legal-badge: #3d3016; }
}
:root[data-theme="dark"] .ri { --ri-legal-line: #4a3a1a; --ri-legal-badge: #3d3016; }

.ri-intro { font-size: 14px; }
.ri-head .v2-head-actions { flex: none; }
.ri-replan {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ri-replan:hover { background: var(--surface-2); }
.ri-replan:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ri-replan[hidden] { display: none; }

/* ---- Tabs Týždeň · Mesiac · Rok · Časová os (equal buttons, green when active – design) ---- */
.ri-tabs.tabs { display: flex; gap: 6px; overflow: visible; scroll-margin-top: calc(var(--header-h, 56px) + 12px); }
.ri-tabs .tab {
  flex: 1 1 0;
  justify-content: center;
  min-width: 0;
  height: 40px;
  padding: 0 6px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
}
.ri-tabs .tab .tab-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ri-tabs .tab:hover { background: var(--surface-2); }
.ri .ri-tabs.tabs--pills .tab.is-active,
.ri .ri-tabs.tabs--pills .tab.is-active:hover { border-color: var(--primary); background: var(--primary); color: #ffffff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ri .ri-tabs.tabs--pills .tab.is-active,
  :root:not([data-theme="light"]) .ri .ri-tabs.tabs--pills .tab.is-active:hover { background: var(--green-soft); color: var(--green-text); }
}
:root[data-theme="dark"] .ri .ri-tabs.tabs--pills .tab.is-active,
:root[data-theme="dark"] .ri .ri-tabs.tabs--pills .tab.is-active:hover { background: var(--green-soft); color: var(--green-text); }
.ri-tabs .tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ri-panel { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ri-panel[hidden] { display: none; }
.ri-weekbody { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ri-weekbody[hidden], .ri-emptyfarm[hidden] { display: none; }

/* ---- Week / month / year navigation ---- */
.ri-nav { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ri-nav-label { flex: 1 1 auto; min-width: 0; font-size: 14px; font-weight: 600; text-align: center; overflow-wrap: anywhere; }
.ri-nav-btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.ri-nav-btn:hover { background: var(--surface-2); }
.ri-nav-today {
  flex: none;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--link);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.ri-nav-today[hidden] { display: none; }
.ri-nav-btn:focus-visible, .ri-nav-today:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- Cards ---- */
.ri-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.ri-card[hidden] { display: none; }
.ri-cap-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; min-width: 0; }
.ri-cap-title { min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
/* round 14: on a 320 px phone a long total („538 h + 417 prác bez času“) goes under the title – the title never breaks mid-word */
.ri-cap-head > .ri-cap-title { flex: 1 1 auto; min-width: min(10.5em, 100%); overflow-wrap: break-word; }
.ri-cap-total { color: var(--text-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.ri-cap-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; font-size: 13px; }
.ri-cap-row.is-warn { color: var(--ri-legal-text); }
.ri-cap-people { font-weight: 600; }
.ri-note { margin: 0; color: var(--text-2); font-size: 13px; line-height: 1.4; }
.ri-note[hidden] { display: none; }
.ri-note.is-warn { color: var(--ri-legal-text); }

/* Bar: segments by group, a capacity mark when the work is more than the people have */
.ri-bar {
  position: relative;
  display: flex;
  height: 10px;
  min-width: 0;
  overflow: hidden;
  border-radius: 999px;
  background: var(--grey-soft);
}
.ri-bar-sm { height: 8px; }
.ri-bar-seg { flex: none; height: 100%; background: var(--green); }
.ri-bar-seg[data-seg="prod"] { background: var(--brown); }
.ri-bar-seg[data-seg="other"] { background: var(--grey); }
.ri-bar-cap {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: var(--text);
}
.ri-bar-cap[hidden] { display: none; }
.ri-bar.is-over { box-shadow: inset 0 0 0 1px var(--ri-red); }
.ri-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--text-2); font-size: 12.5px; }
.ri-key { display: inline-flex; align-items: center; gap: 5px; }
.ri-key[hidden] { display: none; }
.ri-key-dot { flex: none; width: 9px; height: 9px; border-radius: 2px; background: var(--green); }
.ri-key[data-seg="prod"] .ri-key-dot { background: var(--brown); }
.ri-key[data-seg="other"] .ri-key-dot { background: var(--grey); }
.ri-key-line { flex: none; width: 2px; height: 11px; background: var(--text); }

.ri-link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 2px;
  border: 0;
  background: none;
  color: var(--link);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.ri-link:hover { text-decoration: underline; }
.ri-link[hidden] { display: none; }
.ri-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Hours per member */
.ri-mlist { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ri-mlist[hidden] { display: none; }
.ri-mrow { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; grid-template-areas: "av name val" "av bar bar"; gap: 2px 8px; align-items: center; min-width: 0; font-size: 13px; }
.ri-mrow .ri-avatar { grid-area: av; }
.ri-mrow-name { grid-area: name; min-width: 0; overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.ri-mrow-val { grid-area: val; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ri-mbar { grid-area: bar; height: 6px; overflow: hidden; border-radius: 999px; background: var(--grey-soft); }
.ri-mbar-fill { display: block; height: 100%; background: var(--green); }
.ri-mrow.is-over .ri-mrow-val { color: var(--ri-legal-text); font-weight: 600; }
.ri-mrow.is-over .ri-mbar-fill { background: var(--ri-red); }

/* Warnings */
.ri-alerts { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ri-alerts[hidden] { display: none; }
.ri-alert {
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.ri-alert[data-level="warning"] { background: var(--ri-legal-bg); color: var(--ri-legal-text); }
.ri-alert-text { display: block; }
.ri-alert-action {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  margin-top: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--link);
  font: inherit;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.ri-alert-action:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (pointer: coarse) { .ri-alert-action { min-height: 44px; } }

/* Energy: one column per day – the need against the sun of the day, coloured by the status */
.ri-edays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; min-width: 0; }
.ri-edays[hidden] { display: none; }
.ri-eday { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; font-size: 12px; }
.ri-eday-bar { position: relative; display: block; width: 100%; max-width: 28px; height: 44px; overflow: hidden; border-radius: 6px; background: var(--grey-soft); }
.ri-eday-fill { position: absolute; left: 0; right: 0; bottom: 0; background: var(--green); }
.ri-eday[data-status="battery"] .ri-eday-fill { background: var(--brown); }
.ri-eday[data-status="generator"] .ri-eday-fill, .ri-eday[data-status="short"] .ri-eday-fill { background: var(--ri-red); }
.ri-eday[data-status="noPv"] .ri-eday-fill { background: var(--grey); }
.ri-eday-name { color: var(--text-2); font-weight: 600; }
.ri-eday-val { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* The last replan (design: green tint with a sparkle) */
.ri-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--green-soft);
  color: var(--green-text);
}
.ri-notice[hidden] { display: none; }
.ri-notice-icon { display: grid; flex: none; }
.ri-notice p { margin: 0; min-width: 0; font-size: 13.5px; line-height: 1.4; overflow-wrap: anywhere; }

/* Member filter */
.ri-filter { display: flex; gap: 6px; min-width: 0; overflow-x: auto; padding: 2px 0; scrollbar-width: none; }
.ri-filter::-webkit-scrollbar { display: none; }
.ri-filter[hidden] { display: none; }
.ri-fchip {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 3px 12px 3px 4px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ri-fchip[data-member-id=""] { padding-left: 12px; }
.ri-fchip.is-on { border-color: var(--green); background: var(--green-soft); color: var(--green-text); }
.ri-fchip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Avatars (initials) */
.ri-avatar, .ri-who {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--grey-soft);
  color: var(--grey-text);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1;
}
.ri-avatar-sm { width: 26px; height: 26px; font-size: 11px; }
.ri-avatar[hidden], .ri-who[hidden] { display: none; }
.ri-tone-green { background: var(--green-soft); color: var(--green-text); }
.ri-tone-brown { background: var(--brown-soft); color: var(--brown-text); }
.ri-tone-none { background: transparent; color: var(--muted); border: 1px dashed var(--border-strong); }

/* ---- Task rows (design: white cards radius 12, a dot or a date block, the badge right) ---- */
.ri-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; min-width: 0; }
.ri-task {
  display: flex;
  align-items: stretch;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.ri-task.is-legal { background: var(--ri-legal-bg); border-color: var(--ri-legal-line); }
.ri-task-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "lead text badge";
  align-items: center;
  gap: 4px 12px;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 56px;
  padding: 10px 4px 10px 14px;
  border: 0;
  border-radius: 12px 0 0 12px;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ri-task-main:hover { background: var(--surface-2); }
.ri-task.is-legal .ri-task-main:hover { background: transparent; }
.ri-task-main:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ri-dot { grid-area: lead; width: 10px; height: 10px; border-radius: 50%; background: var(--green); }
.ri-dot[data-tone="brown"] { background: var(--brown); }
.ri-dot[data-tone="grey"] { background: var(--grey); }
.ri-date { grid-area: lead; display: flex; flex-direction: column; align-items: center; min-width: 36px; line-height: 1.2; }
.ri-date-dow { color: var(--text-2); font-size: 11px; }
.ri-date-day { font-weight: 700; }
.ri-task.is-legal .ri-date-dow, .ri-task.is-legal .ri-date-day, .ri-task.is-legal .ri-task-title { color: var(--ri-legal-text); }
.ri-task-text { grid-area: text; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ri-task-title { font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.ri-task-meta { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--text-2); font-size: 13px; line-height: 1.35; }
.ri-task-meta .ri-who { width: 22px; height: 22px; font-size: 10px; }
.ri-task-metatext { min-width: 0; overflow-wrap: anywhere; }
.ri-task.is-done .ri-task-title { color: var(--text-2); text-decoration: line-through; text-decoration-thickness: 1px; }
.ri-badge {
  grid-area: badge;
  justify-self: end;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--grey-soft);
  color: var(--grey-text);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
}
.ri-badge:empty { display: none; }
.ri-badge[data-tone="green"] { background: var(--green-soft); color: var(--green-text); }
.ri-badge[data-tone="brown"] { background: var(--brown-soft); color: var(--brown-text); }
.ri-badge[data-tone="legal"] { background: var(--ri-legal-badge); color: var(--ri-legal-text); }

/* Done toggle (44 px target, a round check like Domov) */
.ri-checkwrap {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  min-height: 48px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ri-checkwrap[hidden] { display: none; }
.ri-check {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin: 0;
  border: 2px solid var(--green);
  border-radius: 50%;
  background: var(--surface);
  cursor: inherit;
}
.ri-task[data-tone="brown"] .ri-check { border-color: var(--brown); }
.ri-task[data-tone="grey"] .ri-check { border-color: var(--grey); }
.ri-task[data-tone="legal"] .ri-check { border-color: var(--ri-legal-text); }
.ri-check::after {
  content: "";
  width: 6px;
  height: 11px;
  margin-top: -2px;
  border: solid var(--accent-contrast, #ffffff);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 120ms ease-out;
}
.ri-check:checked { background: var(--green); border-color: var(--green); }
.ri-task[data-tone="brown"] .ri-check:checked { background: var(--brown); border-color: var(--brown); }
.ri-task[data-tone="grey"] .ri-check:checked { background: var(--grey-text); border-color: var(--grey-text); }
.ri-task[data-tone="legal"] .ri-check:checked { background: var(--ri-legal-text); border-color: var(--ri-legal-text); }
.ri-check:checked::after { transform: rotate(45deg) scale(1); }
.ri-check:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ri-check:disabled { opacity: 0.5; cursor: default; }
@media (prefers-reduced-motion: reduce) { .ri-check::after { transition: none; } }

.ri-more {
  align-self: flex-start;
  min-height: 40px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--link);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.ri-more[hidden] { display: none; }
.ri-empty { margin: 0; color: var(--text-2); font-size: 13.5px; }
.ri-empty[hidden] { display: none; }

/* Day chips of „Tento týždeň“ */
/* the chips stay under the app header while the list of the day scrolls (Monday morning: today's work at hand) */
.ri-days {
  position: sticky;
  top: var(--header-h);
  z-index: 3;
  display: flex;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  margin: 0 -4px;
  padding: 6px 4px;
  background: var(--bg);
  scrollbar-width: none;
}
.ri-days::-webkit-scrollbar { display: none; }
.ri-daychip {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  min-height: 44px;
  padding: 3px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  line-height: 1.2;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ri-daychip-name { font-size: 13px; font-weight: 600; white-space: nowrap; }
.ri-daychip-sub { color: var(--text-2); font-size: 11.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ri-daychip.is-today { border-color: var(--green); }
.ri-daychip.is-over .ri-daychip-sub { color: var(--ri-legal-text); font-weight: 700; }
.ri-daychip.is-on { border-color: var(--primary); background: var(--primary); color: #ffffff; }
.ri-daychip.is-on .ri-daychip-sub { color: inherit; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ri-daychip.is-on { background: var(--green-soft); color: var(--green-text); }
}
:root[data-theme="dark"] .ri-daychip.is-on { background: var(--green-soft); color: var(--green-text); }
.ri-daychip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ri-skipped { color: var(--text-2); }
.ri-foot { margin: 6px 0 0; color: var(--text-2); font-size: 12px; line-height: 1.4; }

/* ---- Mesiac ---- */
.ri-mweeks { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.ri-mweek {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "name val" "bar bar";
  align-items: center;
  gap: 4px 10px;
  width: 100%;
  min-height: 48px;
  padding: 6px 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
}
.ri-mweek:hover { background: var(--surface-2); }
.ri-mweek:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ri-mweek-name { grid-area: name; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.ri-mweek-val { grid-area: val; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ri-mweek .ri-bar { grid-area: bar; }
.ri-hints { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ri-hints[hidden], .v2-group-head[hidden] { display: none; }
.ri-hint {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.4;
}
.ri-hint-text { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
.ri-hint-more { min-width: 44px; justify-content: center; }

/* ---- Rok ---- */
.ri-ylist { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ri-ymonth {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  min-height: 56px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.ri-ymonth:hover { border-color: var(--border-strong); }
.ri-ymonth.is-now { border-color: var(--green); }
.ri-ymonth:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ri-ym-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; }
.ri-ym-name { font-weight: 700; }
.ri-ym-val { color: var(--text-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.ri-ym-chips { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.ri-ym-chips[hidden], .ri-ym-legal[hidden] { display: none; }
.ri-ym-chip {
  max-width: 100%;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--grey-text);
  font-size: 12px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.ri-ym-legal { align-self: flex-start; padding: 2px 8px; border-radius: 999px; background: var(--ri-legal-badge); color: var(--ri-legal-text); font-size: 12px; font-weight: 600; }

/* ---- Sheet (modal; a bottom sheet on phones – app.css) ---- */
.ri-sh { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ri-facts { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.ri-fact { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; font-size: 14px; line-height: 1.4; }
.ri-fact dt { color: var(--text-2); }
.ri-fact dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.ri-sh-sec { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ri-sh-title { margin: 0; font-size: 15px; font-weight: 700; }
.ri-sh-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 10px 12px; }
.ri-sh-fields > * { min-width: 0; }
.ri-sh input[type="time"], .ri-sh input[type="date"] { min-height: 44px; font-size: 16px; }
.ri-occ { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; cursor: pointer; }
.ri-occ input { width: 22px; height: 22px; margin: 0; accent-color: var(--green); }
.ri-pick-list { display: flex; flex-direction: column; gap: 6px; }
.ri-pick {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.ri-pick:hover { background: var(--surface-2); }
.ri-pick.is-active { border-color: var(--green); background: var(--green-tint, var(--green-soft)); }
.ri-pick:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ri-pick .ri-avatar { width: 36px; height: 36px; font-size: 12.5px; }
.ri-pick-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ri-pick-name { font-weight: 600; overflow-wrap: anywhere; }
.ri-pick-sub { color: var(--text-2); font-size: 12.5px; overflow-wrap: anywhere; }
.ri-sh-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ri-sh-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.ri-skiplist { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ri-skiprow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding: 8px 0; border-bottom: 1px solid var(--grid); }
.ri-skiprow-title { min-width: 0; font-weight: 600; overflow-wrap: anywhere; }

.ri-os { min-width: 0; }
.ri-error { min-width: 0; }

/* ---- Phone / touch: ≥ 44 px targets ---- */
@media (pointer: coarse) {
  .ri-tabs .tab { height: 44px; }
  .ri-replan, .ri-nav-btn, .ri-nav-today, .ri-link, .ri-more, .ri-fchip, .ri-mweek { min-height: 44px; }
  .ri-nav-btn { width: 44px; height: 44px; }
  .ri-sh-actions .btn, .ri-skiprow .btn { min-height: 44px; }
  .ri-sheet .modal-close { min-width: 44px; min-height: 44px; }
}
/* A phone: the badge goes under the text, so the title keeps the width of the card. */
@media (max-width: 440px) {
  .ri-task-main { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "lead text" "lead badge"; justify-items: start; padding-left: 12px; column-gap: 10px; }
  .ri-badge { justify-self: start; }
  .ri-checkwrap { width: 44px; }
  .ri-card { padding: 12px 14px; }
  .ri-fact { grid-template-columns: 96px minmax(0, 1fr); }
  .ri-tabs .tab { padding: 0 4px; font-size: 13px; }
  .ri-replan { padding: 0 12px; }
}
@media (max-width: 360px) {
  .ri-nav-today { padding: 0 6px; }
  .ri-edays { gap: 3px; }
}

/* Print: the lists stay readable, the controls go. */
@media print {
  .ri-replan, .ri-tabs, .ri-nav, .ri-filter, .ri-days, .ri-checkwrap, .ri-more, .ri-members-btn, .ri-skipped { display: none !important; }
  .ri-task { break-inside: avoid; }
}

/* ---- Phase 4/5: the energy badge of an energy-heavy work, the move to a sunny day, legal duties past their date ---- */
.ri-ebadge {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-text);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}
.ri-ebadge[hidden] { display: none; }
.ri-ebadge[data-energy="battery"] { background: var(--grey-soft); color: var(--grey-text); }
.ri-ebadge[data-energy="generator"] { background: var(--ri-legal-badge); color: var(--ri-legal-text); }
.ri-ebadge[data-energy="short"] { background: var(--critical-soft, #fbe9e8); color: var(--critical-text, #b3292a); }
.ri-ebadge svg { flex: none; }
.ri-task-meta { flex-wrap: wrap; }
.ri-sh-energy[data-energy="generator"] .ri-sh-energy-why, .ri-sh-energy[data-energy="short"] .ri-sh-energy-why { color: var(--ri-legal-text, var(--warning-text)); }
.ri-sh-energy .btn { align-self: flex-start; white-space: normal; text-align: left; }
.ri-legal-link { gap: 6px; padding: 6px 10px; border-radius: 10px; background: var(--ri-legal-badge, var(--warning-soft)); color: var(--ri-legal-text, var(--warning-text)); }
.ri-legal-link svg { flex: none; }
.ri-overdue {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid var(--ri-legal-line, var(--border));
  border-radius: 12px;
  background: var(--ri-legal-bg, var(--warning-soft));
  color: var(--ri-legal-text);
}
.ri-overdue[hidden] { display: none; }
.ri-overdue-text { display: flex; flex: 1 1 14em; flex-direction: column; gap: 2px; min-width: 0; }
.ri-overdue-title { font-size: 14.5px; }
.ri-overdue-sub { color: var(--text-2); font-size: 12.5px; line-height: 1.4; }
.ri-overdue-actions { display: flex; flex-wrap: wrap; gap: 4px 14px; }
@media (pointer: coarse) {
  .ri-sh-energy .btn { min-height: 44px; }
}

/* ==========================================================================
   Komunita – the phase-3 parts (views/komunita.js: Služby from Reg-Inteligence, Výroba, „Nová úloha z farmy“).
   The phase-2 rules stay in komunita.css; these only add to them (prefix .km-).
   ========================================================================== */

/* Week navigation of Služby / Výroba */
.km-week { display: flex; align-items: center; gap: 6px; min-width: 0; }
.km-week-label { flex: 1 1 auto; min-width: 0; font-size: 14px; font-weight: 600; text-align: center; overflow-wrap: anywhere; }
.km-week-btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.km-week-btn:hover { background: var(--surface-2); }
.km-week-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.km-week-now[hidden] { display: none; }

/* Roster: the columns of the farm's services (Hydina only with poultry); a proposal is drawn quieter */
.km-roster[data-slots="2"] .km-roster-row { grid-template-columns: 40px repeat(2, minmax(0, 1fr)); }
.km-roster[data-slots="1"] .km-roster-row { grid-template-columns: 40px minmax(0, 1fr); }
.km-roster-slot[hidden], .km-cell[hidden], .km-rgrid-row[hidden] { display: none; }
.km-cell.is-proposal:not(.is-empty) { border-style: dashed; }
.km-roster-source { font-weight: 600; }
.km-roster-source[hidden] { display: none; }
.km-roster-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.km-roster-reset[hidden] { display: none; }

/* „Nová úloha z farmy“ (design: text left, a brown button right) */
.km-newwork[hidden] { display: none; }
/* Komunita → „Iné komunitné práce“: the community works of the catalogue already in the plan (P3UX-09) */
.km-catbox { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.km-catbox[hidden] { display: none; }
.km-catworks { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.km-catwork-link {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-height: 44px;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.km-catwork-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.km-catwork-title { font-size: 14px; font-weight: 600; line-height: 1.3; }
.km-catwork-meta { color: var(--text-2); font-size: 12.5px; }
.km-newwork-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.km-newwork-body { display: flex; flex: 1 1 auto; flex-direction: column; gap: 2px; min-width: 0; }
.km-newwork-title { font-weight: 600; }
.km-newwork-text { color: var(--text-2); font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.km-newwork-btn.btn {
  flex: none;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: var(--brown);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
}
.km-newwork-btn.btn:hover { background: var(--brown-text); color: #ffffff; }

/* Výroba: daily products, batches as cards (no table wider than the phone) */
.km-pdaily { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.km-pdaily-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 12px;
  min-width: 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--grid);
}
.km-pdaily-row:last-child { border-bottom: 0; }
.km-batches { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.km-batches-empty[hidden], .km-prod-totals[hidden], .km-prod[hidden] { display: none; }
.km-batch {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.km-batch.is-edited { border-color: var(--brown); background: var(--brown-tint); }
.km-batch-head { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.km-batch-day { flex: none; min-width: 44px; color: var(--text-2); font-size: 13px; font-weight: 700; }
.km-batch-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; }
.km-batch-name { font-weight: 600; overflow-wrap: anywhere; }
.km-batch-edited { padding: 1px 8px; border-radius: 999px; background: var(--brown-soft); color: var(--brown-text); font-size: 12px; font-weight: 600; }
.km-batch-edited[hidden] { display: none; }
.km-batch-sub { color: var(--text-2); font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.km-batch-fields { grid-template-columns: repeat(auto-fill, minmax(min(100%, 118px), 1fr)); }
.km-batch-reset[hidden] { display: none; }
.km-products-card { align-items: flex-start; }

@media (pointer: coarse) {
  .km-week-btn { width: 44px; height: 44px; }
  .km-week-now, .km-roster-reset.btn, .km-batch-reset.btn, .km-newwork-btn.btn { min-height: 44px; }
  .km-repeat.toggle { min-height: 44px; }
}
@media (max-width: 400px) {
  .km-roster[data-slots="2"] .km-roster-row { grid-template-columns: 34px repeat(2, minmax(0, 1fr)); }
  .km-newwork-row { flex-wrap: wrap; }
}

/* A work opened from Domov (?task=…) is marked */
.ri-task.is-target { box-shadow: 0 0 0 2px var(--green); scroll-margin: calc(var(--header-h, 56px) + 16px) 0 96px; }
.ri-facts:focus, .ri-sh .ri-note:focus { outline: none; }

/* ==========================================================================
   v4 round 12 – R8 times only after logging (capacity card, the catalogue's estimate on request) and R12 História
   (Plán › História: filters, months → ISO weeks → rows with the origin chip, the archive's summary rows). Phone first:
   the filters two to a row, rows wrap (title and meta over the origin chip), ≥ 44 px targets on touch, 16 px selects.
   ========================================================================== */
.ri-cap-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 16px; min-width: 0; }
.ri-cap-unknown { color: var(--text); font-weight: 600; }
.ri-cap-est, .ri-mrow.is-estimate .ri-mrow-val, .ri-cap-total.is-estimate { color: var(--muted); font-style: italic; }
.ri-alert.is-estimate .ri-alert-text { font-style: italic; }
.ri-estimate-btn[aria-pressed="true"] { color: var(--text-2); }

/* Five tabs on a phone: each as wide as its label, wrapping at 320 px instead of cutting „Časová os“; never under 44 px wide
   (round-14 QA: „Rok“ measured 42 px at 375 px) */
@media (max-width: 440px) {
  .ri-tabs.tabs { flex-wrap: wrap; }
  .ri-tabs .tab { flex: 1 1 auto; min-width: 44px; }
}

/* História */
.ri-hcard { gap: 10px; }
.ri-hfilters { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 8px 10px; min-width: 0; }
.ri-hfilters > .field { min-width: 0; margin: 0; }
.ri-hfilters .field-label { font-size: 12.5px; }
.ri-hsel { width: 100%; min-width: 0; min-height: 40px; }
.ri-hcard.is-filtered .ri-htotal { color: var(--text); font-weight: 600; }
.ri-hnote { font-size: 12.5px; }
.ri-hmonths { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ri-hmonth { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ri-hmonth-head { margin: 0; }
.ri-hmonth-sum { font-variant-numeric: tabular-nums; }
.ri-hweeks { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ri-hweek {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 8px 12px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 12px);
  background: var(--surface);
}
.ri-hweek-head { margin: 0; font-size: 14.5px; font-weight: 700; line-height: 1.3; }
.ri-hweek-title { overflow-wrap: anywhere; }
.ri-hweek-sum { font-variant-numeric: tabular-nums; }
.ri-hrows, .ri-harch { display: flex; flex-direction: column; gap: 0; margin: 0; padding: 0; list-style: none; }
.ri-hrows[hidden], .ri-harch[hidden], .ri-harch-head[hidden], .ri-hempty[hidden] { display: none; }
.ri-hrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 8px;
  min-width: 0;
  padding: 4px 0;
  border-top: 1px solid var(--grid);
}
.ri-hrow:first-child { border-top: 0; }
.ri-hrow-main {
  display: flex;
  flex: 1 1 220px;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  min-height: 44px;
  justify-content: center;
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.ri-hrow-main:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.ri-hrow-title { font-size: 14px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.ri-hrow-meta { color: var(--text-2); font-size: 12.5px; line-height: 1.3; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.ri-hrow.is-skipped .ri-hrow-title { color: var(--text-2); }
.ri-hrow.is-untimed .ri-hrow-meta { color: var(--text-2); }
.ri-hrow-origin {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  min-height: 32px;
  padding: 2px 10px 2px 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.ri-hrow-origin[hidden] { display: none; }
.ri-hrow-origin:hover { background: var(--surface-3); text-decoration: none; }
.ri-hrow-origin:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ri-hrow-origin-icon { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--green-soft); color: var(--green-text); }
.ri-hrow-origin[data-origin-kind="product"] .ri-hrow-origin-icon, .ri-hrow-origin[data-origin-kind="custom"] .ri-hrow-origin-icon,
.ri-hrow-origin[data-origin-kind="community"] .ri-hrow-origin-icon, .ri-hrow-origin[data-origin-kind="association"] .ri-hrow-origin-icon,
.ri-hrow-origin[data-origin-kind="member"] .ri-hrow-origin-icon { background: var(--brown-soft); color: var(--brown-text); }
.ri-hrow-origin[data-origin-kind="obligation"] .ri-hrow-origin-icon { background: var(--warning-soft); color: var(--warning-text); }
.ri-hrow-origin[data-origin-kind="energy"] .ri-hrow-origin-icon, .ri-hrow-origin[data-origin-kind="planEntry"] .ri-hrow-origin-icon,
.ri-hrow-origin[data-origin-kind="catalogue"] .ri-hrow-origin-icon { background: var(--grey-soft); color: var(--grey-text); }
.ri-hrow-origin-text { min-width: 0; overflow-wrap: anywhere; }
.ri-harch-head { margin: 4px 0 0; color: var(--text-2); font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.ri-hmore { align-self: flex-start; }
.ri-hcsv { margin-top: 2px; }
.ri-hempty { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
@media (pointer: coarse) {
  .ri-hsel { min-height: 44px; font-size: 16px; }
  .ri-hrow-origin { min-height: 44px; }
  .ri-estimate-btn, .ri-hclear, .ri-hclear2, .ri-hcsv, .ri-hmore { min-height: 44px; }
}
/* A phone: the row stays one line of text beside the origin – the chip shrinks to its icon (44 px; the label in its title and
   aria-label), so a busy week does not double its height */
@media (max-width: 440px) {
  .ri-hfilters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ri-hweek { padding: 6px 10px 8px; }
  .ri-hrow { flex-wrap: nowrap; }
  .ri-hrow-main { flex: 1 1 auto; }
  .ri-hrow-origin { flex: none; justify-content: center; width: 44px; height: 44px; min-height: 44px; padding: 0; }
  .ri-hrow-origin-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ri-hrow-origin-icon { width: 28px; height: 28px; }
}
@media print {
  .ri-hfilters, .ri-hclear, .ri-hcsv, .ri-hmore, .ri-estimate-btn { display: none !important; }
  .ri-hrow { break-inside: avoid; }
}
/* Round 12 fix PH12-03: where the known hours come from (logged Ø vs typed) under the capacity total */
.ri-cap-split { margin: -2px 0 4px; font-size: 12.5px; }

/* ---- v5 R25 „Práce z minulého roka“ (docs/SPEC_V5.md §3 R25): the Rok card .ri-cy and the preview sheet .ri-cy-sheet ---- */
.ri-cy[data-tone="warn"] { border-color: var(--ri-legal-line); background: var(--ri-legal-bg); }
.ri-cy[data-tone="warn"] .ri-cy-text { color: var(--ri-legal-text); font-weight: 600; }
.ri-cy-text, .ri-cy-cands { overflow-wrap: anywhere; }
.ri-cy-status { margin: 0; color: var(--green-text, var(--text)); font-size: 13.5px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.ri-cy-status[hidden], .ri-cy-cands[hidden] { display: none; }
.ri-cy-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.ri-cy-actions[hidden] { display: none; }
.ri-cy-actions .btn { min-height: 44px; max-width: 100%; white-space: normal; text-align: left; }
.ri-cy-actions .btn[hidden], .ri-cy-actions .ri-link[hidden] { display: none; }
.ri-cy-actions .btn:disabled { cursor: not-allowed; }
.ri-cy-link { align-self: center; }
/* the sheet: one column, folds per group, rows ≥ 44 px, names and dates wrap */
.ri-cy-sh { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ri-cy-sh .ri-note { overflow-wrap: anywhere; }
.ri-cy-content { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ri-cy-content[hidden], .ri-cy-loading[hidden], .ri-cy-mode[hidden], .ri-cy-replaces[hidden], .ri-cy-limits[hidden] { display: none; }
.ri-cy-replaces { padding: 8px 12px; border-radius: 10px; background: var(--surface-2); color: var(--text); }
.ri-cy-h { margin: 4px 0 0; font-size: 15px; font-weight: 700; }
.ri-cy-count { margin-top: -6px; }
.ri-cy-sh .ri-cy-assign { min-height: 44px; align-items: center; }
.ri-cy-groups { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ri-cy-group, .ri-cy-fold { min-width: 0; padding: 0 12px 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.ri-cy-group > .fold-head .fold-actions { margin-left: auto; }
.ri-cy-gcount { color: var(--text-2); font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* (two classes: app.css gives every .checkbox 40 px on touch) */
.ri-cy-sh .ri-cy-gcheck { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }
.ri-cy-list, .ri-cy-months, .ri-cy-skiplist { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; min-width: 0; }
.ri-cy-row { border-top: 1px solid var(--grid); }
.ri-cy-row:first-child { border-top: 0; }
.ri-cy-sh .ri-cy-item { display: flex; width: 100%; min-height: 44px; padding: 8px 0; box-sizing: border-box; }
.ri-cy-item .checkbox-text { flex: 1 1 auto; }
.ri-cy-item .checkbox-label { font-weight: 600; overflow-wrap: anywhere; }
.ri-cy-item .checkbox-hint { overflow-wrap: anywhere; }
.ri-cy-sh .checkbox.is-disabled { opacity: 1; cursor: default; }
.ri-cy-sh .checkbox.is-disabled .checkbox-input { opacity: 0.55; }
.ri-cy-more { margin-top: 2px; }
.ri-cy-more[hidden] { display: none; }
.ri-cy-month { padding: 6px 0; border-top: 1px solid var(--grid); font-size: 13px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ri-cy-month:first-child { border-top: 0; }
.ri-cy-month.is-empty { color: var(--muted); }
.ri-cy-skips { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ri-cy-skiphead { margin: 0; font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.ri-cy-skip { display: flex; flex-direction: column; gap: 1px; padding: 6px 0; border-top: 1px solid var(--grid); min-width: 0; font-size: 13px; }
.ri-cy-skip:first-child { border-top: 0; }
.ri-cy-skip-title { font-weight: 600; overflow-wrap: anywhere; }
.ri-cy-skip-why { color: var(--text-2); overflow-wrap: anywhere; }
.ri-cy-sheet .modal-footer .btn { white-space: normal; }
@media (pointer: coarse) {
  .ri-cy-more, .ri-cy-peek, .ri-cy-link { min-height: 44px; }
  .ri-cy-sheet .modal-footer .btn { min-height: 44px; }
}
@media (max-width: 440px) {
  .ri-cy-group, .ri-cy-fold { padding: 0 10px 6px; }
  .ri-cy-actions .btn { flex: 1 1 100%; justify-content: center; text-align: center; }
}
@media print {
  .ri-cy-actions { display: none !important; }
}

/* v5 R26 (round 15 B3): Rok → „Akčný plán – úlohy a peniaze roka“ (Viac → Akčný plán, tab Úlohy) */
.ri-ap-link { gap: 6px; max-width: 100%; }
.ri-ap-link > span { min-width: 0; overflow-wrap: anywhere; }
.ri-ap-link .v2-icon { flex: none; }
