/* The journal: who worked on what, a day at a time, one line per author and home. The
   changes are the page diff over a set, the scope first. */

.rows.journal .row {
  grid-template-columns: 11rem minmax(0, 1fr) max-content max-content;
  column-gap: 1rem;
  padding: 0.38rem 0;
  font-size: var(--text-md);
}

.rows.journal .who {
  font-weight: 500;
  color: var(--out);
}

.rows.journal .who-cell {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rows.journal .what {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rows.journal .what a {
  color: var(--ink);
}

.rows.journal .row.folded .what a {
  color: var(--muted);
}

.rows.journal .note {
  color: var(--muted);
  font-size: var(--text-sm);
}

.rows.journal .n,
.rows.journal .facts {
  color: var(--muted);
  font-size: var(--text-sm);
  white-space: nowrap;
}

.rows.journal .facts a {
  color: var(--out);
}

@media (max-width: 700px) {
  .rows.journal .row {
    grid-template-columns: minmax(0, 1fr) max-content;
  }

  .rows.journal .who-cell,
  .rows.journal .facts {
    display: none;
  }
}

/* The changes, read like a pull request: the index on the left, the diffs on the right. */

article.changes {
  padding: 0 var(--gutter);
}

article.changes .crumbs {
  font-size: var(--text-sm);
  color: var(--muted);
  margin-bottom: 0.4rem;
}

article.changes .crumbs a {
  color: var(--muted);
}

article.changes h1 {
  font-size: 22px;
  margin: 0 0 0.4rem;
}

article.changes .line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.2rem;
  align-items: baseline;
  font-size: var(--text-sm);
  color: var(--muted);
  margin: 0;
}

article.changes .line .ink {
  color: var(--ink);
}

article.changes .add,
article.changes .pm b {
  color: var(--good);
}

article.changes .del,
article.changes .pm i {
  color: var(--bad);
  font-style: normal;
}

article.changes .pm {
  font-family: var(--mono);
  font-size: 12px;
  white-space: nowrap;
}

article.changes .pm b {
  font-weight: 500;
}

article.changes .pm i,
article.changes .pm em {
  margin-left: 0.4rem;
}

article.changes .pm em {
  color: var(--muted);
  font-style: normal;
}

article.changes .layout {
  display: grid;
  grid-template-columns: 19rem minmax(0, 1fr);
  gap: 2rem;
  margin-top: 1.4rem;
  align-items: start;
}

article.changes .index {
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  overflow: auto;
  font-size: var(--text-sm);
  border-right: 1px solid var(--line);
  padding-right: 1rem;
}

article.changes .index .home {
  margin: 1rem 0 0.25rem;
  font-weight: 500;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

article.changes .index .home:first-child {
  margin-top: 0;
}

article.changes .index .home a {
  color: var(--ink);
}

/* The branches, as a page's tree draws them: a glyph, then the branch. */
article.changes .index .branch {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.5rem;
  align-items: baseline;
  margin: 0;
  padding: 0.1rem 0;
}

article.changes .index .branch > span:first-child,
article.changes .index summary > span:first-child {
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--text-xs);
  white-space: pre;
}

article.changes .index details.group summary {
  cursor: pointer;
  list-style: none;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.5rem;
  align-items: baseline;
  padding: 0.1rem 0;
  color: var(--muted);
}

article.changes .index details.group summary::-webkit-details-marker {
  display: none;
}

article.changes .index details.group summary .n {
  color: var(--muted);
  font-size: var(--text-xs);
}

article.changes .index details.group summary > span:last-child {
  color: var(--ink);
}

article.changes .index details.group summary > span:last-child::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: 0.5rem;
  border-right: 1.2px solid var(--muted);
  border-bottom: 1.2px solid var(--muted);
  transform: rotate(-45deg) translateY(-1px);
}

article.changes .index details.group[open] summary > span:last-child::after {
  transform: rotate(45deg) translateY(-2px);
}

