/* ==========================================================================
   type.css – Typ-Seite (type.php) und Typenvergleich (compare.php)
   ========================================================================== */

.th-top { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; margin-bottom: 20px; align-items: stretch; }
.th-top > .panel { margin-top: 0; }
.th-photo { margin: 0; min-height: 280px; border: 1px solid var(--line); border-radius: var(--radius); aspect-ratio: 16 / 9; }
.th-photo figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 40px 20px 16px;
  background: linear-gradient(180deg, transparent, rgba(4, 10, 20, .8)); color: #fff; font-weight: 700; font-size: 18px;
}
.th-facts .spec-list { padding-bottom: 6px; }
@media (max-width: 900px) {
  .th-top { grid-template-columns: 1fr; }
  .th-photo { min-height: 0; }
}

.th-compare {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 20px 0 0; padding: 14px 18px;
  border: 1px dashed var(--line); border-radius: 14px;
}
.th-compare > span { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; margin-right: 4px; }
.th-compare > span svg { width: 16px; height: 16px; fill: none; stroke: var(--cyan); stroke-width: 2; }
.th-compare .chip { text-decoration: none; padding: 5px 10px; font-size: 12px; margin: 0; }
.th-compare .chip small { color: var(--muted); font-weight: 400; letter-spacing: 0; margin-left: 4px; }
.th-compare .link-arrow { margin-left: auto; }
.type-hub #list .head-actions .tab-bar { margin: 0; }

/* ---------- Vergleich ---------- */
.cmp-pick { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 16px 21px; }
.cmp-pick input {
  width: 150px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface-2); color: var(--text); font: inherit; font-size: 14px; text-transform: uppercase;
}
.cmp-pick input::placeholder { text-transform: none; }
.cmp-pick input:focus { outline: none; border-color: var(--cyan); }
.cmp-pick .vs { color: var(--muted); font-weight: 700; }
.cmp-pick button {
  height: 40px; padding: 0 18px; border: 0; border-radius: 10px; cursor: pointer; font: inherit; font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), #159bd0); color: #04101c;
}

.cmp-heads { margin-bottom: 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; position: relative; }
.cmp-head { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.cmp-head .sp-photo { aspect-ratio: 16 / 7; }
.cmp-head-body { padding: 14px 18px 16px; }
.cmp-head-body h2 { margin: 4px 0 2px; font-size: 22px; letter-spacing: -.02em; }
.cmp-head-body h2 a { color: var(--text); text-decoration: none; }
.cmp-head-body h2 a:hover { color: var(--cyan); }
.cmp-head-body p { margin: 0; color: var(--muted); font-size: 13px; }
.cmp-vs {
  position: absolute; left: 50%; top: 34%; transform: translate(-50%, -50%); z-index: 2;
  display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--cyan); color: var(--cyan); font-weight: 900; letter-spacing: .04em;
}

.cmp-table { width: 100%; border-collapse: collapse; }
.cmp-table th, .cmp-table td { padding: 12px 18px; border-top: 1px solid var(--line); vertical-align: middle; }
.cmp-table thead th { border-top: 0; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.cmp-table th[scope="row"] { width: 26%; text-align: center; color: var(--muted); font-weight: 600; font-size: 13px; }
.cmp-table td { width: 37%; font-weight: 700; }
.cmp-table td:first-of-type { text-align: right; }
.cmp-table td.win { color: var(--green); }
.cmp-table td.win .cmp-v::after { content: " ●"; font-size: 9px; vertical-align: middle; }
.cmp-table td:first-of-type.win .cmp-v::after { content: ""; }
.cmp-table td:first-of-type.win .cmp-v::before { content: "● "; font-size: 9px; vertical-align: middle; }
.cmp-bar { display: block; height: 6px; margin-top: 6px; border-radius: 3px; background: var(--cyan); opacity: .75; }
.cmp-table td:first-of-type .cmp-bar { margin-left: auto; }
.cmp-table small { color: var(--muted); font-weight: 400; }

.cmp-pairs { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; padding: 16px 21px 20px; }
.cmp-pairs h3 { grid-column: 1 / -1; margin: 10px 0 0; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.cmp-pairs h3:first-child { margin-top: 0; }
.cmp-pairs a {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px; color: var(--text); text-decoration: none; font-weight: 700;
}
.cmp-pairs a:hover { border-color: var(--cyan); }
.cmp-pairs a i { font-style: normal; color: var(--cyan); font-size: 12px; }
.cmp-pairs a small { color: var(--muted); font-weight: 400; font-size: 12px; }

@media (max-width: 650px) {
  .cmp-heads { gap: 10px; }
  .cmp-head-body { padding: 10px 12px 12px; }
  .cmp-head-body h2 { font-size: 16px; }
  .cmp-vs { width: 40px; height: 40px; font-size: 12px; }
  .cmp-table th, .cmp-table td { padding: 10px 8px; font-size: 13px; }
  .cmp-table th[scope="row"] { font-size: 11px; }
}
.cmp-pairs a span { white-space: nowrap; font-size: 16px; }
