/* inter-regular - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  src: url('fonts/inter-v20-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

@font-face {
    font-family: 'General Sans';
    src: url('fonts/GeneralSans-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'General Sans';
    src: url('fonts/GeneralSans-Italic.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'General Sans';
    src: url('fonts/GeneralSans-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'General Sans';
    src: url('fonts/GeneralSans-MediumItalic.woff2') format('woff2');
    font-weight: 500;
    font-style: italic;
    font-display: swap;
}


:root {
  --bg: #f5f7f3;
  --panel: #ffffff;
  --text: #1f2a24;
  --textdarkgrey: #666;
  --muted: #647067;
  --line: #dfe6dc;
  --accent: #FAF578;
  --soft: #e5f1e8;
  --danger: #8d2f2f;
  --danger-soft: #f7e7e7;
  --shadow: 0 14px 30px rgba(31, 42, 36, 0.08);
  --softgrey: #ededed;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:'General Sans';
  background: var(--bg);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 13px 18px;
  background: var(--accent);
  color: #000;
  /*font-weight: 750;*/
  cursor: pointer;
}

button:hover:not(:disabled) {
  filter: brightness(0.96);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

button.secondary {
  background: var(--soft);
  color: #000;
}

button.danger {
  background: var(--danger);
  color: #ffffff;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 12px 14px;
  background: #ffffff;
  color: var(--text);
  font-weight: 500;
}

input:focus,
select:focus,
button:focus-visible {
  outline: 3px solid rgba(47, 111, 78, 0.2);
  outline-offset: 2px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.criterion.panel h3{
	color: var(--textdarkgrey);
}

.hero {
  padding: 40px clamp(16px, 5vw, 72px);
  background-color: #FAF578;
  color: #000;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(34px, 6vw, 64px);
}

.hero p {
  margin-bottom: 0;
}

.eyebrow {
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  opacity: 0.85;
}

main {
  padding: 28px clamp(16px, 5vw, 72px) 60px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.intro {
  display: grid;
  gap: 22px;
  padding: 24px;
}

.intro-heading p {
  margin-bottom: 0;
  color: var(--muted);
}

.info-text{
	font-weight: 500;
	display: block;
}

/*
.project-link-label input{
	font-weight: 500;
}
*/

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 650;
}

.project-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.metadata-hint {
  color: var(--muted);
  font-size: 14px;
}

.sync {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  display: flex;
  gap: 12px;
  align-items: baseline;
  flex-wrap: wrap;
  margin-top: 25px;
}

.sync strong::before {
  content: "✓ ";
}

.sync[data-status="syncing"] strong::before {
  content: "↻ ";
}

.sync[data-status="offline"] strong::before,
.sync[data-status="error"] strong::before {
  content: "⚠ ";
}

.sync span {
  color: var(--muted);
  font-size: 14px;
}

.project {
  display: grid;
  gap: 10px;
  padding-top: 4px;
}

.project p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.project-ref {
  display: none;
}

.share {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
}

.qr {
  width: 188px;
  min-height: 188px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  display: grid;
  place-items: center;
}

.workspace {
  margin-top: 22px;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.tab-button {
  border-radius: 14px 14px 0 0;
  background: #edf1ec;
  color: var(--text);
  min-width: 150px;
}

.tab-button.active {
  background: var(--accent);
  color: #000;
}

.tab-panel[hidden] {
  display: none;
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 14px;
  margin-bottom: 18px;
}

#criteria {
  display: grid;
  gap: 16px;
}

.criterion {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border-left-width: 8px;
  border-left-style: solid;
}

.criterion.area-klimafitness {
  border-left-color: #ddd;
  box-shadow:
    inset 0 1px 0 rgba(250, 245, 120, 0.55),
    var(--shadow);
}

.criterion.area-gesundheit {
  border-left-color: #ddd;
  box-shadow:
    inset 0 1px 0 rgba(235, 224, 217, 0.75),
    var(--shadow);
}

.criterion.area-mobilität,
.criterion.area-mobilitat {
  border-left-color: #ddd;
  box-shadow:
    inset 0 1px 0 rgba(58, 58, 58, 0.18),
    var(--shadow);
}

/*
.criterion.area-klimafitness h3 {
  text-decoration: underline;
  text-decoration-color: #faf578;
  text-decoration-thickness: 5px;
  text-underline-offset: 5px;
}

.criterion.area-gesundheit h3 {
  text-decoration: underline;
  text-decoration-color: #ebe0d9;
  text-decoration-thickness: 5px;
  text-underline-offset: 5px;
}

.criterion.area-mobilität h3,
.criterion.area-mobilitat h3 {
  text-decoration: underline;
  text-decoration-color: #3a3a3a;
  text-decoration-thickness: 4px;
  text-underline-offset: 5px;
}
*/

.criterion-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
}

.criterion .tag {
  display: none;
}

.meta,
.question,
footer {
  color: var(--muted);
}

.points {
  min-width: 76px;
  height: 48px;
  border-radius: 16px;
  background: var(--bg);
  display: none;/*grid;*/
  place-items: center;
  font-size: 20px;
}

.question-block {
  margin: 12px 0 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.question-block strong {
  display: block;
  margin-bottom: 6px;
  /*color: var(--accent);*/
  color: var(--textdarkgrey);
}

.question-block p {
  margin-bottom: 0;
  line-height: 1.45;
}

.options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.option {
  min-height: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  cursor: pointer;
}

.option:hover {
  border-color: var(--accent);
}

.option.selected {
  /*border-color: var(--accent);*/
  /*background: var(--soft);*/
  background: var(--softgrey);
}

.option-content {
  display: flex;
  align-items: flex-start;
  gap: 4px;
}

.option input {
  width: auto;
  margin: 2px 10px 0 0;
}

.option span {
  /*color: var(--muted);*/
  font-size: 15px;
  line-height: 1.45;
}

.options label span{
	font-weight: 500;
}

.placeholder-panel,
.result-panel,
.actions {
  padding: 22px;
}

.placeholder-panel {
  min-height: 220px;
}

.placeholder-panel p {
  color: var(--muted);
}

.actions {
  margin-top: 18px;
}

.action-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

#bars {
  overflow-x: auto;
}

.result-chart {
  display: grid;
  gap: 13px;
  min-width: 760px;
  padding: 4px 0;
}

.result-row {
  display: grid;
  grid-template-columns: 250px minmax(280px, 1fr) 58px;
  gap: 12px;
  align-items: center;
}

.result-label {
  text-align: right;
  font-size: 13px;
  font-weight: 750;
  color: #4f5b54;
  line-height: 1.25;
}

.result-track {
  height: 13px;
  border: 1px solid #009ad6;
  background: #ffffff;
  position: relative;
}

.result-fill {
  height: 100%;
  width: 0;
  background: #009ad6;
  opacity: 0.18;
}

.result-value {
  text-align: right;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.result-spacer {
  height: 22px;
}

.result-row.total .result-label {
  font-weight: 850;
}

.decision-dialog {
  width: min(640px, calc(100% - 32px));
  border: 0;
  border-radius: 22px;
  padding: 0;
  box-shadow: 0 24px 60px rgba(31, 42, 36, 0.24);
}

.decision-dialog::backdrop {
  background: rgba(31, 42, 36, 0.45);
}

.decision-dialog form {
  padding: 24px;
}

.dialog-actions {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}


.dialog-email-field {
  display: grid;
  gap: 7px;
  margin-top: 18px;
}

.dialog-email-field label {
  font-weight: 750;
}

.dialog-email-field input {
  width: 100%;
}

.dialog-email-field small {
  color: var(--muted);
  line-height: 1.4;
}

.field-error {
  margin: 0;
  color: #9f3030;
  font-size: 14px;
  font-weight: 700;
}

.dialog-actions button {
  width: 100%;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s ease;
  box-shadow: 0 8px 22px rgba(31, 42, 36, 0.22);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

footer {
  padding: 0 clamp(16px, 5vw, 72px) 28px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  .share,
  .toolbar {
    grid-template-columns: 1fr;
  }

  .tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
  }

  .tab-button {
    min-width: 0;
    padding-inline: 8px;
  }

  .result-chart {
    min-width: 0;
    gap: 16px;
  }

  .result-row {
    grid-template-columns: 1fr 52px;
    gap: 6px 10px;
  }

  .result-label {
    grid-column: 1 / -1;
    text-align: left;
  }

  .result-track {
    grid-column: 1;
  }

  .result-value {
    grid-column: 2;
  }

  
.dialog-email-field {
  display: grid;
  gap: 7px;
  margin-top: 18px;
}

.dialog-email-field label {
  font-weight: 750;
}

.dialog-email-field input {
  width: 100%;
}

.dialog-email-field small {
  color: var(--muted);
  line-height: 1.4;
}

.field-error {
  margin: 0;
  color: #9f3030;
  font-size: 14px;
  font-weight: 700;
}

.dialog-actions button {
  width: 100%;
}

.back-to-top {
    right: 16px;
    bottom: 16px;
  }
}

@media print {
  body {
    background: #ffffff;
  }

  .hero,
  main,
  footer {
    padding: 16px;
  }

  .intro,
  .tabs,
  .actions,
  .toolbar,
  .back-to-top,
  button {
    display: none !important;
  }

  .workspace,
  #panelErgebnis {
    display: block !important;
  }

  #panelBestand,
  #panelPlanung {
    display: none !important;
  }

  .panel {
    box-shadow: none;
    break-inside: avoid;
  }
}


