/* Library Cloth: bookcloth greens and oxblood on a linen ground, gilt details.
   Layout is unchanged; every colour comes from the tokens below (light, then dark). */
/* Fonts as WOFF2, one file per alphabet: a browser downloads only the
   alphabets a page uses (HEL-502). Files from Fontsource; licences in assets/. */
@font-face {
  font-family: "Young Serif";
  src: url("/assets/fonts/young-serif-latin-ext-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Young Serif";
  src: url("/assets/fonts/young-serif-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3-cyrillic-ext-wght-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3-cyrillic-wght-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3-greek-ext-wght-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
  unicode-range: U+1F00-1FFF;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3-greek-wght-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
  unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3-vietnamese-wght-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
:root {
  --paper: #e6e9df;
  --white: #f3f4ee;
  --field: #fbfbf7;
  --ink: #1d2a24;
  --muted: #55635b;
  --line: #cdd3c6;
  --line-strong: #b5bdad;
  --field-border: #7d8878;
  --tile-hover: rgba(255, 255, 255, 0.4);
  --accent: #7a2e2a;
  --accent-hover: #5f221f;
  --green: #1f3b2f;
  --green-hover: #183026;
  --green-text: #1f3b2f;
  --sage: #d8e0d3;
  --tint: #dde3d6;
  --tint-strong: #ccd6c4;
  --red: #8f2a26;
  --gilt: #b8913a;
  --gilt-hover: #a07c2c;
  --gilt-ink: #1d1a12;
  --gilt-light: #f0dda6;
  --gilt-text: #85651f;
  --bar-ink: #f1ead7;
  --bar-muted: #c3cdbd;
  --bar-hover: #2b4a3c;
  --bar-line: #4c6457;
  --bar-active-ink: #1d2a24;
  --warn-bg: #f0e3c4;
  --warn-fg: #6b4a12;
  --error-bg: #f3ddd6;
  --setup-bg: #e8e2cf;
  --setup-fg: #5c4f2c;
  --info-bg: #dfe5ee;
  --info-fg: #3a4b66;
  --tile-paper-0: #dfe6dc;
  --tile-ink-0: #1d3328;
  --tile-paper-1: #eedcd6;
  --tile-ink-1: #4f201d;
  --tile-paper-2: #dbe1ea;
  --tile-ink-2: #1f2f44;
  --tile-paper-3: #ebe2cd;
  --tile-ink-3: #47391f;
  --shadow: 0 18px 55px #1d2a2420;
  --serif: "Young Serif", Georgia, serif;
  --sans: "Source Sans 3", system-ui, sans-serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  font-size: 20px;
  line-height: 1.5;
  scrollbar-color: var(--line-strong) var(--paper);
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #131a16;
    --white: #1b241f;
    --field: #222c26;
    --ink: #e7e9df;
    --muted: #a4ae9f;
    --line: #2e3a33;
    --line-strong: #44524a;
    --field-border: #7f8d83;
    --tile-hover: rgba(0, 0, 0, 0.28);
    --accent: #e5a69d;
    --accent-hover: #f0bdb6;
    --green: #2a4a3b;
    --green-hover: #33584a;
    --green-text: #b9d4c3;
    --sage: #243029;
    --tint: #212c26;
    --tint-strong: #2c3a32;
    --red: #f0897e;
    --gilt: #c9a24a;
    --gilt-hover: #d8b25c;
    --gilt-ink: #1a160c;
    --gilt-light: #f0dda6;
    --gilt-text: #d9b45e;
    --bar-ink: #f1ead7;
    --bar-muted: #b6c1b1;
    --bar-hover: #24402f;
    --bar-line: #3f5548;
    --bar-active-ink: #1d2a24;
    --warn-bg: #3a2f17;
    --warn-fg: #f0d495;
    --error-bg: #3d211e;
    --setup-bg: #332d1f;
    --setup-fg: #e5d6ab;
    --info-bg: #1f2938;
    --info-fg: #b9c9e3;
    --tile-paper-0: #1d2a23;
    --tile-ink-0: #d9e6dc;
    --tile-paper-1: #2c1d1b;
    --tile-ink-1: #f0d7d2;
    --tile-paper-2: #1c2431;
    --tile-ink-2: #d6e0ef;
    --tile-paper-3: #2a2419;
    --tile-ink-3: #ece0c3;
    --shadow: 0 18px 55px #00000060;
    color-scheme: dark;
  }
}
* {
  box-sizing: border-box;
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
body {
  margin: 0;
}
::selection {
  background: var(--tint-strong);
  color: var(--ink);
}
button,
input,
select,
textarea {
  font: inherit;
  touch-action: manipulation;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
button,
a,
input,
select,
textarea,
summary {
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2,
h3,
.serif {
  font-family: var(--serif);
  font-weight: 400;
}
h1,
h2 {
  text-wrap: balance;
  letter-spacing: -0.035em;
}
h1 {
  font-size: clamp(47px, 5.5vw, 86px);
  line-height: 1.1;
}
h2 {
  font-size: clamp(37px, 3vw, 52px);
  line-height: 1.2;
}
h3 {
  font-size: 30px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
p {
  line-height: 1.65;
}
small,
.small {
  font-size: 17px;
  line-height: 1.6;
}
.muted {
  color: var(--muted);
}
.hidden,
[hidden] {
  display: none !important;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.spread {
  justify-content: space-between;
}
.stack {
  display: grid;
  gap: 20px;
}
.text-preserve {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.icon {
  width: 19px;
  height: 19px;
  display: inline-block;
  vertical-align: middle;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 36px;
  letter-spacing: -0.04em;
  text-decoration: none;
  white-space: nowrap;
}
.brand-dot {
  color: var(--accent);
}
.brand-mark {
  display: inline-flex;
  gap: 3px;
  margin-right: 9px;
  transform: rotate(-7deg);
}
.brand-mark i {
  width: 5px;
  height: 22px;
  border: 1.5px solid currentColor;
  border-radius: 1px;
  display: block;
}
.brand-mark i:last-child {
  transform: rotate(-14deg);
  margin-left: 2px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid var(--line-strong);
  background: transparent;
  border-radius: 6px;
  padding: 11px 18px;
  min-height: 44px;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.4;
  transition:
    background 0.16s,
    color 0.16s;
}
.button:hover {
  background: var(--tint);
}
.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}
.button.primary:hover {
  background: var(--accent-hover);
}
.button.dark {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}
.button.dark:hover {
  background: var(--green-hover);
}
.button.ghost {
  border-color: transparent;
}
.button.small {
  padding: 9px 12px;
  font-size: 17px;
}
.button.danger {
  color: var(--red);
}
.text-button {
  background: none;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 4px;
  font-size: 17px;
  min-height: 44px;
  padding: 6px 2px;
  color: var(--accent);
}
.text-button:hover {
  color: var(--accent-hover);
}
.close {
  background: none;
  border: 0;
  min-width: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  border-radius: 5px;
}
.close:hover {
  background: var(--sage);
}
.tag,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 15px;
  line-height: 1.45;
  background: var(--tint);
  color: var(--muted);
}
.badge {
  background: var(--sage);
  color: var(--green-text);
}
.notice,
.error {
  padding: 16px 18px;
  border-radius: 6px;
  line-height: 1.6;
  font-size: 18px;
  background: var(--sage);
  color: var(--green-text);
}
.warning {
  background: var(--warn-bg);
  color: var(--warn-fg);
}
.error {
  color: var(--red);
  background: var(--error-bg);
}
.form-help,
.progress-note {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.55;
  margin: 8px 0 0;
}
.skip-link {
  position: fixed;
  left: 16px;
  top: -100px;
  z-index: 100;
  background: var(--white);
  padding: 15px;
}
.skip-link:focus {
  top: 10px;
}
.loading {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.loading p {
  margin-top: 25px;
  color: var(--muted);
}
.landing {
  max-width: 1320px;
  margin: auto;
  padding: 0 64px;
}
.landing-nav {
  min-height: 98px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  gap: 24px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 18px;
}
.nav-links a {
  text-decoration: none;
}
.nav-links a:hover {
  text-decoration: underline;
}
.hero {
  display: grid;
  grid-template-columns: 1.03fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 64px 0 56px;
}
.hero h1 {
  margin: 0 0 26px;
  max-width: 540px;
}
.hero h1 em {
  color: var(--accent);
  font-weight: 400;
}
.hero-copy > p {
  font-size: 21px;
  max-width: 420px;
  color: var(--muted);
}
.hero .row {
  margin-top: 30px;
  gap: 12px;
}
.hero-footnote {
  margin-top: 17px;
  font-size: 17px !important;
}
.hero-photograph {
  margin: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
/* The photo is offered as AVIF with a JPEG fallback; the wrapper adds no box. */
.hero-photograph > picture {
  display: contents;
}
.hero-photograph img {
  width: 100%;
  height: 100%;
  min-height: 380px;
  max-height: 520px;
  object-fit: cover;
  object-position: 50% 43%;
  border-radius: 2px;
}
.hero-photograph figcaption {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}
.hero-photograph figcaption a {
  font-size: 12px;
}
.promise-strip {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 23px 0;
  font-size: 17px;
  color: var(--green-text);
}
.promise-strip span {
  display: flex;
  align-items: center;
  gap: 10px;
}
.section {
  padding: 90px 0;
}
.section-heading {
  max-width: 640px;
  margin-bottom: 36px;
}
.section-heading h2 {
  margin-bottom: 22px;
}
.section-heading p {
  color: var(--muted);
  max-width: 65ch;
}
.catalog-section {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 74px;
  align-items: center;
}
.catalog-section .section-heading {
  margin: 0;
}
.feature-notes {
  list-style: none;
  padding: 0;
  margin: 34px 0 0;
}
.feature-notes li {
  display: grid;
  gap: 4px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.feature-notes strong {
  font-size: 19px;
  font-weight: 600;
}
.feature-notes span {
  font-size: 18px;
  color: var(--muted);
}
.catalog-preview {
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 28px;
  scroll-margin-top: 24px;
}
.preview-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.preview-heading h3 {
  font: 600 18px var(--sans);
  letter-spacing: 0;
  margin: 0;
}
.preview-heading > span {
  font-size: 13px;
  color: var(--muted);
}
.preview-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  margin: 22px 0;
  gap: 12px;
  overflow: auto;
}
.preview-tabs button {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 12px 0;
  font-size: 15px;
  min-height: 44px;
  white-space: nowrap;
  color: var(--muted);
}
.preview-tabs button[aria-pressed="true"] {
  color: var(--accent);
  border-color: var(--accent);
}
.sample-title {
  padding: 4px 0 20px;
}
.sample-title h3 {
  font-size: 36px;
  margin: 0 0 8px;
}
.sample-title p {
  font-size: 18px;
  margin: 0 0 7px;
}
.sample-title > span {
  font-size: 15px;
  color: var(--muted);
}
.sample-metadata {
  margin: 0 0 20px;
}
.sample-metadata > div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  font-size: 17px;
}
.sample-metadata dt {
  color: var(--muted);
}
.sample-metadata dd {
  margin: 0;
}
.catalog-preview > p {
  margin: 0;
}
.shelf-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  background: var(--sage);
  padding: 52px 44px;
  align-items: center;
  border-radius: 2px;
}
.shelf-section p {
  color: var(--muted);
  font-size: 19px;
}
.shelf-section .small {
  font-size: 17px;
}
.shelf-section h2 {
  margin-bottom: 24px;
}
.workflow-step {
  display: flex;
  gap: 22px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line-strong);
}
.workflow-step:last-child {
  border: 0;
}
.step-number {
  font-family: var(--serif);
  font-size: 30px;
  color: var(--muted);
}
.workflow-step strong {
  display: block;
  font-weight: 600;
  margin-bottom: 7px;
}
.workflow-step p {
  font-size: 18px;
  margin: 0;
}
.pricing {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 24px;
  max-width: 1040px;
  margin: auto;
}
.price-card {
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}
.price-card.full {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}
.price-card h3 {
  margin-bottom: 24px;
}
.price {
  font-family: var(--serif);
  font-size: 50px;
  line-height: 1.25;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
}
.price small {
  font: 18px var(--sans);
  letter-spacing: 0;
}
.price-card p {
  font-size: 18px;
}
.price-card ul {
  padding-left: 20px;
  margin: 24px 0 30px;
  font-size: 18px;
  line-height: 2;
}
.price-card li {
  padding-left: 4px;
}
.price-card .button {
  width: 100%;
}
.price-card.full .button {
  background: var(--paper);
  color: var(--green);
}
.price-card.full .small {
  color: var(--bar-muted);
  font-size: 15px;
  margin: 20px 0 0;
}
.paid-label { font-size: 15px; font-weight: 600; margin-bottom: 24px; }
.billing-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0 20px; }
.billing-option { padding: 18px 14px; border: 1px solid var(--line); border-radius: 8px; }
.billing-option.annual { background: var(--tint); color: var(--ink); border-color: var(--line-strong); }
.price-card.full .billing-option.monthly { border-color: var(--bar-line); }
.billing-option-heading { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.billing-value { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.billing-amount { font: 45px var(--serif); margin: 12px 0 6px; }
.billing-amount span { font: 15px var(--sans); }
.billing-option .billing-total, .billing-option .billing-saving { font-size: 15px; line-height: 1.5; margin: 6px 0; }
.billing-saving { font-weight: 600; }
.billing-option .button { margin-top: 14px; width: 100%; }
.price-card.full .button:disabled { opacity: 1; background: transparent; color: var(--bar-ink); border: 1px solid var(--bar-line); cursor: default; }
@media (max-width: 430px) {
  .billing-options { grid-template-columns: 1fr; }
}
.section.center .section-heading {
  margin: 0 auto 36px;
  text-align: center;
}
.faq {
  max-width: 850px;
  margin: auto;
}
.faq-topics { display: flex; flex-wrap: wrap; gap: 10px 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.faq-topics a { font-size: 18px; text-underline-offset: 4px; }
.faq-group { margin-top: 40px; scroll-margin-top: 24px; }
.faq-group h3 { font-size: 30px; margin-bottom: 4px; }
.faq-group-toggle { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 16px; padding: 4px 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-align: left; cursor: pointer; }
.faq-group-toggle:hover { color: var(--gilt-text); }
.faq-group-chevron { flex: none; width: 12px; height: 12px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-3px, -3px); transition: transform 0.15s ease; }
.faq-group-toggle[aria-expanded="false"] .faq-group-chevron { transform: rotate(-45deg); }
@media (prefers-reduced-motion: reduce) { .faq-group-chevron { transition: none; } }
.faq [hidden] { display: none !important; }
.faq-controls { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 16px; text-align: left; margin-bottom: 16px; }
.faq-controls label { display: grid; gap: 8px; font-size: 17px; font-weight: 600; }
.faq-controls input, .faq-controls select { width: 100%; min-width: 0; }
.faq-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 26px; }
.faq-tools #faq-count { margin: 0 auto 0 0; font-size: 17px; }
.faq-tools .text-button { font-size: 17px; }
.faq-topics a { display: inline-flex; gap: 7px; align-items: baseline; }
.faq-topic-count { color: var(--muted); font-size: 13px; text-decoration: none; }
.faq-group .faq-group-description { margin: 6px 0 8px; font-size: 18px; }
.faq details { scroll-margin-top: 24px; }
.faq-status { display: inline-block; margin: 2px 0 2px 10px; padding: 1px 7px; border-radius: 3px; font: 13px/1.6 var(--sans); vertical-align: middle; white-space: nowrap; background: var(--tint); color: var(--ink); }
.faq-status.setup { background: var(--setup-bg); color: var(--setup-fg); }
.faq-status.idea { background: var(--info-bg); color: var(--info-fg); }
.faq-answer .faq-status { margin: 10px 0 0; }
.faq-answer .faq-answer-link { display: inline-block; margin-top: 14px; font-size: 15px; color: var(--green-text); text-underline-offset: 3px; }
.faq-empty { padding: 30px 0; }
.pilot-welcome { max-width: 720px; margin: auto; }
.pilot-welcome h1 { font-size: clamp(43px, 6vw, 68px); margin-top: 24px; }
.pilot-welcome .row { justify-content: center; margin: 28px 0; }
.health-page { max-width: 1200px; }
.health-costs { margin: 0 0 24px; border-top: 4px solid var(--info-fg); }
.health-costs h2 { margin-bottom: 10px; }
.health-cost-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 22px 0; background: var(--info-bg); border-radius: 6px; }
.health-cost-metrics .health-metric { border-color: var(--line); }
.health-cost-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.health-cost-columns > div { min-width: 0; }
.health-cost-columns h3 { font-size: 22px; }
.health-cost-columns .form-help { margin: 12px 0; }
.health-cost-columns input { max-width: 230px; }
.health-cost-scenario { font-size: 37px; font-variant-numeric: tabular-nums; }
.health-cost-scenario span { display: block; font-size: 17px; color: var(--muted); margin-top: 6px; }
.health-cost-details { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 18px; font-size: 17px; }
.health-cost-details summary { cursor: pointer; font-weight: 600; }
@media (max-width: 650px) {
  .health-cost-columns, .health-cost-metrics { grid-template-columns: 1fr; }
  .health-cost-metrics .health-metric + .health-metric { border-left: 0; border-top: 1px solid var(--line); }
}
.health-overview { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--white); }
.health-capacity, .health-summary { padding: 28px; }
.health-capacity { background: var(--green); color: var(--bar-ink); }
.health-capacity .eyebrow { color: var(--bar-muted); margin: 0; }
.health-capacity h2 { font-family: var(--sans); font-size: clamp(50px, 5vw, 81px); line-height: 1.2; margin: 24px 0; font-variant-numeric: tabular-nums; }
.health-capacity .health-capacity-label { display: block; margin-top: 8px; font-size: 20px; font-weight: 400; line-height: 1.5; letter-spacing: normal; word-spacing: normal; }
.health-capacity meter { width: 100%; height: 14px; display: block; margin-bottom: 14px; accent-color: #aacaad; }
.health-capacity meter::-webkit-meter-bar { background: #546d63; border: none; }
.health-capacity meter::-webkit-meter-optimum-value { background: #b4d5b3; }
.health-capacity meter::-webkit-meter-suboptimum-value { background: #efc47c; }
.health-capacity meter::-webkit-meter-even-less-good-value { background: #f5998c; }
.health-badge { border: 1px solid var(--bar-line); border-radius: 20px; padding: 4px 10px; font-size: 15px; text-transform: capitalize; }
.health-thresholds { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; color: var(--bar-muted); font-size: 15px; border-top: 1px solid var(--bar-line); padding-top: 16px; }
.health-summary h2, .health-panel h2 { font-size: 30px; margin-bottom: 20px; }
.health-timestamp { margin-top: 24px; font-size: 17px; }
.health-alerts { padding-left: 20px; color: var(--accent); }
.health-alerts li + li { margin-top: 8px; }
.health-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 24px 0; background: var(--tint); border-radius: 8px; }
.health-metric { padding: 22px; min-width: 0; }
.health-metric + .health-metric { border-left: 1px solid var(--line-strong); }
.health-metric dt { font-size: 17px; color: var(--muted); }
.health-metric dd { margin: 8px 0; font-size: 29px; line-height: 1.25; font-variant-numeric: tabular-nums; }
.health-metric p { font-size: 15px; margin: 0; color: var(--muted); }
.health-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.health-panel { background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 26px; min-width: 0; }
.health-facts { margin: 0 0 20px; }
.health-facts > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
.health-facts dt { color: var(--muted); }
.health-facts dd { margin: 0; text-align: right; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.health-panel .form-help { margin-bottom: 0; }
.health-history { margin-top: 24px; }
.health-history h2 { margin-bottom: 0; }
.health-table-wrap { overflow-x: auto; margin-top: 20px; }
.health-history table { width: 100%; border-collapse: collapse; font-size: 17px; text-align: left; }
.health-history td, .health-history th { padding: 12px 10px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; white-space: nowrap; }
.health-history tbody th { font-weight: 400; }
.health-pagination { justify-content: flex-end; margin-top: 20px; }
.health-user-email { display: block; font-size: 15px; color: var(--muted); margin-top: 4px; }
.health-users-table tbody th { white-space: normal; min-width: 200px; overflow-wrap: anywhere; }
#service-users { scroll-margin-top: 24px; }
#users-query { max-width: 260px; min-width: 150px; }
@media (max-width: 1100px) {
  .health-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .health-metric:nth-child(3) { border-left: 0; }
  .health-metric:nth-child(n+3) { border-top: 1px solid var(--line-strong); }
  .health-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .health-overview { grid-template-columns: 1fr; }
  .health-capacity, .health-summary, .health-panel { padding: 22px; }
  .health-metric { padding: 18px; }
  .health-metric dd { font-size: 25px; }
}
@media (max-width: 600px) {
  .faq-controls { grid-template-columns: 1fr; }
  .faq-topics { gap: 12px 18px; }
  .faq-group h3 { font-size: 29px; }
}
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}
.faq summary {
  font-size: 21px;
  cursor: pointer;
  line-height: 1.6;
  min-height: 32px;
}
.faq p {
  font-size: 19px;
  color: var(--muted);
  margin: 16px 0 0;
  max-width: 70ch;
}
.footer {
  border-top: 1px solid var(--line);
  padding: 32px 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  color: var(--muted);
  font-size: 17px;
}
.footer .brand {
  font-size: 30px;
  color: var(--ink);
}
.shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  border-right: 1px solid var(--line);
  padding: 30px 22px;
  background: var(--tint);
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: sticky;
  top: 0;
  height: 100dvh;
}
.sidebar .brand {
  font-size: 33px;
}
.side-label {
  font-size: 15px;
  color: var(--muted);
  margin: 0 10px 12px;
}
.side-nav {
  display: grid;
  gap: 4px;
}
.side-nav button {
  border: 0;
  background: transparent;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 10px;
  border-radius: 6px;
  font-size: 18px;
  min-height: 44px;
  min-width: 0;
}
.side-nav button.active {
  background: var(--tint-strong);
  color: var(--green-text);
  font-weight: 600;
}
.side-nav button:hover {
  background: var(--tint);
}
.side-count {
  margin-left: auto;
  font-size: 15px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
/* Your collections, listed under Collections (HEL-496). */
.side-subs {
  display: grid;
  gap: 2px;
  max-height: 26vh;
  overflow: auto;
}
.side-nav .side-sub {
  font-size: 16px;
  min-height: 38px;
  padding: 8px 10px 8px 39px;
  overflow-wrap: anywhere;
}
.side-nav .side-sub .icon {
  width: 16px;
  height: 16px;
  margin-left: -26px;
}
/* Imports, Settings and Admin: a separate group below. */
.side-gap {
  display: block;
  height: 18px;
}
.side-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.plan-label {
  font-size: 15px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.user-button {
  border: 0;
  background: none;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 24px;
  padding: 0;
  text-align: left;
  min-height: 44px;
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--tint-strong);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 21px;
  flex-shrink: 0;
}
.user-button strong {
  font-size: 17px;
  display: block;
  max-width: 135px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-button small {
  font-size: 13px;
  color: var(--muted);
}
.workspace {
  padding: 0 44px 52px;
  min-width: 0;
}
.topbar {
  height: 76px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 15px;
  color: var(--muted);
}
.desktop-breadcrumb > span {
  margin: 0 10px;
  color: var(--muted);
}
.topbar .icon {
  width: 14px;
  height: 14px;
  margin-right: 4px;
}
.mobile-brand {
  display: none;
}
.page-heading {
  padding: 40px 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.page-heading h1 {
  font-size: 48px;
  margin: 0 0 10px;
  line-height: 1.2;
}
.page-heading p {
  font-size: 18px;
  margin: 0;
  color: var(--muted);
}
.page-heading .row {
  flex-shrink: 0;
}
.library-summary {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 17px;
  color: var(--muted);
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.library-summary span:first-child {
  color: var(--ink);
}
.toolbar {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.search-box {
  position: relative;
  flex: 1;
  min-width: 210px;
}
.search-box .icon {
  position: absolute;
  left: 13px;
  top: 13px;
  color: var(--muted);
  width: 18px;
}
.search-box input {
  padding-left: 41px;
}
.toolbar select {
  width: auto;
  max-width: 175px;
}
.filter-panel {
  background: var(--tint);
  padding: 22px;
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 16px;
}
.filter-panel label {
  font-size: 15px;
}
/* HEL-529: less-used filters folded away inside the panel. */
.more-filters {
  grid-column: 1 / -1;
}
.more-filters > summary {
  cursor: pointer;
  font-weight: 600;
}
.filter-panel-more {
  padding: 16px 0 0;
  margin: 0;
  background: none;
}
.active-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.filter-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 7px 10px;
  background: var(--sage);
  font-size: 15px;
  min-height: 36px;
}
.filter-chip .icon {
  width: 14px;
  height: 14px;
}
.results-label {
  font-size: 17px;
  color: var(--muted);
  margin: 22px 0 20px;
}
.selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--sage);
  border-radius: 8px;
  margin-bottom: 18px;
}
.selection-bar strong {
  font-size: 17px;
  font-weight: 500;
}
.selection-mark {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 24px;
  height: 24px;
  border: 1px solid var(--green-text);
  background: var(--white);
  border-radius: 4px;
  display: grid;
  place-items: center;
  z-index: 1;
}
.selected .selection-mark {
  background: var(--green);
  color: var(--white);
}
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 32px 26px;
}
.book-card {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  min-width: 0;
  position: relative;
  border-radius: 6px;
}
.cover-slot {
  height: 236px;
  background: var(--tint);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 18px 28px;
  margin-bottom: 16px;
  position: relative;
  border-radius: 6px;
  transition: background 0.18s;
}
.book-card:hover .cover-slot {
  background: var(--tint-strong);
}
.book-card.selected .cover-slot {
  outline: 2px solid var(--green);
  outline-offset: -2px;
  background: var(--tint-strong);
}
.cover-slot img {
  max-width: 100%;
  height: 100%;
  object-fit: contain;
  box-shadow: 3px 6px 11px #20322728;
  border-radius: 1px;
}
.placeholder-cover {
  width: 135px;
  max-width: 100%;
  height: 190px;
  background: var(--green);
  color: var(--gilt-light);
  box-shadow: 3px 6px 11px #20322728;
  padding: 20px 15px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  position: relative;
}
.placeholder-cover:before,
.placeholder-cover:after {
  content: "";
  height: 1px;
  background: currentColor;
  opacity: 0.45;
  margin: 12px 0;
}
.placeholder-cover strong {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.3;
  /* Whole lines only: the title never shrinks into a half-cut line. */
  flex-shrink: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: break-word;
}
.placeholder-cover small {
  font-size: 12px;
  margin-top: 12px;
  line-height: 1.5;
}
.placeholder-cover[data-color="1"] {
  background: #7a2e2a;
}
.placeholder-cover[data-color="2"] {
  background: #24384f;
}
.placeholder-cover[data-color="3"] {
  background: #5b4a2e;
}
.placeholder-cover[data-color="4"] {
  background: #3d5a45;
}
.no-cover-label {
  position: absolute;
  bottom: 7px;
  right: 10px;
  left: 10px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
.book-card h3 {
  font-size: 23px;
  line-height: 1.3;
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}
.book-card p {
  font-size: 17px;
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.5;
}
.book-card .tag {
  font-size: 14px;
  padding: 3px 6px;
  background: transparent;
  border: 1px solid var(--line);
}
.book-card .row {
  gap: 5px;
}
.book-list {
  display: grid;
}
.list-book {
  display: grid;
  grid-template-columns: 46px minmax(100px, 2fr) minmax(80px, 1fr) minmax(
      80px,
      1fr
    );
  gap: 20px;
  align-items: center;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 16px 8px;
  background: transparent;
  width: 100%;
}
.list-book:hover,
.list-book.selected {
  background: var(--sage);
}
.list-book img,
.mini-cover {
  width: 36px;
  height: 50px;
  object-fit: cover;
}
.mini-cover {
  background: var(--green);
  color: var(--paper);
  display: grid;
  place-items: center;
  font-family: var(--serif);
}
.list-book strong {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 400;
  display: block;
  overflow-wrap: anywhere;
}
.list-book small {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.8;
}
.empty-state {
  padding: 54px 25px;
  text-align: center;
  background: var(--tint);
  border-radius: 12px;
}
.empty-state > .icon {
  width: 38px;
  height: 38px;
  color: var(--green-text);
  margin-bottom: 24px;
}
.empty-state h2 {
  font-size: 39px;
  margin-bottom: 16px;
}
.empty-state p {
  font-size: 19px;
  max-width: 470px;
  margin: 0 auto 25px;
  color: var(--muted);
}
.empty-state .row {
  justify-content: center;
}
.empty-guide {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  margin-top: 34px;
}
.empty-guide div {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.empty-guide strong {
  font-size: 18px;
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}
.empty-guide p {
  font-size: 17px;
  color: var(--muted);
}
.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}
.collection-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}
.collection-card > .icon {
  color: var(--accent);
  width: 28px;
  height: 28px;
}
.collection-card h3 {
  margin: 24px 0 12px;
  overflow-wrap: anywhere;
}
.collection-card p {
  font-size: 18px;
  color: var(--muted);
}
.collection-card .row {
  gap: 4px;
}
.membership-list {
  max-height: 50vh;
  overflow: auto;
}
.membership-book {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.membership-book strong {
  font-weight: 500;
}
.membership-book small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.panel {
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 12px;
  min-width: 0;
}
.panel h3 {
  font-size: 30px;
  margin-bottom: 17px;
}
.panel p {
  font-size: 18px;
  color: var(--muted);
}
.settings-grid .span-2 {
  grid-column: 1/-1;
}
.metadata {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.metadata dt {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 6px;
}
.metadata dd {
  font-size: 18px;
  margin: 0;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.metadata .wide {
  grid-column: 1/-1;
}
.detail-cover {
  max-height: 270px;
  max-width: 170px;
  object-fit: contain;
  box-shadow: var(--shadow);
}
.detail-top {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 30px;
  align-items: start;
  margin-bottom: 32px;
}
.detail-top > div:first-child {
  position: relative;
}
.detail-top h2 {
  font-size: 39px;
  margin: 8px 0 16px;
  overflow-wrap: anywhere;
}
.detail-top .placeholder-cover {
  width: 155px;
  height: 224px;
}
/* "Lent to Anna since 12 Oct 2026" on a lent book's page (HEL-497). */
.lend-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--tint);
  width: fit-content;
  max-width: 100%;
}
/* Your copy first, in the start page sample card's style (HEL-514). */
.edition-state {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}
.copy-facts {
  margin: 0 0 8px;
}
.copy-facts > div {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  font-size: 17px;
}
.copy-facts dt {
  color: var(--muted);
}
.copy-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}
/* Add to collection, beside the book's collections (HEL-532). */
.copy-action {
  display: block;
  margin-top: 6px;
}
.copy-subline {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}
.detail-source {
  margin: 28px 0 0;
  font-size: 15px;
  color: var(--muted);
}
.photo-gallery {
  display: flex;
  gap: 16px;
  overflow: auto;
  margin-top: 20px;
  padding: 3px;
}
.photo-gallery figure {
  margin: 0;
  flex: 0 0 112px;
}
.photo-gallery img {
  width: 112px;
  height: 112px;
  object-fit: cover;
  border-radius: 5px;
}
.photo-gallery figcaption {
  font-size: 15px;
  margin: 7px 0;
  color: var(--muted);
}
dialog {
  border: 0;
  background: var(--paper);
  color: var(--ink);
  border-radius: 12px;
  width: min(760px, calc(100% - 32px));
  max-height: 92dvh;
  padding: 0;
  box-shadow: 0 25px 90px #1c271d40;
}
dialog::backdrop {
  background: #1f292978;
}
.auth-dialog {
  width: min(500px, calc(100% - 32px));
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  gap: 16px;
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 2;
}
.modal-head h2 {
  font-size: 30px;
  margin: 0;
  letter-spacing: -0.025em;
}
.modal-body {
  padding: 28px;
}
.modal-foot {
  border-top: 1px solid var(--line);
  padding: 16px 28px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  position: sticky;
  bottom: 0;
  background: var(--paper);
  z-index: 2;
}
.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
}
.form-grid .wide {
  grid-column: 1/-1;
}
.essential-fields > label:first-child {
  grid-column: 1/-1;
}
.essential-fields input[name="title"] {
  font-family: var(--serif);
  font-size: 26px;
  padding: 13px;
}
.form-intro {
  font-size: 18px;
  color: var(--muted);
  margin: 0 0 24px;
}
.form-section {
  border-top: 1px solid var(--line);
  margin-top: 26px;
  padding-top: 3px;
}
.form-section > summary {
  padding: 20px 0;
  cursor: pointer;
  font-size: 21px;
  font-weight: 500;
  line-height: 1.5;
}
.form-section > summary span {
  font-size: 17px;
  color: var(--muted);
  font-weight: 400;
  margin-left: 12px;
}
.form-section > summary::marker {
  color: var(--accent);
  font-size: 15px;
}
.form-section[open] > summary {
  padding-bottom: 24px;
}
.form-cover {
  height: 130px;
  max-width: 105px;
  object-fit: contain;
  display: block;
  margin-bottom: 15px;
  box-shadow: 2px 4px 8px #273c3318;
}
#cover-status {
  margin-bottom: 18px;
}
.unsaved-warning {
  position: sticky;
  top: 0;
  padding: 20px;
  background: var(--warn-bg);
  color: var(--warn-fg);
  border-radius: 8px;
  z-index: 3;
  margin-bottom: 22px;
}
.unsaved-warning p {
  margin: 8px 0 14px;
  font-size: 18px;
}
label {
  display: grid;
  gap: 8px;
  font-size: 17px;
  color: var(--ink);
  line-height: 1.5;
}
input,
select,
textarea {
  display: block;
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--white);
  padding: 11px 12px;
  color: var(--ink);
  min-height: 44px;
  min-width: 0;
  font-size: 18px;
  caret-color: var(--accent);
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}
textarea {
  resize: vertical;
  line-height: 1.6;
}
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  accent-color: var(--green);
  flex-shrink: 0;
  margin: 0;
}
input[type="file"] {
  font-size: 17px;
  padding: 8px;
  overflow: hidden;
}
input[type="file"]::file-selector-button {
  background: var(--sage);
  color: var(--green-text);
  border: 0;
  border-radius: 3px;
  padding: 8px 10px;
  font: inherit;
  margin-right: 10px;
  cursor: pointer;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  min-height: 32px;
  line-height: 1.6;
}
.section-label {
  font-weight: 600;
  font-size: 18px;
  margin: 28px 0 16px;
}
.lookup-area {
  padding: 20px;
  border-radius: 8px;
  background: var(--tint);
  margin-bottom: 26px;
}
.lookup-area > label {
  margin-bottom: 10px;
  font-weight: 600;
}
.lookup-area .row {
  flex-wrap: nowrap;
}
.lookup-area input {
  flex: 1;
}
.lookup-area p {
  font-size: 17px;
  color: var(--muted);
  margin: 10px 0 0;
}
.lookup-results {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.lookup-results:empty {
  display: none;
}
.lookup-result {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 13px;
  background: var(--white);
  display: flex;
  gap: 14px;
  align-items: center;
  width: 100%;
}
.lookup-result:hover {
  background: var(--paper);
}
.lookup-result img {
  width: 32px;
  height: 46px;
  object-fit: cover;
}
.lookup-result strong {
  display: block;
  font-size: 18px;
}
.lookup-result small {
  display: block;
  overflow-wrap: anywhere;
  font-size: 16px;
  color: var(--muted);
  line-height: 1.5;
}
.lookup-result span { min-width: 0; }
.lookup-result img { flex-shrink: 0; }
[data-editions] { display: grid; gap: 8px; }
.auth-wrap {
  max-width: 390px;
  margin: auto;
  padding: 8px 0;
}
.auth-wrap h2 {
  font-size: 41px;
  margin-bottom: 14px;
}
.auth-wrap > p {
  font-size: 18px;
  color: var(--muted);
  margin-bottom: 26px;
}
.auth-wrap .button {
  width: 100%;
}
.auth-wrap .row {
  justify-content: center;
}
.auth-switch {
  font-size: 18px;
  color: var(--muted);
  text-align: center;
  margin: 24px 0 0;
}
.tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  gap: 28px;
  margin-bottom: 24px;
  overflow: auto;
}
.tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  padding: 15px 1px;
  font-size: 18px;
  white-space: nowrap;
  min-height: 48px;
}
.tabs button.active {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}
.import-box {
  padding: 28px;
  border-radius: 12px;
  background: var(--tint);
  margin-bottom: 32px;
}
.import-box h3 {
  margin-bottom: 14px;
}
.import-box label {
  margin: 20px 0 14px;
}
.import-box > .button {
  margin-top: 18px;
}
.draft-row {
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.draft-row h3 {
  font-size: 23px;
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}
.draft-row p {
  font-size: 17px;
  margin: 0;
  color: var(--muted);
}
.review-row {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  margin-bottom: 18px;
}
.review-row .form-grid {
  gap: 16px;
}
.review-row > .row {
  margin-bottom: 12px;
}
.review-row p {
  font-size: 17px;
  color: var(--muted);
  margin: 12px 0 0;
}
.review-row details summary {
  min-height: 36px;
  cursor: pointer;
}
.review-actions {
  position: sticky;
  bottom: 0;
  background: var(--paper);
  padding: 20px 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  z-index: 2;
}
.review-photo {
  max-height: 240px;
  max-width: 100%;
  object-fit: contain;
  border-radius: 5px;
}
.selection-grid {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 0;
}
.legal {
  max-width: 800px;
  margin: 64px auto;
  padding: 0 24px;
}
.legal h1 {
  font-size: 55px;
}
.legal h2 {
  font-size: 35px;
  margin-top: 36px;
}
.legal p {
  font-size: 20px;
  color: var(--muted);
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(580px, calc(100% - 32px));
  background: var(--green);
  color: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 16px 22px;
  z-index: 50;
  font-size: 18px;
  line-height: 1.6;
  display: none;
}
#toast.visible {
  display: block;
}
@media (min-width: 1500px) {
  .workspace {
    max-width: 1420px;
    margin: 0 auto;
    width: 100%;
  }
  .book-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}
@media (max-width: 1100px) {
  .landing {
    padding: 0 36px;
  }
  .hero {
    gap: 36px;
  }
  .hero h1 {
    font-size: clamp(52px, 6vw, 74px);
  }
  .hero-photograph img {
    min-height: 360px;
    max-height: 470px;
  }
  .catalog-section {
    gap: 36px;
  }
  .shelf-section {
    gap: 36px;
    padding: 38px 30px;
  }
  .workspace {
    padding: 0 26px 44px;
  }
  .shell {
    grid-template-columns: 212px minmax(0, 1fr);
  }
  .sidebar {
    padding: 28px 16px;
  }
  .sidebar .brand {
    font-size: 31px;
  }
  .filter-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .page-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .settings-grid .span-2 {
    grid-column: auto;
  }
  .book-grid {
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
    gap: 26px 20px;
  }
  .cover-slot {
    height: 224px;
    padding: 14px 14px 28px;
  }
  .catalog-preview {
    padding: 24px;
  }
  .sample-metadata > div {
    grid-template-columns: 95px 1fr;
  }
}
@media (max-width: 760px) {
  .landing {
    padding: 0 24px;
  }
  .landing-nav {
    min-height: 80px;
    gap: 12px;
  }
  .nav-links {
    gap: 8px;
  }
  .nav-links > a {
    display: none;
  }
  .nav-links .button {
    padding: 10px 12px;
    font-size: 17px;
  }
  .brand {
    font-size: 31px;
  }
  .hero {
    grid-template-columns: 1fr;
    padding: 40px 0 32px;
    gap: 24px;
  }
  .hero h1 {
    font-size: clamp(48px, 8.8vw, 70px);
    max-width: 560px;
    margin-bottom: 22px;
  }
  .hero-copy > p {
    font-size: 20px;
    max-width: 470px;
  }
  .hero .row {
    margin-top: 24px;
  }
  .hero-photograph {
    width: 100%;
  }
  .hero-photograph img {
    min-height: 0;
    height: 350px;
    max-height: none;
    object-position: 50% 35%;
  }
  .hero-photograph figcaption {
    font-size: 13px;
  }
  .hero-photograph figcaption a {
    font-size: 12px;
  }
  .promise-strip {
    flex-wrap: wrap;
    font-size: 17px;
    gap: 14px 24px;
    justify-content: flex-start;
  }
  .section {
    padding: 56px 0;
  }
  .catalog-section {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .catalog-section .section-heading {
    max-width: 520px;
  }
  .feature-notes {
    margin-top: 24px;
  }
  .feature-notes li {
    padding: 14px 0;
  }
  .catalog-preview {
    padding: 24px;
  }
  .shelf-section {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 30px 24px;
  }
  .workflow-step {
    padding: 20px 0;
  }
  .pricing {
    grid-template-columns: 1fr;
  }
  .price-card {
    padding: 28px;
  }
  .footer {
    flex-wrap: wrap;
    font-size: 15px;
    padding: 28px 0;
  }
  .footer .row {
    gap: 20px;
  }
  .shell {
    display: block;
    padding-bottom: 76px;
  }
  .sidebar {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    height: auto;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    display: block;
    border-right: 0;
    border-top: 1px solid var(--line);
    z-index: 5;
    background: var(--paper);
  }
  .sidebar > .brand,
  .sidebar .side-label,
  .side-subs,
  .side-gap,
  .side-footer {
    display: none;
  }
  .side-nav {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 4px;
  }
  .side-nav button {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 7px 4px;
    font-size: 13px;
    min-height: 54px;
  }
  .side-nav .icon {
    width: 20px;
    height: 20px;
  }
  .side-count {
    display: none;
  }
  .workspace {
    padding: 0 20px 28px;
  }
  .topbar {
    height: 68px;
    font-size: 13px;
  }
  .mobile-brand {
    display: block;
    font-size: 31px;
  }
  .desktop-breadcrumb {
    display: none;
  }
  .page-heading {
    padding: 28px 0 20px;
    gap: 20px;
  }
  .page-heading h1 {
    font-size: 42px;
  }
  .page-heading p {
    font-size: 18px;
  }
  .page-heading > .row {
    gap: 8px;
    width: 100%;
    flex-shrink: 1;
  }
  .page-heading > .row .button {
    flex: 1;
  }
  .library-summary {
    gap: 10px 20px;
    font-size: 15px;
    margin-bottom: 22px;
    padding-bottom: 20px;
  }
  .book-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 18px;
  }
  .cover-slot {
    height: 230px;
  }
  .toolbar {
    gap: 8px;
  }
  .toolbar .search-box {
    flex-basis: 100%;
  }
  .toolbar .button {
    padding: 10px 12px;
    font-size: 17px;
  }
  .toolbar select {
    flex: 1;
    max-width: none;
    font-size: 17px;
  }
  .filter-panel {
    grid-template-columns: 1fr 1fr;
    padding: 16px;
    gap: 16px;
  }
  .filter-chip {
    min-height: 40px;
  }
  .selection-bar {
    padding: 12px;
    gap: 8px;
  }
  .selection-bar .button {
    width: 100%;
  }
  .empty-state {
    padding: 38px 20px;
  }
  .empty-state h2 {
    font-size: 35px;
  }
  .empty-guide {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 26px;
  }
  .empty-guide p {
    margin-bottom: 8px;
  }
  .detail-top {
    grid-template-columns: 110px 1fr;
    gap: 22px;
    margin-bottom: 20px;
  }
  .detail-cover {
    max-width: 110px;
    max-height: 166px;
  }
  .detail-top .placeholder-cover {
    width: 110px;
    height: 164px;
    padding: 10px;
  }
  .detail-top .placeholder-cover strong {
    font-size: 19px;
  }
  .detail-top h2 {
    font-size: 31px;
  }
  .copy-facts > div {
    grid-template-columns: 100px minmax(0, 1fr);
  }
  .modal-head {
    padding: 14px 20px;
  }
  .modal-head h2 {
    font-size: 29px;
  }
  .modal-body {
    padding: 24px 20px;
  }
  .modal-foot {
    padding: 14px 20px;
    flex-wrap: wrap;
  }
  /* Labels stay on one line; buttons that don't fit move to a second row
     and share its width (a book's page has three: Remove, Lend, Edit). */
  .modal-foot .button {
    flex: 1 1 auto;
    white-space: nowrap;
  }
  .book-dialog {
    width: calc(100% - 16px);
    max-height: 96dvh;
  }
  .form-grid {
    gap: 18px;
  }
  .form-section > summary span {
    display: block;
    margin: 4px 0 0 17px;
    font-size: 17px;
  }
  .lookup-area {
    padding: 16px;
  }
  .lookup-area .row {
    flex-wrap: wrap;
  }
  .lookup-area input {
    flex-basis: 100%;
  }
  .lookup-area .button {
    width: 100%;
  }
  .form-grid,
  .filter-panel {
    grid-template-columns: 1fr 1fr;
  }
  .collection-grid {
    grid-template-columns: 1fr;
  }
  .collection-card {
    padding: 26px;
  }
  .collection-card h3 {
    margin: 16px 0 10px;
  }
  .list-book {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 15px;
  }
  .list-book > small {
    display: none;
  }
  .draft-row {
    align-items: flex-start;
    gap: 12px;
  }
  .draft-row .row {
    justify-content: flex-end;
    flex-shrink: 0;
  }
  .tabs {
    gap: 22px;
  }
  .tabs button {
    font-size: 17px;
  }
  .import-box {
    padding: 22px;
  }
  .review-row {
    padding: 20px 16px;
  }
  .review-actions {
    bottom: 76px;
    padding: 16px 0;
  }
  .review-actions > .row {
    width: 100%;
  }
  .review-actions .button {
    flex: 1;
  }
  .review-actions > span {
    font-size: 15px;
  }
  .settings-grid {
    gap: 20px;
  }
  .panel {
    padding: 24px;
  }
  .metadata {
    gap: 22px 16px;
  }
  input,
  select,
  textarea,
  .toolbar input {
    font-size: 20px;
  }
  .check {
    min-height: 44px;
  }
  #toast {
    bottom: 92px;
  }
  .auth-wrap {
    padding: 0;
  }
  .auth-wrap h2 {
    font-size: 37px;
  }
}
@media (max-width: 420px) {
  .landing {
    padding: 0 20px;
  }
  .landing-nav .brand-mark {
    display: none;
  }
  .landing-nav {
    gap: 8px;
  }
  .nav-links {
    gap: 3px;
  }
  .nav-links .button {
    font-size: 15px;
    padding: 9px 10px;
  }
  .hero h1 {
    font-size: 50px;
  }
  .hero .row {
    gap: 8px;
  }
  .hero .row .button {
    font-size: 17px;
    padding: 12px;
  }
  .hero-photograph img {
    height: 300px;
  }
  .catalog-preview {
    padding: 20px;
  }
  .preview-tabs {
    gap: 16px;
  }
  .preview-tabs button {
    font-size: 13px;
  }
  .preview-heading > span {
    font-size: 13px;
  }
  .sample-metadata > div {
    grid-template-columns: 85px 1fr;
    font-size: 17px;
  }
  .workspace {
    padding: 0 16px 26px;
  }
  .cover-slot {
    height: 208px;
    padding: 12px 12px 27px;
  }
  .placeholder-cover {
    height: 169px;
    padding: 12px;
  }
  .placeholder-cover strong {
    font-size: 20px;
  }
  .book-card h3 {
    font-size: 21px;
  }
  .book-card p {
    font-size: 15px;
  }
  .book-card .tag {
    font-size: 12px;
  }
  .book-grid {
    gap: 26px 14px;
  }
  .toolbar .button {
    padding: 10px;
    font-size: 15px;
  }
  .toolbar select {
    max-width: 145px;
    font-size: 15px;
    padding-left: 10px;
  }
  .form-grid,
  .filter-panel {
    grid-template-columns: 1fr;
  }
  .essential-fields > label:first-child,
  .form-grid .wide {
    grid-column: auto;
  }
  .detail-top {
    grid-template-columns: 1fr;
  }
  .detail-top > div:first-child {
    width: 110px;
  }
  .topbar > span:last-child {
    max-width: 150px;
    text-align: right;
  }
  .page-heading h1 {
    font-size: 40px;
  }
  .tabs {
    gap: 19px;
  }
  .tabs button {
    font-size: 15px;
  }
  .review-row {
    padding: 18px 14px;
  }
  .modal-head,
  .modal-foot {
    padding: 12px 16px;
  }
  .modal-body {
    padding: 22px 16px;
  }
  .auth-wrap h2 {
    font-size: 35px;
  }
  .draft-row {
    flex-wrap: wrap;
  }
  .draft-row .row {
    justify-content: flex-start;
    flex-shrink: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
/* Copy-led cards. One shared palette keeps book and collection surfaces related. */
[data-tone="0"] {
  --tile-color: #1f3b2f;
  --tile-paper: var(--tile-paper-0);
  --tile-ink: var(--tile-ink-0);
}
[data-tone="1"] {
  --tile-color: #7a2e2a;
  --tile-paper: var(--tile-paper-1);
  --tile-ink: var(--tile-ink-1);
}
[data-tone="2"] {
  --tile-color: #24384f;
  --tile-paper: var(--tile-paper-2);
  --tile-ink: var(--tile-ink-2);
}
[data-tone="3"] {
  --tile-color: #5b4a2e;
  --tile-paper: var(--tile-paper-3);
  --tile-ink: var(--tile-ink-3);
}
.workspace {
  background: var(--paper);
}
.sidebar {
  background: var(--green);
  color: var(--bar-ink);
  border: 0;
}
.sidebar .brand-dot {
  color: var(--gilt);
}
.sidebar .side-label,
.sidebar .side-count,
.sidebar .user-button small {
  color: var(--bar-muted);
}
.sidebar .side-nav button:hover {
  background: var(--bar-hover);
}
.sidebar .side-nav button.active {
  background: var(--gilt-light);
  color: var(--bar-active-ink);
}
.sidebar .side-nav button.active .side-count {
  color: var(--bar-active-ink);
}
.sidebar .side-footer {
  border-color: var(--bar-line);
}
.sidebar .side-footer > .button {
  border-color: var(--bar-line);
  color: var(--bar-ink);
}
.sidebar .side-footer > .button:hover {
  background: var(--bar-hover);
}
.sidebar .avatar {
  background: var(--gilt-light);
  color: var(--green);
}
.sidebar .brand:focus-visible,
.sidebar button:focus-visible {
  outline-color: var(--gilt);
}
.book-tile {
  border-radius: 12px;
  overflow: hidden;
  background: var(--tile-paper);
  color: var(--tile-ink);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.book-tile .book-card {
  color: inherit;
  flex: 1;
  display: flex;
  flex-direction: column;
  border-radius: 0;
}
.book-tile .book-card:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -4px;
}
.book-tile .cover-slot {
  background: var(--tile-color);
  border-radius: 0;
  margin: 0;
  width: 100%;
  /* HEL-544: the cover is about a quarter larger, with less tile around it.
     HEL-565: moved down a little; the box and the cover keep their sizes. */
  height: 300px;
  padding: 24px 16px 28px;
  transition: filter 0.18s;
}
.book-tile .book-card:hover .cover-slot {
  background: var(--tile-color);
  filter: brightness(1.08);
}
.book-tile .cover-slot img {
  max-width: 100%;
  max-height: 100%;
  height: 100%;
  object-fit: contain;
  box-shadow: 4px 8px 16px #16211b40;
}
.book-tile .no-cover-label {
  color: var(--gilt-light);
  bottom: 38px;
  font-size: 15px;
}
.book-tile .card-edition {
  position: absolute;
  bottom: 10px;
  left: 20px;
  right: 20px;
  color: var(--gilt-light);
  font-size: 13px;
  letter-spacing: 0.025em;
  text-align: center;
}
.missing-cover {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  height: 100%;
  width: 100%;
  color: var(--gilt-light);
  border: 1px solid #ffffff55;
  padding: 15px;
}
.missing-cover .icon {
  width: 32px;
  height: 32px;
  stroke-width: 1.2;
}
.missing-cover span {
  font-family: var(--serif);
  font-size: 23px;
  line-height: 1.45;
  text-align: center;
}
.book-card-copy {
  padding: 22px 20px 16px;
  width: 100%;
}
.book-tile h3 {
  font-size: 26px;
  line-height: 1.3;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.book-tile .book-card p {
  font-size: 17px;
  color: var(--tile-ink);
  margin: 0 0 18px;
  line-height: 1.5;
}
.card-detail-line {
  display: flex;
  gap: 8px 12px;
  flex-wrap: wrap;
  font-size: 15px;
  line-height: 1.6;
  color: var(--tile-ink);
}
.card-detail-line > span + span:before {
  content: "·";
  margin-right: 12px;
}
.copy-photo-area {
  padding: 0 20px 8px;
}
.copy-photo-rail {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 0 0 16px;
}
.copy-photo-rail a {
  display: block;
  width: 42px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 3px;
  overflow: hidden;
}
.copy-photo-rail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.copy-photo-rail > span {
  font-size: 13px;
  margin-left: 3px;
  line-height: 1.4;
}
.copy-photo-rail small {
  display: block;
  font-size: 12px;
}
.card-photo-button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  font-size: 15px;
  color: var(--tile-ink);
  text-align: left;
  padding: 10px 0;
}
.card-photo-button:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.card-photo-button .icon {
  width: 16px;
  height: 16px;
}
.card-photo-button .icon:last-child {
  margin-left: auto;
  width: 14px;
  height: 14px;
}
.book-tile.selected {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}
.book-tile.selected .selection-mark {
  background: var(--white);
  color: var(--green-text);
}
.book-tile.selected .cover-slot {
  outline: 0;
}
.collection-card {
  padding: 0;
  border: 0;
  background: var(--tile-paper);
  color: var(--tile-ink);
  overflow: hidden;
  cursor: pointer;
}
/* The whole card opens the collection, like a book tile. */
.collection-card:hover .collection-visual {
  filter: brightness(1.12);
}
.collection-visual {
  background: var(--tile-color);
  height: 156px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  padding: 22px 25px 30px;
  position: relative;
  overflow: hidden;
}
.collection-visual img {
  height: 100%;
  max-width: 28%;
  object-fit: contain;
  box-shadow: 3px 6px 12px #12231b30;
}
.collection-initial {
  font-family: var(--serif);
  font-size: 95px;
  color: var(--gilt-light);
  line-height: 1;
}
.collection-visual-count {
  position: absolute;
  bottom: 12px;
  right: 18px;
  font-size: 15px;
  color: var(--gilt-light);
}
.collection-copy {
  padding: 24px;
}
.collection-copy h3 {
  margin: 0 0 12px;
  font-size: 32px;
}
.collection-copy > p {
  display: none;
}
.collection-card .button {
  color: var(--tile-ink);
  border-color: var(--line-strong);
}
.collection-card .button.ghost {
  border-color: transparent;
}
.collection-card .button:hover {
  background: var(--tile-hover);
}
@media (max-width: 760px) {
  .sidebar {
    background: var(--green);
  }
  .sidebar .side-nav button.active {
    background: var(--gilt-light);
  }
  .book-tile .cover-slot {
    height: 276px;
    padding: 22px 14px 28px;
  }
  .book-card-copy {
    padding: 18px 16px 14px;
  }
  .book-tile h3 {
    font-size: 25px;
  }
  .book-tile .book-card p {
    font-size: 15px;
    margin-bottom: 13px;
  }
  .copy-photo-area {
    padding: 0 16px 6px;
  }
  .card-photo-button {
    font-size: 13px;
    gap: 6px;
    min-height: 48px;
  }
  .card-photo-button .icon:last-child {
    display: none;
  }
  .copy-photo-rail {
    gap: 6px;
    flex-wrap: wrap;
  }
  .copy-photo-rail a {
    width: 38px;
    height: 44px;
  }
  .copy-photo-rail > span {
    flex-basis: 100%;
    display: flex;
    gap: 4px;
  }
  .collection-grid {
    grid-template-columns: 1fr 1fr;
  }
  .collection-copy {
    padding: 20px;
  }
  .collection-copy h3 {
    font-size: 28px;
  }
  .collection-visual {
    height: 142px;
  }
  .collection-card .button {
    font-size: 15px;
    padding: 9px 8px;
  }
  .missing-cover span {
    font-size: 21px;
  }
  .card-detail-line {
    font-size: 15px;
    gap: 4px;
  }
  .card-detail-line > span + span:before {
    display: none;
  }
  .card-detail-line > span {
    display: block;
    width: 100%;
  }
}
@media (max-width: 420px) {
  .book-tile .cover-slot {
    height: 236px;
    padding: 19px 12px 28px;
  }
  .book-card-copy {
    padding: 16px 13px 13px;
  }
  .book-tile h3 {
    font-size: 22px;
  }
  .book-tile .book-card p {
    font-size: 15px;
  }
  .copy-photo-area {
    padding: 0 13px 5px;
  }
  .card-photo-button {
    font-size: 13px;
    gap: 5px;
    line-height: 1.4;
  }
  .card-photo-button .icon {
    width: 15px;
    height: 15px;
  }
  .book-tile .card-edition {
    font-size: 12px;
    left: 10px;
    right: 10px;
  }
  .missing-cover span {
    font-size: 19px;
  }
  .missing-cover {
    gap: 14px;
    padding: 8px;
  }
  .collection-grid {
    grid-template-columns: 1fr;
  }
  .collection-visual {
    height: 165px;
  }
  .collection-copy h3 {
    font-size: 31px;
  }
}
.form-section {
  scroll-margin-top: 90px;
}
.error {
  scroll-margin-top: 100px;
}
@media (max-width: 760px) {
  .library-summary > .summary-collections {
    display: none;
  }
  .library-summary {
    gap: 10px;
    justify-content: space-between;
  }
  .page-heading p {
    display: none;
  }
  .page-heading {
    gap: 16px;
  }
  .toolbar select {
    min-width: 108px;
    max-width: none;
  }
  .toolbar #select-books {
    padding-inline: 10px;
  }
  .results-label {
    margin-top: 16px;
  }
  .book-grid {
    gap: 24px 14px;
  }
}

/* ---- Library Cloth details -------------------------------------------- */
/* Text that sits on bottle-green or gilt keeps its own colours in both themes. */
.button.primary {
  background: var(--gilt);
  border-color: var(--gilt);
  color: var(--gilt-ink);
}
.button.primary:hover {
  background: var(--gilt-hover);
  border-color: var(--gilt-hover);
}
.button.dark,
.price-card.full,
#toast {
  color: var(--bar-ink);
}
.selected .selection-mark {
  color: var(--bar-ink);
}
.mini-cover {
  color: var(--gilt-light);
}
input,
select,
textarea {
  background-color: var(--field);
  color: var(--ink);
  border-color: var(--field-border);
}
h1,
h2 {
  letter-spacing: -0.01em;
}
.brand {
  font-weight: 400;
  letter-spacing: -0.01em;
}
.brand-dot {
  color: var(--gilt);
}
.hero h1 em {
  color: var(--gilt-text);
}

/* Landing: a bottle-green band across the top, like the cloth of a book's spine. */
.landing-nav :focus-visible {
  outline-color: var(--gilt);
}
.landing-nav {
  background: var(--green);
  color: var(--bar-ink);
  border-bottom: 3px solid var(--gilt);
  box-shadow: 0 0 0 100vmax var(--green);
  clip-path: inset(0 -100vmax);
}
.landing-nav .button {
  border-color: var(--bar-line);
  color: var(--bar-ink);
}
.landing-nav .button:hover {
  background: var(--bar-hover);
}
.landing-nav .button.primary {
  background: var(--gilt);
  border-color: var(--gilt);
  color: var(--gilt-ink);
}
.hero h1 {
  color: var(--ink);
}
.hero-photograph img {
  border-radius: 4px;
  outline: 1px solid var(--gilt);
  outline-offset: 6px;
}
.promise-strip {
  color: var(--ink);
}
.price-card.full .button {
  background: var(--gilt);
  border-color: var(--gilt);
  color: var(--gilt-ink);
}

/* Book covers: cloth colours with a fine gilt frame and gilt titles. */
.book-tile .cover-slot::after,
.collection-visual::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(232, 203, 128, 0.5);
  border-radius: 3px;
  pointer-events: none;
}
.placeholder-cover {
  background: #1f3b2f;
  color: var(--gilt-light);
  border-radius: 2px 4px 4px 2px;
  box-shadow: inset 5px 0 0 rgba(0, 0, 0, 0.2), 3px 6px 11px rgba(0, 0, 0, 0.25);
}
.placeholder-cover::before,
.placeholder-cover::after {
  background: var(--gilt);
  opacity: 0.8;
}
.book-tile h3,
.collection-copy h3 {
  font-weight: 400;
}
.book-tile .book-card:hover .cover-slot {
  filter: brightness(1.12);
}

