/* skipto.page — site screens beyond the book page. Loads after tokens.css and book.css. */

/* ---------- header nav + phone tab bar ---------- */
.nav { display: flex; gap: var(--space-1); }
.nav a { padding: var(--space-2) var(--space-3); border-radius: var(--radius-2); color: var(--text-muted); font-weight: 500; text-decoration: none; }
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); font-weight: 600; background: var(--surface); }
.site-header .search { margin-left: auto; }
.search-link { display: none; width: 2.5rem; height: 2.5rem; place-items: center; border-radius: var(--radius-2); color: var(--text); }
.tabbar { display: none; }
@media (max-width: 640px) {
  .site-header .nav, .site-header .search { display: none; }
  .search-link { display: grid; margin-left: auto; }
  .tabbar {
    display: grid; grid-template-columns: repeat(4, 1fr); position: sticky; bottom: 0;
    border-top: 1px solid var(--border); background: var(--ground);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 3.5rem; padding: 0 var(--space-1) var(--space-3); font-size: var(--text-xs); font-weight: 500; color: var(--text-muted); text-decoration: none; }
  .tabbar a::before { content: ""; width: 1.75rem; height: 3px; border-radius: 0 0 2px 2px; background: transparent; margin-bottom: var(--space-1); }
  .tabbar a[aria-current="page"] { color: var(--text); font-weight: 600; }
  .tabbar a[aria-current="page"]::before { background: var(--accent); }
}

/* ---------- page scaffolding ---------- */
.page { display: flex; flex-direction: column; gap: var(--space-12); padding-block: var(--space-8) var(--space-16, 4rem); }
.page--narrow { max-width: 55rem; }
.page-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2) var(--space-4); }
.h1 { font-size: var(--text-3xl); font-weight: 620; letter-spacing: -0.015em; line-height: 1.1; text-wrap: balance; }
.h1--xl { font-size: clamp(2rem, 1.3rem + 2.8vw, 3rem); }
.lead { font-size: var(--text-lg); line-height: 1.55; color: var(--text-muted); max-width: 56ch; text-wrap: pretty; }
.with-aside { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--space-8) var(--space-10); }
.with-aside > aside { flex: 1 1 12.5rem; max-width: 15rem; }
.with-aside > .main { flex: 999 1 30rem; min-width: 0; }


/* ---------- list of books ---------- */
.booklist > li { display: flex; align-items: center; gap: var(--space-4); padding-block: var(--space-3); border-bottom: 1px solid var(--border); }
.booklist { border-top: 1px solid var(--border); }
.booklist__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.booklist__title { font-weight: 500; text-decoration: none; overflow-wrap: anywhere; }
.booklist__sub { font-size: var(--text-sm); color: var(--text-muted); }
.mark { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-xs); font-weight: 500; color: var(--text-muted); }
.mark::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, transparent); box-shadow: inset 0 0 0 1.5px var(--c, var(--border)); }
.mark--want { --c: var(--st-want); color: var(--st-want); }
.mark--reading { --c: var(--st-reading); color: var(--st-reading); }
.mark--read { --c: var(--st-read); color: var(--st-read); }
.mark--paused { --c: var(--st-paused); }
.mark--dnf { --c: var(--st-dnf); }
.mark--rereading { --c: var(--st-rereading); color: var(--st-rereading); }

/* ---------- home ---------- */
.current { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--space-5) var(--space-8); padding: var(--space-6); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-3); }
.current .book__cover { width: min(8.25rem, 32vw); }
.current__body { flex: 1 1 18.75rem; min-width: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.current__title { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); font-weight: 620; letter-spacing: -0.015em; line-height: 1.12; text-decoration: none; }
.current .btn--read { align-self: flex-start; }
.current .progress { max-width: 32.5rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 21.25rem), 1fr)); gap: var(--space-3); }
.cards > li { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-3); min-width: 0; }

