/* Derived colors keep text, selected controls and focus rings legible. */
:root[data-custom-accent] {
  --accent-solid: var(--chosen-color);
  --accent-on: var(--on-chosen);
  --accent-tint: color-mix(in srgb, var(--chosen-color) 10%, white);
  --accent-line: color-mix(in srgb, var(--chosen-color) 45%, #aaa);
  --accent-ink: color-mix(in srgb, var(--chosen-color) 46%, #161616);
  --accent-indicator: color-mix(in srgb, var(--chosen-color) 72%, #383838);
  --accent-light: color-mix(in srgb, var(--chosen-color) 55%, white);
  --orange: var(--accent-solid);
  --purple: var(--accent-ink);
  --purple-dark: var(--accent-ink);
  --pale: var(--accent-tint);
  --bg: color-mix(in srgb, var(--chosen-color) 6%, #f3f3f3);
}
[data-custom-accent] .compare-page { background: var(--bg); }
[data-custom-accent] .summary-strip,
[data-custom-accent] .agenda-input button { color: var(--on-chosen); }
[data-custom-accent] .classic-brand img,
[data-custom-accent] .brand img {
  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='42' height='45'/%3E");
  background: var(--accent-indicator);
  mask: url("./assets/classic/mark.svg") center / contain no-repeat;
}
.mobile-menu-button { display: none; }
.classic-header .theme-menu > summary {
  display: flex;
  align-items: center;
  gap: 6px;
}
.current-color, .color-presets i {
  display: inline-block;
  border: 1px solid #0003;
  border-radius: 50%;
}
.current-color {
  width: 16px;
  height: 16px;
  background: var(--orange);
}
.color-presets {
  display: flex;
  gap: 2px;
}
.classic-header .color-presets button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
}
.color-presets i {
  width: 23px;
  height: 23px;
  background: var(--swatch);
}
.color-presets [aria-pressed=true] i {
  outline: 2px solid #292622;
  outline-offset: 2px;
}
.custom-color {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 6px;
  font-size: 15px;
}
.custom-color input {
  height: 40px;
  width: 48px;
  padding: 3px;
  cursor: pointer;
}
/* Separate the code field and submit action where they cannot share a row. */
@media screen and (max-width: 480px) {
  .join-bar > div,
  [data-design] .join-bar > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    height: auto;
    gap: 8px;
    padding: 0;
    background: none;
  }
  .join-bar input,
  [data-design] .join-bar input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border-radius: 22px;
    background: var(--black);
  }
  .join-bar button {
    min-height: 44px;
    white-space: normal;
  }
  .join-bar > div:focus-within {
    outline: none;
  }
  .classic-shell .join-bar input:focus,
  .room-body .join-bar input:focus {
    outline: 2px solid var(--accent-ink, #b95908);
    outline-offset: 2px;
  }
}
@media screen {
  html:is(:not([data-design]), [data-design="klassik"], [data-design="register"])
    .module-card .module-start {
    width: min(100%, 11rem);
    min-width: 0;
    min-height: 44px;
    padding-inline: 8px;
    text-align: center;
    white-space: nowrap;
  }
  :is(.flow-actions, .live-work .actions) > .button,
  .live-agenda > .button {
    width: min(100%, 14rem);
    min-height: 44px;
    text-align: center;
  }
  .form-footer {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .form-footer .button {
    min-height: 44px;
    overflow-wrap: anywhere;
  }
}
@media screen and (651px <= width <= 850px) {
  html:is(:not([data-design]), [data-design="klassik"]) .module-card.large {
    grid-template-columns: 66px minmax(0, 1fr);
    column-gap: 12px;
    padding: 14px;
  }
  html:is(:not([data-design]), [data-design="klassik"]) .module-card.large .module-art {
    width: 64px;
    height: 64px;
  }
}
@media screen and (900px < width <= 1040px) {
  html:is(:not([data-design]), [data-design="klassik"]) .module-card {
    grid-column: span 2;
  }
}
@media screen and (651px <= width <= 760px) {
  html[data-design="register"] .format-panel:not([hidden]) {
    grid-template-columns: 1fr;
  }
}
@media screen and (max-width: 530px) {
  :is(.flow-actions, .live-work .actions):has(> .button + .button) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    align-items: stretch;
  }
  :is(.flow-actions, .live-work .actions):has(> .button + .button) > .button {
    width: 100%;
    padding-inline: 8px;
    overflow-wrap: anywhere;
    hyphens: auto;
  }
  .flow-actions.live-footer > .button {
    gap: 4px;
    font-size: .875rem;
  }
}
@media screen and (max-width: 365px) {
  :is(.flow-actions, .live-work .actions):has(> .button + .button) {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media screen and (max-width: 1040px) {
  .classic-header, #topbar.classic-header, .room-head.classic-header {
    width: min(94%, 960px);
    height: 56px;
    min-height: 56px;
    margin: 12px auto 0;
    padding: 0 8px 0 15px;
    gap: 8px;
    flex-wrap: nowrap;
    border-radius: 18px;
    z-index: 5;
  }
  .classic-header .classic-brand { gap: 8px; }
  .classic-header .classic-brand img { width: 29px; height: 29px; }
  .classic-header .classic-brand strong { font-size: 23px; }
  .mobile-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 12px;
    background: var(--accent-tint, #f5f1ec);
    color: var(--ink);
    font: 600 15px Outfit, sans-serif;
  }
  .mobile-menu-button i { width: 15px; height: 10px; border-block: 2px solid; }
  .mobile-menu-button[aria-expanded=true] i {
    border: none;
    height: 16px;
    background: linear-gradient(45deg, transparent 45%, currentColor 46% 54%, transparent 55%),
      linear-gradient(-45deg, transparent 45%, currentColor 46% 54%, transparent 55%);
  }
  .classic-header #main-navigation { display: none; }
  .classic-header .mobile-menu-button[aria-expanded=true] + #main-navigation {
    display: grid;
    gap: 0;
    align-items: stretch;
    justify-content: stretch;
    position: absolute;
    inset: calc(100% + 6px) 0 auto;
    max-height: calc(100dvh - 90px);
    overflow: auto;
    overscroll-behavior: contain;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: white;
    box-shadow: 0 10px 26px #27211a24;
  }
  #main-navigation > button[data-module],
  #main-navigation > .management-insights-link,
  #main-navigation > .workspace-nav-link,
  #main-navigation .classic-menu summary,
  #main-navigation > .design-picker {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    max-width: none;
    padding: 7px 8px;
    font-size: 16px;
    text-align: left;
    overflow-wrap: anywhere;
    white-space: normal;
  }
  #main-navigation .classic-menu summary::after {
    content: "";
    margin-left: auto;
    width: 7px;
    height: 7px;
    border: solid #615b54;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
  }
  #main-navigation .classic-menu[open] summary::after { transform: rotate(225deg); }
  #main-navigation .classic-menu > div {
    position: static;
    min-width: 0;
    width: auto;
    padding: 4px 8px;
    border: 0;
    border-radius: 10px;
    box-shadow: none;
    background: #f8f7f5;
  }
  #main-navigation .classic-menu > div :is(button, a) { min-height: 44px; }
}
.flow-frame .has-live-question, .room-main .flow-frame .has-live-question { padding: 0; }
[data-smooth-details][data-resizing] { overflow: hidden; }
@media screen and (max-width: 650px), screen and (pointer: coarse) {
  .outlook-prepare .modal-form :is(input:not([type="checkbox"]):not([type="range"]), select, textarea),
  .room-main .room-form :is(input:not([type="checkbox"]):not([type="range"]), select, textarea),
  .classic-shell .flow-frame :is(input:not([type="checkbox"]):not([type="range"]), select, textarea),
  .classic-shell #dialog-content :is(input:not([type="checkbox"]):not([type="range"]), select, textarea) {
    font-size: max(16px, 1rem);
  }
}
:is(.flow-frame[data-stage="people"], .flow-title:has(+ .flow-frame[data-stage="people"])) {
  --people-inset: clamp(18px, 3vw, 30px);
}
.flow-title:has(+ .flow-frame[data-stage="people"]) {
  max-width: 940px;
  margin-inline: auto;
  padding-inline: calc(var(--people-inset) + 1px);
  text-align: left;
}
.flow-frame[data-stage="people"] > .invite-code {
  display: grid;
  justify-items: start;
  margin: 0;
  padding: 18px var(--people-inset);
  border: 0;
  border-radius: 0;
}
.flow-frame[data-stage="people"] :is(.panel-title, .task-row, .setting),
.room-main .flow-frame[data-stage="people"] details.room-section,
.flow-frame[data-stage="people"] > .flow-actions {
  padding-inline: var(--people-inset);
}
.flow-frame[data-stage="people"] > .flow-actions { justify-content: flex-start; }
.flow-frame[data-stage="people"] .panel-title { flex-wrap: wrap; }
.flow-frame[data-stage="people"] details.room-section > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  list-style: none;
}
.flow-frame[data-stage="people"] details.room-section > summary::-webkit-details-marker {
  display: none;
}
.flow-frame[data-stage="people"] details.room-section > summary::after {
  content: "";
  flex: 0 0 24px;
  block-size: 24px;
  border-radius: 50%;
  background: #f4f1ed url("./assets/chevron-down.svg") center / 16px no-repeat;
}
.flow-frame[data-stage="people"] details.room-section[open]:not([data-closing]) > summary::after {
  transform: rotate(180deg);
}
@media (prefers-reduced-motion: no-preference) {
  [data-smooth-details] > summary::after { transition: transform .18s ease-out; }
}
/* Keep the question and its clock together, including on narrow displays. */
.flow-frame:has(.live-question) { max-width: 1100px; }
.flow-frame .question-banner.live-question {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, .26fr);
  align-items: start;
  gap: 18px clamp(20px, 3.5vw, 48px);
  margin: 0;
  padding: clamp(16px, 2vw, 24px) clamp(18px, 3.7vw, 46px) 20px;
  color: var(--accent-on, #21170c);
  text-align: left;
}
.chapter-proposer, .chapter-clock > span, .meeting-context span {
  font-size: .92rem;
  font-weight: 500;
  line-height: 1.4;
}
.chapter-copy { min-width: 0; }
.chapter-proposer { display: block; margin-top: 8px; overflow-wrap: anywhere; }
.flow-frame .live-question h2 {
  margin: 0;
  color: inherit;
  font-size: clamp(1.875rem, 3.7vw, 3.2rem);
  font-weight: 640;
  letter-spacing: -.035em;
  line-height: 1.08;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.live-question tact-question { display: block; }
.live-question tact-question h2 {
  hyphens: auto;
}
@media screen {
  tact-question[data-folded] h2 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
  }
}
.question-toggle {
  margin-top: 6px;
  padding: 6px 0;
  min-height: 36px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: .95rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: .2em;
  cursor: pointer;
}
@media print { .question-toggle { display: none; } }
.flow-frame .question-banner:not(.live-question) > div { min-width: 0; overflow-wrap: anywhere; }
.live-question h2:focus { outline: none; }
.chapter-clock {
  display: grid;
  align-content: center;
  gap: 2px;
  padding-inline-start: clamp(16px, 2vw, 26px);
  border-inline-start: 1px solid color-mix(in srgb, currentColor 32%, transparent);
  font-variant-numeric: tabular-nums;
}
.chapter-clock strong {
  font-size: clamp(2.1rem, 3.3vw, 3rem);
  font-weight: 580;
  line-height: 1.1;
}
.chapter-clock progress {
  appearance: none;
  width: 100%;
  height: 5px;
  margin: 7px 0 0;
  border: 0;
  border-radius: 4px;
  background: color-mix(in srgb, currentColor 22%, transparent);
  color: inherit;
}
.chapter-clock progress::-webkit-progress-bar { background: transparent; }
.flow-frame .chapter-clock progress::-webkit-progress-value { background: currentColor; }
.chapter-clock progress::-moz-progress-bar { background: currentColor; }
.chapter-clock .clock-over { font-weight: 650; }
.meeting-context {
  grid-column: 1 / -1;
  display: flex;
  align-items: start;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  padding-top: 12px;
  border-top: 1px solid color-mix(in srgb, currentColor 32%, transparent);
}
.meeting-context > div { display: grid; min-width: 0; gap: 2px; }
.meeting-context strong { font-size: 1rem; font-weight: 570; overflow-wrap: anywhere; }
.live-work { padding: 20px clamp(18px, 4vw, 48px) 26px; }
@media (max-width: 650px) {
  .flow-frame .question-banner.live-question {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
  }
  .chapter-clock {
    grid-template-columns: auto auto 1fr;
    align-items: baseline;
    gap: 2px 8px;
    border: 0;
    padding: 0;
  }
  .chapter-clock strong { font-size: 1.55rem; }
  .chapter-clock :is(progress, .clock-over) { grid-column: 1 / -1; }
  .meeting-context { gap: 8px 20px; padding-top: 10px; }
}
.editing-chapter {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-left: 3px solid var(--accent-indicator, #d66b17);
  background: var(--accent-tint, #fff1df);
}

/* Give the moderator room to write and to open the next chapter. */
.live-agenda > .button { margin-top: 12px; }
@media screen and (min-width: 900px) {
  body:has(.flow-frame[data-stage="live"]) :is(#topbar.classic-header, .room-head.classic-header),
  .classic-shell #main:has(.flow-frame[data-stage="live"]),
  .room-main:has(.flow-frame[data-stage="live"]) {
    width: calc(100% - 2 * clamp(10px, 1vw, 22px));
    max-width: none;
  }
  body:has(.flow-frame[data-stage="live"]) :is(#topbar.classic-header, .room-head.classic-header) {
    height: 52px;
    min-height: 52px;
    margin: 8px auto 0;
    padding-inline: clamp(15px, 2vw, 32px);
    border-radius: 16px;
  }
  :is(#main,.room-main):has(.flow-frame[data-stage="live"]) {
    padding-bottom: 12px;
  }
  :is(#main,.room-main):has(.flow-frame[data-stage="live"]) > .flow-title {
    margin: 12px 0 10px;
    padding-inline: clamp(14px, 1.8vw, 30px);
    max-width: none;
    font-size: clamp(1.45rem, 2vw, 2rem);
    text-align: left;
    overflow-wrap: anywhere;
  }
  .flow-frame[data-stage="live"] {
    max-width: none;
    width: 100%;
    border-radius: 16px;
  }
  html:not([data-design="spalten"]) .flow-frame[data-stage="live"] > .process-strip {
    min-height: 42px;
    padding-block: 3px;
  }
  .live-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.85fr) minmax(280px, 1fr);
    align-items: stretch;
  }
  .live-layout > .has-live-question { display: contents; }
  .live-layout .live-question {
    grid-column: 1 / -1;
    padding-inline: clamp(22px, 2vw, 40px);
    grid-template-columns: minmax(0, 1fr) clamp(155px, 15vw, 275px);
  }
  .live-layout .live-work, .live-layout .live-agenda {
    min-width: 0;
    padding: 20px clamp(20px, 2vw, 40px);
    overflow-wrap: anywhere;
  }
  .live-layout .live-work { border-bottom: 1px solid var(--line); }
  .room-main .live-work > .room-form[data-op="notes"] { max-width: none; width: 100%; }
  .live-layout .live-work textarea:is(#live-notes,[name="notes"]) {
    min-height: clamp(135px, 19vh, 300px);
  }
  .live-layout .live-agenda {
    border-inline-start: 1px solid var(--line);
    background: #faf9f6;
  }
  .live-layout .live-agenda h2 { margin: 0 0 10px; font-size: 1.15rem; }
  .live-agenda .next-chapter {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 12px;
    padding-block: 12px;
    border-bottom: 1px solid var(--line);
  }
  .live-agenda .next-chapter .button { justify-self: start; }
  .live-agenda .chapter-fold { padding: 0; }
  .live-agenda .chapter-fold > summary { padding: 12px 0; }
  .live-agenda .chapter-fold > summary small { flex: none; }
  .room-main .live-agenda .chapter-fold > .room-section { padding: 12px 0; }
  .live-footer { justify-content: flex-end; padding: 12px clamp(20px, 2vw, 40px); }
  .live-footer > button:first-child { margin-inline-end: auto; }
  .classic-shell .workspace:has(.live-layout) {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
  }
  .classic-shell #main:has(.live-layout) {
    flex: 1;
    display: flex;
    flex-direction: column;
  }
  html:not([data-design="spalten"]) .classic-shell .flow-frame:has(.live-layout) {
    flex: 1;
    display: flex;
    flex-direction: column;
  }
  .classic-shell .live-layout { flex: 1; grid-template-rows: auto 1fr; }
  .classic-shell .live-layout .live-work { display: flex; flex-direction: column; }
  .classic-shell .live-layout #live-notes { flex: 1; }
}
@media screen and (max-width: 899px) {
  .classic-shell #main:has(.flow-frame[data-stage="live"]),
  .room-main:has(.flow-frame[data-stage="live"]),
  body:has(.flow-frame[data-stage="live"]) :is(#topbar.classic-header, .room-head.classic-header) {
    width: calc(100% - 16px);
  }
  :is(#main, .room-main):has(.flow-frame[data-stage="live"]) > .flow-title {
    margin: 16px 8px 12px;
    font-size: clamp(1.4rem, 4.6vw, 1.85rem);
    overflow-wrap: anywhere;
  }
}
.live-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 6px clamp(4px, 1vw, 16px);
}
.live-heading .flow-title {
  flex: 1 1 8rem;
  min-width: 0;
  max-width: none;
  margin: 0;
  text-align: left;
  font-size: clamp(1.35rem, 2vw, 2rem);
  overflow-wrap: anywhere;
}
.live-heading .live-nav-toggle {
  min-height: 40px;
  font-size: .9rem;
  margin-inline-start: auto;
}
@media screen {
  body:has(.live-nav-toggle[aria-expanded="false"]) :is(#topbar, #account.classic-header),
  .live-heading:has([aria-expanded="false"]) + .flow-frame > :is(#meeting-steps, #mobile-steps) {
    display: none;
  }
}
@media screen and (min-width: 851px) {
  [data-design="spalten"] .live-heading:has([aria-expanded="false"]) + .flow-frame {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: stretch;
    background: white;
  }
}
@media print {
  .live-nav-toggle { display: none; }
}
.live-nav-edge { display: none; }
@media screen and (min-width: 900px) and (hover: hover) and (pointer: fine) {
  .live-heading .live-nav-toggle { display: none; }
  .live-heading .live-nav-edge {
    display: block;
    position: fixed;
    inset: 0 0 auto;
    height: 8px;
    z-index: 20;
  }
  .live-heading:has([aria-expanded="false"]) .live-nav-edge::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 50%;
    width: 36px;
    height: 3px;
    transform: translateX(-50%);
    border-radius: 2px;
    background: #928a80;
  }
  body:has(.live-nav-toggle) :is(#topbar.classic-header, #account.classic-header) {
    position: sticky;
    top: 0;
  }
}
@media screen and (min-width: 900px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  body:has(.live-nav-toggle) :is(#topbar.classic-header, #account.classic-header, #meeting-steps, #mobile-steps) {
    transition: opacity .16s ease, translate .16s ease, display .16s allow-discrete;
  }
  body:has(.live-nav-toggle[aria-expanded="false"]) :is(#topbar.classic-header, #account.classic-header, #meeting-steps, #mobile-steps) {
    opacity: 0;
    translate: 0 -12px;
    pointer-events: none;
  }
  @starting-style {
    body:has(.live-nav-toggle[aria-expanded="true"]) :is(#topbar.classic-header, #account.classic-header, #meeting-steps, #mobile-steps) {
      opacity: 0;
      translate: 0 -12px;
    }
  }
}