/* Layout-Korrekturen Version 2026-07-15_05 */
.intro {
  gap: 18px;
  margin-bottom: 75px;
}

.project-controls {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 10px 14px;
}

.metadata-hint {
  line-height: 1.35;
}

.project {
  padding-top: 0;
}

.project-share-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: start;
  margin-top: 25px;
}

.project-share-main {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.project-link-label {
  color: var(--text);
}

.share-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.share-actions button {
  min-width: 150px;
}

.qr-wrapper {
  align-self: start;
}

.qr {
  width: 188px;
  min-height: 188px;
}

.qr:empty {
  display: none;
}

.workspace {
  scroll-margin-top: 18px;
}

@media (max-width: 900px) {
  .project-controls {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .project-controls button {
    width: 100%;
  }

  .project-share-content {
    grid-template-columns: 1fr;
  }

  .share-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .share-actions button {
    min-width: 0;
    width: 100%;
  }

  .qr-wrapper {
    justify-self: start;
  }
}

@media (max-width: 520px) {
  main {
    padding-inline: 12px;
  }

  .intro {
    padding: 18px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .share-actions {
    grid-template-columns: 1fr;
  }

  .qr,
  .qr-wrapper {
    width: 100%;
  }

  .qr {
    min-height: 0;
    /*justify-content: start;*/
  }
}

/* Planung und Ergebnisvergleich – Version 2026-07-16_01 */
#planningCriteria {
  display: grid;
  gap: 16px;
}

.result-legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.result-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-swatch {
  width: 24px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.legend-bestand {
  background: #009ad6;
}

.legend-planung {
  background: var(--accent);
}

.comparison-chart {
  gap: 16px;
}

.comparison-group {
  display: grid;
  grid-template-columns: 250px minmax(360px, 1fr);
  gap: 12px;
  align-items: center;
}

.comparison-group > .result-label {
  text-align: right;
}

.comparison-series {
  display: grid;
  gap: 6px;
}

.result-series {
  display: grid;
  grid-template-columns: 70px minmax(280px, 1fr) 58px;
  gap: 10px;
  align-items: center;
}

.series-name {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.result-series-bestand .result-track {
  border-color: #009ad6;
}

.result-series-bestand .result-fill {
  background: #009ad6;
  opacity: 0.28;
}

.result-series-planung .result-track {
  border-color: #2f6f4e;
}

.result-series-planung .result-fill {
  background: var(--accent);
  opacity: 0.34;
}

.comparison-group.total > .result-label {
  font-weight: 850;
}

@media (max-width: 900px) {
  .comparison-group {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .comparison-group > .result-label {
    text-align: left;
  }

  .result-series {
    /*grid-template-columns: 64px minmax(0, 1fr) 46px;*/
	grid-template-columns: 85% minmax(0, 1fr) 46px;
    gap: 8px;
  }
}

@media print {
  .result-legend {
    display: flex !important;
  }
}


/* Optionaler externer Leitfaden-Link je Frage */
.criterion-head-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  min-width: max-content;
}

.criterion-resource {
  margin: 0;
}

.criterion-resource-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #FAF578;
  /*font-weight: 700;*/
  color: #000;
  text-decoration: none;
  white-space: nowrap;
}

.criterion-resource-link::after {
  content: "↗";
  font-size: 0.9em;
}

.criterion-resource-link:hover,
.criterion-resource-link:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
}

@media (max-width: 760px) {
  .criterion-head {
    grid-template-columns: 1fr;
  }

  .criterion-head-actions {
    align-items: flex-start;
    min-width: 0;
  }
}


.hero {
  display: flex;
  align-items: center;
  gap: 40px;
}

.hero-logo {
  width: 220px;
  height: auto;
  flex-shrink: 0;
}

.hero-content {
  min-width: 0;
}

@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .hero-logo {
    width: 180px;
  }
}