/* ---------- first run / dropzone ---------- */
.dropzone { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); padding: var(--space-8) var(--space-6); border: 1.5px dashed var(--border); border-radius: var(--radius-3); background: var(--surface); }
.dropzone b { font-size: 1.125rem; font-weight: 600; }
.dropzone input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }

/* ---------- library ---------- */
.status-tabs a::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, transparent); }
.status-tabs a { gap: 7px; align-items: center; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.toolbar__end { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.seg { display: flex; border: 1px solid var(--border); border-radius: var(--radius-2); overflow: hidden; }
.seg a, .seg button { padding: 7px var(--space-3); border: 0; background: none; font-size: var(--text-sm); font-weight: 500; text-decoration: none; color: var(--text); cursor: pointer; }
.seg [aria-current="page"], .seg [aria-pressed="true"] { background: var(--text); color: var(--ground); }
.filter-chip { padding: 6px 10px; border-radius: var(--radius-pill); background: var(--surface-2); font-size: var(--text-xs); text-decoration: none; }
.side-nav { display: flex; flex-direction: column; gap: var(--space-4); font-size: var(--text-sm); }
.side-nav h2 { padding: 0 10px 4px; font-size: 0.75rem; font-weight: 500; color: var(--text-muted); }
.side-nav a { display: flex; justify-content: space-between; gap: var(--space-2); padding: 7px 10px; border-radius: var(--radius-2); text-decoration: none; }
.side-nav a:hover { background: var(--surface); color: var(--text); }
.side-nav a[aria-current="page"] { background: var(--surface); font-weight: 500; }
.shelves-link { display: none; }
@media (max-width: 640px) {
  .with-aside > aside.side-nav { display: none; }
  .shelves-link { display: flex; justify-content: space-between; padding: 10px var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-2); font-size: var(--text-sm); text-decoration: none; }
}
.shelf__bar { height: 3px; border-radius: 2px; background: var(--surface-2); overflow: hidden; }
.shelf__bar > span { display: block; height: 100%; background: var(--accent); }

/* ---------- queue ---------- */
.queue { display: flex; flex-direction: column; gap: 6px; }
.queue > li { display: flex; align-items: center; gap: 6px; padding: 2px var(--space-2) 2px 0; border: 1px solid var(--border); border-radius: var(--radius-3); }
.queue > li[aria-grabbed="true"] { border-color: var(--accent); background: var(--surface); transform: translateX(6px); }
.handle { flex: none; width: 2.75rem; height: 2.75rem; display: grid; place-items: center; border: 0; background: none; color: var(--text-muted); border-radius: var(--radius-2); cursor: grab; }
.queue__n { width: 1.5em; flex: none; font-family: var(--font-mono); font-size: var(--text-sm); color: var(--text-muted); }
.queue form { display: flex; }
.icon-btn { width: 2.25rem; height: 2.25rem; display: grid; place-items: center; border: 0; background: none; color: var(--text-muted); border-radius: var(--radius-2); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
@media (max-width: 640px) { .queue form { display: none; } }

/* ---------- search results page (also the no-script fallback of the palette) ---------- */
.results { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; max-width: 40rem; }
.results__field { display: flex; align-items: center; gap: 10px; padding: 0 14px; min-height: 3.375rem; border-bottom: 1px solid var(--border); }
.results__field input { flex: 1; min-width: 0; border: 0; background: none; font-size: var(--text-lg); outline: none; }
.results h2 { padding: 10px var(--space-4) 4px; font-size: 0.75rem; font-weight: 600; color: var(--text-muted); }
.results a.hit { display: flex; align-items: center; gap: var(--space-3); min-height: 2.75rem; padding: var(--space-2) var(--space-4); text-decoration: none; }
.results a.hit:hover, .results a.hit:focus-visible { background: var(--surface-2); box-shadow: inset 2px 0 0 var(--accent); outline: none; }
.hit__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hit__sub { font-size: var(--text-xs); color: var(--text-muted); }
.hit__tag { flex: none; font-size: 0.75rem; color: var(--text-muted); }
.cmd { flex: none; width: 1.75rem; height: 1.75rem; display: grid; place-items: center; border-radius: var(--radius-2); background: var(--surface-2); color: var(--text-muted); font-family: var(--font-mono); }
.results__keys { display: flex; flex-wrap: wrap; gap: 4px 18px; padding: 10px var(--space-4); border-top: 1px solid var(--border); font-size: 0.75rem; color: var(--text-muted); }
@media (max-width: 640px) { .results { border: 0; border-radius: 0; } .results__keys { display: none; } }

/* ---------- series ---------- */
.segments { display: grid; grid-template-columns: repeat(var(--n, 9), 1fr); gap: 3px; }
.segments > span { height: 8px; border-radius: 2px; background: var(--surface-2); }
.segments .s-read { background: var(--st-read); }
.segments .s-reading { background: var(--st-reading); }
.segments .s-owned { background: var(--text-muted); }
.segments .s-missing { background: transparent; box-shadow: inset 0 0 0 1px var(--border); }

/* ---------- stats ---------- */
.bignums { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.375rem, 1fr)); gap: var(--space-6); }
.bignum b { display: block; font-size: clamp(2rem, 1.5rem + 2vw, 3rem); font-weight: 620; letter-spacing: -0.02em; line-height: 1; }
.bignum span { font-size: var(--text-sm); color: var(--text-muted); }
.bars { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; align-items: end; height: 11.25rem; }
.bars > li { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; }
.bars > li > span { width: 100%; min-height: 2px; border-radius: 2px 2px 0 0; background: color-mix(in oklab, var(--text-muted) 55%, transparent); }
.bars > li[aria-current] > span { background: var(--accent); }
.bars small { font-family: var(--font-mono); font-size: 0.6875rem; color: var(--text-muted); }
.cols3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17.5rem), 1fr)); gap: var(--space-8) var(--space-10); }
.kv > li { display: flex; justify-content: space-between; gap: var(--space-3); padding-block: 9px; border-bottom: 1px solid var(--border); }
.kv { border-top: 1px solid var(--border); }
.kv .mono { color: var(--text-muted); }

