/* Contribution Rhythm Calendar, adapted to the site's dark blue glass surfaces. */
.desk .desk-left { grid-template-rows: 100px minmax(0,1fr) !important; }
.desk .completion-card { padding: 12px 16px !important; justify-content: center; gap: 2px; }
.desk .completion-card strong { margin-top: 0; font-size: 2rem !important; line-height: 1.1; }
.desk .completion-card small { margin-top: 0; font-size: .68rem; }
/* Card surface adapted from Uiverse.io by iconicchandu (MIT).
   Source gradients and inset light retained; sizing follows the dashboard. */
#app .dev-root .desk :is(.contribution-panel,.urgency-panel.has-contribution-rhythm) {
  position:relative; isolation:isolate; padding:14px !important; overflow:hidden;
  background-color:hsl(240,15%,9%);
  background-image:radial-gradient(at 88% 40%,hsl(240,15%,9%) 0,transparent 85%),
    radial-gradient(at 49% 30%,hsl(240,15%,9%) 0,transparent 85%),
    radial-gradient(at 14% 26%,hsl(240,15%,9%) 0,transparent 85%),
    radial-gradient(at 0% 64%,hsl(189,99%,26%) 0,transparent 85%),
    radial-gradient(at 41% 94%,hsl(189,97%,36%) 0,transparent 85%),
    radial-gradient(at 100% 99%,hsl(188,94%,13%) 0,transparent 85%);
  border:1px solid rgba(194,213,219,.34); border-radius:16px;
  box-shadow:inset 0 -16px 24px rgba(255,255,255,.25);
}
/* A masked border keeps the moving highlight outside the calendar contents. */
#app .dev-root .desk :is(.contribution-panel,.urgency-panel.has-contribution-rhythm)::before {
  content:''; position:absolute; inset:0; border-radius:inherit; padding:1px;
  pointer-events:none; z-index:1;
  background:conic-gradient(from var(--rhythm-border-angle),transparent 0deg,rgba(194,213,219,.45) 70deg,transparent 120deg,#00d9ff 170deg,#00d9ff 190deg,transparent 230deg,rgba(194,213,219,.45) 300deg,transparent 360deg);
  -webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);
  -webkit-mask-composite:xor; mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0); mask-composite:exclude;
  animation:rhythm-border-orbit 8s linear infinite;
}
@property --rhythm-border-angle { syntax:'<angle>'; inherits:false; initial-value:0deg; }
@keyframes rhythm-border-orbit { to { --rhythm-border-angle:360deg; } }
.urgency-panel.has-contribution-rhythm > :not(.contribution-rhythm) { display: none !important; }
.contribution-rhythm { --rhythm-weeks: 12; --rhythm-empty: #f2f3f0; width: 100%; min-width: 0; color: #d9e9f3; }
.desk .contribution-rhythm .rhythm-heading h3 { margin: 0; color: #e6f2fa; font-size: .94rem; line-height: 1.2; font-weight: 650; letter-spacing: -.02em; }
.desk .contribution-rhythm .rhythm-heading p { margin: 4px 0 0; color: #829db0; font-size: .65rem; line-height: 1.3; }
/* Neumorphic inset control, Uiverse.io by Smit-Prajapati / coslac (MIT).
   Native selects retain keyboard, touch, and screen reader support. */
.rhythm-controls { display:flex; gap:8px; margin-top:10px; }
.rhythm-input-container {
  display:flex; flex:1; min-width:0; padding:3px; border-radius:12px;
  background:linear-gradient(173deg,#23272f 0%,#14161a 100%);
  box-shadow:5px 5px 10px #0e1013,-5px -5px 20px rgba(56,62,75,.55);
}
#app .dev-root .desk .rhythm-controls select {
  width:100%; min-width:0; padding:7px 20px 7px 8px; border:1px solid transparent; border-radius:9px;
  background-color:#23272f;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='m1 1 4 4 4-4' fill='none' stroke='%23b8c9d5' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 7px center;
  box-shadow:inset 5px 5px 10px #0e1013,inset -5px -5px 10px #383e4b,0 0 24px transparent;
  color:#fff; color-scheme:dark; font:inherit; font-size:.68rem; line-height:1.25;
  appearance:none; cursor:pointer; transition:border-color .2s ease-in-out,box-shadow .2s ease-in-out;
}
#app .dev-root .desk .rhythm-controls select:hover { border-color:rgba(93,197,213,.35); }
#app .dev-root .desk .rhythm-controls select:focus {
  outline:none; border-color:#53d2e1;
  box-shadow:inset 5px 5px 10px #0e1013,inset -5px -5px 10px #383e4b,0 0 18px rgba(34,190,213,.24);
}
#app .dev-root .desk .rhythm-controls select:focus-visible { outline:2px solid #7de4ed; outline-offset:3px; }
.rhythm-controls option { background:#23272f; color:#fff; }
.rhythm-total { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 8px 0 6px; }
.rhythm-total span { color: #819aaf; font-size: .66rem; }
.rhythm-total strong { color: #b7e6eb; font-size: 1rem; line-height: 1.2; font-weight: 650; font-variant-numeric: tabular-nums; }
.rhythm-scroll { overflow-x: auto; padding-bottom: 3px; scrollbar-width: thin; scrollbar-color: #29465b transparent; }
.rhythm-months { display: grid; grid-template-columns: repeat(var(--rhythm-weeks),minmax(11px,18px)); gap: 3px; margin-left: 25px; min-width: calc(var(--rhythm-weeks)*14px - 3px); margin-bottom: 4px; font-size: 9px; line-height: 12px; color: #8aabbf; }
.rhythm-calendar { display: flex; gap: 5px; min-width: calc(var(--rhythm-weeks)*14px + 22px); }
.rhythm-weekdays { display: grid; flex: 0 0 20px; grid-template-rows: repeat(7,11px); gap: 3px; align-items: center; color: #7893a8; font-size: 9px; line-height: 11px; }
.rhythm-grid { display: grid; flex: 1; grid-auto-flow: column; grid-template-rows: repeat(7,11px); grid-template-columns: repeat(var(--rhythm-weeks),minmax(11px,18px)); gap: 3px; }
.rhythm-cell, .rhythm-legend i { border: 1px solid rgba(139,189,206,.06); border-radius: 3px; background: var(--rhythm-empty); box-sizing: border-box; }
.rhythm-cell { width: 100%; min-width: 0; padding: 0; height: 11px; cursor: pointer; transition: transform .18s ease,box-shadow .18s ease; }
.contribution-rhythm .rhythm-cell {
  background-image: none !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  border-radius: 3px !important;
  box-shadow: none !important;
  filter: none !important;
}
.contribution-rhythm .rhythm-cell[data-level="0"], .rhythm-legend i[data-level="0"] { background: #f2f3f0 !important; }
.contribution-rhythm .rhythm-cell[data-level="1"], .rhythm-legend i[data-level="1"] { background: #83c79d !important; }
.contribution-rhythm .rhythm-cell[data-level="2"], .rhythm-legend i[data-level="2"] { background: #efd469 !important; }
.contribution-rhythm .rhythm-cell[data-level="3"], .rhythm-legend i[data-level="3"] { background: #6250ad !important; }
.contribution-rhythm .rhythm-cell[data-level="4"], .rhythm-legend i[data-level="4"] { background: #ee5963 !important; }
.rhythm-cell:hover, .rhythm-cell:focus-visible { position: relative; z-index: 1; transform: scale(1.18); outline: 1px solid #b0eff4; box-shadow: 0 0 8px #52bbd355; }
.contribution-rhythm .rhythm-cell-empty { background: transparent !important; border-color: transparent !important; cursor: default; }
.rhythm-legend { display: flex; align-items: center; justify-content: flex-end; gap: 3px; margin: 5px 0 8px; font-size: 9px; line-height: 12px; color: #8ca5b5; }
.rhythm-legend i { width: 9px; height: 9px; }
.rhythm-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; border-top: 1px solid #28425388; padding-top: 8px; text-align: center; }
.rhythm-stats div { display: flex; flex-direction: column; gap: 3px; }
.rhythm-stats strong { font-size: 1.12rem; line-height: 21px; color: #d9f1f5; font-weight: 650; font-variant-numeric: tabular-nums; }
.rhythm-stats span { font-size: .58rem; line-height: 12px; color: #8aa2b4; }
.desk .contribution-rhythm .rhythm-detail { margin: 7px 0 0; min-height: 26px; color: #84a4b9; font-size: .62rem; line-height: 1.35; }
.rhythm-error { color: #f1b7b7; font-size: .65rem; }
.rhythm-retry { border: 1px solid #385d72; border-radius: 6px; padding: 4px 8px; background: #183346; color: #cfedf3; cursor: pointer; }
.contribution-rhythm[aria-busy="true"] .rhythm-grid { opacity: .55; }
@media(max-width:760px) { .desk .desk-left { height: auto; grid-template-rows: 94px auto !important; }.desk .contribution-panel,.desk .urgency-panel.has-contribution-rhythm { min-height: 346px; } }
@media(prefers-reduced-motion:reduce) {
  .rhythm-cell,.rhythm-controls select { transition:none; }
  #app .dev-root .desk :is(.contribution-panel,.urgency-panel.has-contribution-rhythm)::before { animation:none; }
}
