/* Work page: the drawn sections at the end. Loaded only by work.html, after
   the main stylesheet, and built on its tokens. The Pictos PoS and SalesPulse
   cards moved to the Pictos thread, with their styles (projects.css). The order-flow diagram has its own stylesheet, flow.css, because
   the Recently pages show it too. */

/* ------------------------------------------------ How I work, availability, what I do
   Three sections drawn rather than written out: four principles as cards,
   the response times as three numbers over a week of hours, and the kinds of
   work as cards of keywords. */
.docs-article .vis-lead {
  margin: 0 0 16px;
  color: var(--text-secondary);
}
.docs-article .ways,
.docs-article .avail,
.docs-article .dos,
.docs-article .do-tags {
  margin: 0;
  padding: 0;
  list-style: none;
}
.vis-icon {
  display: block;
  flex: none;
  color: var(--accent);
}

/* How I work: four cards. */
.docs-article .ways {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 34px;
}
.docs-article .way {
  display: grid;
  align-content: start;
  gap: 6px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--border-primary);
  border-radius: 5px;
  background: var(--background-default);
}
.docs-article .way .vis-icon { margin-bottom: 6px; }
.way-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}
.way-line {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-secondary);
}

/* Availability: three numbers. */
.docs-article .avail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.docs-article .avail-stat {
  display: grid;
  align-content: start;
  gap: 4px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--border-primary);
  border-radius: 5px;
  border-top: 3px solid var(--accent);
}
.avail-num {
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  white-space: nowrap;
}
.avail-what {
  font-size: 14px;
  font-weight: 550;
  line-height: 1.35;
  color: var(--text-primary);
}
.avail-note {
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-secondary);
}

/* A week of hours, Monday to Sunday down, midnight to midnight across. From
   08:00 to 21:00 the cells are full; overnight they are faint, because then I
   answer only if I feel like it. The cell for this hour in Madiun is marked
   by work.js. */
.docs-article .week { margin: 0 0 34px; }
.week-grid { display: grid; gap: 3px; }
.week-row,
.week-axis {
  display: grid;
  grid-template-columns: 2.6em repeat(24, minmax(0, 1fr));
  gap: 2px;
  align-items: center;
}
.week-day,
.week-axis span {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-secondary);
}
.week-row i {
  height: 14px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.85;
}
.week-row i:nth-of-type(-n + 8),
.week-row i:nth-of-type(n + 22) {
  opacity: 0.22;
}
.week-row i.is-now {
  opacity: 1;
  box-shadow: 0 0 0 2px var(--background-default), 0 0 0 3.5px var(--text-primary);
  animation: week-now 1.6s ease-in-out infinite;
}
@keyframes week-now { 50% { box-shadow: 0 0 0 2px var(--background-default), 0 0 0 3.5px transparent; } }
.week-axis span:nth-child(n + 2) { grid-column: span 6; }
.week-key {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-secondary);
}
.week-key span { display: inline-flex; align-items: center; gap: 6px; }
.week-key span::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--accent);
}
.week-key .week-key-off::before { opacity: 0.22; }
.week-key .week-key-now::before {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--text-primary);
}
.week-key-now { display: none; }
.js .week-key-now { display: inline-flex; }

/* What I do: a card per kind of work, with its keywords as chips, and a last
   card for everything else. */
.docs-article .dos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}
.docs-article .do {
  display: grid;
  align-content: start;
  gap: 10px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--border-primary);
  border-radius: 5px;
}
.do-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}
.docs-article .do-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.docs-article .do-tags li {
  margin: 0;
  padding: 2px 8px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary);
  border: 1px solid var(--border-secondary);
  border-radius: 999px;
}
.docs-article .do-ask {
  padding: 0;
  border-style: dashed;
  border-color: var(--border-secondary);
}
.docs-article .do-ask a {
  display: grid;
  align-content: center;
  gap: 6px;
  height: 100%;
  padding: 16px;
  color: inherit;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.2s;
}
.docs-article .do-ask a:hover { background: var(--secondary-main); }
.docs-article .do-ask a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.do-line {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-secondary);
}

@media (max-width: 560px) {
  .docs-article .avail { grid-template-columns: minmax(0, 1fr); }
  .docs-article .avail-stat {
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 14px;
    align-items: baseline;
  }
  .avail-num { grid-row: span 2; font-size: 26px; }
  .week-row i { height: 10px; }
  .week-row, .week-axis { gap: 1px; }
}
@media (prefers-reduced-motion: reduce) {
  .week-row i.is-now { animation: none; }
  .docs-article .do-ask a { transition: none; }
}

/* On GitHub: the contribution calendar, a column a week, drawn by
   api/lib-austin/github-contrib.mjs. */
.gh { margin: 0 0 30px; }
.docs-article .gh-stats { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 0 0 14px; padding: 0; list-style: none; }
.docs-article .gh-stats li { margin: 0; display: grid; }
.gh-num { font-family: var(--font-mono); font-size: 26px; font-weight: 300; line-height: 1.1; color: var(--text-primary); }
.gh-what { font-size: 12px; color: var(--text-secondary); }
.gh-cal { display: grid; grid-template-rows: repeat(7, minmax(0, 1fr)); grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; }
.gh-cal i, .gh-legend i { display: block; aspect-ratio: 1; border-radius: 2px; background: var(--accent); }
.gh-cal .gh-pad { background: transparent; }
.gh-l0 { background: var(--secondary-main) !important; }
.gh-l1 { opacity: 0.35; }
.gh-l2 { opacity: 0.55; }
.gh-l3 { opacity: 0.78; }
.gh-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: 11px; color: var(--text-secondary); font-family: var(--font-mono); }
.gh-legend { display: inline-flex; align-items: center; gap: 3px; }
.gh-legend i { width: 10px; }
@media (max-width: 560px) {
  .gh-cal i:nth-child(-n + 182) { display: none; }
}
