/* Contribution workbench: paper surfaces, ink typography, activity in green. */
:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #25332c;
  background: #f7f6f2;
  font-synthesis: none;
  --ink: #25332c;
  --blue: #334fb4;
  --muted: #656e67;
  --line: #dedfd7;
  --paper: #fdfdf9;
  --range-ring: #798acd;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input {
  font: inherit;
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  transition:
    background 150ms,
    color 150ms,
    border-color 150ms;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid #8498de;
  outline-offset: 3px;
}
a {
  color: inherit;
  text-decoration: none;
}
p {
  line-height: 1.6;
}
[hidden] {
  display: none !important;
}
.masthead,
main {
  width: min(100%, 1376px);
  margin: 0 auto;
  padding: 0 48px;
}
.masthead {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -1px;
}
.brand-mark {
  display: grid;
  place-content: center;
  width: 32px;
  height: 32px;
  background: var(--blue);
  color: white;
  border-radius: 7px;
  font:
    bold 30px Georgia,
    serif;
  padding-bottom: 7px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 28px;
}
.text-button {
  background: none;
  border: 0;
  padding: 8px 0;
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.text-button:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.header-actions .text-button {
  color: var(--ink);
  font-size: 13px;
}
.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}
.primary-button {
  background: var(--blue);
  color: #fff;
}
.primary-button:hover:not(:disabled) {
  background: #263d92;
}
.secondary-button {
  background: transparent;
  color: var(--ink);
  border-color: #c8cec4;
}
.secondary-button:hover:not(:disabled) {
  background: #edf0e8;
}
.header-actions a[aria-disabled="true"] {
  opacity: 0.6;
  cursor: default;
}
.intro {
  display: grid;
  grid-template-columns: 1fr;
  padding: 40px 0 34px;
}
h1 {
  font:
    normal clamp(38px, 4.25vw, 58px) / 1.05 Georgia,
    "Times New Roman",
    serif;
  letter-spacing: -2px;
  margin: 0;
}
h1 em {
  color: #42654c;
  font-weight: normal;
}
.intro > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 40px;
  align-items: end;
}
.intro p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}
h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 620;
  letter-spacing: -0.45px;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 304px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.canvas {
  min-width: 0;
  padding: 26px 28px 0;
  display: flex;
  flex-direction: column;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.quiet-pill {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
  white-space: nowrap;
}
#identity-ready {
  color: #326644;
  padding: 6px 10px;
  border-radius: 4px;
  background: #e9f0e7;
}
.subtext {
  color: var(--muted);
  font-size: 12px;
  margin: 8px 0 12px;
  line-height: 1.6;
}
.activity-view {
  display: flex;
  flex-direction: column;
}
.activity-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
}
.activity-status {
  flex: 1;
  min-width: 0;
  padding: 6px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
#refresh-activity {
  font-size: 11px;
  flex-shrink: 0;
}
.activity-charts {
  display: flex;
  flex-direction: column;
  min-height: 358px;
}
.comparison-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 12px;
}
.comparison-heading h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
}
.comparison-heading span {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
#after-heading h3 {
  color: #326644;
}
.comparison-panel {
  padding-bottom: 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.calendar-scroll {
  overflow-x: auto;
  padding: 0 0 10px;
  scrollbar-width: thin;
}
.calendar {
  position: relative;
  overflow: hidden;
  min-width: 640px;
  display: grid;
  grid-template-columns: 25px repeat(54, minmax(8px, 1fr));
  grid-template-rows: 18px repeat(7, 13px);
  gap: 3px;
  padding: 3px;
}
.day {
  min-width: 0;
  border-radius: 2px;
  border: 0;
  padding: 0;
  position: relative;
}
.day:hover {
  outline: 1.5px solid #192c42;
  outline-offset: 1px;
}
.day:focus-visible {
  z-index: 1;
}
.date-tooltip {
  position: fixed;
  z-index: 100;
  width: max-content;
  max-width: calc(100vw - 16px);
  padding: 12px 14px;
  border: 1px solid #34475a;
  border-radius: 10px;
  background: #192c42;
  color: #fff;
  box-shadow: 0 8px 24px #192c4233;
  font-size: 12px;
  line-height: 1.5;
}
.tooltip-date {
  color: #c3d0df;
  font-size: 11px;
}
.tooltip-count {
  display: block;
  margin-top: 3px;
  font-size: 13px;
}
.tooltip-breakdown {
  margin-top: 4px;
  color: #dbe6f0;
}
.tooltip-range {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 6px;
  border: 1px solid #8ca7ff;
  border-radius: 4px;
  color: #dce5ff;
  font-size: 10px;
}
.day.is-in-range::after {
  content: "";
  position: absolute;
  inset: -3px;
  pointer-events: none;
  border: solid var(--range-ring);
  border-width: var(--range-top) var(--range-right) var(--range-bottom)
    var(--range-left);
}
.range-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 11px;
}
.range-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.range-legend i {
  width: 22px;
  height: 11px;
  border-radius: 2px;
  border: 3px solid var(--range-ring);
}
.calendar .weekday,
.calendar .month {
  font-size: 9px;
  color: var(--muted);
  align-self: center;
  white-space: nowrap;
  pointer-events: none;
}
.calendar .month {
  align-self: start;
}
.level-0 {
  background: #eeefea;
}
.level-1 {
  background: #bbdccb;
}
.level-2 {
  background: #7cbd9a;
}
.level-3 {
  background: #40875f;
}
.level-4 {
  background: #20503b;
}
.calendar.is-skeleton::before {
  content: "";
  position: absolute;
  inset: 24px 3px 3px 31px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Crect width='13' height='13' rx='2' fill='%23e4e7df'/%3E%3C/svg%3E")
    repeat;
}
.calendar.is-shimmering::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    100deg,
    transparent 20%,
    rgb(255 255 255 / 75%) 50%,
    transparent 80%
  );
  transform: translateX(-100%);
  animation: calendar-shimmer 1.6s ease-in-out infinite;
}
.is-loading::before {
  content: "";
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  margin-right: 0.6em;
  border: 1.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -0.08em;
  animation: loading-spin 0.8s linear infinite;
}
@keyframes calendar-shimmer {
  to {
    transform: translateX(100%);
  }
}
@keyframes loading-spin {
  to {
    transform: rotate(360deg);
  }
}

