/* Borrowbook site — v2 (Figma: "Home — v2").
   One sans (Inter) for everything, mono only for small labels. Tokens come from tokens.css (design/book.mjs).
   The pills are a 1:1 copy of the extension's content.css: do not restyle them. */

@font-face { font-family: "Inter"; src: url(/assets/fonts/inter-var.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(/assets/fonts/plex-mono-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(/assets/fonts/plex-mono-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--color-page); color: var(--color-text);
  font-family: var(--type-body-font-family); font-size: var(--type-body-font-size);
  line-height: var(--type-body-line-height); font-weight: var(--type-body-font-weight);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; border-radius: var(--radius-s); }
code, kbd { font-family: var(--font-mono); font-size: 0.875em; color: var(--color-text); }
kbd { display: inline-block; min-width: 1.5em; text-align: center; padding: 0 4px; border: 1px solid var(--color-line); border-bottom-width: 2px; border-radius: var(--radius-s); background: var(--color-surface); line-height: 1.4; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--space-m); top: var(--space-m); z-index: 10; background: var(--color-button); color: var(--color-on-button); padding: var(--space-xs) var(--space-s); }

.wrap { width: min(1072px, 100% - 2 * var(--space-l)); margin-inline: auto; }
.muted { color: var(--color-text-muted); }
.label {
  font-family: var(--type-label-font-family); font-size: var(--type-label-font-size);
  line-height: var(--type-label-line-height); font-weight: var(--type-label-font-weight);
  letter-spacing: var(--type-label-letter-spacing); text-transform: uppercase; color: var(--color-text-muted);
}
.label b { color: var(--color-text); font-weight: inherit; }
.h2 { font: var(--type-h2-font-weight) var(--type-h2-font-size) / var(--type-h2-line-height) var(--type-h2-font-family); letter-spacing: var(--type-h2-letter-spacing); }
.h3 { font: var(--type-h3-font-weight) var(--type-h3-font-size) / var(--type-h3-line-height) var(--type-h3-font-family); letter-spacing: var(--type-h3-letter-spacing); }
.h4 { font: var(--type-heading-font-weight) var(--type-heading-font-size) / var(--type-heading-line-height) var(--type-heading-font-family); letter-spacing: var(--type-heading-letter-spacing); }

/* Highlighter: a marker bar behind text, like the library names in the extension */
.hl { background: var(--lib, var(--color-question)); color: var(--color-on-marker); -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* ---------- Masthead ---------- */
.masthead { background: var(--color-brand); border-bottom: 1px solid var(--color-line-strong); }
.mh { display: flex; align-items: stretch; min-height: 62px; }
.mh > * { display: flex; align-items: center; padding-inline: var(--space-m); }
.mh > * + * { border-left: 1px solid var(--color-line-strong); }
.mh-brand { padding-left: 0; gap: 10px; text-decoration: none; font-weight: 700; font-size: 1.25rem; letter-spacing: -0.03em; }
.mh-brand img { border-radius: 6px; }
.mh-title { flex: 1; flex-direction: column; align-items: flex-start; justify-content: center; line-height: 1.3; }
.mh-title span:last-child { font-weight: 600; }
.mh-nav { gap: var(--space-l); padding-right: 0; font-size: 0.875rem; font-weight: 500; }
.mh-nav a { text-decoration: none; white-space: nowrap; }
.mh-nav a:hover, .mh-nav a[aria-current] { text-decoration: underline; }

/* ---------- Sections ---------- */
.section { border-top: 1px solid var(--color-line-strong); padding-block: var(--space-3xl) 120px; }
.section-head { display: grid; grid-template-columns: 552px 1fr; gap: var(--space-3xl); align-items: end; margin-bottom: 72px; }
.section-head p { color: var(--color-text-muted); max-width: 32em; }

/* ---------- Hero ---------- */
.hero { padding-block: 112px 128px; }
.display {
  font: var(--type-display-font-weight) var(--type-display-font-size) / var(--type-display-line-height) var(--type-display-font-family);
  letter-spacing: var(--type-display-letter-spacing);
}
.display .hl { display: inline-block; padding: 0 0.12em 0.06em 0.08em; margin-left: -0.08em; }
.hero-grid { display: grid; grid-template-columns: 456px 1fr; gap: var(--space-3xl); margin-top: 72px; align-items: start; }
.lede { font-size: var(--font-size-m); line-height: 1.45; color: var(--color-text-muted); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; margin-top: var(--space-xl); }
.button {
  display: inline-flex; align-items: center; padding: 14px 22px; border-radius: var(--radius-s);
  background: var(--color-button); color: var(--color-on-button); font-weight: 600; text-decoration: none;
  transition: background var(--motion-ease);
}
a.button:hover { background: var(--color-button-hover); }
.button.is-soon { cursor: default; }
.link { font-weight: 600; }

.fig1 { border-top: 1px solid var(--color-line-strong); padding-top: var(--space-m); display: grid; gap: 20px; }
.book-title { font-size: 1.75rem; line-height: 1.1; font-weight: 600; letter-spacing: -0.02em; }
.fig1 .note { font-size: var(--font-size-s); color: var(--color-text-muted); }

/* ---------- Where you'll see it ---------- */
.place { display: grid; grid-template-columns: 360px 1fr; gap: 64px; border-top: 1px solid var(--color-line); padding-block: var(--space-xl) var(--space-2xl); }
.place-text { display: grid; gap: var(--space-m); align-content: start; position: sticky; top: var(--space-l); align-self: start; }
.place-text p { color: var(--color-text-muted); }
.meta { display: flex; align-items: center; gap: 8px; font-size: var(--font-size-s); color: var(--color-text-muted); padding-top: var(--space-xs); }
.shot { padding-top: 6px; }
.shot img {
  width: 100%; max-width: 648px; border-radius: 6px;
  outline: 1px solid rgba(0, 0, 0, .14); box-shadow: 0 30px 60px rgba(0, 0, 0, .08);
  background: #fff;
}
.shot.tall img { max-width: 384px; }

/* ---------- Set up once ---------- */
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
.steps li { display: grid; gap: 14px; align-content: start; }
.steps p { color: var(--color-text-muted); }
.bar { display: block; width: 64px; height: 16px; background: var(--lib); margin-bottom: 10px; }
.bar.round { width: 16px; border-radius: 50%; }

/* ---------- Details ---------- */
.details-grid { display: grid; grid-template-columns: 360px 1fr; gap: var(--space-3xl); }
.details-head { display: grid; gap: 20px; align-content: start; position: sticky; top: var(--space-l); align-self: start; }
.details-head p { color: var(--color-text-muted); }
.specs > div { display: grid; grid-template-columns: 140px 1fr; gap: var(--space-l); padding-block: 14px; border-top: 1px solid var(--color-line); }
.specs dt { font-weight: 600; }
.specs dd { color: var(--color-text-muted); }
.faq-title { margin: var(--space-2xl) 0 var(--space-m); }
.faq details { border-top: 1px solid var(--color-line); padding-block: 18px; }
.faq details:last-child { border-bottom: 1px solid var(--color-line); }
.faq summary { display: flex; justify-content: space-between; gap: var(--space-l); cursor: pointer; font-weight: 600; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--color-text-muted); font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--color-text-muted); margin-top: 10px; max-width: 38em; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--color-line-strong); padding-block: var(--space-xl) var(--space-xl); }
.footer-grid { display: flex; align-items: center; gap: var(--space-xl); font-size: var(--font-size-s); }
.footer-grid .muted { flex: 1; }
.brand-mark { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: -0.03em; text-decoration: none; }
.brand-mark .hl { --lib: var(--color-brand); padding: 1px 6px 2px; font-size: 1rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--space-l); }
.footer-links a { font-weight: 600; white-space: nowrap; }
.footer-links span { color: var(--color-text-muted); white-space: nowrap; }

