/* Tool pages: Passwort-Hashes, Bit-Flips, Zufallszahlen, HMAC, Signaturen, Kodierung. */

.tl-hero { padding-top: 48px; }
.tl-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.tl-head .page-sub { margin-top: 14px; }
.tl-badge {
  flex: none; width: 124px; height: 100px; border-radius: 50%; background: var(--red); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  transform: rotate(-6deg); line-height: 1.1; font-size: 17px; padding: 6px;
}
.tl-badge b { font-size: 25px; font-weight: 700; display: block; }
.tl-badge sup { font-size: .6em; }
@media (max-width: 767px) {
  .tl-hero { padding-top: 24px; }
  .tl-badge { width: 96px; height: 80px; font-size: 14px; }
  .tl-badge b { font-size: 19px; }
}

/* form card with the yellow border (taller variant of .searchpill) */
.tl-form {
  margin-top: 36px; border: 4px solid var(--yellow); border-radius: 28px; background: #fff;
  padding: 18px 22px 20px; display: grid; gap: 16px;
}
.tl-form .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; align-items: end; }
.tl-form .actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: flex-end; }
.tl-form .actions .hint { margin-right: auto; font-size: 14px; color: var(--muted); }
.tl-form .btn-primary { height: 50px; font-size: 19px; min-width: 200px; }
.tl-form textarea.input { font-family: var(--mono); font-size: 14px; }
.tl-form .input-plain { font-family: inherit; font-size: 16px; }
@media (max-width: 767px) {
  .tl-form { border-radius: 22px; padding: 14px; margin-top: 24px; }
  .tl-form .actions .btn { width: 100%; }
  .tl-form .actions .hint { margin-right: 0; }
}

.tl-summary { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin: 36px 0 16px; font-size: 18px; }
.tl-summary b { font-weight: 700; }
.tl-list { display: grid; gap: 16px; }