article.changes .index details.group {
  display: block;
}

article.changes .index details.group > .pages {
  display: grid;
  gap: 0;
}

article.changes .index .branch a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  column-gap: 0.5rem;
  align-items: baseline;
  color: var(--ink);
  border-radius: var(--radius-sm);
}

article.changes .index .branch a:hover {
  text-decoration: none;
}

article.changes .index .branch a:hover .t {
  text-decoration: underline;
}

article.changes .index .branch a.quiet {
  color: var(--muted);
}

article.changes .index .t {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

article.changes .kind {
  margin: 0;
}

article.changes .diffs {
  min-width: 0;
}

article.changes .change {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--sheet);
  margin-bottom: 1.2rem;
  scroll-margin-top: 1rem;
}

article.changes .change header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content max-content max-content;
  column-gap: 1rem;
  align-items: baseline;
  padding: 0.5rem 0.9rem;
  background: var(--wash);
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
  font-size: var(--text-md);
}

article.changes .change header .page {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

article.changes .change header .page a {
  color: var(--ink);
  font-weight: 500;
}

article.changes .change header .v {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

article.changes .change header .links {
  font-size: var(--text-sm);
  color: var(--muted);
  display: inline-flex;
  gap: 0.9rem;
}

article.changes .change .notes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.2rem;
  padding: 0.45rem 0.9rem;
  margin: 0;
  font-size: var(--text-sm);
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

article.changes .change .notes .note:first-child {
  color: var(--ink);
}

article.changes .change .notes:last-child {
  border-bottom: 0;
}

article.changes .split {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
}

article.changes .split col.n {
  width: 3.2rem;
}

article.changes .split td {
  padding: 0.05rem 0.5rem;
  vertical-align: top;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border-left: 1px solid var(--line);
}

article.changes .split td:first-child {
  border-left: 0;
}

article.changes .split td.n {
  color: var(--muted);
  text-align: right;
  user-select: none;
  font-size: 11px;
}

article.changes .split tr.keep td {
  color: var(--muted);
}

article.changes .split td.del {
  background: color-mix(in oklab, var(--bad) 12%, var(--sheet));
}

article.changes .split td.add {
  background: color-mix(in oklab, var(--good) 12%, var(--sheet));
}

article.changes .split td.n.del {
  background: color-mix(in oklab, var(--bad) 20%, var(--sheet));
}

article.changes .split td.n.add {
  background: color-mix(in oklab, var(--good) 20%, var(--sheet));
}

article.changes .split td.empty {
  background: var(--wash);
}

article.changes .split tr.skip td {
  color: var(--muted);
  text-align: center;
  font-size: 11px;
  padding: 0.3rem;
  background: var(--paper);
}

article.changes .diffs .meta {
  color: var(--muted);
  font-size: var(--text-sm);
}

@media (max-width: 900px) {
  article.changes .layout {
    grid-template-columns: minmax(0, 1fr);
  }

  article.changes .index {
    position: static;
    max-height: none;
    border-right: 0;
    padding-right: 0;
  }

  article.changes .change header {
    grid-template-columns: minmax(0, 1fr) max-content;
  }

  article.changes .change header .v,
  article.changes .change header .links {
    display: none;
  }
}

/* A member's page */

article.member .crumbs {
  font-size: var(--text-sm);
  color: var(--muted);
  margin-bottom: 0.5rem;
}

article.member .crumbs a {
  color: var(--muted);
}

article.member h1 {
  font-size: 26px;
  margin: 0 0 0.35rem;
}

article.member .line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.2rem;
  align-items: baseline;
  font-size: var(--text-sm);
  color: var(--muted);
}

article.member .line .ink {
  color: var(--ink);
}

article.member section.google p {
  max-width: var(--measure);
  margin: 0.4rem 0 0;
}

article.member section.google .mailbox {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.2rem;
  align-items: baseline;
  font-size: var(--text-sm);
  color: var(--muted);
}

article.member section.google .mailbox .account {
  color: var(--ink);
}

article.member section.google .connect,
article.member section.google .google-actions {
  margin-top: 1rem;
}

article.member section.google h3 {
  font-size: var(--text-base);
  margin: 0 0 0.4rem;
}

article.member section.google .manage {
  display: flex;
  gap: 0.8rem;
  margin-top: 1rem;
}

article.member section.google .manage button {
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  color: var(--muted);
}

article.member section.connections p {
  max-width: var(--measure);
  margin: 0.4rem 0 1rem;
}

article.member section.connections ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

article.member section.connections li {
  display: flex;
  gap: 1.2rem;
  align-items: baseline;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--line);
}

