:root {
  /* „only“: Samsung Internet/Chrome-Android erzwingen sonst ein automatisches Dunkel-Design. */
  color-scheme: light only;
  font:
    16px/1.55 Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: #fafafc;
  color: #161616;
  --ink: #161616;
  --muted: #626262;
  --line: #e1e1e1;
  --brand: #e9763e;
  --brand-dark: #9c421b;
  --soft: #fff2e9;
  --focus: #161616;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  /* Mobile WebKit/Samsung: keine automatische Schriftvergrößerung, kein grauer Tipp-Blitz. */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
body {
  margin: 0;
  min-height: 100vh;
  background: #fafafc;
}
main {
  max-width: 1660px;
  margin: 0 auto;
  padding: 42px 28px 88px;
}
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 18px;
  padding: 28px 32px;
  border-radius: 18px;
  border-top: 4px solid var(--brand);
  background: var(--ink);
  color: #fff;
  --focus: #fff;
}
.welcome {
  min-width: 0;
}
.brand-logo {
  display: block;
  width: 210px;
  max-width: 100%;
  height: auto;
  margin-bottom: 24px;
}
.page-header .eyebrow {
  color: var(--brand);
}
.page-header .lead {
  color: #d7d7d9;
}
.page-header h1 {
  overflow-wrap: anywhere;
}
.eyebrow,
.kicker {
  margin: 0 0 7px;
  color: var(--brand-dark);
  letter-spacing: 0.15em;
  font-size: 0.73rem;
  font-weight: 800;
}
h1 {
  margin: 0;
  font-size: clamp(2.25rem, 4vw, 3.35rem);
  letter-spacing: -0.055em;
  line-height: 1.05;
}
h2 {
  margin: 0 0 14px;
  font-size: 1.35rem;
  letter-spacing: -0.025em;
}
h3 {
  margin: 0;
  font-size: 1.04rem;
  line-height: 1.4;
}
.lead {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
}
.identity {
  max-width: 430px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #252525;
  border: 1px solid #555;
}
.identity p {
  margin: 0 0 8px;
}
.identity.is-authenticated {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 14px;
  box-shadow: none;
}
.identity.is-authenticated::before {
  content: "";
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px #493024;
}
.identity.is-authenticated p {
  margin: 0;
  color: #d7d7d9;
  font-size: 0.84rem;
}
#status {
  min-height: 22px;
  margin: 8px 2px 12px;
  color: var(--muted);
  font-size: 0.9rem;
}
.section-nav {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 5px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.04);
}
.section-nav a {
  padding: 8px 14px;
  border-radius: 9px;
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
}
.section-nav a:first-child,
.section-nav a:hover {
  color: var(--brand-dark);
  background: var(--soft);
}
a {
  color: var(--brand-dark);
  overflow-wrap: anywhere;
}
.panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.04);
}
.briefing-panel {
  padding: 0;
  overflow: hidden;
  border-color: #ead8cc;
}
.briefing-toolbar {
  padding: 20px 22px;
  background: var(--soft);
  border-bottom: 1px solid #ead8cc;
}
.briefing-toolbar .kicker {
  margin-bottom: 6px;
}
.briefing-sources {
  margin: 0 0 20px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}
.briefing-sources summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.briefing-sources > p {
  margin: 10px 0;
  color: var(--muted);
}
.mailbox-list {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}
.mailbox-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.mailbox-row label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 650;
}
.mailbox-row input {
  width: auto;
  margin: 0;
}
.mailbox-address {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 400;
  overflow-wrap: anywhere;
}
.mailbox-remove {
  padding: 6px 10px;
  color: #8a2f35;
  border-color: #d8b9bc;
  background: #fff;
}
.mailbox-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.7fr) auto;
  align-items: end;
  gap: 10px;
}
.optional,
.source-note {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 400;
}
.day-picker {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 0.86rem;
}
.day-picker select {
  width: auto;
  min-width: 150px;
  margin: 0;
}
#briefing-content {
  padding: 22px;
}
#briefing-content.empty-state {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 118px;
}
#briefing-content.empty-state h2 {
  margin-bottom: 4px;
}
#briefing-content.empty-state p {
  margin: 0;
  color: var(--muted);
}
.empty-marker {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  border-radius: 16px;
  color: var(--brand-dark);
  background: var(--soft);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}