/* comparison card ("Anbieter") */
.tl-offer { padding: 18px 20px; display: grid; grid-template-columns: 260px 1fr 280px; gap: 20px; align-items: start; }
.tl-offer.win { border: 2px solid var(--action); }
.tl-offer.lose { background: #fffafa; }
.tl-offer .who { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.tl-offer .who h3 { font-size: 21px; font-weight: 700; }
.tl-offer .who h3 a { color: var(--text); }
.tl-offer .attrs { display: grid; gap: 6px; font-size: 15px; min-width: 0; }
.tl-offer .attrs .a { display: flex; gap: 8px; align-items: flex-start; }
.tl-offer .attrs .a .icon { width: 18px; height: 18px; stroke-width: 1.6; margin-top: 2px; flex: none; }
.tl-offer .price { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.tl-offer .price .big { font-size: 30px; line-height: 1.1; }
.tl-offer .price .big small { font-size: 15px; color: var(--muted); margin-right: 6px; }
.tl-offer .digest { width: 100%; }
@media (max-width: 1099px) {
  .tl-offer { grid-template-columns: 1fr 1fr; }
  .tl-offer .price { grid-column: 1 / -1; align-items: stretch; text-align: left; }
}
@media (max-width: 767px) {
  .tl-offer { grid-template-columns: 1fr; border-radius: 0; border-left: 0; border-right: 0; margin: 0 calc(-1 * var(--pad)); padding: 18px var(--pad); }
  .tl-offer.win { border-left: 0; border-right: 0; }
  .tl-offer .price { align-items: flex-end; text-align: right; }
  .tl-list { gap: 0; }
}

/* compact rows for long lists (bit flips) */
.tl-rows { display: grid; gap: 0; overflow: hidden; }
.tl-row { display: grid; grid-template-columns: 34px 170px 1fr 120px 200px; gap: 14px; align-items: center; padding: 12px 16px; border-bottom: 1px solid #eee; }
.tl-row:last-child { border-bottom: 0; }
.tl-row .rank { font-weight: 700; color: var(--muted); }
.tl-row .nm a { color: var(--text); font-weight: 600; }
.tl-row .nm .muted { display: block; font-size: 13px; }
.tl-row .num { text-align: right; font-variant-numeric: tabular-nums; }
.tl-row .num b { font-size: 18px; }
.tl-row.bad { background: #fff5f5; }
.tl-row.head { font-size: 13px; color: var(--muted); padding-top: 10px; padding-bottom: 10px; background: #fafafa; }
@media (max-width: 767px) {
  .tl-row { grid-template-columns: 28px 1fr auto; gap: 6px 10px; padding: 12px 10px; }
  .tl-row .rank { grid-column: 1; grid-row: 1; }
  .tl-row .nm { grid-column: 2; grid-row: 1; }
  .tl-row .num { grid-column: 3; grid-row: 1; white-space: nowrap; }
  .tl-row .bar-cell { grid-column: 2 / -1; grid-row: 2; }
  .tl-row .flag { grid-column: 2 / -1; grid-row: 3; }
  .tl-row.head { display: none; }
}

.bar { position: relative; height: 12px; background: #edf0f5; border-radius: 6px; overflow: hidden; }
.bar > span { position: absolute; left: 0; top: 0; bottom: 0; background: var(--action); border-radius: 6px; transition: width .3s; }
.bar.red > span { background: var(--red); }
.bar.green > span { background: #19a03f; }
.bar .ideal { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--text); left: 50%; }
.bar-cap { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 2px; }

.tl-explain { margin-top: 48px; }
.tl-explain h2 { font-size: 24px; font-weight: 700; margin-bottom: 12px; }
.tl-explain h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.tl-explain p { margin-bottom: 12px; max-width: 900px; }
.tl-explain .grid-2 p { max-width: none; }

.bits { font-family: var(--mono); font-size: 13px; line-height: 1.7; word-break: break-all; background: #f6f7f9; border: 1px solid #e6e8ec; border-radius: 6px; padding: 8px 10px; }
.bits mark { background: var(--yellow); color: var(--text); border-radius: 2px; padding: 0 1px; }

/* histogram */
.hist { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; align-items: end; height: 110px; position: relative; }
.hist .col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 2px; font-size: 12px; color: var(--muted); }
.hist .col span.b { width: 100%; background: var(--action); border-radius: 4px 4px 0 0; min-height: 2px; }
.hist .exp { position: absolute; left: 0; right: 0; border-top: 2px dashed #8a8a8a; pointer-events: none; }
.hist-labels { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; text-align: center; font-size: 13px; font-weight: 600; margin-top: 4px; }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; font-size: 15px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; }

.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 22px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; height: 36px; padding: 0 14px; border-radius: 18px; font-size: 15px; font-weight: 600; }
.seg button.active { background: var(--pill-blue); color: var(--action); }

.tl-ok { color: #0a6b25; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.tl-bad { color: #b0000d; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.tl-ok .icon, .tl-bad .icon { width: 18px; height: 18px; }

.enc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.enc-field { display: flex; flex-direction: column; gap: 6px; }
.enc-field .lbl { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 15px; }
.enc-field .err { color: #b0000d; font-size: 13px; min-height: 18px; }
.enc-field textarea { min-height: 88px; font-family: var(--mono); font-size: 14px; }
.enc-field textarea.invalid { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
@media (max-width: 767px) { .enc-grid { grid-template-columns: 1fr; } }

.sig-card .kv dd { font-family: var(--mono); font-size: 12.5px; word-break: break-all; }
.sig-msg { display: flex; gap: 10px; align-items: stretch; }
.sig-msg .input { flex: 1 1 auto; }
@media (max-width: 767px) { .sig-msg { flex-direction: column; } }
@media (max-width: 767px) {
  .hm-row { grid-template-columns: 1fr auto !important; }
  .hm-row > div:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
}
.tl-offer .price .digest { text-align: left; }
@media (max-width: 767px) {
  .sig-card .kv { grid-template-columns: 1fr; }
  .sig-card .kv dt { margin-top: 6px; }
  .tl-badge { width: 104px; height: 84px; font-size: 13px; }
}