/* ---------- next ---------- */
.toggle { padding: 7px var(--space-3); border-radius: var(--radius-pill); border: 1px solid var(--border); background: none; font-size: var(--text-sm); cursor: pointer; }
.toggle[aria-pressed="true"] { border-color: var(--text); background: var(--text); color: var(--ground); }
.advisor { display: flex; flex-direction: column; gap: 10px; padding: var(--space-5); border: 1px dashed var(--border); border-radius: var(--radius-3); }

/* ---------- messages ---------- */
.msgs { border-top: 1px solid var(--border); }
.msgs > li { display: flex; flex-direction: column; gap: var(--space-2); padding-block: var(--space-4); border-bottom: 1px solid var(--border); }
.msg__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px var(--space-3); }
.msg__head .report { margin-left: auto; font-size: var(--text-xs); color: var(--text-muted); }
.msg__text { max-width: 66ch; line-height: 1.55; text-wrap: pretty; }
.msgs details { border: 1px dashed var(--border); border-radius: var(--radius-2); padding: 10px var(--space-3); }
.msgs summary { cursor: pointer; font-size: var(--text-sm); font-weight: 500; }
.msg__pic { width: min(100%, 20rem); aspect-ratio: 4 / 3; border-radius: var(--radius-2); background: var(--surface-2); object-fit: cover; }
.msgs .removed { color: var(--text-muted); font-size: var(--text-sm); }
.pager { align-self: center; }

