/* The Journal: titles only, one per line. Signed in, the owner also sees "New article" and drafts. */
.cards {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--edge);
}

.card {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 20px;
  flex-wrap: wrap;
  padding: 18px 0;
  border-bottom: 1px solid var(--edge);
}

.card h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--ink);
  min-width: 0;
}

.card .meta {
  font-size: 13px;
  color: var(--dim);
  white-space: nowrap;
}

.card .meta b {
  font-weight: 500;
  color: var(--cyan-ink);
}

.card.new .go,
.card.new .go svg {
  color: var(--cyan-ink);
}

.card.new .go:hover .t,
.card.new .go:focus-visible .t {
  background-image: linear-gradient(100deg, var(--cyan-ink) 0 36%, var(--ink) 50%, var(--cyan-ink) 64% 100%);
}

.card.draft h3 {
  color: var(--ink-2);
}

.card.none {
  font-size: 15px;
  color: var(--dim);
}

.card .meta i {
  font-style: normal;
  color: var(--cyan-ink);
}

/* an article */
/* the article's title and text; the editor (signed-in/editing.css) draws its marks inside them */
#n-title,
#n-body {
  position: relative;
}

.ntext {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 60ch;
}

.ntext p {
  margin: 0;
  font-size: 18px;
  line-height: 1.75;
  color: var(--ink-2);
}

/* an article's sections: each heading opens its part, one at a time; the opening above them always shows */
.nsecs {
  display: flex;
  flex-direction: column;
  margin-top: 8px;
  border-top: 1px solid var(--edge);
}

.nsec {
  border-bottom: 1px solid var(--edge);
  scroll-margin-top: calc(env(safe-area-inset-top, 0px) + 24px);
}

/* a section heading: the text's size, set apart by weight */
.ntext h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  text-wrap: balance;
}

.nsec-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 18px 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.nsec-btn svg {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--dim);
  transition: transform 0.25s ease, color 0.2s;
}

.nsec-btn:hover svg,
.nsec.open .nsec-btn svg {
  color: var(--cyan-ink);
}

.nsec.open .nsec-btn svg {
  transform: rotate(90deg);
}

.nsec-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-bottom: 26px;
  animation: nsec-in 0.35s ease;
}

@keyframes nsec-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .nsec-body {
    animation: none;
  }

  .nsec-btn svg {
    transition: none;
  }
}

.nmeta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
