/* Milestones on the timeline (see js/milestones.js). */
:root { --ban: #a8322b; }

/* Hatched band for the ban period, over the axis */
.tl-ban {
  position: absolute; top: 20px; height: 10px; z-index: 0; pointer-events: none;
  border-radius: 2px;
  background: repeating-linear-gradient(135deg,
    color-mix(in srgb, var(--ban) 30%, transparent) 0 4px,
    color-mix(in srgb, var(--ban) 12%, transparent) 4px 8px);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ban) 45%, transparent);
}
.tl-ban span {
  position: absolute; left: 4px; top: -15px;
  font-size: 10px; font-weight: 600; letter-spacing: .02em; color: var(--ban);
  white-space: nowrap;
}

/* Milestone marker: a small diamond on the axis */
.tl-ms {
  position: absolute; top: 18px; width: 14px; height: 14px; margin-left: -7px;
  z-index: 5; padding: 0; border: 0; background: none; cursor: pointer;
}
.tl-ms::before {
  content: ""; position: absolute; inset: 2px; transform: rotate(45deg);
  background: var(--ban); border-radius: 2px; box-shadow: 0 0 0 1.5px #f7f6f3;
  transition: transform .15s;
}
/* Bigger tap area for fingers */
.tl-ms::after { content: ""; position: absolute; inset: -8px -5px; }
.tl-ms:hover::before, .tl-ms.is-active::before { transform: rotate(45deg) scale(1.35); }
.tl-ms.is-active::before { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--ban); }
.tl-ms:focus-visible { outline: 2px solid #222; outline-offset: 2px; border-radius: 2px; }

/* Card above the timeline */
.ms-card {
  position: fixed; left: 12px; bottom: 72px; z-index: 1100;
  width: min(420px, calc(100vw - 24px)); max-height: min(60vh, 520px);
  display: flex; flex-direction: column;
  background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 6px 24px rgba(0,0,0,.25);
  font-size: 14px; line-height: 1.45; color: #222;
}
.ms-card[hidden] { display: none; }
.ms-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 8px;
  padding: 12px 12px 10px 16px; background: var(--ban); color: #fff;
}
.ms-head h2 { margin: 2px 0 0; font-size: 17px; line-height: 1.25; }
.ms-date { font-size: 12px; opacity: .9; }
.ms-close {
  flex: none; width: 30px; height: 30px; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.15); color: #fff; font-size: 20px; line-height: 1; cursor: pointer;
}
.ms-close:hover { background: rgba(255,255,255,.3); }
.ms-body { padding: 12px 16px 4px; overflow-y: auto; }
.ms-body p { margin: 0 0 10px; }
.ms-lead { font-weight: 600; }
.ms-note {
  font-size: 12px; color: #6b5a10; background: #fbf3d0; border-radius: 6px; padding: 6px 8px;
}
.ms-body h3 { margin: 12px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: #666; }
.ms-sources { margin: 0 0 10px; padding: 0; list-style: none; }
.ms-sources li { margin-bottom: 8px; }
.ms-sources a { color: var(--accent); }
.ms-sources small { display: block; color: #777; font-size: 12px; }

/* Vote: Ja / Nein as one bar */
.ms-vote { margin: 0 0 12px; }
.ms-vote-label, .ms-vote-legend { display: flex; justify-content: space-between; font-size: 12px; }
.ms-vote-label { font-weight: 600; margin-bottom: 4px; }
.ms-vote-legend { color: #666; margin-top: 3px; }
.ms-vote-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: #ddd; }
.ms-ja { background: var(--accent); }
.ms-nein { flex: 1; background: #d9d6d0; }

.ms-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; border-top: 1px solid #eee; font-size: 12px; color: #777;
}
.ms-nav button {
  border: 0; background: none; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; padding: 6px 4px;
}
.ms-nav button:disabled { color: #bbb; cursor: default; }

/* Steps inside one milestone card: a small vertical chronology */
.ms-steps { list-style: none; margin: 4px 0 8px; padding: 0 0 0 16px; border-left: 2px solid color-mix(in srgb, var(--ban) 35%, transparent); }
.ms-steps > li { position: relative; margin-bottom: 14px; }
.ms-steps > li::before {
  content: ""; position: absolute; left: -22px; top: 4px; width: 8px; height: 8px;
  transform: rotate(45deg); background: var(--ban); border-radius: 1px; box-shadow: 0 0 0 2px #fff;
}
.ms-step-date { font-size: 12px; color: var(--ban); font-weight: 600; }
.ms-body .ms-steps h3 { margin: 1px 0 4px; font-size: 15px; text-transform: none; letter-spacing: 0; color: #222; }
.ms-steps .ms-sources { margin-bottom: 0; }
