/* Kryptotext – ergänzt die main.css, definiert bewusst keine globalen Farben.
   Alle Tokens mit Fallback, damit die Seite auch ohne main.css benutzbar bleibt. */

.kt {
  max-width: 60rem;
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 3rem) 1.25rem 4rem;
  font-family: var(--font-body, system-ui, sans-serif);
}

/* --- Kopf --- */
.kt-head { margin-bottom: 2rem; }

.kt-title {
  font-family: var(--font-display, var(--font-body, serif));
  font-size: clamp(2.25rem, 6vw, 3.25rem);
  line-height: 1.1;
  margin: 0 0 .5rem;
  color: var(--accent, #a78bfa);
}

.kt-lead {
  margin: 0;
  max-width: 46rem;
  color: var(--muted, #a0a0b0);
  line-height: 1.6;
}

/* --- Karten --- */
.kt-card {
  background: var(--surface, #17141f);
  border: 1px solid var(--line, #2c2740);
  border-radius: 14px;
  padding: clamp(1rem, 3vw, 1.5rem);
  margin-bottom: 1.25rem;
}

.kt-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
}

.kt-card-title {
  font-family: var(--font-display, var(--font-body, serif));
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 .75rem;
  letter-spacing: .01em;
}

.kt-card-head .kt-card-title { margin-bottom: .75rem; }

.kt-card-tools { display: flex; gap: .5rem; }

/* --- Felder --- */
.kt-field { margin-top: 1.1rem; }
.kt-field:first-of-type { margin-top: 0; }

.kt-label {
  display: block;
  font-size: .875rem;
  font-weight: 600;
  margin-bottom: .4rem;
  letter-spacing: .02em;
}

.kt-label-note {
  font-weight: 400;
  color: var(--muted, #a0a0b0);
}

.kt-hint {
  font-size: .8125rem;
  line-height: 1.55;
  color: var(--muted, #a0a0b0);
  margin: .5rem 0 0;
}

.kt-card > .kt-hint:first-of-type { margin: 0 0 1rem; }

.kt-input-row { display: flex; gap: .5rem; align-items: stretch; }

.kt-input,
.kt-area {
  width: 100%;
  background: color-mix(in srgb, var(--surface, #17141f) 70%, #000 30%);
  color: inherit;
  border: 1px solid var(--line, #2c2740);
  border-radius: 10px;
  padding: .7rem .85rem;
  font: inherit;
  font-size: .95rem;
}

.kt-area {
  display: block;
  resize: vertical;
  min-height: 8.5rem;
  line-height: 1.5;
}

.kt-area--mono {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: .85rem;
  word-break: break-all;
}

.kt-input:focus-visible,
.kt-area:focus-visible,
.kt-drop:focus-visible,
.kt-btn:focus-visible {
  outline: 2px solid var(--accent, #a78bfa);
  outline-offset: 2px;
}

/* --- Passwortstärke --- */
.kt-meter {
  font-size: .78125rem;
  margin: .45rem 0 0;
  min-height: 1.1em;
  color: var(--muted, #a0a0b0);
}
.kt-meter[data-level="weak"]   { color: #e0736c; }
.kt-meter[data-level="medium"] { color: #d8b25c; }
.kt-meter[data-level="strong"] { color: #7fc99a; }

/* --- Dateiauswahl --- */
.kt-drop {
  border: 1px dashed var(--line, #2c2740);
  border-radius: 10px;
  padding: 1.35rem 1rem;
  text-align: center;
  cursor: pointer;
  color: var(--muted, #a0a0b0);
  font-size: .875rem;
  transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}

.kt-drop:hover,
.kt-drop.is-over {
  border-color: var(--accent, #a78bfa);
  color: var(--accent, #a78bfa);
  background: color-mix(in srgb, var(--accent, #a78bfa) 8%, transparent);
}

/* --- Listeneinträge (Schlüsseldatei, Warteschlange, Ergebnisse) --- */
.kt-items {
  list-style: none;
  margin: .6rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.kt-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-top: .6rem;
  padding: .5rem .75rem;
  border: 1px solid var(--line, #2c2740);
  border-radius: 10px;
}

.kt-items .kt-item { margin-top: 0; }

.kt-item-name {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: .8125rem;
  overflow-wrap: anywhere;
}

.kt-fieldset {
  border: 0;
  padding: 0;
  margin-top: 1.1rem;
  min-width: 0;
}

.kt-fieldset .kt-label { padding: 0; }

.kt-gen {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .5rem;
}

.kt-gen-label {
  font-size: .8125rem;
  color: var(--muted, #a0a0b0);
  margin-right: .1rem;
}

.kt-choice {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  margin-bottom: .2rem;
}

.kt-radio {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .9rem;
  cursor: pointer;
}

.kt-radio input {
  accent-color: var(--accent, #a78bfa);
  width: 1rem;
  height: 1rem;
  cursor: pointer;
}

.kt-fp {
  flex: 0 0 auto;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: .75rem;
  letter-spacing: .06em;
  color: var(--accent, #a78bfa);
  border: 1px solid color-mix(in srgb, var(--accent, #a78bfa) 40%, transparent);
  border-radius: 999px;
  padding: .15rem .55rem;
  cursor: help;
}

/* --- Reiter --- */
.kt-tabs {
  display: flex;
  gap: .35rem;
  margin: 0 0 1.25rem;
  padding: .3rem;
  border: 1px solid var(--line, #2c2740);
  border-radius: 12px;
  background: var(--surface, #17141f);
}

.kt-tab {
  flex: 1 1 0;
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  padding: .55rem 1rem;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted, #a0a0b0);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}

.kt-tab:hover { color: inherit; }

.kt-tab[aria-selected="true"] {
  background: color-mix(in srgb, var(--accent, #a78bfa) 16%, transparent);
  color: var(--accent, #a78bfa);
}

.kt-tab:focus-visible {
  outline: 2px solid var(--accent, #a78bfa);
  outline-offset: 2px;
}

/* --- Fortschritt --- */
.kt-progress {
  height: 4px;
  margin-top: 1rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent, #a78bfa) 14%, transparent);
  overflow: hidden;
}

.kt-progress-bar {
  height: 100%;
  width: 0;
  background: var(--accent, #a78bfa);
  transition: width .12s linear;
}

code {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: .95em;
}

/* --- Buttons --- */
.kt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 1rem;
}

.kt-btn {
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  padding: .6rem 1.1rem;
  border-radius: 10px;
  border: 1px solid var(--line, #2c2740);
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}

.kt-btn:hover:not(:disabled) { border-color: var(--accent, #a78bfa); }

.kt-btn:disabled { opacity: .45; cursor: not-allowed; }

.kt-btn--primary {
  border-color: color-mix(in srgb, var(--accent, #a78bfa) 55%, transparent);
  background: color-mix(in srgb, var(--accent, #a78bfa) 14%, transparent);
  color: var(--accent, #a78bfa);
}

.kt-btn--primary.is-suggested {
  background: color-mix(in srgb, var(--accent, #a78bfa) 26%, transparent);
  border-color: var(--accent, #a78bfa);
}

.kt-btn--ghost { color: var(--muted, #a0a0b0); }

.kt-btn--icon {
  font-size: .8125rem;
  font-weight: 500;
  padding: .45rem .75rem;
}

/* --- Status & Banner --- */
.kt-status {
  margin: .9rem 0 0;
  min-height: 1.3em;
  font-size: .875rem;
  color: var(--muted, #a0a0b0);
}
.kt-status[data-tone="error"] { color: #e0736c; }
.kt-status[data-tone="ok"]    { color: #7fc99a; }
.kt-status[data-tone="busy"]  { color: var(--accent, #a78bfa); }

.kt-banner {
  border-radius: 10px;
  padding: .8rem 1rem;
  font-size: .875rem;
  margin: 0 0 1.25rem;
  border: 1px solid;
}
.kt-banner--warn {
  border-color: #e0736c;
  color: #e0736c;
  background: color-mix(in srgb, #e0736c 10%, transparent);
}

.kt-tag {
  font-size: .75rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent, #a78bfa);
  border: 1px solid color-mix(in srgb, var(--accent, #a78bfa) 45%, transparent);
  border-radius: 999px;
  padding: .2rem .6rem;
}

/* --- Fuß --- */
.kt-foot {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line, #2c2740);
}

.kt-foot-title {
  font-family: var(--font-display, var(--font-body, serif));
  font-size: 1rem;
  margin: 0 0 .75rem;
  color: var(--muted, #a0a0b0);
}

.kt-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted, #a0a0b0);
  font-size: .8125rem;
  line-height: 1.7;
}

@media (max-width: 32rem) {
  .kt-actions .kt-btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, .kt-progress-bar { transition: none !important; animation: none !important; }
}
