/* ==========================================================================
   contribution-skyline.css — GitHub-Aktivitaetskalender (Startseite), Farben aus dem Theme.
   ========================================================================== */
.csk-section { padding-top: 0 !important; }
.csk {
    --csk-accent: var(--accent, #b775ff);
    --csk-bg: var(--surface, #17161b);
    --csk-fg: var(--text, #f4f4f6);
    --csk-muted: var(--text-muted, #a1a1aa);
    --csk-border: var(--border, rgba(255, 255, 255, .08));
    --csk-ease: cubic-bezier(.65, 0, .35, 1);
    position: relative;
    max-width: 980px;
    margin: 0 auto;
    padding: clamp(14px, 2.4vw, 20px);
    border-radius: 16px;
    border: 1px solid var(--csk-border);
    background: var(--csk-bg);
    color: var(--csk-fg);
}
.csk .visually-hidden, .csk-live { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Kopf ---------- */
.csk-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; }
.csk-title { margin: 0; font-size: 15px; font-weight: 500; line-height: 1.4; font-family: inherit; text-transform: none; letter-spacing: 0; color: var(--csk-fg); }
.csk-head-right { display: flex; align-items: center; gap: 14px; }
.csk-profile { font-size: 13px; color: var(--csk-muted); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.csk-profile:hover { color: var(--csk-accent); }
.csk-profile i { font-size: 11px; }

.csk-toggle { position: relative; display: inline-flex; padding: 2px; border: 1px solid var(--csk-border); border-radius: 8px; }
.csk-toggle-pill {
    position: absolute; top: 2px; bottom: 2px; left: 2px; width: 34px; border-radius: 6px;
    background: var(--csk-fg); transition: transform .5s var(--csk-ease);
}
.csk.is-3d .csk-toggle-pill { transform: translateX(100%); }
.csk-toggle button {
    position: relative; z-index: 1; display: grid; place-items: center; width: 34px; height: 30px;
    border: 0; border-radius: 6px; padding: 0; background: transparent; cursor: pointer;
    color: var(--csk-muted); transition: color .5s ease;
}
.csk-toggle button[aria-pressed="true"] { color: var(--csk-bg); }
.csk-toggle button:focus-visible, .csk-swatch:focus-visible { outline: 2px solid var(--csk-fg); outline-offset: 2px; }

/* ---------- Buehne ---------- */
.csk-frame { position: relative; border: 1px solid var(--csk-border); border-radius: 12px; }
.csk-pad { position: relative; padding: 14px 14px 0; }
.csk-stage { position: relative; width: 100%; height: 150px; overflow: hidden; border-radius: 8px; }
.csk-stage:has(:focus-visible) { outline: 2px solid var(--csk-fg); outline-offset: 4px; }
.csk-canvas { position: absolute; top: 0; left: 0; display: block; max-width: none; outline: none; }

.csk-corner {
    position: absolute; display: flex; flex-direction: column; gap: 18px; pointer-events: none;
    opacity: 0; transition: opacity .3s var(--csk-ease), transform .3s var(--csk-ease);
}
.csk-corner-tr { top: 4px; right: 4px; align-items: flex-end; text-align: right; transform: translateY(-10px); }
.csk-corner-bl { bottom: 4px; left: 4px; align-items: flex-start; transform: translateY(10px); }
.csk.is-3d.has-corners .csk-corner { opacity: 1; transform: none; transition-duration: .6s; }
.csk.is-3d.has-corners .csk-corner-tr { transition-delay: .7s; }
.csk.is-3d.has-corners .csk-corner-bl { transition-delay: .85s; }
.csk-corner .csk-num { font-size: clamp(30px, 4.6vw, 52px); }
.csk-corner .csk-stat { min-width: 0; }

/* ---------- Tooltip ---------- */
.csk-tip {
    position: absolute; top: 14px; left: 14px; z-index: 5; white-space: nowrap; pointer-events: none;
    padding: 7px 10px; border-radius: 6px; font-size: 12px; line-height: 1;
    background: var(--csk-fg); color: var(--csk-bg); box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .6);
    opacity: 0; transition: opacity .15s ease;
}
.csk-tip.is-on { opacity: 1; }
.csk-tip strong { font-weight: 600; }
.csk-tip-date { opacity: .75; }
.csk-tip-arrow {
    position: absolute; top: 100%; left: var(--arrow, 50%); margin-left: -5px; width: 0; height: 0;
    border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 5px solid var(--csk-fg);
}

/* ---------- Kennzahlen ---------- */
.csk-statrow { display: grid; grid-template-rows: 1fr; opacity: 1; transition: grid-template-rows 1.3s var(--csk-ease), opacity 1.3s var(--csk-ease); }
.csk.is-3d.has-corners .csk-statrow { grid-template-rows: 0fr; opacity: 0; }
.csk-statrow-in { min-height: 0; overflow: hidden; }
.csk-statgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding: 16px 14px 4px; }
.csk-sl { font-size: 13px; line-height: 1.2; color: var(--csk-muted); }
.csk-sv { margin-top: 4px; display: flex; align-items: baseline; gap: 6px; }
.csk-num { font-weight: 600; font-variant-numeric: tabular-nums; font-size: 28px; line-height: 1; letter-spacing: -.02em; color: var(--csk-accent); transition: color .5s ease; }
.csk-unit { font-size: 14px; }
.csk-sub { margin-top: 2px; font-size: 12px; color: var(--csk-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Fuss ---------- */
.csk-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 12px 14px; font-size: 12px; color: var(--csk-muted); }
.csk-hints { position: relative; display: grid; flex: 1; min-width: 200px; }
.csk-hints > span { grid-area: 1 / 1; opacity: 0; transition: opacity .5s ease; }
.csk-hints > span.is-on { opacity: 1; }
.csk-legend { display: flex; align-items: center; gap: 6px; }
.csk-swatch {
    width: 12px; height: 12px; padding: 0; border: 0; border-radius: 2px; cursor: pointer;
    background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px rgba(127, 127, 127, .12);
    transition: background-color .5s ease, transform .2s ease;
}
.csk-swatch:hover, .csk-swatch[aria-pressed="true"] { transform: scale(1.25); }
/* groessere Trefferflaeche fuer Finger, ohne die Optik zu aendern */
@media (pointer: coarse) { .csk-swatch { position: relative; } .csk-swatch::after { content: ""; position: absolute; inset: -8px -3px; } }

@media (max-width: 767.98px) {
    .csk-statgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .csk-pad { padding: 10px 10px 0; }
    .csk-foot { padding: 12px 10px; }
}
@media (max-width: 420px) { .csk-profile span, .csk-profile { font-size: 12px; } }

@media (prefers-reduced-motion: reduce) {
    .csk-toggle-pill, .csk-toggle button, .csk-corner, .csk-statrow, .csk-hints > span, .csk-swatch, .csk-num, .csk-tip { transition: none !important; }
}
