/* Source feed */

section.day h2 {
  margin-top: 1.4rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--line);
}

section.day ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

section.day li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  column-gap: 1.5rem;
  align-items: baseline;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
}

section.day .title {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  min-width: 0;
}

/* Reserve copper for unread state, not source-kind icons. */

svg.mark {
  color: var(--muted);
  flex: none;
  vertical-align: -0.15em;
}

section.day .title svg.mark {
  align-self: center;
}

h1 svg.mark {
  margin-right: 0.5rem;
  vertical-align: -0.1em;
}

nav.tabs svg.mark {
  margin-right: 0.3rem;
}

section.day .title a {
  color: var(--ink);
  font-weight: 500;
  overflow-wrap: anywhere;
}

section.day .shape {
  grid-column: 1;
  color: var(--muted);
  font-size: var(--text-sm);
}

section.day .read {
  grid-column: 2;
  grid-row: 1 / span 2;
  color: var(--good);
  font-size: var(--text-sm);
  white-space: nowrap;
  text-align: right;
}

section.day .read.no {
  color: var(--in);
}

nav.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  border-bottom: 1px solid var(--line);
  margin-top: 1.2rem;
  font-size: var(--text-sm);
}

nav.tabs a {
  padding: 0.45rem 0;
  color: var(--muted);
  margin-bottom: -1px;
}

nav.tabs a.current {
  color: var(--ink);
  border-bottom: 1.5px solid var(--ink);
}

nav.tabs .count {
  margin-left: 0.3rem;
}

/* Source files */

p.file {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.2rem;
  padding: 0.6rem 0.9rem;
  background: var(--wash);
  border-radius: var(--radius);
  font-size: var(--text-md);
}

p.file .name {
  font-weight: 500;
  overflow-wrap: anywhere;
}

p.file .size {
  color: var(--muted);
  font-size: var(--text-sm);
}

p.file .download {
  margin-left: auto;
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 0.15rem 0.6rem;
  font-weight: 500;
  white-space: nowrap;
}

p.file .download:hover {
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}

/* File-format icons */

.format {
  display: inline-block;
  flex: none;
  vertical-align: middle;
  margin-right: 0.4rem;
  padding: 0.4rem 0.3rem 0.2rem;
  border-radius: 2px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  color: white;
  background: var(--muted);
  clip-path: polygon(0 0, calc(100% - 0.35rem) 0, 100% 0.35rem, 100% 100%, 0 100%);
}

.format.pdf { background: #b3261e; }
.format.docx, .format.doc { background: #2b579a; }
.format.xlsx, .format.xls, .format.csv { background: #217346; }
.format.pptx, .format.ppt { background: #b7472a; }
.format.png, .format.jpg, .format.gif, .format.webp { background: #6b4c9a; }

section.day .title .format {
  align-self: center;
  margin-right: 0;
}

/* File preview */

article.page iframe.document,
article.page img.document {
  margin-top: 1rem;
  border: 1px solid var(--line);
}

article.page img.document {
  display: block;
  max-width: 100%;
}

details.text {
  margin-top: 1rem;
}

details.text summary {
  cursor: pointer;
  color: var(--muted);
  font-size: var(--text-sm);
}

details.text pre {
  margin-top: 0.5rem;
}

/* Thread messages */

section.messages article.message {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

section.messages article.message h2 {
  font-size: var(--text-base);
  margin-bottom: 0.25rem;
}

section.messages article.message h2 a {
  color: inherit;
}

section.messages article.message pre {
  margin-top: 0.5rem;
}

article.page > pre {
  margin-top: 1.6rem;
}

/* Source facets */

aside.facets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

aside.facets h2 {
  margin-bottom: 0.5rem;
}

aside.facets ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

aside.facets li {
  margin: 0.2rem 0;
  font-size: var(--text-md);
}

aside.facets li a {
  color: var(--ink);
}

aside.facets .relation {
  color: var(--muted);
  font-size: var(--text-xs);
}