.columns {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(440px, 1.65fr) minmax(
      250px,
      0.85fr
    );
  gap: 20px;
  align-items: start;
}
#meetings-view {
  position: sticky;
  top: 20px;
}
#briefing-view {
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow: auto;
}
#focus-items {
  padding: 0 22px 22px;
}
#focus-items:empty {
  display: none;
}
#focus-items h3 {
  margin-top: 18px;
}
#focus-items ul {
  padding-left: 20px;
  margin: 8px 0 0;
}
#focus-items li {
  margin: 8px 0;
}
.briefing-toolbar {
  flex-wrap: wrap;
}
#briefing-content.empty-state {
  flex-direction: column;
  align-items: flex-start;
}
@media (max-width: 1200px) {
  .columns {
    grid-template-columns: minmax(0, 1.55fr) minmax(250px, 0.65fr);
  }
  #briefing-view {
    position: static;
    grid-column: 1 / -1;
    max-height: none;
  }
}
.toolbar,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.count,
.status-badge {
  display: inline-block;
  border-radius: 99px;
  padding: 4px 10px;
  background: var(--soft);
  color: var(--brand-dark);
  font-size: 0.78rem;
  font-weight: 750;
  white-space: nowrap;
}
article {
  margin: 12px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
article p {
  margin: 7px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.task {
  margin: 10px 0;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  border-left: 4px solid var(--brand);
}
.task p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.task-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}
.task-context {
  color: #484848;
}
.task-detail {
  color: #484848;
  font-size: 0.93rem;
}
.detail-label {
  display: block;
  margin: 13px 0 2px;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.is-done {
  border-left-color: #aaa;
  background: #f6f6f6;
}
.is-done h3 {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}
.is-done > summary > span:first-child {
  text-decoration: line-through;
}
.reference {
  padding-top: 7px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
}
.possible-reply {
  display: block;
  margin-top: 16px;
  font-weight: 700;
}
.possible-reply textarea {
  display: block;
  margin-top: 7px;
  min-height: 8rem;
  resize: vertical;
  font-weight: 400;
  overflow-wrap: anywhere;
}
.meeting {
  border-left: 4px solid var(--brand);
}
.meeting-agenda {
  overflow-wrap: anywhere;
}
.meeting-agenda li {
  margin-bottom: 8px;
}
.task-dependencies label, .task-checklist label { display:flex; align-items:center; gap:10px; }
.task-dependencies input[type="checkbox"], .task-checklist input[type="checkbox"] { width:auto; flex:0 0 auto; }
.task-dependencies .dependency-editor label:has(input[type="search"]) { display:block; }
.dependency-editor span { min-width:0; overflow-wrap:anywhere; }
.briefing-run-checks { overflow-wrap:anywhere; }
.task-results, #recurring-settings { overflow-wrap:anywhere; }
.calendar-empty {
  margin-top: 10px;
  padding: 22px 16px;
  border: 1px dashed #ccc;
  border-radius: 14px;
  text-align: center;
  color: var(--muted);
  background: #fafafc;
}
.calendar-empty span {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 99px;
  color: var(--brand-dark);
  background: var(--soft);
  font-size: 0.78rem;
  font-weight: 750;
}
.calendar-empty p {
  margin: 9px 0 0;
}
.completion-form {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.completion-form input {
  flex: 1;
  min-width: 0;
}
input,
textarea,
select,
button,
.button {
  font: inherit;
  border-radius: 9px;
}
input,
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #888;
  background: #fff;
  color: var(--ink);
}
button,
.button {
  display: inline-block;
  padding: 9px 14px;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}
button:hover,
.button:hover {
  filter: brightness(0.96);
}
button.secondary {
  color: var(--ink);
  border-color: #888;
  background: #fff;
}
.page-header button.secondary {
  color: #fff;
  background: transparent;
  border-color: #aaa;
}
input[type="checkbox"] {
  accent-color: var(--brand-dark);
}
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
label {
  display: block;
  font-weight: 650;
}
label input,
label textarea,
label select {
  margin-top: 5px;
  font-weight: 400;
}
textarea {
  min-height: 100px;
  resize: vertical;
}
details {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
summary {
  cursor: pointer;
  font-weight: 700;
}
.completed-tasks {
  margin-top: 18px;
  padding: 14px 2px 0;
}
.completed-tasks summary {
  color: var(--muted);
}
.planner-setup {
  margin: 0 0 20px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}
.planner-setup summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.planner-setup p {
  color: var(--muted);
}
.planner-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
  gap: 12px;
  margin-top: 14px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.form-grid label:nth-child(n + 3) {
  grid-column: 1 / -1;
}
.local-login {
  display: flex;
  align-items: end;
  gap: 8px;
  max-width: 520px;
}
[hidden] {
  display: none !important;
}
.task-views button[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}
.task-views button[aria-pressed="false"] {
  background: transparent;
  border-color: transparent;
  color: var(--ink);
}
.task-views button[aria-pressed="false"]:hover {
  background: var(--soft);
}
.task-sharing {
  margin-top: 16px;
}
.task-sharing form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
}
.task-sharing label {
  flex: 1 1 240px;
  min-width: 0;
}
.task-sharing select {
  width: 100%;
}
.task-sharing p {
  overflow-wrap: anywhere;
}
.task-search {
  margin-bottom: 18px;
}
.customer-group {
  padding: 12px 0 0;
}
.customer-group > summary {
  padding: 8px 0;
  overflow-wrap: anywhere;
}
.task > summary {
  padding: 4px 0;
}
.task > summary > span:first-child {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.task > summary::before {
  content: "▸";
  flex: none;
}
.task[open] > summary::before {
  content: "▾";
}
.task-context {
  line-height: 1.6;
}
.task-context.is-clamped {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 10;
  overflow: hidden;
}
.task-note {
  border-left: 3px solid var(--line);
  padding: 8px 12px;
  margin-top: 12px;
}
.task-note p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.task-notes button {
  margin-top: 10px;
}
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
@media (max-width: 850px) {
  main {
    padding: 24px 14px 50px;
  }
  .page-header {
    align-items: stretch;
    flex-direction: column;
    padding: 24px;
    gap: 24px;
  }
  .identity.is-authenticated {
    align-self: flex-start;
  }
  .columns,
  .form-grid {
    grid-template-columns: 1fr;
  }
  #meetings-view {
    position: static;
  }
  .planner-form {
    grid-template-columns: 1fr;
  }
  .mailbox-form {
    grid-template-columns: 1fr;
  }
  .form-grid label {
    grid-column: auto !important;
  }
  .completion-form {
    flex-direction: column;
  }
}
@media (max-width: 520px) {
  main {
    padding-inline: 12px;
  }
  .section-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
  .briefing-toolbar {
    align-items: flex-end;
  }
  #briefing-content.empty-state {
    align-items: flex-start;
    flex-direction: column;
  }
  .task-heading {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
}
.desktop-mapping-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.desktop-mapping-form label:last-of-type { grid-column: 1 / -1; }
.desktop-mapping-form label:has(> select) { grid-column: 1 / -1; min-width: 0; }
.desktop-mapping-form select { width: 100%; min-width: 0; max-width: 100%; }
.desktop-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.task-prompt textarea { width: 100%; min-height: 200px; box-sizing: border-box; }
.task-prompt select { width: 100%; }
.handoff-ready { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.handoff-ready p { flex-basis: 100%; }
.task-merge select { width: 100%; max-width: 100%; }
#briefing-audit { padding: 0 24px 24px; overflow-wrap: anywhere; }
#desktop-project-settings li { overflow-wrap: anywhere; margin: 12px 0; }
@media (max-width: 850px) { .desktop-mapping-form { grid-template-columns: 1fr; } }

.task-complete {
  flex: 0 0 auto;
  min-height: 44px;
}
.customer-group > summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.collapse-customer {
  margin-left: auto;
  min-height: 44px;
  font-size: 0.8rem;
  padding: 6px 12px;
}
.customer-group:not([open]) > summary > .collapse-customer,
.customer-group:not(:has(> details.task[open])) > summary > .collapse-customer {
  display: none;
}
.meeting-join {
  display: inline-block;
  margin: 4px 0 12px;
}
@media (max-width: 600px) {
  .task-heading {
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr) auto;
  }
  .task-heading > span:first-of-type {
    grid-column: 2 / -1;
  }
  .task-heading > .status-badge {
    grid-column: 2;
  }
  .task-heading > .task-complete {
    grid-column: 3;
    grid-row: 2;
  }
}
/* James workbench: compact tools, visible deadlines, and optional history. */
.task-toolbar { position: sticky; top: 0; z-index: 4; display: flex; align-items: end; gap: .65rem; padding: .7rem 0; background: var(--surface, #fff); }
.task-toolbar .task-search { flex: 1; margin: 0; }
.task-toolbar button { white-space: nowrap; }
.task-filters, .metric-row, .customer-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin: .6rem 0; }
.task-filters button, .metric-row button, .customer-actions > button { padding: .45rem .6rem; min-height: 36px; font-size: .85rem; }
.task-filters button[aria-pressed=true], .metric-row button[aria-pressed=true] { background: #222; color: #fff; }
.task-feedback:not(:empty) { padding: .7rem; border-left: 3px solid #e97827; background: #fff5eb; }
.task-feedback button { margin-left: .5rem; }
#manual-task-dialog { max-width: 660px; width: calc(100% - 2rem); max-height: 88vh; overflow-y: auto; border: 1px solid #bbb; border-radius: 18px; padding: 1.3rem; }
#manual-task-dialog::backdrop, .message-dialog::backdrop { background: #0008; }
#manual-task-dialog h2 { margin: 0; }
.due-badge { font-size: .75rem; white-space: nowrap; font-weight: 500; }
.due-badge.overdue { color: #9b3000; }
.attention-hints { background: #fff5eb; padding: .65rem .65rem .65rem 1.7rem; border-radius: 8px; }
.task-secondary { margin: 1rem 0; border-top: 1px solid #ddd; padding-top: .5rem; }
.task-secondary > summary { font-size: .9rem; }
.activity-chart { font-size: .8rem; margin: .6rem 0 1rem; }
.activity-bars { display: flex; align-items: end; gap: .2rem; overflow-x: auto; margin-top: .7rem; }
.activity-day { display: grid; grid-template-columns: 1fr 1fr; align-items: end; flex: 1; min-width: 24px; gap: 1px; text-align: center; }
.activity-bar { display: block; background: #e97827; color: #111; font-size: .65rem; padding-top: 2px; border-radius: 3px 3px 0 0; }
.activity-bar.done { background: #333; color: white; }
.activity-day small { grid-column: 1 / -1; }
.customer-actions details { font-size: .85rem; flex: 1; }
.next-meeting { display: none; }
.message-dialog { width: min(740px, calc(100% - 2rem)); max-height: 90vh; overflow-y: auto; border-radius: 16px; padding: 1.2rem; }
.message-dialog textarea { min-height: 10rem; width: 100%; }
.message-dialog label { display: block; margin: .7rem 0; }
.message-preview { white-space: pre-wrap; overflow-wrap: anywhere; border: 1px solid #ccc; border-radius: 8px; padding: 1rem; }
@media (max-width: 850px) {
  .next-meeting:not([hidden]) { display: block; padding: .8rem; margin-bottom: 1rem; border: 1px solid #ddd; border-radius: 10px; }
  .task-toolbar { flex-wrap: wrap; }
  .task-toolbar .task-search { min-width: 65%; }
  .metric-row { gap: .3rem; }
  .task-heading { flex-wrap: wrap; }
}
.columns > section { min-width: 0; }
.task-filters button:not([aria-pressed=true]) { background: #fff; color: #222; border-color: #d9d9d9; }
.message-dialog p { overflow-wrap: anywhere; }
@media (max-width: 850px) { .columns { grid-template-columns: minmax(0, 1fr); } .task-toolbar input { min-width: 0; } }
/* Header chart and independent customer/urgency dimensions. */
.page-header { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 1fr); align-items: start; gap: 12px 28px; }
.page-header .welcome { grid-row: 1 / 3; }
.page-header .identity { justify-self: end; }
.header-dashboard { grid-column: 2; min-width: 0; color: #fff; }
.header-dashboard .activity-chart { border-top-color: #555; margin: 0; padding-top: 10px; }
.header-dashboard summary { color: #fff; }
.header-dashboard .activity-chart p { color: #ddd; font-size: .75rem; line-height: 1.4; margin-bottom: 0; }
.header-dashboard .activity-bar.done { background: #fff; color: #111; }
.header-dashboard .activity-day small { color: #ddd; }
.task-selectors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; margin: .7rem 0; }
.task-selectors select { width: 100%; }
.filter-help { color: var(--muted); font-size: .8rem; margin: .4rem 0 1rem; }
@media (max-width: 850px) {
  .page-header { grid-template-columns: minmax(0, 1fr); }
  .page-header .welcome { grid-row: auto; }
  .page-header .identity { justify-self: stretch; }
  .header-dashboard { grid-column: 1; }
}
@media (max-width: 420px) { .task-selectors { grid-template-columns: minmax(0, 1fr); } }
.activity-day { display: flex; flex-direction: column; align-items: stretch; min-width: 0; }
.activity-stack { display: flex; flex-direction: column; justify-content: end; margin: 0 auto; width: min(100%, 40px); min-height: 105px; }
.activity-bar { border-radius: 2px; padding: 0; min-height: 0; }
.activity-unknown { border-bottom: 1px dashed #aaa; min-height: 22px; }
.activity-day small { font-size: .65rem; overflow-wrap: anywhere; }
.header-dashboard select { margin-top: .3rem; width: min(100%, 230px); background: #fff; color: #111; min-height: 36px; }
.chart-range { display: block; margin-top: .6rem; color: #eee; }
.guides-page { max-width: 1660px; }
.guides-page .page-header { grid-template-columns: minmax(0,1fr) auto; }
.guides-page .page-header a { align-self: start; }
.guide-section { margin: 1.3rem 0; padding: 1.2rem; border: 1px solid #ddd; border-radius: 12px; background: #fff; }
.guide-part { border-top: 1px solid #ddd; padding-top: .7rem; margin-top: 1rem; scroll-margin-top: 1rem; }
.guide-part li { margin-bottom: .5rem; }
.guide-snippet pre { white-space: pre-wrap; overflow-wrap: anywhere; background: #f5f5f5; color: #222; padding: 1rem; border-radius: 8px; font-size: .85rem; }
.guide-part p, #guide-version { overflow-wrap: anywhere; }
.guides-page .section-nav { gap: 1rem; flex-wrap: wrap; }
@media(max-width:600px) { .guides-page .page-header { grid-template-columns: minmax(0,1fr); } .guide-section { padding: .8rem; } }

/* Redesign 2026-11: ruhigere Flächen, ein dunkler Hauptbutton, Aufgaben als Liste mit runder Checkbox. */
:root {
  --ink: #1c1b1a;
  --muted: #6b6560;
  --line: #ece8e4;
  --field: #c9c2bb;
  --hover: #f3efeb;
  --brand: #e9763e;
  --brand-dark: #9c421b;
  --danger: #b42318;
  --done: #2f7d5b;
  --focus: #e9763e;
  background: #f6f5f3;
  color: var(--ink);
}
body { background: #f6f5f3; }
main { padding-top: 24px; }

button, .button {
  min-height: 36px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--ink);
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-size: .875rem;
  font-weight: 500;
  transition: background .15s, border-color .15s, color .15s;
}
button:hover, .button:hover { filter: none; background: #3a3734; border-color: #3a3734; }
button:disabled { opacity: .5; cursor: default; }
button.secondary, .button.secondary {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}
button.secondary:hover, .button.secondary:hover { background: var(--hover); border-color: var(--line); }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
input, textarea, select {
  padding: 8px 12px;
  border: 1px solid var(--field);
  border-radius: 10px;
  font-size: .9rem;
}
label { font-weight: 500; font-size: .875rem; }
summary { font-weight: 500; }
details { border-top-color: var(--line); }

.panel {
  border-color: var(--line);
  border-radius: 14px;
  box-shadow: none;
  background: #fff;
}
.briefing-panel { border-color: var(--line); }
.briefing-toolbar { background: #fbf7f3; border-bottom-color: var(--line); }
.eyebrow, .kicker { font-weight: 600; letter-spacing: .12em; font-size: .7rem; }
h2 { font-size: 1.25rem; font-weight: 600; letter-spacing: -.01em; }
.count { background: transparent; padding: 0; color: var(--muted); font-weight: 500; font-size: .82rem; }

/* Kopfbereich schlanker */
.page-header { padding: 20px 28px; border-radius: 14px; border-top-width: 3px; }
.brand-logo { width: 140px; margin-bottom: 14px; }
h1 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); letter-spacing: -.03em; }
.page-header .lead { margin-top: 4px; font-size: .9rem; }
.page-header button.secondary { min-height: 32px; border-color: #555; }
.page-header button.secondary:hover { background: #2a2826; }
.identity { border-color: #3a3734; background: #252322; }

/* Navigation als ruhige Segmente */
.section-nav { padding: 4px; border-color: var(--line); border-radius: 12px; box-shadow: none; background: #fff; margin-bottom: 16px; }
.section-nav button, .section-nav a { min-height: 32px; padding: 0 12px; border-radius: 8px; font-size: .875rem; font-weight: 500; }
.section-nav a { display: inline-flex; align-items: center; }
.section-nav a:first-child { color: var(--ink); background: transparent; }
.section-nav a:hover { color: var(--ink); background: var(--hover); }
.section-nav .button.secondary, .section-nav button.secondary { border-color: transparent; }
.task-views button[aria-pressed="true"] { background: var(--hover); border-color: transparent; color: var(--ink); font-weight: 600; }
.task-views button[aria-pressed="false"]:hover { background: var(--hover); }
.task-views .count { margin-left: 4px; }

/* Werkzeugleiste und Filter */
.task-toolbar { align-items: end; padding: .4rem 0 .6rem; }
.task-toolbar input { height: 38px; }
#new-task { height: 38px; }
#new-task::before { content: "+"; font-size: 1.05rem; line-height: 1; }
.task-filters { gap: 2px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.task-filters button, .task-filters button:not([aria-pressed=true]) {
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #4a4541;
  font-size: .82rem;
  font-weight: 500;
}
.task-filters button:hover { background: var(--hover); color: var(--ink); }
.task-filters button[aria-pressed=true] { background: var(--hover); color: var(--ink); font-weight: 600; }
.task-view-mode { display: flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 10px; height: 38px; align-items: center; }
.task-view-mode button, .task-view-mode button:not([aria-pressed=true]) {
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #4a4541;
  font-size: .82rem;
  font-weight: 500;
}
.task-view-mode button:hover { background: var(--hover); color: var(--ink); }
.task-view-mode button[aria-pressed=true] { background: var(--hover); color: var(--ink); font-weight: 600; }
.customer-chip { display: inline-block; max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 1px 8px; border-radius: 999px; background: var(--hover); color: var(--muted); font-size: .72rem; font-weight: 500; vertical-align: middle; }
.task-selectors { gap: .5rem; }
.task-selectors label { color: var(--muted); font-size: .78rem; }
.task-selectors select { margin-top: 3px; min-height: 34px; padding: 4px 10px; font-size: .85rem; }
.filter-help { font-size: .75rem; margin: .3rem 0 .8rem; }
/* Kunde/Dringlichkeit eingeklappt unter den Schnellfiltern */
.task-more-filters { margin: 0 0 .4rem; padding: 0; border: 0; background: transparent; box-shadow: none; }
.task-more-filters > summary { display: inline-block; padding: 2px 0; color: var(--muted); font-size: .78rem; font-weight: 500; cursor: pointer; list-style: none; }
.task-more-filters > summary::-webkit-details-marker { display: none; }
.task-more-filters > summary::before { content: "›"; display: inline-block; margin-right: 6px; transition: transform .15s ease; }
.task-more-filters[open] > summary::before { transform: rotate(90deg); }
.task-more-filters > summary:hover { color: var(--ink); }
.task-filter-active { color: var(--brand-dark, #9c421b); font-weight: 600; }
.task-filters button[hidden] { display: none; }

/* Kundengruppen */
.customer-group { padding-top: 6px; }
.customer-group > summary {
  gap: 8px;
  padding: 8px 0 6px;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .01em;
}
.customer-group > summary button {
  min-height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 500;
}
.customer-group > summary button:hover { background: var(--hover); color: var(--ink); }
/* Abstandshalter: schiebt Kundenwissen, Zuklappen und + nach rechts (früher über „Status kopieren“). */
.customer-group > summary::after { content: ""; order: 0; flex: 1 1 0; }
.customer-group > summary .collapse-customer { order: 2; margin-left: 0; min-height: 30px; }
.customer-group > summary .customer-add { order: 3; width: 30px; padding: 0; font-size: 1.05rem; }

/* Aufgaben als Liste */
.task {
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
}
.customer-group > .task:first-of-type { border-top-left-radius: 12px; border-top-right-radius: 12px; }
.customer-group > .task:last-of-type { border-bottom-left-radius: 12px; border-bottom-right-radius: 12px; }
.customer-group > .task + .task { border-top: 0; }
.task[open] { box-shadow: inset 3px 0 0 var(--brand); }
.task > summary.task-heading {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 10px;
  margin: 0;
  /* Platz links für die Checkbox, die über die volle Kopfhöhe mittig steht. */
  padding: 12px 40px 12px 50px;
  min-height: 60px;
  list-style: none;
}
.task > summary.task-heading::-webkit-details-marker { display: none; }
.task > summary.task-heading:hover { background: #faf8f6; }
.task:not(.is-done) > summary::before, .task:not(.is-done)[open] > summary::before { content: none; }
.task > summary::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid #8a837c;
  border-bottom: 1.5px solid #8a837c;
  transform: translateY(-50%) rotate(-45deg);
  transition: transform .15s;
}
.task[open] > summary::after { transform: translateY(-70%) rotate(45deg); }
.task > summary.task-heading > span:first-child {
  flex: 1 1 100%;
  font-size: .95rem;
  font-weight: 500;
  line-height: 1.35;
}
.task-complete {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  min-height: 24px;
  height: 24px;
  padding: 0;
  border: 1.5px solid var(--field);
  border-radius: 50%;
  background: #fff;
  font-size: 0;
  color: transparent;
}
/* Vorschau-Häkchen: dieselbe zentrierte Grafik wie bei erledigten Aufgaben (ein gedrehtes Rahmen-L sitzt
   optisch nie mittig), in Markenfarbe; auch bei Tastaturfokus. */
.task-complete:hover,
.task-complete:focus-visible {
  border-color: var(--brand);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e9763e' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.is-done > summary.task-heading::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--done) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.is-done { background: #fff; }
.is-done > summary > span:first-child { color: #8a837c; text-decoration-thickness: 1px; }
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 500;
}
.status-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.status-badge[data-status="waiting"]::before { background: #6b7fa8; }
.status-badge[data-status="blocked"]::before { background: var(--danger); }
.status-badge[data-status="done"]::before { background: var(--done); }
.status-badge[data-status="archived"]::before { background: #a8a19a; }
.status-badge[data-status="suggested"] { color: var(--done); }
.status-badge[data-status="suggested"]::before { background: transparent; border: 1.5px solid var(--done); width: 6px; height: 6px; }
.done-suggestion { margin: 10px 0; padding: 10px 12px; border-radius: 10px; background: #eef6f1; border: 1px solid #cfe5d8; }
.done-suggestion p { margin: 0; font-size: .85rem; }
.done-suggestion p:first-child { font-weight: 600; color: #1f5a40; }
.done-suggestion-reason { margin-top: 4px !important; color: #4a4541; overflow-wrap: anywhere; }
.done-suggestion-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.due-badge { color: var(--muted); font-size: .75rem; font-weight: 500; }
.due-badge.overdue { color: var(--danger); }

/* Aufgeklappter Inhalt */
.task[open] > :not(summary) { margin-left: 50px; margin-right: 20px; }
.task[open] > :last-child { margin-bottom: 16px; }
.task-context { margin: 2px 0 12px; color: #4a4541; font-size: .9rem; }
.task-detail { margin: 10px 0; font-size: .85rem; color: var(--ink); }
.detail-label { margin: 0 0 2px; color: var(--muted); font-size: .68rem; font-weight: 600; letter-spacing: .06em; }
.task h4 { margin: 14px 0 4px; font-size: .68rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.meeting-agenda { margin: 12px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: .85rem; }
.meeting-agenda h4 { margin-top: 0; }
.meeting-agenda p, .meeting-agenda ul { margin: 2px 0; }
.attention-hints { margin: 10px 0; padding: 10px 12px 10px 28px; border-radius: 10px; background: #fbf4ee; font-size: .85rem; color: #4a4541; }
.possible-reply { margin-top: 14px; color: var(--muted); font-size: .68rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.possible-reply textarea { min-height: 6rem; margin-top: 6px; border-color: var(--line); background: #faf8f6; color: var(--ink); font-size: .9rem; letter-spacing: 0; text-transform: none; }
.task[open] > button { margin-top: 10px; min-height: 34px; font-size: .82rem; }
.task-updated { margin: 12px 0 0; color: #a8a19a; font-size: .75rem; }
.task-more, .task > details { margin-top: 10px; padding-top: 8px; border-top: 1px solid #f1ede9; }
.task-more > summary, .task > details > summary { color: var(--muted); font-size: .82rem; }
.task-more details { margin-top: 10px; padding-top: 10px; border-top-color: #f1ede9; }
.task-more details > summary { font-size: .82rem; color: #4a4541; }
.task-secondary { margin: 10px 0 0; border-top-color: #f1ede9; }
.completion-form { margin-top: 10px; }
.reference { font-size: .78rem; }

/* Erledigt-Bereich und Rückmeldung */
.completed-tasks { margin-top: 14px; }
.completed-tasks > summary { font-size: .85rem; font-weight: 500; }
.task-feedback:not(:empty) {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 20;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100% - 32px);
  padding: 10px 12px 10px 16px;
  border: 0;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-size: .85rem;
  box-shadow: 0 12px 32px rgba(28, 27, 26, .18);
}
.task-feedback button { margin: 0; min-height: 30px; border-color: #4a4541; background: transparent; color: #fff; }
.task-feedback button:hover { background: #3a3734; }
/* Ausblenden nach 5 s (workbench.js notice). */
.task-feedback { transition: opacity .6s ease; }
.task-feedback.is-fading { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .task-feedback { transition: none; } }

/* Kalender: eigener Scrollbereich, unabhängig von der Aufgabenliste */
.meeting { border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: 10px; padding: 12px 14px; }
@media (min-width: 851px) {
  #meetings-view {
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  #briefing-view { overscroll-behavior: contain; }
}

/* Dialoge */
#manual-task-dialog, .message-dialog { border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 60px rgba(28, 27, 26, .2); }
#manual-task-dialog::backdrop, .message-dialog::backdrop { background: rgba(28, 27, 26, .35); }
#close-task-dialog { background: transparent; color: var(--muted); border-color: transparent; }
#close-task-dialog:hover { background: var(--hover); color: var(--ink); }

@media (max-width: 600px) {
  .task > summary.task-heading { display: flex; }
  .task[open] > :not(summary) { margin-left: 16px; margin-right: 16px; }
}

/* Formatierte Notizen und Beschreibungen (Markdown aus dem Notizblock, 12.11.2026). */
.rich-text > :first-child { margin-top: 0; }
.rich-text > :last-child { margin-bottom: 0; }
.rich-text p { margin: 0 0 .5em; white-space: normal; overflow-wrap: anywhere; }
.rich-text ul, .rich-text ol { margin: 0 0 .5em; padding-left: 1.4em; }
.rich-text li { margin: .15em 0; overflow-wrap: anywhere; }
.rich-text li > ul, .rich-text li > ol { margin: .15em 0 0; }
.task-note .rich-text p { white-space: normal; }