.calendar-caption {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}
#date-caption {
  font-family: var(--mono);
  font-size: 10px;
}
.legend {
  display: flex;
  gap: 3px;
  align-items: center;
}
.legend > i {
  width: 9px;
  height: 9px;
  border-radius: 2px;
}
.legend > span {
  margin: 0 3px;
}
.range-legend {
  margin-top: 8px;
  font-size: 10px;
}
.summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 24px 0 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.summary > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.summary > div + div {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}
.summary strong {
  font-size: 32px;
  line-height: 1;
  font-weight: 450;
  letter-spacing: -1.2px;
  font-variant-numeric: tabular-nums;
}
.summary > div:first-child strong {
  color: #326644;
}
.summary span {
  font-size: 11px;
  color: var(--muted);
}
.canvas-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: auto;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
#canvas-note {
  max-width: 520px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.65;
}
.canvas-footer .text-button {
  flex-shrink: 0;
  font-size: 12px;
}
.controls {
  padding: 27px 24px;
  border-left: 1px solid var(--line);
  background: #f0f1ea;
}
.controls h2 {
  font-size: 16px;
}
.preset-group {
  display: flex;
  padding: 3px;
  margin: 18px 0 22px;
  border: 1px solid #d6dbd0;
  border-radius: 6px;
  background: #e7eae1;
}
.preset-group button {
  flex: 1;
  min-height: 34px;
  padding: 7px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}
