/* ─── Reset ─────────────────────────────────────────── */
* {
  box-sizing: border-box;
}

body, html {
  background: #F2F3F5;
  font-family: system-ui, sans-serif;
  font-weight: normal;
  font-size: 14px;
  line-height: 1.6;
  color: #1a1a1a;
}

/* ─── Layout ─────────────────────────────────────────── */
.wrapper {
  margin: 0 auto;
  max-width: 100ch;
  padding-inline: 1.5rem;
}

.Kopf img {
  display: block;
  margin: 1.5rem auto 1rem;
  width: 100%;
  max-width: 400px;
}

/* ─── Auswertungs-Kacheln ────────────────────────────── */
.auswertung {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-block: 0.5rem;
}

.auswertung > div {
  background: #fff;
  padding: 1rem 1rem 1.1rem;
  border-radius: 14px;
  text-align: center;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06), 0 3px 10px rgba(0,0,0,0.04);
  transition: box-shadow 0.2s;
}

.auswertung > div:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.09), 0 4px 16px rgba(0,0,0,0.06);
}

.auswertung > div > div:first-child {
  color: #777;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.auswertung > div > div:last-child {
  font-size: 1.55rem;
  font-weight: 700;
  color: #111;
  line-height: 1.2;
}

/* ─── Texteingabe ────────────────────────────────────── */
.forms {
  margin-block: 0.75rem;
}

.highlight-wrapper {
  position: relative;
  border-radius: 14px;
  border: 1.5px solid rgba(0,0,0,0.09);
  box-shadow: 0 1px 4px rgba(0,0,0,0.05), 0 3px 12px rgba(0,0,0,0.04);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.highlight-wrapper:focus-within {
  border-color: #39C55B;
  box-shadow: 0 0 0 3px rgba(57,197,91,0.12), 0 2px 8px rgba(0,0,0,0.07);
}

.highlight-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 1rem;
  background: #fff;
  border-radius: 13px;
  font-family: system-ui, sans-serif;
  font-size: 1rem;
  line-height: normal;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow: hidden;
  color: #1a1a1a;
  pointer-events: none;
  box-sizing: border-box;
}

mark.hl-sentence {
  background-color: #e07400;
  color: white;
  padding: 1px 0;
  border-radius: 3px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

mark.hl-word {
  background-color: #c62828;
  color: white;
  padding: 1px 0;
  border-radius: 3px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.rounded-text-field {
  background: transparent;
  color: transparent;
  caret-color: #1a1a1a;
  border-radius: 13px;
  border: none;
  width: 100%;
  min-height: 66ex;
  font-size: 1rem;
  padding: 1rem;
  margin-block: 0;
  font-family: system-ui, sans-serif;
  position: relative;
  z-index: 1;
  resize: none;
  outline: none;
}

.rounded-text-field::placeholder {
  color: #bbb;
}

/* ─── Action Row ─────────────────────────────────────── */
.action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-block: 0.6rem;
}

.toggle-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.icons {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ─── Buttons ────────────────────────────────────────── */
.highlight-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 34px;
  padding: 0 13px;
  border-radius: 8px;
  border: 1.5px solid #ddd;
  background: #fff;
  color: #333;
  font-size: 13px;
  font-family: system-ui, sans-serif;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.highlight-toggle:hover {
  border-color: #bbb;
  box-shadow: 0 1px 5px rgba(0,0,0,0.11);
}

.highlight-toggle img:not(.icon-large) {
  width: 16px;
  height: 16px;
}

#toggleSentences.is-active {
  background-color: #e07400;
  border-color: #e07400;
  color: white;
  box-shadow: 0 1px 6px rgba(224,116,0,0.3);
}

#toggleWords.is-active {
  background-color: #c62828;
  border-color: #c62828;
  color: white;
  box-shadow: 0 1px 6px rgba(198,40,40,0.3);
}

/* ─── Tooltips ───────────────────────────────────────── */
.tooltip2 {
  display: inline-block;
  position: relative;
  text-align: left;
}

.tooltip2 .tooltiptext2 {
  min-width: 250px;
  top: 40px;
  left: 50%;
  transform: translate(-50%, 0);
  padding: 8px 10px;
  color: #111;
  background: #fff;
  font-weight: normal;
  font-family: system-ui;
  font-size: 13px;
  border-radius: 8px;
  position: absolute;
  z-index: 99999999;
  box-sizing: border-box;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s;
}

.tooltip2:hover .tooltiptext2 {
  visibility: visible;
  opacity: 1;
}

.tooltip {
  display: inline-block;
  position: relative;
  text-align: center;
}

.tooltip .tooltiptext {
  min-width: 120px;
  top: 40px;
  left: 50%;
  transform: translate(-50%, 0);
  padding: 6px 10px;
  color: #111;
  background: #fff;
  font-weight: normal;
  font-family: system-ui;
  font-size: 13px;
  border-radius: 8px;
  position: absolute;
  z-index: 99999999;
  box-sizing: border-box;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

/* ─── Dialog ─────────────────────────────────────────── */
.dialog-container {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.35);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(3px);
}

.dialog-content {
  background: #fff;
  padding: 24px 28px;
  border-radius: 16px;
  min-width: 270px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
  border: 1px solid rgba(0,0,0,0.06);
}

.dialog-content p {
  margin: 0.4rem 0;
  font-size: 14px;
}

.dialog-content button {
  background: #1a1a1a;
  color: white;
  border: none;
  padding: 9px 22px;
  margin-top: 18px;
  cursor: pointer;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  font-family: system-ui, sans-serif;
  transition: background 0.15s;
}

.dialog-content button:hover {
  background: #333;
}

/* ─── Footer & Navigation ────────────────────────────── */
.footer {
  color: #aaa;
  font-size: 0.75rem;
  margin-block: 1.5rem;
  text-align: center;
  line-height: 1.8;
}

.footer a {
  transition: color 0.15s;
}

.footer a:hover {
  color: #39C55B !important;
}

.footer *:first-child {
  margin-bottom: 0.5rem;
}

.footer-logo {
  text-align: center;
  margin-block: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(0,0,0,0.07);
}

.custom-menu {
  text-align: center;
  margin-block: 1.5rem;
  margin-bottom: 10px;
}

.custom-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: inline-block;
}

.custom-menu ul li {
  display: inline;
  margin-right: 20px;
}

.custom-menu ul li a {
  text-decoration: none;
  color: #323232;
  font-size: 14px;
  font-family: system-ui, sans-serif;
  font-weight: 600;
  transition: color 0.15s;
}

.custom-menu ul li a:hover {
  color: #39C55B;
}

/* ─── Material Icons ─────────────────────────────────── */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  font-size: 12px;
  line-height: 1;
  transform: translateY(1px);
}

.icon-large {
  width: 20px;
  height: 20px;
  transform: translateY(1px);
}

/* ─── Element ────────────────────────────────────────── */
.element {
  width: 32px;
  height: 32px;
  overflow: hidden;
  cursor: pointer;
  display: inline-block;
}