article.member h2 {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: var(--text-xs);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin: 1.8rem 0 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--line);
}

article.member h2 a,
article.member h2 span {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  font-size: var(--text-sm);
}

article.member .months,
article.member .grid {
  display: grid;
  gap: 3px;
  font-size: 11px;
  color: var(--muted);
}

article.member .months {
  margin-bottom: 4px;
}

article.member .months span {
  white-space: nowrap;
}

article.member .grid {
  grid-auto-rows: 14px;
  align-items: center;
}

article.member .grid .m {
  grid-column: 1;
}

article.member .c,
article.member .scale i {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: var(--wash);
}

article.member .c.off {
  background: transparent;
}

article.member .c.q1,
article.member .scale i.q1 {
  background: color-mix(in oklab, var(--out) 35%, var(--sheet));
}

article.member .c.q2,
article.member .scale i.q2 {
  background: color-mix(in oklab, var(--out) 65%, var(--sheet));
}

article.member .c.q3,
article.member .scale i.q3 {
  background: var(--out);
}

article.member .scale {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 1.2rem;
}

article.member .scale i {
  width: 11px;
  height: 11px;
}

article.member .meta {
  color: var(--muted);
  font-size: var(--text-sm);
  margin-top: 0.6rem;
}

article.member .two {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 3rem;
}

article.member .two > * {
  min-width: 0;
}

article.member .touched {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 0 1rem;
  font-size: var(--text-md);
}

article.member .touched > span {
  padding: 0.32rem 0;
  border-top: 1px solid var(--line);
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

article.member .touched a {
  color: var(--ink);
}

article.member .touched .kind,
article.member .member-journal .kind {
  margin: 0 0.45rem 0 0;
}

article.member .member-journal .what .kind {
  margin: 0 0 0 0.45rem;
}

article.member .touched .w {
  color: var(--muted);
  font-size: var(--text-sm);
}

article.member .touched .w b {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  margin-left: 0.5rem;
}

article.member .bars {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 2.6rem;
  column-gap: 0.8rem;
  row-gap: 0.45rem;
  align-items: center;
  font-size: var(--text-sm);
}

article.member .bars a {
  color: var(--ink);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  display: block;
}

article.member .bars .b {
  height: 6px;
  border-radius: 0 3px 3px 0;
  background: var(--out);
}

article.member .bars .v {
  color: var(--muted);
  text-align: right;
  font-family: var(--mono);
  font-size: 12px;
}

@media (max-width: 700px) {
  article.member .two {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The member's journal, in its column. */

article.member .member-journal .row {
  grid-template-columns: minmax(0, 1fr) max-content max-content;
  column-gap: 1rem;
  padding: 0.32rem 0;
  font-size: var(--text-md);
}

article.member .member-journal .what {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

article.member .member-journal .what a {
  color: var(--ink);
}

article.member .member-journal .row.folded .what a,
article.member .member-journal .note {
  color: var(--muted);
  font-size: var(--text-sm);
}

article.member .member-journal .n,
article.member .member-journal .facts {
  color: var(--muted);
  font-size: var(--text-sm);
  white-space: nowrap;
}

article.member .member-journal .facts a {
  color: var(--out);
}
