:root {
  --bg: #f5f6f7;
  --paper: #fff;
  --ink: #23313b;
  --muted: #596873;
  --line: #d6dee3;
  --green: #275e55;
  --soft: #e9f1ee;
  --amber: #885a16;
  --red: #a2322b;
  --guide: 302px;
  font:
    15px/1.5 system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: #215f70;
  text-underline-offset: 3px;
}
a:hover {
  color: #123a45;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid #c3ced5;
  border-radius: 5px;
  padding: 0.55rem 0.8rem;
  background: var(--paper);
  color: var(--ink);
  font-weight: 550;
  line-height: 1.3;
}
button:hover {
  border-color: #54857b;
  background: #eef5f3;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #37799e;
  outline-offset: 3px;
}
.primary {
  color: white;
  background: var(--green);
  border-color: var(--green);
}
.primary:hover {
  background: #1e4c43;
  color: white;
}
.danger {
  color: var(--red);
  border-color: #d6a39e;
}
.quiet {
  border: 0;
  background: transparent;
  padding: 0.3rem;
}
.small {
  font-size: 0.85rem;
  padding: 0.38rem 0.6rem;
}
input,
select,
textarea {
  border: 1px solid #bac8d1;
  border-radius: 4px;
  padding: 0.55rem 0.65rem;
  background: #fff;
  color: var(--ink);
  width: 100%;
  min-width: 0;
}
input[type="checkbox"],
input[type="radio"] {
  width: auto;
  accent-color: var(--green);
  margin-right: 0.45rem;
}
textarea {
  min-height: 110px;
  resize: vertical;
}
label {
  display: block;
  font-weight: 550;
  font-size: 0.9rem;
  margin: 0.7rem 0;
}
label input,
label textarea,
label select {
  display: block;
  margin-top: 0.3rem;
  font-weight: 400;
}
label.check {
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
label.check input {
  margin: 0;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 1.65rem;
  line-height: 1.3;
  margin-bottom: 0.4rem;
}
h2 {
  font-size: 1.15rem;
  margin-bottom: 1rem;
}
h3 {
  font-size: 1rem;
}
p {
  color: var(--muted);
}
small,
.muted {
  color: var(--muted);
}
small {
  font-size: 0.8rem;
}
[hidden] {
  display: none !important;
}
.brand {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand small {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
}
.app-header {
  height: 76px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 12px 24px;
  display: flex;
  gap: 22px;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 5;
}
.app-header nav a {
  font-size: 0.9rem;
}
#navigation {
  display: flex;
  align-items: center;
  gap: 16px;
  overflow-x: auto;
  white-space: nowrap;
  flex-basis: 100%;
  order: 6;
}
.card-guide-button {
  margin-left: auto;
  font-size: 0.8rem;
  text-decoration: underline;
}
.app-header form {
  display: flex;
  gap: 7px;
  flex: 1;
  max-width: 620px;
  margin-left: auto;
}
.app-header form input {
  min-width: 110px;
}
#search-form { align-items: center; }
#search-form label { white-space: nowrap; font-size: .82rem; margin: 0; }
#import-progress { margin: 12px 24px; }
#import-report progress { width: 100%; max-width: 480px; }
.result-stamp { font-size: .82rem; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.result-return { padding: 10px 0; }
[data-paged-table] > small { display: block; margin-bottom: 6px; }
.account {
  position: relative;
  margin: 0;
}
.account summary {
  font-size: 0.85rem;
  max-width: 150px;
}
.account > div {
  position: absolute;
  right: 0;
  top: 40px;
  min-width: 230px;
  padding: 20px;
  background: white;
  border: 1px solid var(--line);
  box-shadow: 0 6px 24px #23313b20;
}
.account small {
  display: block;
}
.environment {
  font-size: 0.8rem;
  margin-top: 12px;
}
.workspace {
  margin-right: var(--guide);
}
main {
  max-width: 1480px;
  margin: auto;
  padding: 28px 26px 80px;
  min-width: 0;
}
#guide {
  position: fixed;
  top: 112px;
  right: 0;
  bottom: 0;
  width: var(--guide);
  padding: 20px 22px;
  background: #edf2f4;
  border-left: 1px solid #c5d3db;
  overflow: auto;
  font-size: 0.9rem;
  z-index: 4;
}
.guide-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  font-size: 0.85rem;
  font-weight: 650;
}
.eyebrow {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
}
.guide-caution {
  border-top: 1px solid #c6d4dc;
  padding-top: 20px;
  margin-top: 25px;
}
.guide-caution h3 {
  font-size: 0.9rem;
}
.guide-foot {
  margin-top: 30px;
  font-size: 0.8rem;
  color: #667985;
}
#guide ol {
  padding-left: 20px;
}
#guide li {
  margin-bottom: 12px;
}
#guide h2 {
  font-size: 1.25rem;
}
#guide p {
  line-height: 1.65;
}
.guide-context {
  font-weight: 600;
}
.guide-closed .workspace {
  margin-right: 0;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 22px;
}
.page-heading p {
  margin: 0;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 20px;
  min-width: 0;
}
.card.guide-selected {
  border-left-color: #528e9b;
  border-left-width: 3px;
  padding-left: 18px;
}
.card .card {
  background: #fafbfc;
  padding: 14px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: baseline;
  margin-bottom: 15px;
}
.section-heading h2 {
  margin: 0;
}
.section-heading p {
  font-size: 0.85rem;
  margin: 0.4rem 0 0;
}
.section-heading a {
  font-size: 0.85rem;
}
.dashboard-priority {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.workflow-boxes,
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  gap: 20px;
}
.workspace-section {
  margin: 30px 0 18px;
}
.button-link {
  display: inline-block;
  padding: 8px 0;
  font-weight: 600;
}
.workflow-boxes .section-heading {
  display: block;
}
.workflow-boxes .section-heading .actions {
  margin: 10px 0;
}
.lead-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(290px, 1fr);
  gap: 22px;
}
.lead-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.lead-summary p {
  color: var(--ink);
  margin: 0.4rem 0 1rem;
}
.lead-summary small {
  display: block;
}
.person-status {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 22px;
  font-size: 0.9rem;
}
.count {
  font-size: 0.85rem;
  background: var(--soft);
  border-radius: 4px;
  padding: 2px 7px;
}
.stat {
  font-size: 1.8rem;
  font-weight: 650;
}
.decision-counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.decision-count {
  display: flex;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  padding: 12px;
  text-decoration: none;
  color: var(--ink);
}
.decision-count strong {
  font-size: 1.5rem;
}
.decision-count span {
  font-size: 0.85rem;
}
.filters {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}
.filters label {
  min-width: 180px;
  margin: 0;
}
#work-filters .filters {
  align-items: flex-end;
}
#work-filters .work-search label {
  flex: 0 1 340px;
  min-width: min(100%, 260px);
}
#work-filters .work-search button {
  min-height: 40px;
}
#work-filters select {
  max-width: 100%;
}
.badge {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 4px;
  background: var(--soft);
  font-size: 0.78rem;
  white-space: nowrap;
}
.badge.warn {
  background: #fff0d3;
  color: var(--amber);
}
.badge.bad {
  background: #f9e5e2;
  color: var(--red);
}
.table-wrap {
  overflow: auto;
  max-width: 100%;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.88rem;
}
th {
  text-align: left;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 650;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 12px 10px;
  border-bottom: 1px solid #e9eef1;
  vertical-align: top;
}
tr:last-child td {
  border-bottom: 0;
}
td strong,
td small {
  display: block;
}
.batch-responsibility > * {
  white-space: nowrap;
  line-height: 1.5;
}
.batch-uses {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .4rem;
}
.batch-use {
  width: fit-content;
  border-left: 3px solid #90a7b5;
  padding-left: .6rem;
}
.batch-use-ended {
  border-color: var(--line);
  color: var(--muted);
}
.batch-multi-use {
  display: inline-block;
  background: #24465e;
  color: white;
  padding: .3rem .6rem;
  border-radius: 4px;
  margin-bottom: .6rem;
}
td .batch-multi-use { display: inline-block; }
.batch-usage-summary { margin-bottom: 1rem; }
.batch-usage-summary small { display: block; }
.section-arrival {
  outline: 3px solid #37799e;
  outline-offset: 4px;
  scroll-margin-top: 1rem;
}
td .actions {
  min-width: 130px;
}
tr:hover td {
  background: #fafcfd;
}
.empty {
  padding: 22px 8px;
  color: var(--muted);
  font-size: 0.9rem;
}
.empty strong {
  display: block;
  color: var(--ink);
  margin-bottom: 5px;
}
.work-item {
  padding: 14px 0;
  border-top: 1px solid #e2e9ed;
}
.work-item:first-child {
  border: 0;
}
.work-item small {
  display: block;
}
.excerpt {
  white-space: pre-wrap;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  margin: 8px 0;
  font-size: 0.9rem;
}
.timeline-item {
  padding: 0 0 22px 18px;
  border-left: 2px solid var(--line);
  position: relative;
  margin-left: 4px;
}
.timeline-item:before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 100%;
  background: #7a96a5;
  position: absolute;
  left: -5px;
  top: 7px;
}
.timeline-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.8rem;
  margin-bottom: 6px;
}
.timeline-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.92rem;
  margin: 8px 0 12px;
}
.timeline-item details {
  font-size: 0.8rem;
  margin: 5px 0;
}
.timeline-item .actions {
  margin-top: 8px;
}
.history-filter {
  max-width: 260px;
  margin-bottom: 28px;
}
.note {
  background: #fffef7;
  border: 1px solid #e7e0c7;
  border-radius: 4px;
  padding: 16px;
  margin: 12px 0;
}
.note-relation {
  font-size: 0.8rem;
  color: #736144;
  margin-bottom: 8px;
}
.note details {
  font-size: 0.8rem;
  margin-bottom: 0;
}
.note details .actions {
  margin: 10px 0;
}
.contact {
  padding: 13px 0;
  border-top: 1px solid var(--line);
}
.contact:first-of-type {
  border: 0;
}
.contact-heading {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  justify-content: space-between;
}
.contact strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 0.95rem;
}
.contact small {
  display: block;
  margin: 3px 0 7px;
}
.contact details {
  font-size: 0.8rem;
  margin: 5px 0;
}
.notice {
  background: #fff7e4;
  border-left: 3px solid #bd903b;
  padding: 12px 15px;
  color: #6b5223;
  margin: 12px 0;
  font-size: 0.88rem;
}
.error {
  background: #fff0ed;
  color: var(--red);
  padding: 12px;
  border-radius: 4px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.pagination {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  align-items: center;
  margin-top: 15px;
  font-size: 0.85rem;
}
.notes-pagination:empty {
  display: none;
}
.breadcrumbs {
  font-size: 0.85rem;
  margin-bottom: 20px;
}
.login {
  width: min(450px, calc(100% - 40px));
  margin: 12vh auto;
}
.login h1 {
  font-size: 2rem;
  margin-top: 42px;
}
.login form {
  margin-top: 25px;
}
.login .primary {
  width: 100%;
  margin-top: 15px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 24px;
  max-width: 720px;
  width: calc(100% - 32px);
  max-height: 92vh;
  box-shadow: 0 25px 90px #12212f40;
}
dialog::backdrop {
  background: #14253166;
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.dialog-heading h2 {
  margin: 0;
  font-size: 1.3rem;
}
.dialog-heading button {
  font-size: 1.4rem;
  border: 0;
}
#modal-help {
  font-size: 0.9rem;
  margin: 14px 0 20px;
}
dialog footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  position: sticky;
  bottom: -24px;
  background: white;
  padding-bottom: 15px;
  z-index: 2;
}
#modal-error {
  font-size: 0.9rem;
  color: var(--red);
  white-space: pre-wrap;
}
#modal-error:not(:empty) {
  padding: 14px;
  background: #fff0ed;
  margin-top: 14px;
}
.form-group {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 14px;
}
.form-group summary {
  font-size: 0.9rem;
}
.field-hint {
  display: block;
  margin: -4px 0 12px;
}
.choice-group {
  border: 0;
  padding: 0;
  margin: 15px 0;
}
.choice-group legend {
  font-weight: 600;
  font-size: 0.9rem;
}
.choice {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  border: 1px solid var(--line);
  padding: 12px;
  border-radius: 4px;
  font-weight: 400;
}
.choice:has(:checked) {
  border-color: #4b8b7a;
  background: #f1f7f5;
}
.choice input {
  margin-top: 5px;
}
.choice small {
  display: block;
  margin-top: 4px;
}
.person-result {
  width: 100%;
  text-align: left;
  display: block;
  margin: 5px 0;
  font-weight: 400;
}
.person-result small {
  display: block;
}
.person-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--soft);
  padding: 4px 7px;
  margin: 4px 5px 4px 0;
  border-radius: 4px;
  font-size: 0.85rem;
}
.person-chip button {
  border: 0;
  background: transparent;
  padding: 0 4px;
  font-size: 1.2rem;
}
.picker-results {
  max-height: 240px;
  overflow: auto;
}
.picker-pages {
  display: flex;
  gap: 8px;
  margin: 5px 0;
}
.interval-preview {
  padding: 14px;
  background: #f0f5f8;
  border: 1px solid #c5d9e4;
  border-radius: 5px;
  margin: 12px 0;
}
.interval-preview p {
  margin: 8px 0 0;
  font-size: 0.85rem;
}
.duration-bar {
  display: block;
  width: 100%;
  height: 9px;
  border: 0;
  accent-color: #5a8c9b;
  background: #dde7ec;
  margin-top: 12px;
}
.duration-bar span {
  display: block;
  height: 100%;
  background: #5a8c9b;
  min-width: 1%;
}
.duration-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.8rem;
  align-items: center;
  margin: 10px 0;
}
.duration-shortcuts button {
  font-size: 0.8rem;
  padding: 5px 8px;
}
.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(140px, 1fr));
  gap: 8px;
  overflow: auto;
  padding-bottom: 12px;
}
.agenda-day {
  min-width: 0;
  border: 1px solid var(--line);
  background: #fafcfd;
  padding: 9px;
  border-radius: 4px;
}
.agenda-day.today {
  border-top: 3px solid var(--green);
}
.agenda-day h3 {
  font-size: 0.85rem;
  text-transform: capitalize;
  margin: 4px 0 16px;
}
.agenda-day > p {
  font-size: 0.8rem;
}
.agenda-event {
  font-size: 0.8rem;
  padding: 9px;
  margin-bottom: 8px;
  border-left: 3px solid #83b09e;
  background: #edf7f1;
  border-radius: 3px;
}
.agenda-event strong,
.agenda-event span,
.agenda-event a {
  display: block;
  margin-bottom: 5px;
}
.agenda-event button {
  font-size: 0.75rem;
  padding: 5px;
}
.agenda-event.call {
  background: #eaf2fb;
  border-color: #6b99bd;
}
.call-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.call-filters button[aria-pressed="true"] {
  background: var(--green);
  color: white;
}
.call-ownership {
  padding: 8px 10px;
  border-left: 3px solid #697f8a;
  background: #f2f6f8;
  margin: 6px 0;
}
.call-ownership.waiting {
  border-color: #926b21;
  background: #fff6e6;
}
.call-ownership strong,
.call-ownership small {
  display: block;
}
.confirmation-effect {
  padding: 12px 14px;
  border-left: 3px solid var(--green);
  background: #edf7f1;
}
.confirmation-effect p {
  margin: 8px 0 0;
}
#calls-list [data-action="confirm-call"] {
  margin: 4px 0 8px;
}
.agenda-event.closed {
  background: #f0f1f3;
  border-color: #aab3ba;
}
.agenda-event.booked {
  background: #fff6e6;
  border-color: #c7a66b;
}
.agenda-event.slot .agenda-event.call { margin: 7px 0 2px; border: 1px solid #6b99bd; border-left-width: 3px; }
.slot-occupancy { height: 9px; position: relative; background: #dce7de; margin: 6px 0; border-radius: 2px; }
.slot-occupancy i { position: absolute; height: 100%; background: #40779f; }
.slot-preview-labels { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; font-size: .85rem; }
.slot-occupancy.proposal { height: 16px; }
.slot-occupancy.outside i { background: #a23c31; }

/* Availability editor: quarter-hour grid, draft commands, fixed call obstacles. */
#modal.slot-editor-modal { width: min(1500px, 98vw); max-width: 1500px; max-height: 97vh; padding: 16px 20px; }
.slot-editor-modal .modal-workspace { display: block; }
.slot-editor-modal #modal-guide, .slot-editor-modal #modal-guide-toggle { display: none; }
.slot-editor-modal #modal-help { margin: 8px 0 12px; }
.slot-editor-modal footer { bottom: -16px; margin-top: 10px; padding: 10px 0; }
.se-toolbar, .se-tools { display: flex; align-items: end; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.se-toolbar label { display: flex; flex-direction: column; gap: 3px; font-size: .8rem; }
.se-toolbar .actions { align-items: end; }
.se-tools button, .se-toolbar button, .se-selection button, .se-review button { padding: 6px 9px; font-size: .82rem; }
.se-durations { display: flex; flex-wrap: wrap; gap: 4px; }
.se-durations button { min-width: 48px; }
.se-tools [aria-pressed="true"] { background: #235847; color: white; border-color: #235847; }
.se-instructions { font-size: .82rem; margin: 6px 0; max-width: none; }
#se-status { min-height: 2em; font-size: .85rem; background: #edf3f8; padding: 7px 10px; margin-bottom: 8px; border-left: 3px solid #40779f; }
.se-scroll { height: min(50vh, 600px); min-height: 300px; overflow: auto; border: 1px solid #9aaeb7; overscroll-behavior: contain; scrollbar-gutter: stable; }
.se-canvas { min-width: 850px; position: relative; overflow-anchor: none; }
.se-head { display: grid; grid-template-columns: 54px repeat(7, minmax(0, 1fr)); position: sticky; top: 0; z-index: 8; background: #f1f5f7; border-bottom: 1px solid #9aaeb7; height: 34px; }
.se-head strong, .se-hour-head { padding: 8px 4px; border-left: 1px solid #bdcbd1; text-align: center; font-size: .8rem; text-transform: capitalize; }
.se-time-body { position: relative; }
.se-hours { position: absolute; top: 0; left: 0; width: 53px; font-size: .72rem; color: #536874; }
.se-hours span { position: absolute; right: 6px; transform: translateY(-.5em); }
.se-hours span:first-child { transform: none; }
.se-days { margin-left: 54px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); position: relative; touch-action: none; user-select: none; outline-offset: -2px; }
.se-day { border-left: 1px solid #bdcbd1; position: relative; background: repeating-linear-gradient(to bottom, #9db2bd 0, #9db2bd 1px, transparent 1px, transparent calc(var(--quarter) * 4)), repeating-linear-gradient(to bottom, #fff 0, #fff calc(var(--quarter) - 1px), #dce5e9 calc(var(--quarter) - 1px), #dce5e9 var(--quarter)); }
.se-event { position: absolute; left: 3px; right: 3px; border: 1px solid #53836c; border-radius: 3px; background: #ddf0e4; color: #193c2e; z-index: 3; cursor: grab; box-sizing: border-box; font-size: 11px; line-height: 15px; overflow: hidden; }
.se-event-time { display: block; position: relative; z-index: 2; padding: 2px 5px; background: #ddf0e4eb; white-space: nowrap; }
.se-event-name { display: block; padding: 0 5px; }
.se-event.compact .se-event-time { padding: 0 5px; font-size: 10px; line-height: 13px; }
.se-event.new { border-style: dashed; border-width: 2px; }
.se-event.selected { outline: 2px solid #163d93; outline-offset: -2px; background: #c7e1fa; z-index: 4; }
.se-event.selected .se-event-time { background: #c7e1faeb; }
.se-event.selecting { outline: 3px solid #163d93; outline-offset: -3px; }
.se-event.fixed { background: #e3e7eb; border-color: #85939e; color: #3b4b56; cursor: not-allowed; }
.se-event.fixed .se-event-time { background: #e3e7ebed; }
.se-event.call, .se-call-inside { background: #bfd9ee; color: #183f62; border-color: #487da5; }
.se-call-inside { position: absolute; display: block; left: 5px; right: 5px; border-left: 3px solid #487da5; padding: 16px 4px 0; box-sizing: border-box; overflow: hidden; font-size: 11px; }
.se-edge { position: absolute; left: 0; right: 0; height: 5px; z-index: 5; cursor: ns-resize; }
.se-edge.top { top: 0; border-top: 2px solid #467c66; }
.se-edge.bottom { bottom: 0; border-bottom: 2px solid #467c66; }
.se-event.selected .se-edge { border-color: #163d93; }
.se-range { position: absolute; left: 1px; right: 1px; background: #d8e8ffb3; border: 1px dashed #245ba8; pointer-events: none; z-index: 1; box-sizing: border-box; }
.se-wall { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, #eceff0, #eceff0 6px, #e3e7e9 6px, #e3e7e9 8px); color: #52646e; font-size: .73rem; overflow: hidden; pointer-events: none; }
.se-wall span { position: sticky; top: 40px; display: block; padding: 5px; }
.se-wall.clock { z-index: 2; }
.se-selection { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 9px 0; }
.se-selection .field-hint { flex-basis: 100%; margin: 0; }
.se-precise, .se-review { border-top: 1px solid var(--line); padding: 10px 0 0; margin-top: 6px; }
.se-precise summary { margin-bottom: 8px; font-size: .85rem; }
.se-review label { margin-top: 10px; }
.se-review p { font-size: .83rem; margin: 7px 0; }
@media (max-width: 800px) {
  #modal.slot-editor-modal { width: 99vw; padding: 12px; }
  .se-scroll { height: 45vh; }
  .se-instructions { font-size: .78rem; }
}
.inline-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.8rem;
}
.inline-label input {
  margin: 0;
  width: 155px;
}
.legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  margin: 12px 0 0;
}
.steps-editor {
  background: #f2f5f6;
  padding: 12px;
  border-radius: 4px;
  margin-bottom: 12px;
}
.step-editor {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 8px;
  align-items: end;
}
.step-editor label {
  margin: 5px 0;
}
.step-editor button {
  margin-bottom: 5px;
}
.funnel {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.funnel span {
  font-size: 0.8rem;
}
.funnel b {
  font-size: 1.2rem;
  display: block;
}
details {
  margin: 14px 0;
}
summary {
  cursor: pointer;
  color: #245865;
  font-weight: 550;
}
details[open] > summary {
  margin-bottom: 12px;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f0f3f5;
  padding: 14px;
  font-size: 0.8rem;
  border-radius: 4px;
}
#toast {
  position: fixed;
  bottom: 20px;
  left: 24px;
  max-width: min(540px, 90vw);
  padding: 14px 20px;
  background: var(--ink);
  color: white;
  border-radius: 5px;
  z-index: 20;
  white-space: pre-wrap;
}
.skip-link {
  position: absolute;
  top: -70px;
  left: 20px;
  background: white;
  padding: 14px;
  z-index: 30;
}
.skip-link:focus {
  top: 10px;
}
.busy {
  opacity: 0.6;
  pointer-events: none;
}
@media (min-width: 1700px) {
  :root {
    --guide: 330px;
  }
  main {
    padding: 35px 40px;
  }
}
@media (max-width: 1200px) {
  :root {
    --guide: 270px;
  }
  .app-header {
    gap: 12px;
    padding: 12px 18px;
  }
  .brand small {
    display: none;
  }
  .lead-columns,
  .dashboard-priority {
    grid-template-columns: 1fr;
  }
  .decision-counts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  main {
    padding: 24px 20px;
  }
  .page-heading {
    flex-wrap: wrap;
  }
  .section-heading {
    flex-wrap: wrap;
  }
  .account summary {
    max-width: 100px;
  }
}
@media (max-width: 850px) {
  .app-header {
    height: auto;
    min-height: 76px;
    flex-wrap: wrap;
    gap: 10px;
  }
  .app-header form {
    order: 5;
    flex-basis: 100%;
    max-width: none;
    margin: 0;
  }
  .workspace {
    margin-right: 0;
  }
  #guide {
    position: static;
    width: auto;
    max-height: 380px;
    border-left: 0;
    border-bottom: 1px solid var(--line);
    padding: 18px 22px;
    order: 1;
  }
  .guide-heading {
    margin-bottom: 12px;
  }
  #guide-content ol {
    display: none;
  }
  .guide-caution {
    padding-top: 12px;
    margin-top: 15px;
  }
  .guide-foot {
    margin: 10px 0;
  }
  #shell {
    display: flex;
    flex-direction: column;
  }
  .app-header {
    order: 0;
    position: relative;
  }
  .workspace {
    order: 2;
  }
  .app-header #guide-toggle {
    margin-left: auto;
  }
  .account summary {
    max-width: none;
  }
  .guide-closed #guide {
    display: none;
  }
  main {
    padding: 22px 16px;
  }
  .grid,
  .workflow-boxes {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 17px;
  }
  .card.guide-selected {
    padding-left: 15px;
  }
  .lead-summary {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .person-status {
    gap: 8px;
  }
  .decision-counts {
    grid-template-columns: 1fr 1fr;
  }
  .decision-count {
    padding: 8px;
    gap: 8px;
  }
  .timeline-meta {
    flex-wrap: wrap;
    gap: 4px;
  }
  .page-heading .actions {
    width: 100%;
  }
  dialog {
    padding: 20px;
  }
  dialog footer {
    bottom: -20px;
  }
  .table-wrap {
    margin: 0 -4px;
  }
  .account > div {
    z-index: 6;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
.bulk-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 0 15px;
  font-size: 0.8rem;
}
.bulk-toolbar label {
  margin: 0;
}
.process {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  list-style: none;
  padding: 0;
}
.process li {
  padding: 8px 12px;
  border: 1px solid var(--line);
  font-size: 0.85rem;
  border-radius: 4px;
}
.process .complete {
  background: var(--soft);
}
.alert-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}
.alert-filters button {
  font-size: 0.85rem;
}
.alert-filters [aria-pressed="true"] {
  background: var(--green);
  color: white;
}
.reply-preview {
  white-space: pre-wrap;
  margin: 0 0 18px;
  padding: 16px;
  border-left: 3px solid #7ca3b3;
  background: #f2f6f8;
  font-size: 0.9rem;
}
/* Decision context stays accessible inside the native dialog's top layer. */
#modal {
  width: min(1060px, 96vw);
  max-width: 1060px;
}
.modal-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 300px);
  gap: 24px;
  align-items: start;
}
.modal-workspace:has(#modal-guide[hidden]) {
  grid-template-columns: minmax(0, 1fr);
}
#modal-guide {
  position: sticky;
  top: 0;
  background: #f3f5f0;
  border-left: 3px solid #a8b79c;
  padding: 16px;
  font-size: 0.9rem;
  line-height: 1.55;
}
#modal-guide h2 {
  font-size: 1.1rem;
  margin-top: 0;
}
#modal-guide h3 {
  font-size: 0.95rem;
}
#modal-guide ol {
  padding-left: 20px;
}
#modal-guide-toggle {
  margin: 0 0 14px;
}
.open-activity {
  padding: 14px 0;
  border-bottom: 1px solid #dce1d7;
}
.open-activity:last-child {
  border-bottom: 0;
}
.open-activity .section-heading {
  gap: 10px;
}
.open-activity .actions {
  margin-top: 10px;
}
.context-summary {
  padding: 12px;
  background: #f4f5f0;
  border: 1px solid #dce1d7;
  border-radius: 5px;
  margin-bottom: 15px;
}
.context-summary p {
  margin: 5px 0;
}
.context-summary h3 {
  margin: 0 0 8px;
}
.preview-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.source-preview {
  white-space: pre-wrap;
}
.decision-result {
  border-left: 4px solid #536844;
}
.inline-warning {
  color: #855300;
}
.field-hint {
  display: block;
  margin: 5px 0 10px;
}
.selection-status {
  padding: 8px 0;
}
.agenda-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.agenda-day .agenda-event small {
  white-space: normal;
}
.person-status .badge {
  margin-right: 6px;
}
@media (max-width: 820px) {
  .modal-workspace {
    grid-template-columns: 1fr;
  }
  #modal-guide {
    position: static;
    order: -1;
    max-height: 240px;
    overflow: auto;
  }
  #modal {
    width: 96vw;
  }
}

.fact-list {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) minmax(0, 2fr);
  gap: 7px 16px;
  margin: 0;
  font-size: 0.9rem;
}
.fact-list dt {
  color: var(--muted);
}
.fact-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.case-highlight {
  outline: 2px solid #9c742d;
  outline-offset: 2px;
  background: #fff8df;
}
.context-summary:focus {
  outline: 2px solid var(--green);
}
.person-jumps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  font-size: 0.85rem;
}
.person-jumps button {
  font-size: 0.85rem;
}
#content .card {
  scroll-margin-top: 124px;
}
/* Shown only when arriving via a RAW description. Does not alter workflow state. */
.workflow-arrival {
  background: #eef4f8;
  border: 1px solid #9ab3c4;
  border-radius: 0.4rem;
  padding: 1rem;
  margin: 1rem 0;
  scroll-margin-top: 7rem;
}
.workflow-arrival p {
  margin: 0.4rem 0;
}
.workflow-highlight {
  outline: 3px solid #587d95;
  outline-offset: 4px;
  scroll-margin-top: 7rem;
}
.workflow-control-highlight {
  box-shadow: 0 0 0 2px #587d95;
}
.workflow-picker form {
  display: flex;
  align-items: end;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}
.workflow-picker form label {
  flex: 1;
  min-width: 14rem;
}
.workflow-choices {
  padding-left: 1.25rem;
}
.workflow-choices li {
  margin: 0.65rem 0;
}
.workflow-choices small {
  display: block;
}

/* Stable work navigation stays accessible above long lists. */
@media (min-width: 851px) {
  .app-header {
    display: grid;
    grid-template-columns: auto minmax(200px, 1fr) auto auto;
    grid-template-rows: 40px 24px;
    height: 112px;
    gap: 10px 20px;
  }
  .app-header .brand { grid-column: 1; grid-row: 1; }
  .app-header form { grid-column: 2; grid-row: 1; width: 100%; }
  .app-header #guide-toggle { grid-column: 3; grid-row: 1; }
  .app-header .account { grid-column: 4; grid-row: 1; }
  #navigation { grid-column: 1 / -1; grid-row: 2; }
}
.card, .workflow-arrival, [id$="-result"] { scroll-margin-top: 124px; }

/* Publics are destinations; pending files are tasks, old files are disclosure. */
.public-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 265px), 1fr)); gap: 16px; margin: 16px 0; }
.public-card { padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: #fafcfb; min-width: 0; }
.public-card h3 { margin: 0 0 10px; font-size: 1.15rem; }
.public-card p { margin: 0 0 10px; }
.public-card.priority { border-left: 4px solid var(--amber); }
.public-card .notice { font-size: .85rem; margin-bottom: 12px; }
.public-open { display: inline-block; margin-top: 4px; font-weight: 650; }
.public-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding: 12px 0 20px; }
.public-metrics > div { border-left: 3px solid #d3e3dd; padding-left: 14px; }
.public-metrics strong { display: block; font-size: 1.8rem; font-weight: 650; }
.public-metrics span { display: block; color: var(--muted); font-size: .87rem; }
.proposal { color: var(--ink); font-size: 1.02rem; max-width: 75ch; }
.selection-summary { padding-left: 20px; color: var(--muted); }
.selection-summary li { margin: 6px 0; }
.guide-field { border-bottom: 2px solid #c2d5ce; margin-bottom: 22px; padding-bottom: 12px; }
.guide-field h3 { color: #254e44; font-size: 1.05rem; }
.guide-field p { line-height: 1.65; }
.identity-comparison .table-wrap { max-width: 100%; }
.identity-comparison th, .identity-comparison td { min-width: 155px; vertical-align: top; }
.identity-comparison th:first-child, .identity-comparison td:first-child { min-width: 110px; }
.comparison-value { overflow-wrap: anywhere; margin: 4px 0 8px; padding: 5px; }
.shared-value { background: #fff0bd; border-left: 3px solid #ad842f; color: #45391d; }
.form-group { border: 1px solid var(--line); border-radius: 6px; background: #fbfcfc; padding: 12px 16px; margin: 18px 0; }
.form-group > summary { line-height: 1.6; }
.form-group[open] > summary { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.field-hint { display: block; line-height: 1.55; max-width: 78ch; margin: -2px 0 14px; }
.choice-group .choice { align-items: flex-start; }
.choice-group .choice input { margin-top: 5px; flex: 0 0 auto; }
.choice-group .choice small { line-height: 1.55; margin-top: 3px; }
.card > details { margin-bottom: 8px; }
.card > details > summary { padding: 8px 0; }
.section-heading h2 { line-height: 1.35; }
#modal-help { max-width: 90ch; line-height: 1.6; }
#modal-guide-content p, #modal-guide-content li { line-height: 1.6; }
#modal-guide-content li { margin-bottom: 12px; }
@media (max-width: 1150px) { .public-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 850px) { #guide-content ol { display: block; } .identity-comparison th, .identity-comparison td { min-width: 150px; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

.choice-help { padding: 10px 12px; border-left: 3px solid #b3ccc3; background: #f1f6f3; font-size: .9rem; line-height: 1.6; margin-top: -2px; }

/* Checkpoint Dietisti: keep decisions and their context together. */
.result-card { margin: 1rem 0 0; border-left: 3px solid var(--accent, #397563); }
#admin-result, #collaborators-result, #settings-result { scroll-margin-top: 6rem; }
.result-card > h3 { outline: none; }
.result-stamp { font-size: .82rem; }
.chosen-candidate { display: block; background: #e5f3eb; color: #214f3a; padding: .4rem; border-radius: .3rem; }
.chosen-candidate small { display: block; font-weight: normal; }
#identity-comparison .notice { margin-bottom: .8rem; }
#duplicates-filter { align-items: end; }
#duplicates-filter [hidden] { display: none; }

/* Planning controls retain an exact input for historical/non-rounded times. */
.planning-time > span { display:block; font-weight:600; margin-bottom:.5rem; }
.planning-time-controls { display:flex; align-items:end; flex-wrap:wrap; gap:.5rem; }
.planning-time-controls label { display:flex; flex-direction:column; gap:.3rem; }
.planning-time-controls input { width:11rem; }
.planning-time-controls select { min-width:4.5rem; width:auto; }
.planning-time-controls button { margin-bottom:0; }
.precise-time { margin-top:.6rem; }
.precise-time summary { font-size:.85rem; }
.agenda-event.historical { border-style:dashed; background:#f1f4f5; color:#263b43; }
.agenda-event .call-outcome { margin:.25rem 0; overflow-wrap:anywhere; }
#call-next-actions { border-left:4px solid var(--accent, #286552); padding-left:1rem; }
