/* Xyncema Shelf — oat paper, workshop moss, a tool-handle orange used only where something is waiting.
   Square corners and thin rules, because the page is a ledger of who has what, not a shop. */

[data-theme="lending"] body { background: var(--bg); color: var(--text); font-family: var(--font-body); }
.ls-wrap { width: min(100% - 2.5rem, 76rem); margin-inline: auto; }
.ls-muted { color: var(--muted); }
.ls-h1, .ls-h2, .ls-h3 { font-family: var(--font-heading); font-weight: 700; line-height: 1.1; margin: 0; letter-spacing: -0.025em; }
.ls-h1 { font-size: clamp(2rem, 1.35rem + 3vw, 3.4rem); }
.ls-h2 { font-size: clamp(1.5rem, 1.28rem + 1.3vw, 2.15rem); }
.ls-h3 { font-size: clamp(1.08rem, 1rem + 0.4vw, 1.28rem); }
.ls-h4 { font: 700 1rem/1.35 var(--font-body); margin: 0; }
.ls-h2 a, .ls-h3 a, .ls-h4 a { color: inherit; text-decoration: none; }
.ls-h2 a:hover, .ls-h3 a:hover, .ls-h4 a:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 4px; }
.ls-eyebrow { display: inline-block; font: 600 0.75rem/1 var(--font-body); letter-spacing: 0.18em; text-transform: uppercase; color: var(--primary-ink); margin: 0 0 0.85rem; }
.ls-lead { font-size: clamp(1rem, 0.96rem + 0.3vw, 1.1rem); line-height: 1.75; color: var(--muted); }

