/* Branchenrotation (fuenfter Bereich). Alle Selektoren unter #view-rotation
   gescoped und mit rot- praefixt, damit nichts mit map/earnings/fund kollidiert.
   Tokens kommen aus base.css. */

#view-rotation { max-width: var(--maxw); margin: 0 auto; padding: 16px 20px 64px; }
.rot-intro { max-width: 780px; margin: 4px 0 20px; }
.rot-intro h1 { margin: 0 0 8px; font-size: 23px; letter-spacing: -.01em; }
.rot-intro p { margin: 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.6; }
.rot-intro b { color: var(--ink); font-weight: 600; }
.rot-stand { color: var(--muted); font-size: 12px; font-family: var(--font-num); white-space: nowrap; }
.rot-empty { color: var(--muted); font-size: 13.5px; padding: 46px 4px; text-align: center; }

/* KPI-Streifen */

.rot-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin-bottom: 22px; }
.rot-kpi {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
  box-shadow: var(--shadow-1); padding: 15px 17px;
}
.rot-kpi .k { font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.rot-kpi .v { font-family: var(--font-num); font-size: 21px; font-weight: 600; margin-top: 5px; display: flex; align-items: baseline; gap: 9px; }
.rot-kpi .v small { font-size: 13px; font-weight: 500; }
.rot-kpi .s { font-size: 12px; color: var(--muted); margin-top: 3px; }
.rot-kpi .v.pos { color: var(--pos); }
.rot-kpi .v.neg { color: var(--neg); }

/* ---------------- Panels ---------------- */
.rot-panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-1); padding: 20px 22px 22px; margin-bottom: 22px;
}
.rot-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 16px; }
.rot-panel-head h2 { margin: 0; font-size: 17px; letter-spacing: -.01em; }
.rot-sub { margin: 5px 0 0; color: var(--muted); font-size: 12.5px; max-width: 620px; }
.rot-sub b { color: var(--ink-2); font-weight: 600; }

.rot-controls { display: flex; gap: 10px; flex-wrap: wrap; }
.rot-seg { display: flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden; }
.rot-seg button {
  background: none; border: none; color: var(--muted); font-family: var(--font-ui);
  font-size: 12.5px; font-weight: 600; padding: 8px 13px; cursor: pointer; transition: .15s; white-space: nowrap;
}
.rot-seg button:hover { color: var(--ink-2); }
.rot-seg button.on { background: var(--accent-soft); color: var(--accent-2); }

/* ---------------- Chart ---------------- */
.rot-chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.rot-cx-grid { stroke: var(--border); stroke-width: 1; opacity: .55; }
.rot-cx-base { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 4; opacity: .7; }
.rot-cx-lbl  { fill: var(--muted); font-family: var(--font-num); font-size: 11px; }
.rot-cx-line { fill: none; stroke-width: 1.9; stroke-linejoin: round; stroke-linecap: round; transition: opacity .15s, stroke-width .15s; }
.rot-chart.rot-focus .rot-cx-line { opacity: .16; }
.rot-chart.rot-focus .rot-cx-line.hot { opacity: 1; stroke-width: 2.8; }
.rot-cx-end { font-family: var(--font-num); font-size: 11.5px; font-weight: 600; }

.rot-legend { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.rot-lg {
  display: inline-flex; align-items: center; gap: 7px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 20px; padding: 5px 12px 5px 9px;
  font-size: 12px; color: var(--ink-2); cursor: pointer; transition: .15s;
}
.rot-lg:hover { border-color: #33436a; color: var(--ink); }
.rot-lg i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.rot-lg b { font-family: var(--font-num); font-weight: 600; margin-left: 2px; }

/* ---------------- Tabelle ---------------- */
.rot-tbl-scroll { overflow-x: auto; }
.rot-tbl { border-collapse: collapse; width: 100%; min-width: 780px; font-size: 13.5px; }
.rot-tbl th {
  text-align: right; padding: 9px 12px; font-size: 10.5px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.rot-tbl th:first-child, .rot-tbl td:first-child { text-align: left; }
.rot-tbl td { padding: 10px 12px; text-align: right; font-family: var(--font-num); border-bottom: 1px solid rgba(37,49,74,.5); }
.rot-tbl tbody tr:hover { background: var(--surface-2); }
.rot-tbl .rot-t-sec { display: flex; align-items: center; gap: 9px; font-family: var(--font-ui); }
.rot-tbl .rot-t-sec i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.rot-tbl .rot-t-sec small { color: var(--muted); font-size: 11px; font-family: var(--font-num); }
.rot-tbl .rot-grp { border-left: 1px solid var(--border); }

/* ---------------- Hinweise / Fuss ---------------- */
.rot-notes {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 20px 22px; margin-bottom: 22px;
}
.rot-notes h3 { margin: 0 0 9px; font-size: 14px; }
.rot-notes h3 + ul { margin: 0 0 18px; }
.rot-notes ul { padding-left: 18px; margin: 0; }
.rot-notes li { color: var(--ink-2); font-size: 13.5px; line-height: 1.62; margin-bottom: 7px; }
.rot-notes b { color: var(--ink); font-weight: 600; }

  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: var(--muted); font-size: 11.5px; font-family: var(--font-num); padding-top: 4px;
}

@media (max-width: 720px) {
  .wrap { padding: 20px 14px 50px; }
  .intro h1 { font-size: 24px; }
  .rot-panel { padding: 16px 14px 18px; }
  .shell-header { padding: 13px 15px; }
  .head-meta .hd-range { display: none; }
}
