/* recently-opened.css — Recently Opened page (timeline) */

.recent-hero {
  max-width: 1240px;
  margin: 0 auto;
  padding: 42px 56px 24px;
}
.recent-hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 11px 'Roboto', system-ui, sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(6,31,39,.55);
  margin-bottom: 14px;
  padding: 5px 11px 5px 10px;
  background: rgba(6,31,39,.05);
  border-radius: 3px;
}
.recent-hero-title {
  font: 400 44px/1.1 'Cormorant Garamond', Georgia, serif;
  color: #061F27;
  margin: 0 0 8px;
  letter-spacing: -.01em;
}
.recent-hero-title em {
  font-style: italic;
  color: #26828F;
}
.recent-hero-sub {
  font: 400 14.5px/1.55 'Roboto', system-ui, sans-serif;
  color: rgba(6,31,39,.65);
  max-width: 640px;
  margin: 0 0 24px;
  text-wrap: pretty;
}

/* Summary stats strip */
.recent-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid rgba(6,31,39,.08);
  border-bottom: 1px solid rgba(6,31,39,.08);
  padding: 18px 0;
  margin-top: 6px;
}
.recent-stat { padding: 0 20px; border-right: 1px solid rgba(6,31,39,.06); }
.recent-stat:first-child { padding-left: 0; }
.recent-stat:last-child { border-right: 0; padding-right: 0; }
.recent-stat-n {
  font: 500 22px 'Cormorant Garamond', Georgia, serif;
  color: #061F27;
  letter-spacing: .01em;
  margin-bottom: 2px;
}
.recent-stat-l {
  font: 500 11px 'Roboto', system-ui, sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(6,31,39,.55);
}