/* ---------- Header ---------- */
.ls-notice { background: var(--surface-2); color: var(--on-surface-2); font-size: 0.8125rem; line-height: 1.45; padding: 0.5rem 0; }
.ls-notice p { margin: 0; }
.ls-header { position: sticky; top: 0; z-index: 30; background: rgba(246, 244, 238, 0.95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.ls-header__row { display: flex; align-items: center; gap: 1.25rem; min-height: 4.25rem; }
.ls-logo { display: flex; align-items: baseline; gap: 0.45rem; text-decoration: none; color: var(--text); margin-right: auto; }
.ls-logo svg { width: 1.5rem; height: 1.5rem; color: var(--primary); align-self: center; }
.ls-logo span { font-family: var(--font-heading); font-weight: 700; font-size: 1.4rem; line-height: 1; letter-spacing: -0.035em; }
.ls-logo small { font-size: 0.6875rem; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; }
.ls-nav { display: flex; gap: 1.35rem; }
.ls-nav a { color: var(--text); text-decoration: none; font-weight: 500; font-size: 0.9375rem; padding: 0.4rem 0; border-bottom: 2px solid transparent; }
.ls-nav a:hover, .ls-nav a[aria-current="page"] { border-bottom-color: var(--primary); }
.ls-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: var(--radius); width: 2.75rem; height: 2.75rem; padding: 0.6rem; color: var(--text); cursor: pointer; }
.ls-toggle svg { width: 100%; height: 100%; }
.ls-mobile { display: none; flex-direction: column; padding-bottom: 1rem; }
.ls-mobile a { padding: 0.85rem 0; border-top: 1px solid var(--border); color: var(--text); text-decoration: none; font-weight: 500; }
.ls-mobile[data-open] { display: flex; }
@media (max-width: 980px) { .ls-nav, .ls-header .ls-btn { display: none; } .ls-toggle { display: block; } }

/* ---------- Buttons ---------- */
.ls-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 2.9rem; padding: 0 1.3rem; border-radius: var(--radius-btn); border: 1.5px solid var(--primary); background: var(--primary); color: var(--on-primary); font: 600 0.9375rem/1 var(--font-body); text-decoration: none; cursor: pointer; }
.ls-btn:hover { background: var(--primary-ink); border-color: var(--primary-ink); }
.ls-btn--sm { min-height: 2.5rem; padding: 0 0.95rem; font-size: 0.875rem; }
.ls-btn--line { background: var(--surface); color: var(--primary-ink); }
.ls-btn--line:hover { background: #E7EFE9; }
.ls-btn--ghost { background: transparent; color: #FFFFFF; border-color: rgba(255, 255, 255, 0.6); }
.ls-btn--ghost:hover { background: rgba(255, 255, 255, 0.14); border-color: #FFFFFF; }
.ls-btn svg { width: 1.05rem; height: 1.05rem; }

/* ---------- Sections ---------- */
.ls-section { padding-block: clamp(2.75rem, 2rem + 3.5vw, 5rem); }
.ls-section--pale { background: var(--surface); }
.ls-head { display: grid; gap: 0.7rem; margin-bottom: 1.9rem; max-width: 48rem; }

/* ---------- Hero ---------- */
.ls-hero { position: relative; overflow: hidden; display: grid; }
.ls-hero__media, .ls-hero__inner { grid-area: 1 / 1; }
.ls-hero__media { position: relative; min-height: min(60vh, 560px); }
.ls-hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ls-hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18, 26, 20, 0.5) 0%, rgba(18, 26, 20, 0.62) 45%, rgba(18, 26, 20, 0.92) 100%); }
.ls-hero__inner { position: relative; z-index: 1; display: grid; align-content: end; padding-block: clamp(3rem, 6vw, 5rem) clamp(2rem, 4vw, 3.25rem); color: #FFFFFF; }
.ls-hero .ls-eyebrow { color: var(--secondary); }
.ls-hero h1 { max-width: 19ch; }
.ls-hero__copy { max-width: 54ch; line-height: 1.75; margin: 1.1rem 0 1.6rem; color: #D5E1D8; }
.ls-hero__actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }

/* ---------- Shelf ---------- */
.ls-shelf { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.25rem, 3vw, 2rem); align-items: start; }
.ls-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(1.1rem, 2.4vw, 1.6rem); }
.ls-count { margin: 0.5rem 0 1.1rem; color: var(--muted); font-size: 0.9rem; }
.ls-count b { color: var(--text); }
.ls-loans { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.ls-loans li { display: flex; align-items: center; justify-content: space-between; gap: 0.9rem; padding: 0.7rem 0.85rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.ls-loan__body { display: grid; gap: 0.15rem; min-width: 0; }
.ls-loan__body small { color: var(--muted); font-size: 0.83rem; }
.ls-rows { list-style: none; margin: 1rem 0 1.1rem; padding: 0; display: grid; gap: 0.55rem; }
.ls-row { display: flex; flex-wrap: wrap; gap: 0.7rem 1rem; align-items: center; justify-content: space-between; padding: 0.85rem 0.95rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.ls-row.is-mine { border-left: 3px solid var(--primary); }
.ls-row__main { min-width: 0; display: grid; gap: 0.3rem; }
.ls-row__status { margin: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.ls-row__copies { margin: 0; color: var(--muted); font-size: 0.83rem; }
.ls-row__acts { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.ls-pill { display: inline-flex; align-items: center; padding: 0.2rem 0.6rem; border-radius: 999px; background: #EDEADF; color: var(--muted); font-size: 0.78rem; font-weight: 600; }
.ls-pill.is-free { background: #E1EFE4; color: var(--primary-ink); }
.ls-pill.is-out { background: #EDEADF; color: var(--text); }
.ls-pill.is-q { background: rgba(228, 113, 30, 0.16); color: #8A3D00; }
.ls-msg { margin: 0 0 0.9rem; padding: 0.8rem 0.95rem; border-radius: var(--radius); font-size: 0.92rem; line-height: 1.65; border-left: 3px solid var(--primary); background: #EDF2ED; }
.ls-msg.is-no { border-left-color: var(--danger); background: #FBEDEC; }
.ls-msg.is-info { border-left-color: var(--secondary); background: rgba(228, 113, 30, 0.12); }

.ls-hold { padding: 1rem 1.1rem; border: 1px solid var(--primary); border-radius: var(--radius); background: #F1F6F2; }
.ls-hold__date { margin: 0.5rem 0 0.9rem; font-size: 1rem; }
.ls-hold__date b { font-family: var(--font-heading); font-size: 1.2rem; }
.ls-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; counter-reset: step; }
.ls-steps li { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); gap: 0.6rem; align-items: start; font-size: 0.9rem; line-height: 1.6; color: var(--muted); }
.ls-steps li.is-you { color: var(--text); font-weight: 600; }
.ls-steps__n { display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: #DFE8E0; color: var(--primary-ink); font-size: 0.78rem; font-weight: 700; }
.ls-steps li.is-you .ls-steps__n { background: var(--primary); color: var(--on-primary); }
.ls-assume { margin: 0.9rem 0 1rem; padding: 0.75rem 0.9rem; border-left: 3px solid var(--secondary); background: rgba(228, 113, 30, 0.1); font-size: 0.87rem; line-height: 1.7; color: var(--text); }
.ls-details { margin-top: 1.8rem; padding-top: 1.4rem; border-top: 1px solid var(--border); }
.ls-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 1rem; margin-top: 0.9rem; }
.ls-ok { display: flex; gap: 0.6rem; align-items: center; margin: 0 0 1.1rem; font-weight: 700; color: var(--primary-ink); }
.ls-ok svg { flex: none; width: 1.5rem; height: 1.5rem; padding: 0.25rem; border-radius: 50%; background: var(--primary); color: var(--on-primary); }

/* ---------- Content blocks ---------- */
.ls-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; }
.ls-info { padding: 1.15rem 1.3rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.ls-section--pale .ls-info { background: var(--bg); }
.ls-info p { margin: 0.45rem 0 0; color: var(--muted); line-height: 1.7; font-size: 0.9375rem; }
.ls-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; max-width: 52rem; }
.ls-list li { display: flex; gap: 0.6rem; line-height: 1.7; }
.ls-list li::before { content: ""; flex: none; width: 0.4rem; height: 0.4rem; margin-top: 0.68rem; border-radius: 50%; background: var(--primary); }
.ls-faq { display: grid; gap: 0.5rem; max-width: 54rem; }
.ls-faq details { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.ls-section--pale .ls-faq details { background: var(--bg); }
.ls-faq summary { padding: 1rem 1.15rem; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.ls-faq summary::-webkit-details-marker { display: none; }
.ls-faq summary::after { content: "+"; color: var(--primary); font-weight: 700; }
.ls-faq details[open] summary::after { content: "\2212"; }
.ls-faq p { margin: 0; padding: 0 1.15rem 1.15rem; color: var(--muted); line-height: 1.75; }

/* ---------- Cards, table ---------- */
.ls-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1.25rem; }
.ls-ic { display: grid; grid-template-rows: auto 1fr; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.ls-section--pale .ls-ic { background: var(--bg); }
.ls-ic img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.ls-ic__body { padding: 1.1rem 1.2rem 1.25rem; display: grid; gap: 0.5rem; align-content: start; }
.ls-ic__body p { margin: 0; color: var(--muted); line-height: 1.6; font-size: 0.9375rem; }
.ls-ic__status { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.ls-tablewrap { overflow-x: auto; padding-bottom: 0.4rem; }
.ls-table { width: 100%; min-width: 36rem; border-collapse: collapse; }
.ls-table th, .ls-table td { text-align: left; padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--border); font-size: 0.9375rem; }
.ls-table thead th { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--primary-ink); }
.ls-table tbody th { font-weight: 700; }
.ls-table tbody th a { color: inherit; }

/* ---------- Collection & detail ---------- */
.ls-pagehead { padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem) clamp(1.75rem, 3vw, 2.5rem); background: var(--surface); border-bottom: 1px solid var(--border); }
.ls-dhead { padding-block: clamp(1.75rem, 3vw, 2.75rem) clamp(2rem, 3.5vw, 3.25rem); background: var(--surface); border-bottom: 1px solid var(--border); }
.ls-crumb { margin: 0 0 1.4rem; font-size: 0.85rem; color: var(--muted); }
.ls-crumb a { color: var(--muted); }
.ls-dgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.ls-dgrid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); display: block; }
.ls-dstatus { margin: 1.1rem 0 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.ls-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 0.75rem; margin-top: 1rem; }
.ls-thumb { padding: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: none; cursor: pointer; }
.ls-thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.ls-thumb:hover img { opacity: 0.85; }

/* ---------- Footer ---------- */
.ls-footer { background: var(--surface-2); color: var(--on-surface-2); padding-block: clamp(2.5rem, 4vw, 3.75rem) 2rem; }
.ls-footer__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(auto-fit, minmax(9rem, 1fr)); gap: 2rem; }
.ls-footer .ls-logo { color: var(--on-surface-2); }
.ls-footer .ls-logo svg { color: var(--secondary); }
.ls-footer .ls-logo small { color: #A3B7A8; }
.ls-footer__grid p { margin: 0.7rem 0 0; color: #BDCFC1; line-height: 1.6; font-size: 0.9375rem; max-width: 32ch; }
.ls-footer h3 { font: 600 0.75rem/1 var(--font-body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--primary-on-dark); margin: 0 0 0.9rem; }
.ls-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.ls-footer a { color: var(--on-surface-2); text-decoration: none; font-size: 0.9375rem; }
.ls-footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
.ls-footer__note { margin: 2.5rem 0 1.25rem; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, 0.16); color: #A3B7A8; font-size: 0.85rem; line-height: 1.65; }
.ls-footer .xy-attribution, .ls-footer .xy-attribution a { color: #A3B7A8; }
.ls-footer :focus-visible { outline-color: var(--secondary); }

/* ---------- Narrow ---------- */
@media (max-width: 1000px) {
  .ls-shelf { grid-template-columns: minmax(0, 1fr); }
  .ls-dgrid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .ls-wrap { width: min(100% - 1.75rem, 76rem); }
  .ls-row__acts, .ls-row__acts .ls-btn { width: 100%; }
  .ls-loans li { flex-wrap: wrap; }
}