/* ---------- adding books ---------- */
.choices { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18.75rem), 1fr)); gap: var(--space-3); }
.choice { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-3); cursor: pointer; }
.choice:has(input:checked) { border: 2px solid var(--accent); background: var(--surface); padding: calc(var(--space-4) - 1px); }
.choice input { margin: 3px 0 0; accent-color: var(--accent); width: 1.125rem; height: 1.125rem; flex: none; }
.choice span { display: flex; flex-direction: column; gap: 4px; }
.counts { display: flex; flex-wrap: wrap; gap: 6px var(--space-6); font-size: var(--text-sm); }
.counts b { font-weight: 600; }
.candidates { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16.25rem), 1fr)); gap: var(--space-3); }
.candidate { display: flex; gap: var(--space-3); padding: var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-3); }
.decide { display: flex; flex-direction: column; gap: var(--space-4); padding: 18px; border: 1px solid var(--border); border-radius: var(--radius-3); }

/* ---------- auth + system pages ---------- */
.center { display: flex; justify-content: center; padding-block: var(--space-6) var(--space-10); }
.auth { width: 100%; max-width: 26.25rem; display: flex; flex-direction: column; gap: var(--space-5); }
.auth form { display: flex; flex-direction: column; gap: var(--space-4); }
.auth .btn--primary { justify-content: center; }
.eyebrow { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--accent); }
.alert { padding: 10px var(--space-3); border-radius: var(--radius-2); border: 1px solid var(--error); color: var(--error); font-size: var(--text-sm); }
.sys { width: 100%; max-width: 32.5rem; display: flex; flex-direction: column; gap: var(--space-4); }
.sys code { font-family: var(--font-mono); font-weight: 600; user-select: all; }

/* ---------- landing ---------- */
.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 26.25rem), 1fr)); gap: var(--space-8) var(--space-18); align-items: center; }
.hero__text { display: flex; flex-direction: column; gap: 18px; }
.hero__eyebrow { font-size: 0.9375rem; font-weight: 500; color: var(--accent); }
.hero h1 { font-size: clamp(2.25rem, 1.4rem + 3.4vw, 3.75rem); font-weight: 620; letter-spacing: -0.025em; line-height: 1.03; text-wrap: balance; }
.hero__shelf { display: grid; grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr)); gap: 14px; width: 100%; max-width: 28.75rem; justify-self: end; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.125rem), 1fr)); gap: var(--space-5) var(--space-8); padding-top: 28px; border-top: 1px solid var(--border); }
.steps li { display: flex; align-items: center; gap: var(--space-3); }
.steps .dot { flex: none; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--surface-2); color: var(--accent); display: grid; place-items: center; }
.steps b { display: block; font-weight: 600; font-size: 0.9375rem; }

/* ---------- account ---------- */
.data { display: flex; flex-direction: column; gap: var(--space-4); padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-3); }
.data ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr)); gap: 10px var(--space-6); font-size: var(--text-sm); }
.data li { display: flex; justify-content: space-between; gap: 10px; padding-top: var(--space-2); border-top: 1px solid var(--border); }
.settings-section { display: flex; flex-direction: column; gap: 14px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.settings-section h2 { font-size: var(--text-xl); font-weight: 600; }
.setting > li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--space-4); padding-block: var(--space-3); border-top: 1px solid var(--border); }
.setting__text { flex: 1 1 13.75rem; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.setting__text b { font-weight: 500; }
.btn--danger { border-color: var(--error); color: var(--error); }
.btn--danger:hover { background: color-mix(in oklab, var(--error) 10%, transparent); color: var(--error); }

/* ---------- states ---------- */
.skeleton { background: var(--surface-2); border-radius: 3px; }
.region-error { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-5); border: 1px solid var(--error); border-radius: var(--radius-3); }
.region-error b { color: var(--error); font-weight: 600; }

/* minimal guest page (landing-minimal.html): no images, no third-party requests */
.site-header--bare .site-header__signin { margin-left: auto; }
.page--solo { min-height: calc(100svh - 11rem); justify-content: center; }
.solo { max-width: 40rem; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.solo h1 { font-size: clamp(2.25rem, 1.4rem + 3.4vw, 3.75rem); font-weight: 620; letter-spacing: -0.025em; line-height: 1.03; text-wrap: balance; }
.solo__cta { margin-top: 6px; }
.solo__note { font-size: var(--text-sm); color: var(--text-muted); }
