/* Journals index (authed + public): serif-title toolbar, cover tiles with
   dot-status chips, folder-detail control language. Literals where the public
   base lacks the shared tokens. */

.jl-shell {
  width: 95%;
  max-width: 1080px;
  margin: 0 auto;
}

/* ---- Toolbar ---- */
.jl-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 24px;
  padding: 26px 0 22px;
}
.jl-toolbar-authed {
  align-items: center;
  padding: 0 0 18px;
}
/* Same 1080 cap folder pages give their header (their rule lives in folder.css,
   which this page does not load). */
.jl-page-header {
  width: 95%;
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
}
.jl-title {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: var(--brand-primary);
}
.jl-meta {
  margin: 4px 0 0;
  font-size: 13px;
  color: #5c656d;
}
.jl-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
/* Control chrome from the shared search library; only the width budget is local. */
.jl-search input {
  width: 300px;
  min-width: 140px;
  flex: 1 1 auto;   /* the input gives way when the row tightens, not the button */
  max-width: 100%;
}
/* Segmented All/Open: quiet chips, the active one filled navy (journals.js
   toggles .active). */
.jl-seg {
  display: inline-flex;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  overflow: hidden;
}
.jl-seg-btn {
  height: 32px;
  padding: 0 16px;
  border: none;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: #5c656d;
  cursor: pointer;
}
.jl-seg-btn + .jl-seg-btn {
  border-left: 1px solid #e6e6e6;
}
.jl-seg-btn.active {
  background-color: var(--brand-primary);
  color: #fff;
}
.jl-seg-btn:focus-visible,
.jl-search-btn:focus-visible {
  outline: 2px solid #5187bd;
  outline-offset: 2px;
}

/* ---- Cards ---- */
.journal-link {
  margin: 0 auto;
  display: block;
  text-decoration: none;
}
.journal-link:hover {
  text-decoration: none;
}
.jl-cover {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 3/4;
  overflow: hidden;
  border: 1px solid rgba(18, 49, 80, 0.10);
  border-radius: 8px;
  background-color: #f5f5f5;
  box-shadow: 0 6px 16px rgba(18, 49, 80, 0.16);
  transition: box-shadow 0.15s ease;
}
/* Keyed off the card, not the anchor: the bell is a sibling of the <a>, so
   hovering it would otherwise drop the hover state.

   Deepened shadow only -- the 4px lift is gone. Under Reminders the cover
   carries a button, and a target that jumps the moment the pointer reaches it is
   a target you miss. The shadow gives the same "this is live" feedback without
   moving anything. */
.jl-card:hover .jl-cover {
  box-shadow: 0 14px 28px rgba(18, 49, 80, 0.22);
}
.jl-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.jl-name {
  margin: 12px 2px 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  color: var(--brand-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Fluid grid: columns follow the window, no breakpoint jumps. */
.jl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 30px 22px;
  margin-bottom: 44px;
}
.jl-empty {
  grid-column: 1 / -1;
}
/* The card is the positioned ancestor the bell anchors to. */
.jl-card {
  position: relative;
}
/* Remove-reminder control, mirroring .jl-badge across the cover. Only rendered on
   the Reminders view, so it has one meaning and no state to show. */
.jl-bell {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.16);
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.jl-bell:hover {
  background-color: var(--danger);
  color: #fff;
}
.jl-bell:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}
.jl-bell[disabled],
.jl-bell[aria-busy="true"] {
  opacity: 0.5;
  cursor: default;
}
/* Status chip on the cover: dot + word, white pill legible over any artwork. */
.jl-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.16);
  font-size: 11px;
  font-weight: 700;
  color: #212529;
}
.jl-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.jl-badge.is-open::before  { background-color: var(--success); }
.jl-badge.is-closed::before { background-color: var(--danger); }
.journal-link:hover .jl-name {
  text-decoration: underline 2px;
  text-underline-offset: 3px;
}

/* ---- Paginator: navy active page, quiet chrome ---- */
.pagination .page-link {
  color: var(--brand-primary);
  border-color: #e6e6e6;
}
.pagination .page-item.active .page-link {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
}

@media (max-width: 900px) {
  .jl-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .jl-search input {
    width: 100%;
    flex: 1 1 auto;
  }
}