.preset-group button[aria-pressed="true"] {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 1px 3px #25332c16;
}
.preset-group button:hover:not([aria-pressed="true"]) {
  color: var(--ink);
  background: #f7f8f2;
}
.control-group {
  margin-bottom: 22px;
}
.date-fields,
.commit-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.date-group .field-note {
  font-size: 10px;
  margin: 9px 0 0;
}
label {
  display: block;
  color: var(--ink);
  font-size: 12px;
  font-weight: 550;
}
input:not([type="range"], [type="checkbox"]) {
  display: block;
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 10px;
  margin-top: 8px;
  border: 1px solid #cdd3c6;
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
}
input[type="date"] {
  padding: 8px !important;
  font-size: 11px !important;
}
input[type="number"] {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
input::placeholder {
  color: #757e74;
}
input[readonly] {
  background: #efefe9;
  color: var(--muted);
}
.range-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.range-label output {
  font-family: var(--mono);
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
input[type="range"] {
  width: 100%;
  height: 4px;
  accent-color: var(--blue);
  margin: 9px 0 12px;
  cursor: pointer;
}
.field-note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}
.check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding-bottom: 16px;
  font-size: 12px;
  font-weight: 450;
}
.check-label input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--blue);
}
.activity-group {
  margin-bottom: 4px;
}
.commit-range {
  min-width: 0;
  border: 0;
  margin: 0;
  padding: 0;
}
.commit-range legend {
  padding: 0;
  font-size: 12px;
  font-weight: 550;
}
.commit-fields {
  margin: 12px 0 10px;
}
.commit-fields label {
  font-size: 11px;
  color: var(--muted);
}
.daily-average {
  display: block;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #d6dbd0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}
.pattern-error {
  color: #a0372d;
  font-size: 12px;
  line-height: 1.5;
  margin: 12px 0 0;
}
.pattern-error:empty {
  display: none;
}
.build-section {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 64px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}
.build-intro {
  position: relative;
  padding-left: 34px;
}
.step-number {
  position: absolute;
  top: 3px;
  left: 0;
  font: 12px var(--mono);
  color: #747f70;
}
.build-intro h2 {
  font-size: 18px;
}
.build-intro p {
  max-width: 300px;
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.identity-fields {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 16px;
}
.generate-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
}
.generate-bottom > span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.refresh-button {
  margin-top: 8px;
  font-size: 11px;
}
.generated-detail {
  font: 12px/1.7 var(--mono);
  color: var(--ink);
  margin-bottom: 12px;
  overflow-wrap: anywhere;
}
.publish-content p,
#repository-status {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
.repository-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  margin: 8px 0 16px;
}
.published-link {
  display: inline-block;
  margin: 10px 0;
  color: var(--blue);
  font-weight: 600;
}
.status {
  border-left: 3px solid var(--blue);
  background: #eaedf8;
  padding: 14px 18px;
  margin-top: 20px;
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.status.error {
  border-color: #a0372d;
  background: #f6eae6;
  color: #8b3027;
}
footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0 32px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
.footer-dot {
  margin: 0 8px;
  color: #9ca494;
}
footer a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
dialog {
  width: min(520px, calc(100% - 32px));
  max-height: calc(100dvh - 48px);
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 20px 80px #25332c30;
}
dialog::backdrop {
  background: #25332c66;
  backdrop-filter: blur(3px);
}
dialog h2 {
  font:
    normal 32px/1.1 Georgia,
    serif;
  letter-spacing: -0.8px;
  margin: 0 0 22px;
}
dialog p,
dialog li {
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
}
dialog ol {
  padding-left: 20px;
}
dialog li {
  padding: 5px 0;
}
dialog code {
  font-size: 12px;
}
.close-dialog {
  position: absolute;
  right: 16px;
  top: 10px;
  font-size: 18px;
  padding: 6px;
  color: var(--muted);
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}
.review-visibility {
  padding: 12px 14px;
  border: 1px solid #d9e2d4;
  border-radius: 5px;
  background: #edf2e8;
  margin: 20px 0;
  font-size: 13px;
}
@media (max-width: 1100px) {
  .masthead,
  main {
    padding-left: 28px;
    padding-right: 28px;
  }
  .intro > div {
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 24px;
  }
  .workspace {
    grid-template-columns: minmax(0, 1fr) 280px;
  }
  .canvas {
    padding-left: 22px;
    padding-right: 22px;
  }
  .controls {
    padding-left: 20px;
    padding-right: 20px;
  }
  .build-section {
    gap: 36px;
  }
}
@media (max-width: 1000px) {
  .workspace {
    grid-template-columns: 1fr;
  }
  .intro > div {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .intro p {
    max-width: 560px;
  }
  .controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 32px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .controls h2 {
    grid-column: 1 / -1;
  }
  .preset-group {
    grid-column: 1 / -1;
    max-width: 320px;
    width: 100%;
  }
  .date-group {
    grid-column: 1;
  }
  .activity-group {
    grid-column: 1;
  }
  .commit-range {
    grid-column: 2;
    grid-row: 3 / 5;
  }
  .pattern-error {
    grid-column: 1 / -1;
  }
  .build-section {
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 28px;
  }
  .identity-fields {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .masthead,
  main {
    padding-left: 18px;
    padding-right: 18px;
  }
  .masthead {
    height: 72px;
  }
  .brand {
    font-size: 20px;
  }
  .brand-mark {
    width: 28px;
    height: 28px;
    font-size: 26px;
  }
  .header-actions {
    gap: 14px;
  }
  .header-actions #about-button {
    display: none;
  }
  .header-actions .primary-button {
    font-size: 11px;
    padding: 9px 12px;
    min-height: 38px;
  }
  .intro {
    padding: 30px 0 26px;
  }
  h1 {
    font-size: clamp(31px, 8.8vw, 44px);
    letter-spacing: -1.4px;
  }
  .intro p {
    font-size: 13px;
    max-width: 360px;
  }
  .intro > div {
    gap: 16px;
  }
  .canvas {
    padding: 22px 16px 0;
  }
  h2 {
    font-size: 16px;
  }
  .quiet-pill {
    font-size: 9px;
  }
  .section-heading {
    gap: 8px;
  }
  .subtext {
    font-size: 11px;
  }
  .activity-toolbar {
    min-height: 54px;
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
  }
  .activity-status {
    flex: none;
    padding: 4px 0;
    font-size: 10px;
  }
  #refresh-activity {
    padding: 4px 0;
    font-size: 10px;
  }
  .comparison-heading {
    gap: 8px;
  }
  .comparison-heading span {
    font-size: 9px;
  }
  .comparison-heading h3 {
    font-size: 11px;
  }
  .calendar-caption {
    font-size: 10px;
  }
  .summary {
    margin: 20px 0;
    padding-top: 18px;
  }
  .summary strong {
    font-size: 28px;
  }
  .summary span {
    font-size: 10px;
  }
  .summary > div + div {
    padding-left: 14px;
  }
  .canvas-footer {
    align-items: flex-start;
    gap: 16px;
  }
  #canvas-note {
    font-size: 10px;
  }
  .canvas-footer .text-button {
    font-size: 11px;
  }
  .controls {
    display: block;
    padding: 24px 20px;
  }
  .preset-group {
    max-width: none;
  }
  .activity-group {
    margin-bottom: 8px;
  }
  .check-label {
    padding-bottom: 16px;
  }
  input[type="date"] {
    font-size: 13px !important;
  }
  .build-section {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 28px 0;
  }
  .build-intro p {
    max-width: 420px;
  }
  .generate-bottom {
    flex-wrap: wrap;
  }
  .generate-form,
  .publish-content {
    min-width: 0;
  }
  .dialog-actions {
    flex-direction: column-reverse;
  }
  dialog {
    padding: 28px 22px;
  }
  dialog h2 {
    font-size: 28px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .calendar.is-shimmering::after {
    display: none;
  }
}