/* Sidebar: the active page reads like a gilt label on a green spine. */
.sidebar {
  border-right: 3px solid var(--gilt);
}
.sidebar .side-nav button.active {
  background: var(--gilt-light);
  color: var(--bar-active-ink);
}
.workspace {
  background: var(--paper);
}
.panel,
.collection-card,
.health-panel {
  border-color: var(--line);
}

@media (max-width: 760px) {
  .sidebar {
    border-right: 0;
    border-bottom: 3px solid var(--gilt);
  }
}
@media (prefers-reduced-motion: reduce) {
  .book-tile .book-card:hover .cover-slot {
    filter: none;
  }
}
.barcode-scanner { margin: 20px 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--tint); }
.barcode-scanner .row { flex-wrap: wrap; }
.scanner-file { position: relative; overflow: hidden; cursor: pointer; }
.scanner-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.scanner-file:focus-within { outline: 3px solid var(--accent); outline-offset: 4px; }
.scanner-viewfinder { position: relative; margin-bottom: 12px; background: var(--green); border-radius: 6px; overflow: hidden; }
.scanner-viewfinder video { display: block; width: 100%; max-height: 320px; object-fit: contain; }
.scanner-frame { position: absolute; inset: 25% 8%; border: 2px solid var(--gilt); border-radius: 6px; pointer-events: none; }
.scanner-result { padding: 12px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.scanner-result .button { display: block; width: 100%; white-space: normal; text-align: left; margin-top: 8px; }
.barcode-scanner p, .barcode-scanner label { font-size: 17px; line-height: 1.5; }
/* One choice at a time, and problems as a warning box with next steps (HEL-513). */
.scanner-panel { margin-top: 14px; display: grid; gap: 12px; }
.scanner-panel p { margin: 0; }
.scanner-panel label { display: grid; gap: 8px; }
.scan-alert { margin-top: 14px; padding: 14px 16px; border-radius: 8px; border-left: 5px solid var(--warn-fg); background: var(--warn-bg); color: var(--warn-fg); }
.scan-alert strong { display: block; font-size: 18px; margin-bottom: 4px; }
.scan-alert p { margin: 0 0 12px; color: var(--warn-fg); }
.scan-alert .button { white-space: normal; }
/* The phone scanner draws the camera behind the page (HEL-526): while it
   runs, only its frame, hint and Close button are shown. */
html.native-scanning, html.native-scanning body, html.native-scanning dialog { background: transparent !important; box-shadow: none !important; }
html.native-scanning dialog::backdrop { background: transparent; }
html.native-scanning body * { visibility: hidden; }
html.native-scanning .native-scan-overlay, html.native-scanning .native-scan-overlay * { visibility: visible; }
.native-scan-overlay { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 16px; padding: 24px 16px calc(32px + env(safe-area-inset-bottom, 0px)); }
.native-scan-frame { position: absolute; left: 8%; right: 8%; top: 30%; height: 22%; border: 3px solid var(--gilt); border-radius: 10px; box-shadow: 0 0 0 100vmax #00000080; }
.native-scan-hint { position: relative; margin: 0; padding: 10px 14px; border-radius: 8px; background: #000000b3; color: #fff; font-size: 18px; line-height: 1.4; text-align: center; max-width: 30em; }
.native-scan-overlay .button { position: relative; min-width: 200px; }
.phone-pending { margin: 16px clamp(16px, 4vw, 48px); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.phone-pending[hidden] { display: none; }
.phone-pending p { margin: 4px 0 0; }
.pending-list { display: grid; gap: 12px; }
.pending-item { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--tint); overflow-wrap: anywhere; }
.pending-item h3 { margin-top: 0; }
.pending-item .row { flex-wrap: wrap; }
.pending-item .button, .phone-pending .button { min-height: 44px; white-space: normal; }

/* Admin uses the same sections at desktop and phone widths. */
[data-admin-panel][hidden] { display: none !important; }
.admin-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
/* The selected tab uses the gilt of primary buttons, readable in both themes. */
.admin-tabs [aria-pressed="true"] { background: var(--gilt); border-color: var(--gilt); color: var(--gilt-ink); }
.admin-menu { display: none; }
.admin-overview { display: block; }
#admin-content .health-grid { display: contents; }
#admin-content .health-panel, #admin-content .health-capacity { margin-bottom: 1.5rem; }
#invite-created { overflow-wrap: anywhere; margin: 1rem 0; }
@media (max-width: 640px) {
  .admin-tabs { display: none; }
  .admin-menu { display: grid; gap: .4rem; margin-bottom: 1rem; }
  .admin-menu select { width: 100%; }
  #admin-content { min-width: 0; }
}

/* Shelves and lending (HEL-457) */
.lending-person { display: grid; gap: 8px; }
.lending-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lending-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.lending-list li > span { min-width: 0; display: grid; }
.lending-list small { color: var(--muted); }
/* Shelves on Collections, people on Lent out (HEL-530). */
.names-area { margin-top: 28px; }
/* Send feedback (HEL-531). */
.feedback-kinds { display: flex; flex-wrap: wrap; gap: 8px 20px; border: 0; padding: 0; margin: 0; }
.feedback-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.feedback-list li { border-top: 1px solid var(--line); padding-top: 12px; }
.feedback-list p { margin: 0 0 6px; }
.feedback-kinds legend { font-weight: 600; margin-bottom: 8px; }
/* HEL-566: shelves and the people you lend to, as a list; each opens a card. */
.names-list { list-style: none; margin: 8px 0 0; padding: 0; border-top: 1px solid var(--line); }
.names-list li { border-bottom: 1px solid var(--line); }
.names-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 10px 4px; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.names-item:hover, .names-item:focus-visible { background: var(--tint, rgba(0, 0, 0, 0.04)); }
.names-item-name { flex: 1 1 auto; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.names-item-go { font-size: 1.4em; line-height: 1; opacity: 0.6; }
.names-card input { width: 100%; }

/* Settings: the two download choices, each with a short caption. */
.backup-choices { display: flex; flex-wrap: wrap; gap: 1rem; }
.backup-choices > div { display: grid; gap: .25rem; min-width: 0; }
.backup-choices .form-help { margin: 0; }

/* A file picker shown as a plain button. */
.file-button { position: relative; overflow: hidden; cursor: pointer; }
.file-button input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* HEL-557: a collection suggested for a book. */
.suggested-tag { font-size: 0.8em; color: var(--gilt-ink, var(--muted)); background: var(--tint, transparent); border-radius: 999px; padding: 1px 8px; margin-left: 4px; }

/* HEL-567 (Philip, October 20): "All of the back buttons in the app are too
   small." Every "← Collections" / "← All books" is the same, a little bigger. */
.button.back-link {
  font-size: 19px;
  min-height: 48px;
  padding: 12px 20px;
  font-weight: 600;
}

/* HEL-573: adding a shelf or a person, and the People card on Lent out. */
.names-add { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.names-add label { flex: 1 1 14rem; min-width: 0; }
.names-add input { width: 100%; }
.names-add .form-help { flex-basis: 100%; margin: 0; }
.lending-people { margin: 0 0 18px; }

/* HEL-571: the way to Restore a backup, below the spreadsheet upload. */
.import-switch { margin: 14px 0 22px; }

/* Phone text sizes. Five steps, used on every screen and dialog at phone
   width, so pages stay consistent and still fit when the phone's own
   font-size setting enlarges text in the installed app. HEL-546 (Philip,
   October 20): author names and other secondary text were a little small. */
:root {
  --text-xs: 12px;
  --text-sm: 16px;
  --text-md: 17px;
  --text-lg: 19px;
  --text-xl: 26px;
}
@media (max-width: 760px) {
  :root { font-size: var(--text-md); }
  /* Page and dialog titles. */
  h1, h2, .page-heading h1, .empty-state h2, .detail-top h2, .modal-head h2, .auth-wrap h2,
  .health-capacity h2, .health-summary h2, .health-panel h2, .legal h1, .pilot-welcome h1,
  .brand, .mobile-brand, .sidebar .brand {
    font-size: var(--text-xl);
    line-height: 1.2;
  }
  /* Section, card and list headings. */
  h3, .book-tile h3, .book-card h3, .panel h3, .collection-copy h3, .draft-row h3, .faq-group h3,
  .health-cost-columns h3, .sample-title h3, .legal h2, .form-section > summary, .faq summary,
  .list-book strong, .health-metric dd, .health-cost-scenario, .detail-top .placeholder-cover strong,
  .placeholder-cover strong {
    font-size: var(--text-lg);
    line-height: 1.3;
  }
  /* Body text, buttons and form fields. */
  p, label, input, select, textarea, .toolbar input, .toolbar select, .essential-fields input[name="title"],
  .button, .toolbar .button, .nav-links .button, .tabs button, .check, .notice, .error, #toast,
  .page-heading p, .empty-state p, .panel p, .faq p, .legal p, .collection-card p, .draft-row p,
  .review-row p, .unsaved-warning p, .form-intro, .section-label, .lookup-result strong,
  .metadata dd, .copy-facts > div, .lookup-area p, .barcode-scanner p, .barcode-scanner label, .scan-alert strong, .empty-guide strong, .auth-wrap > p, .auth-switch, .hero-copy > p, .price-card p,
  .price-card ul, .workflow-step p, .shelf-section p, .faq-topics a, .faq-group .faq-group-description,
  .feature-notes strong, .feature-notes span, .sample-title p {
    font-size: var(--text-md);
  }
  /* Hints, details and secondary lines. */
  small, .small, .form-help, .progress-note, .text-button, .button.small, .tag, .badge, .topbar,
  .library-summary, .results-label, .filter-panel label, .filter-chip, .selection-bar strong,
  .form-section > summary span, .lookup-result small,
  .metadata dt, .edition-state, .detail-source, .photo-gallery figcaption, .book-card p, .book-tile .book-card p, .card-detail-line,
  .card-photo-button, .missing-cover span, .book-tile .no-cover-label, .list-book small,
  .review-actions > span, .collection-visual-count, .collection-card .button, .empty-guide p,
  .footer, .promise-strip, .hero-footnote, .faq-controls label, .faq-tools #faq-count,
  .faq-tools .text-button, .faq-answer .faq-answer-link, .health-badge, .health-thresholds,
  .health-timestamp, .health-metric dt, .health-metric p, .health-facts > div, .health-history table,
  .health-user-email, .health-cost-details, .health-cost-scenario span, .health-capacity .health-capacity-label,
  .side-label, .plan-label, .user-button strong, .side-count {
    font-size: var(--text-sm);
  }
  /* Labels on covers and the bottom bar. */
  .side-nav button, .book-tile .card-edition, .book-card .tag, .placeholder-cover small, .no-cover-label,
  .copy-photo-rail small, .copy-photo-rail > span, .user-button small, .hero-photograph figcaption,
  .hero-photograph figcaption a, .faq-topic-count, .billing-value {
    font-size: var(--text-xs);
  }
  /* Typed text uses the body font, not the heading font. */
  .essential-fields input[name="title"] { font-family: var(--sans); padding: 10px 12px; }
  /* Title, author and shelf each get the full width. */
  .essential-fields { grid-template-columns: 1fr; }
  .essential-fields > label:first-child { grid-column: auto; }
  /* Card titles break only between words, at most three lines. */
  .book-tile h3 { overflow-wrap: break-word; word-break: normal; hyphens: manual; margin-bottom: 6px; }
  .missing-cover { gap: 10px; padding: 12px; }
  .missing-cover .icon { width: 24px; height: 24px; flex-shrink: 0; }
  .missing-cover span { font-family: var(--sans); line-height: 1.4; }
  /* Bottom bar: each label stays on one line inside its own highlight. */
  .side-nav button { padding: 6px 2px; gap: 3px; min-height: 52px; align-items: center; overflow: hidden; }
  .side-nav button > .side-name { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
}
/* The file input is invisible, so show keyboard focus on its button. */
.file-button:focus-within { outline: 3px solid var(--accent); outline-offset: 4px; }

/* Add a book in three steps (HEL-490). */
.found-heading { font-size: var(--text-xl); margin: 0 0 16px; }
.found-book { display: grid; grid-template-columns: minmax(0, 170px) minmax(0, 1fr); gap: 20px; align-items: start; margin-bottom: 20px; }
.found-cover { display: grid; gap: 12px; }
.found-cover img { width: 100%; max-width: 170px; border-radius: 4px; box-shadow: var(--shadow); }
.found-details h4 { font-family: var(--serif); font-weight: 400; font-size: var(--text-lg); line-height: 1.25; margin: 0 0 6px; }
.found-details p { margin: 0 0 12px; }
.found-owned { font-weight: 600; color: var(--ink); background: var(--tint); border-radius: 6px; padding: 8px 12px; }
.cover-choice { display: grid; gap: 6px; justify-items: start; cursor: pointer; }
/* With two covers to choose from, they sit side by side above the details. */
.found-cover:has(.cover-choice) { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 20px; }
.found-cover .keep-photo { flex-basis: 100%; }
.found-book:has(.cover-choice) .found-details { grid-column: 1 / -1; }
.cover-choice span { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.cover-choice input[type="radio"] { width: 1.25rem; height: 1.25rem; min-height: 0; margin: 0; padding: 0; flex: none; accent-color: var(--gilt); }
.cover-choice img { max-width: 120px; }
.cover-choice:has(input:checked) img { outline: 3px solid var(--gilt); outline-offset: 2px; }
.confirm-step .row .button { flex: 1 1 12rem; }
/* An offline scan, saved for later (HEL-541). */
.saved-step p { margin: 0 0 12px; }
.saved-step .saved-isbn { font-weight: 600; font-variant-numeric: tabular-nums; }
.saved-step .row { margin-top: 20px; }
.saved-step .row .button { flex: 1 1 12rem; }
.found-summary { background: var(--tint); border-left: 4px solid var(--gilt); border-radius: 6px; padding: 10px 14px; font-weight: 600; }
@media (max-width: 760px) {
  .found-book { grid-template-columns: minmax(0, 120px) minmax(0, 1fr); gap: 14px; }
  .cover-choice img { max-width: 100px; }
}
/* After saving, the book is shown in the list and briefly highlighted. */
.book-tile.just-saved, .list-book.just-saved { outline: 4px solid var(--gilt); outline-offset: 3px; transition: outline-color 0.6s ease; }
/* Books waiting on the phone to be sent. */
.waiting-books { margin-bottom: 26px; }
.book-tile.waiting { opacity: 0.92; }
.waiting-label { display: inline-block; font-weight: 600; font-size: var(--text-sm); background: var(--gilt); color: var(--gilt-ink); border-radius: 999px; padding: 2px 10px; margin-bottom: 8px; }
/* One fact per line on the card, never broken mid-word. */
.found-details .metadata { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; margin: 0 0 12px; }
.found-details .metadata div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; }
.found-details .metadata dt { color: var(--muted); }
.found-details .metadata dd { margin: 0; overflow-wrap: normal; word-break: normal; }

/* HEL-545: on phones the collections aren't listed, so while one is open the
   Collections button shows where you are. */
@media (max-width: 760px) {
  .sidebar .side-nav button.holds-current {
    background: var(--gilt-light);
    color: var(--bar-active-ink);
    font-weight: 600;
  }
  .sidebar .side-nav button.holds-current .side-count {
    color: var(--bar-active-ink);
  }
}

/* HEL-553: lists the app keeps (Lent out, Recently deleted) at the top of
   Collections; imports waiting on All books; the many-books ways on the add
   screen. */
.special-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 0 0 24px; }
.special-list { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--tint, transparent); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.special-list:hover { border-color: var(--gilt); }
.special-list > span { display: grid; flex: 1; min-width: 0; }
.special-list small { color: var(--muted); }
.imports-waiting { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 16px; }
.imports-waiting p { margin: 0; }
.add-many { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }

/* HEL-552: a collection's own page. */
.collection-heading .back-link { margin-bottom: 10px; }
.collection-title { display: flex; align-items: center; gap: 16px; min-width: 0; }
.collection-mosaic { display: flex; flex-shrink: 0; }
.collection-mosaic img { width: 44px; height: 66px; object-fit: cover; border-radius: 3px; box-shadow: 2px 4px 10px #16211b40; }
.collection-mosaic img + img { margin-left: -14px; }
@media (max-width: 760px) {
  /* The main action gets its own line; the others share the next one. */
  .collection-heading .row { flex-wrap: wrap; }
  .collection-heading .row > .button { flex: 1 1 auto; white-space: nowrap; }
  .collection-heading .row > .button.primary { flex: 1 1 100%; }
}
/* A collection's actions wrap under its name when the window is too narrow
   to fit them beside it (Codex review of HEL-552). */
.collection-heading { flex-wrap: wrap; }
.collection-heading > div:first-child { min-width: 0; flex: 1 1 320px; }
.collection-heading > .row { flex-shrink: 1; flex-wrap: wrap; justify-content: flex-end; }

/* HEL-655: Books is My books, Wish list and Lent out. */
.books-switch .tabs { margin-bottom: 16px; }
.books-deleted { display: block; margin: 0 0 16px; }
.wish-find { display: grid; gap: 8px; margin-bottom: 8px; }
.wish-find .row { flex-wrap: nowrap; }
.wish-find input { flex: 1; min-width: 0; }
.wish-more { display: flex; flex-wrap: wrap; gap: 16px; margin: 0 0 16px; }