/* Toolbar -------------------------------------------------- */
.recent-toolbar {
  max-width: 1240px;
  margin: 20px auto 0;
  padding: 0 56px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid rgba(6,31,39,.08);
}
.recent-tabs { display: flex; gap: 2px; }
.recent-tab {
  background: none; border: 0;
  padding: 12px 14px;
  font: 500 12.5px 'Roboto', system-ui, sans-serif;
  letter-spacing: .02em;
  color: rgba(6,31,39,.58);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.recent-tab:hover { color: #061F27; }
.recent-tab.on { color: #061F27; border-bottom-color: #26828F; }
.recent-tab-count {
  font: 700 10.5px 'Roboto', system-ui, sans-serif;
  padding: 1px 6px;
  border-radius: 8px;
  background: rgba(6,31,39,.08);
  color: rgba(6,31,39,.6);
  min-width: 20px; text-align: center;
}
.recent-tab.on .recent-tab-count { background: rgba(38,130,143,.15); color: #26828F; }
.recent-clear {
  background: none; border: 0;
  padding: 8px 10px;
  font: 500 12px 'Roboto', system-ui, sans-serif;
  color: rgba(6,31,39,.55);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 4px;
}
.recent-clear:hover { background: rgba(184,68,58,.08); color: #b8443a; }

/* Content -------------------------------------------------- */
.recent-content {
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px 56px 72px;
}

/* Bucket (time group) */
.recent-bucket { margin-bottom: 36px; }
.recent-bucket-head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 8px;
}
.recent-bucket-head h2 {
  font: 500 13px 'Roboto', system-ui, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(6,31,39,.7);
  margin: 0;
}
.recent-bucket-line {
  display: block;
  width: 26px; height: 1px;
  background: rgba(6,31,39,.2);
}
.recent-bucket-count {
  font: 500 11px 'Roboto', system-ui, sans-serif;
  color: rgba(6,31,39,.45);
  letter-spacing: .04em;
  margin-left: auto;
}
.recent-bucket-rows {
  position: relative;
}
/* Vertical thread behind the rail */
.recent-bucket-rows::before {
  content: '';
  position: absolute;
  left: 19px; top: 8px; bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, rgba(6,31,39,.12), rgba(6,31,39,.04));
}

/* Row ------------------------------------------------------ */
.recent-row {
  display: grid;
  grid-template-columns: 40px 1fr 140px;
  gap: 16px;
  padding: 18px 16px;
  margin-bottom: 2px;
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s;
  align-items: flex-start;
  position: relative;
}
.recent-row:hover { background: #fff; box-shadow: 0 2px 12px rgba(6,31,39,.05); }

.recent-rail {
  display: flex; flex-direction: column; align-items: center;
  padding-top: 2px;
}
.recent-rail-dot {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fbf5ea;
  color: rgba(6,31,39,.7);
  border-radius: 4px;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 3px var(--topbar-bg, #fbf7ee);
}

.recent-body { min-width: 0; }

.recent-meta-row {
  display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font: 600 10.5px 'Roboto', system-ui, sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(6,31,39,.55);
  margin-bottom: 6px;
}
.recent-action {
  font-weight: 700;
}
.recent-kicker { color: rgba(6,31,39,.55); }
.recent-dot { opacity: .4; padding: 0 1px; }
.recent-langchip {
  padding: 1px 5px;
  background: rgba(6,31,39,.06);
  border-radius: 2px;
  font-size: 9.5px;
  letter-spacing: .12em;
}

.recent-title-line {
  font: 500 19px/1.3 'Cormorant Garamond', Georgia, serif;
  color: #061F27;
  margin-bottom: 4px;
}
.recent-ref {
  font: 600 13px 'Roboto', system-ui, sans-serif;
  letter-spacing: .04em;
  color: #26828F;
  padding: 2px 8px;
  background: rgba(38,130,143,.1);
  border-radius: 3px;
  margin-right: 8px;
  vertical-align: 2px;
}
.recent-title { font-style: italic; }
.recent-title-sep { color: rgba(6,31,39,.3); margin: 0 4px; font-style: normal; }
.recent-byline {
  font: 400 13.5px 'Roboto', system-ui, sans-serif;
  color: rgba(6,31,39,.55);
  font-style: italic;
}
.recent-query {
  font-family: 'Roboto', system-ui, sans-serif;
  font-style: italic;
  font-weight: 500;
  font-size: 16px;
  color: #061F27;
}

.recent-detail {
  font: 400 12.5px/1.5 'Roboto', system-ui, sans-serif;
  color: rgba(6,31,39,.65);
  margin-bottom: 10px;
}
.recent-detail em {
  color: rgba(6,31,39,.75);
  font-style: italic;
}

/* Progress */
.recent-progress {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px;
  max-width: 360px;
}
.recent-progress-bar {
  flex: 1;
  height: 3px;
  background: rgba(6,31,39,.08);
  border-radius: 2px;
  overflow: hidden;
}
.recent-progress-bar > span {
  display: block; height: 100%;
  background: linear-gradient(90deg, #26828F 0%, #1f6974 100%);
  border-radius: 2px;
}
.recent-progress-pct {
  font: 500 11px 'Roboto', system-ui, sans-serif;
  color: rgba(6,31,39,.55);
  white-space: nowrap;
}

/* Footer */
.recent-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  margin-top: 2px;
}
.recent-footer-left { display: inline-flex; gap: 4px; align-items: center; }
.recent-footer-right { display: inline-flex; gap: 6px; }
.recent-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 11px;
  border-radius: 4px;
  font: 600 11.5px 'Roboto', system-ui, sans-serif;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.recent-btn.primary {
  background: #061F27;
  color: #fbf7ee;
}
.recent-btn.primary:hover { background: #0a2f3b; }
.recent-btn.ghost {
  background: transparent;
  color: rgba(6,31,39,.7);
  border-color: rgba(6,31,39,.18);
}
.recent-btn.ghost:hover { background: rgba(6,31,39,.05); border-color: rgba(6,31,39,.3); }

/* Right column · time + duration */
.recent-time {
  text-align: right;
  display: flex; flex-direction: column; gap: 4px;
  padding-top: 4px;
}
.recent-when {
  font: 500 11.5px 'Roboto', system-ui, sans-serif;
  color: rgba(6,31,39,.55);
  letter-spacing: .02em;
}
.recent-duration {
  display: inline-flex; align-items: center; gap: 4px;
  align-self: flex-end;
  font: 500 11px 'Roboto', system-ui, sans-serif;
  color: rgba(6,31,39,.45);
  letter-spacing: .02em;
}

/* Kind accents */
.recent-kind-pericope .recent-rail-dot { background: rgba(38,130,143,.1); color: #26828F; }
.recent-kind-study    .recent-rail-dot { background: rgba(199,102,34,.12); color: #c76622; }
.recent-kind-search   .recent-rail-dot { background: rgba(6,31,39,.06); color: rgba(6,31,39,.65); }
.recent-kind-collection .recent-rail-dot { background: rgba(138,92,59,.14); color: #8a5c3b; }

/* Empty */
.recent-empty {
  text-align: center;
  padding: 60px 20px;
  color: rgba(6,31,39,.5);
}
.recent-empty-t {
  font: 500 18px 'Cormorant Garamond', Georgia, serif;
  color: #061F27;
  margin: 12px 0 4px;
}
.recent-empty-s {
  font: 400 13px 'Roboto', system-ui, sans-serif;
}

/* Scholar theme ------------------------------------------- */
body.theme-scholar .recent-hero-title,
body.theme-scholar .recent-title-line,
body.theme-scholar .recent-query,
body.theme-scholar .recent-stat-n,
body.theme-scholar .recent-empty-t { color: #f5f3ec; }
body.theme-scholar .recent-hero-sub,
body.theme-scholar .recent-detail,
body.theme-scholar .recent-byline,
body.theme-scholar .recent-when,
body.theme-scholar .recent-progress-pct,
body.theme-scholar .recent-stat-l,
body.theme-scholar .recent-bucket-head h2 { color: rgba(245,243,236,.7); }
body.theme-scholar .recent-hero-title em { color: #d4a24c; }
body.theme-scholar .recent-row:hover { background: rgba(245,243,236,.04); box-shadow:none; }
body.theme-scholar .recent-rail-dot { box-shadow: 0 0 0 3px #1a2328; }
body.theme-scholar .recent-btn.primary { background: #d4a24c; color: #061F27; }
body.theme-scholar .recent-btn.ghost { color: #f5f3ec; border-color: rgba(245,243,236,.22); }
body.theme-scholar .recent-stats { border-color: rgba(245,243,236,.12); }
body.theme-scholar .recent-stat { border-color: rgba(245,243,236,.08); }
body.theme-scholar .recent-hero-eyebrow { background: rgba(245,243,236,.08); color: rgba(245,243,236,.7); }
body.theme-scholar .recent-tab.on { border-bottom-color: #d4a24c; }
body.theme-scholar .recent-tab.on .recent-tab-count { background: rgba(212,162,76,.2); color: #d4a24c; }
body.theme-scholar .recent-ref { background: rgba(212,162,76,.15); color: #d4a24c; }
body.theme-scholar .recent-bucket-rows::before { background: linear-gradient(to bottom, rgba(245,243,236,.15), rgba(245,243,236,.03)); }
