/* Home: a strip of what has piled up, then what to read, add and check next. */
.home [hidden] { display: none !important; }
main.home { display: flex; flex-direction: column; gap: 20px; padding: 28px 40px 48px; max-width: 1260px; }
.home h2 { margin: 0; font-size: var(--fs-lg); line-height: 1.4; }
.home .button { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent;
  background: var(--accent); color: var(--on-accent); font-size: var(--fs-md); font-weight: 600; text-decoration: none; }
.home .button:hover { background: var(--accent-hover); }
.home .button.secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); height: 36px; padding: 0 14px; font-size: var(--fs-sm); }
.home .button.secondary:hover { background: var(--surface-2); }
.home .button:focus-visible, .home a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.home-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; padding: 16px 24px; border-radius: 16px; background: var(--logo-ground); }
.home-rings { display: flex; align-items: center; gap: 14px; }
.home-rings svg { width: 56px; height: 56px; }
.home-rings span { display: flex; flex-direction: column; }
.home-rings b { font-size: 28px; line-height: 1.1; color: var(--logo-ink); font-variant-numeric: tabular-nums; }
.home-rings small { font-size: var(--fs-sm); color: var(--text-2); }
.home-progress { flex: 1 1 240px; display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-sm); color: var(--text-2); }
.home-progress b { color: var(--text); }
.home-progress .bar { display: block; height: 8px; border-radius: 4px; background: #e2dccb; max-width: 440px; }
.home-progress .bar span { display: block; height: 8px; width: 0; border-radius: 4px; background: var(--logo-ink); }
.home-check { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--warning-soft);
  border: 1px solid var(--warning-border); color: var(--warning); font-size: var(--fs-sm); font-weight: 600; text-decoration: none; }
.home-check:hover { background: #fbecc8; }

.home-row { display: flex; flex-wrap: wrap; gap: 20px; }
.home-row-top { align-items: flex-start; }
.home-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px; min-width: 0; }

.home-continue { flex: 2 1 460px; display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.home-page { flex: 0 0 96px; height: 128px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); padding: 14px 12px;
  display: flex; flex-direction: column; gap: 6px; }
.home-page span { display: block; height: 4px; border-radius: 2px; background: var(--border); }
.home-page span:first-child { height: 6px; width: 80%; background: var(--border-strong); }
.home-page span:nth-child(3) { width: 90%; }
.home-page .mark { width: 60%; background: #f3d98f; }
.home-continue-text { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.home-continue-text p { margin: 0; }
.home-continue-text h2 { font-size: var(--fs-xl); overflow-wrap: anywhere; }

.home-add { flex: 1 1 260px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center;
  background: transparent; border: 2px dashed var(--border-strong); }
.home-add-icon svg { width: 30px; height: 30px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.home-add-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

.home-list { flex: 1 1 400px; display: flex; flex-direction: column; }
.home-list h2 { margin-bottom: 8px; }
.home-list ul { list-style: none; margin: 0; padding: 0; }
.home-list p { margin: 12px 0 0; }
.home-groups li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 0; border-top: 1px solid var(--surface-3); }
.home-group-text { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.home-group-name { font-size: var(--fs-md); font-weight: 600; }
.home-group-name small { margin-left: 6px; font-weight: 500; color: var(--warning); font-size: var(--fs-sm); }
.home-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.home-chips span { font-size: var(--fs-xs); padding: 3px 9px; border-radius: 999px; background: var(--warning-soft); border: 1px solid var(--warning-border); color: var(--warning);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-recent a { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--surface-3); color: var(--text); text-decoration: none; }
.home-recent a:hover .home-recent-value { color: var(--accent); }
.home-recent-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.home-recent-text small { font-size: var(--fs-xs); color: var(--text-2); }
.home-recent-text span { font-size: var(--fs-md); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-recent-value { font-size: var(--fs-md); font-weight: 600; white-space: nowrap; max-width: 40%; overflow: hidden; text-overflow: ellipsis; }
.home-recent-page { font-size: var(--fs-xs); color: var(--accent); white-space: nowrap; padding-top: 2px; }

@media (max-width: 620px) { main.home { padding: 20px 16px 96px; } .home-strip { padding: 14px 16px; } .home-card { padding: 18px; } .home-page { display: none; } }
.home-add.dropping { border-color: var(--accent); background: var(--surface-2); }
.home .button { cursor: pointer; font-family: inherit; }
/* New records, a paper at a time: the summary line opens to a few of its values. */
.home-recent-paper { border-top: 1px solid var(--surface-3); }
.home-recent-paper summary { display: flex; align-items: baseline; gap: 12px; padding: 12px 0; cursor: pointer; list-style: none; }
.home-recent-paper summary::-webkit-details-marker { display: none; }
.home-recent-title { flex: 1; min-width: 0; font-size: var(--fs-md); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-recent-paper summary small { font-size: var(--fs-xs); color: var(--text-2); white-space: nowrap; }
.home-recent-paper ul { padding: 0 0 8px; }
.home-recent-paper li a { border-top: 0; padding: 6px 0; }
.home-recent-more { font-size: var(--fs-sm); color: var(--accent); }
#home-empty { margin: 0; font-size: var(--fs-sm); }
