/* Shared shell, typography and report primitives. */
:root {
  --ink: #152644;
  --muted: #52637d;
  --paper: #f5f8fe;
  --sheet: #ffffff;
  --rule: #d4deed;
  --blue: #214fb9;
  --teal: #2455b7;
  --danger: #b53743;
  --mast: #173e98;
  --gutter: clamp(24px, 4vw, 68px);
  --display: Manrope, -apple-system, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body {
  color: var(--ink);
  background: var(--paper);
}
button,
.button,
select {
  border-color: #bdc9da;
  border-radius: 6px;
}
button,
.button {
  font-weight: 650;
}
button:hover,
.button:hover {
  background-color: #eff4ff;
}
button.primary,
.button.primary {
  background: var(--mast);
  border-color: var(--mast);
  color: #fff;
}
button.primary:hover,
.button.primary:hover {
  background: #153c95;
  border-color: #153c95;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
textarea:focus-visible {
  outline: 3px solid #4986b4;
  outline-offset: 3px;
}
a.button {
  text-decoration: none;
}
.skip {
  position: fixed;
  top: -100px;
  left: 18px;
  z-index: 20;
  background: white;
  padding: 12px 20px;
  border-radius: 4px;
}
.skip:focus {
  top: 10px;
}
main {
  margin: 0;
  min-width: 0;
}
.sidebar {
  position: relative;
  inset: auto;
  width: 100%;
  padding: 0 var(--gutter);
  min-height: 65px;
  flex-direction: row;
  align-items: stretch;
  background: #fff;
  color: #172541;
  border: 0;
  border-bottom: 1px solid #d5dfed;
  gap: clamp(15px, 2.8vw, 48px);
}
.brand,
.mobile-brand {
  padding: 0;
  gap: 9px;
  color: #182b47;
  align-items: center;
  display: inline-flex;
  white-space: nowrap;
  font-size: 19px;
  font-weight: 720;
  letter-spacing: -0.05em;
  text-decoration: none;
}
.brand img {
  width: 24px;
  height: 30px;
}
.brand em,
.login-sheet em {
  margin-left: 0.4em;
  border-left: 1px solid #c9d6e8;
  padding-left: 0.55em;
  color: #435c83;
  font-style: normal;
  font-size: 0.79em;
  font-weight: 610;
  letter-spacing: -0.025em;
}
.sidebar nav {
  display: flex;
  flex: 1;
  align-items: stretch;
  gap: clamp(8px, 1.6vw, 24px);
}
.sidebar nav a {
  position: relative;
  border-radius: 0;
  font-size: 12.5px;
  font-weight: 650;
  padding: 0 1px;
  color: #505f75;
  gap: 7px;
  transition: color 0.12s;
}
.sidebar nav a:hover,
.sidebar nav a[aria-current] {
  background: transparent;
  box-shadow: none;
  color: #204eae;
}
.sidebar nav a[aria-current]::after {
  content: "";
  height: 3px;
  border-radius: 2px 2px 0 0;
  background: #2857d5;
  position: absolute;
  inset: auto 0 0;
}
.sidebar nav svg {
  display: none;
}
.mast-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
}
.session-button {
  background: transparent;
  border: 1px solid #c7d4e7;
  color: #294b85;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding: 0;
}
.session-button svg {
  width: 18px;
  height: 18px;
}
.session-button:hover {
  background: #e7effe;
}
.nav-close,
.topbar {
  display: none;
}
.workspace {
  max-width: 1590px;
  padding: 30px var(--gutter) 64px;
}
.workspace:focus {
  outline: none;
}
.heading {
  margin: 0 0 23px;
  align-items: flex-end;
  flex-wrap: nowrap;
  gap: 16px;
}
.heading h1,
.login-sheet h1 {
  font: normal 690 clamp(32px, 2.85vw, 46px) / 1.11 var(--display);
  letter-spacing: -0.052em;
  color: var(--ink);
  text-wrap: balance;
}
.plan-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
}
.plan-line span + span::before {
  content: "/";
  margin-right: 9px;
  color: #99a8bd;
}
.heading .heading-tools {
  gap: 18px;
  align-items: center;
  padding-bottom: 4px;
}
.plan-date {
  color: var(--muted);
  font-size: 12px;
}
.plan-date time {
  font-weight: 650;
}
.scenario-entry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  padding: 9px 16px;
}
.scenario-entry svg {
  width: 18px;
  height: 18px;
}
.card {
  padding: clamp(18px, 2vw, 30px);
  border: 1px solid var(--rule);
  border-radius: 9px;
  background: var(--sheet);
  box-shadow: none;
}
.cardhead {
  gap: 16px;
  margin-bottom: 18px;
}
.card h2,
dialog h2 {
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.045em;
}
.card h2 {
  font-size: clamp(20px, 1.7vw, 26px);
}
.card .actions {
  row-gap: 10px;
}
.data {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.data td,
.data th {
  padding: 12px 10px;
  border-color: #e3eaf3;
}
.data th {
  background: #f3f6fc;
  color: #526781;
  font-weight: 650;
}
.data button.link {
  font-weight: 680;
}
.formgrid input,
.formgrid select,
select,
textarea {
  border-color: #bdcada;
  background: #fff;
}
.bar {
  background: #e4eaf3;
}
.bar span {
  background: var(--teal);
}
.flowrow .bar {
  max-width: 100%;
}
dialog {
  background: var(--sheet);
  max-height: 90dvh;
  border: 1px solid #c2cede;
  border-radius: 12px;
  padding: clamp(20px, 3vw, 38px);
  box-shadow: 0 18px 90px #101d4129;
}
dialog::backdrop {
  background: #16264361;
}
dialog h2 {
  font-family: var(--display);
  font-weight: 650;
  font-size: clamp(26px, 2.5vw, 38px);
}
.dialog-close button {
  width: 37px;
  height: 37px;
  border-radius: 50%;
  background: #eff3fb;
}
dialog .formgrid {
  margin-block: 20px;
}
dialog .note,
dialog .warn {
  line-height: 1.5;
}
.note {
  border-color: #6890be;
  background: #eef4ff;
}
.warn {
  border-color: #af6e39;
  background: #fff5e3;
}
#status:not(:empty) {
  background: #1c355d;
}
.login {
  padding: 24px;
}
.login-sheet {
  width: min(460px, 100%);
  background: var(--sheet);
  padding: 38px;
  border-block: 2px solid var(--mast);
}
.login-sheet p {
  color: var(--muted);
  margin: 14px 0 26px;
}
.login-sheet em {
  color: var(--teal);
}
.login-sheet h1 {
  margin: 26px 0 0;
  font-size: 38px;
}
@media (min-width: 1101px) {
  .workspace[data-view="entscheidungen"] > .stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
  .workspace[data-view="entscheidungen"] > .stack > :first-child {
    grid-column: 1/-1;
  }
  .workspace[data-view="historie"] > .stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .workspace[data-view="historie"] > .stack > :first-child {
    grid-column: 1/-1;
  }
}
@media (min-width: 761px) and (max-width: 1120px) {
  .sidebar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0 14px;
    padding-top: 12px;
  }
  .sidebar nav {
    grid-row: 2;
    grid-column: 1/-1;
    min-height: 43px;
    justify-content: space-between;
    gap: 8px;
  }
  .mast-tools {
    grid-column: 2;
    grid-row: 1;
  }
}
@media (max-width: 760px) {
  :root {
    --gutter: clamp(14px, 4vw, 24px);
  }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 8;
    width: min(310px, 86vw);
    flex-direction: column;
    padding: 23px;
    gap: 24px;
    transform: translateX(-101%);
    visibility: hidden;
    overflow-y: auto;
  }
  .sidebar .brand {
    min-height: 42px;
    margin-right: 25px;
    padding: 0;
  }
  .sidebar.open {
    transform: none;
    visibility: visible;
  }
  .sidebar nav {
    display: grid;
    align-content: start;
    gap: 3px;
  }
  .sidebar nav a {
    min-height: 48px;
    font-size: 15px;
    padding: 8px 12px;
    gap: 12px;
    border-radius: 6px;
  }
  .sidebar nav a[aria-current] {
    background: #e9f1ff;
  }
  .sidebar nav a[aria-current]::after {
    display: none;
  }
  .sidebar nav svg {
    display: block;
  }
  .mast-tools {
    margin: auto auto 0 0;
  }
  .session-button {
    width: 44px;
    height: 44px;
  }
  .nav-close {
    display: grid;
    place-items: center;
    position: absolute;
    top: 21px;
    right: 12px;
    color: var(--ink);
    width: 44px;
    height: 44px;
    background: transparent;
    border: 0;
    padding: 0;
    font-size: 26px;
  }
  .topbar {
    display: flex;
    justify-content: flex-start;
    gap: 9px;
    padding: 0 var(--gutter);
    height: 55px;
    background: #fff;
    border: 0;
    border-bottom: 1px solid var(--rule);
  }
  #mobile-nav {
    color: #29426b;
    background: transparent;
    border: none;
    width: 44px;
    height: 44px;
    margin-left: -10px;
    padding: 11px;
  }
  #mobile-nav svg {
    width: 22px;
    height: 22px;
  }
  .mobile-brand {
    font-size: 18px;
    gap: 2px;
    padding: 0;
  }
  .workspace {
    padding: 20px var(--gutter) 44px;
  }
  .heading {
    margin-bottom: 18px;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
  }
  .heading h1 {
    font-size: clamp(29px, 6.7vw, 39px);
  }
  .plan-line {
    font-size: 10.5px;
    gap: 5px;
    margin-bottom: 7px;
  }
  .plan-line span + span::before {
    margin-right: 5px;
  }
  .plan-date {
    display: none;
  }
  .heading .heading-tools {
    align-self: flex-end;
    padding: 0;
  }
  .heading .scenario-entry {
    min-height: 40px;
    font-size: 12px;
    gap: 6px;
    padding: 8px 10px;
  }
  .scenario-entry svg {
    width: 15px;
    height: 15px;
  }
  .card {
    padding: 17px 14px;
  }
  .stack,
  .stack > *,
  .workspace {
    min-width: 0;
  }
  .formgrid {
    grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  }
  dialog {
    width: min(96vw, 660px);
    padding: 21px 17px;
  }
  .dialog-close button {
    width: 42px;
    height: 42px;
  }
}
@media print {
  .sidebar,
  .topbar,
  .heading-tools,
  #status,
  .skip {
    display: none;
  }
  .workspace {
    padding: 0;
  }
}
/* Only the persistent navigation lets the scrolling workspace show through. */
@media (min-width: 761px) {
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 4;
  }
  @supports (backdrop-filter: blur(1px)) {
    .sidebar {
      background: rgb(255 255 255 / 89%);
      backdrop-filter: saturate(115%) blur(18px);
    }
  }
  html {
    scroll-padding-top: 110px;
  }
}
@media (prefers-reduced-transparency: reduce) {
  .sidebar {
    background: white;
    backdrop-filter: none;
  }
}
.workspace {
  --mast: #234fba;
}
.heading .scenario-entry {
  background: #fff;
  color: #234576;
  border-color: #cbd6e6;
  box-shadow: 0 1px 2px #1227460d;
}
.heading .scenario-entry:hover {
  background: #ebf2ff;
  border-color: #a7bce2;
}
.goalplot {
  background: #f0f4fc;
  margin-inline: 0;
}
.dialog-close button:active,
.session-button:active,
.scenario-entry:active {
  transform: translateY(1px);
}
:root {
  --ink: #1a2538;
  --paper: #f7f8fa;
  --muted: #59677a;
  --rule: #dce1e8;
}
.plan-line {
  font-size: 12px;
}
.heading h1:focus-visible {
  outline: none;
  text-decoration: underline;
  text-decoration-color: #9ab5e2;
  text-underline-offset: 0.15em;
  text-decoration-thickness: 2px;
}
@media (max-width: 760px) {
  /* The overview exposes the same scenario controls directly below its chart. */
  .workspace[data-view="uebersicht"] .heading-tools {
    display: none;
  }
}
@media (max-width: 760px) {
  .workspace[data-view="zeitstrahl"] .heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }
  .workspace[data-view="zeitstrahl"] .plan-line {
    grid-column: 1/-1;
  }
  .workspace[data-view="zeitstrahl"] .heading .scenario-entry {
    min-height: 42px;
  }
}