/* ---------- Pills: 1:1 with the extension (content.css) ---------- */
.pills { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.pill { display: inline-flex; align-items: stretch; background: #f7f1e5; color: #000; border: 1px solid rgba(0, 0, 0, .14); border-radius: 2px; font: 500 13px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; overflow: hidden; max-width: 100%; }
.pill-lib { display: inline-flex; align-items: center; background: var(--lib); color: #000; padding: 3px 8px; font-weight: 600; white-space: nowrap; }
.pill-body { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; white-space: nowrap; }
.pill-sub { color: #5f584c; font-weight: 400; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--status-none); flex: none; }
.pill.ok .dot, .dot-ok { background: var(--status-available); }
.pill.wait .dot, .dot-wait { background: var(--status-waitlist); }

/* ---------- Privacy / long text ---------- */
.doc { padding-block: var(--space-2xl) 120px; }
.doc .col { max-width: 720px; }
.doc .page-mark { display: flex; justify-content: space-between; border-bottom: 1px solid var(--color-line); padding-bottom: 12px; margin-bottom: var(--space-xl); }
.doc h1 { margin-bottom: var(--space-m); }
.doc .meta-line { margin-bottom: var(--space-l); }
.doc h2 { display: flex; align-items: baseline; gap: var(--space-m); margin: var(--space-xl) 0 var(--space-m); padding-bottom: 10px; border-bottom: 1px solid var(--color-line-strong); }
.doc h2 .label { font-size: 0.75rem; }
.doc p, .doc ul { margin-bottom: var(--space-m); }
.doc ul { padding-left: 1.2em; }
.doc li + li { margin-top: var(--space-xs); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .section-head, .hero-grid, .place, .details-grid { grid-template-columns: 1fr; gap: var(--space-xl); }
  .section-head { margin-bottom: var(--space-2xl); }
  .place-text, .details-head { position: static; }
  .steps { grid-template-columns: 1fr; gap: var(--space-xl); }
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 2 * var(--space-m)); }
  .hero { padding-block: var(--space-2xl) var(--space-3xl); }
  .hero-grid { margin-top: var(--space-xl); }
  .section { padding-block: var(--space-2xl) var(--space-3xl); }
  .mh-title { display: none; }
  .mh-nav { gap: var(--space-s); margin-left: auto; padding-left: var(--space-s); font-size: 0.8125rem; }
  .mh-nav a:first-child { display: none; }
  .mh-brand { font-size: 1.125rem; }
  .specs > div { grid-template-columns: 1fr; gap: 2px; }
  .footer-grid { flex-direction: column; align-items: flex-start; gap: var(--space-m); }
}
