/* BANQED: black and white, Helvetica, square corners, and a warm ink so it never feels cold.
   No inline styles anywhere: the security policy only allows this stylesheet. */
:root {
  --paper: #ffffff;
  --ink: #1a1815;
  --muted: #6b6966;
  --line: #e6e5e2;
  --tint: #f5f5f3;
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }  /* hidden always wins over a component's own display */
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); line-height: 1.5; }
a { color: inherit; }
a:hover { color: var(--muted); }
img { max-width: 100%; height: auto; }
.muted { color: var(--muted); }
.small { font-size: 0.8125rem; font-weight: 400; }

/* Header */
.site-header { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; min-height: 72px; padding: 16px 24px;
               border-bottom: 1px solid var(--line); }
.logo-link { display: flex; margin-right: auto; }
.logo { height: 20px; width: auto; display: block; }
.site-nav, .account-nav { display: flex; gap: 24px; font-size: 0.9375rem; }
.site-nav a, .account-nav a { text-decoration: none; text-underline-offset: 6px; text-decoration-thickness: 1.5px; }
.site-nav a[aria-current="page"], .account-nav a[aria-current="page"] { text-decoration: underline; }
.account-nav { color: var(--muted); }
@media (max-width: 640px) {
  .site-nav { order: 3; width: 100%; }
}

main { max-width: 1280px; margin: 40px auto 80px; padding: 0 24px; }
h1 { font-size: clamp(2rem, 5vw, 3.75rem); line-height: 1; font-weight: 700; letter-spacing: -0.03em; margin: 0 0 14px; }
h2 { font-size: 1.125rem; font-weight: 700; margin: 40px 0 16px; }
.lede { max-width: 40em; margin: 0 0 24px; color: var(--muted); }
.hint { color: var(--muted); font-size: 0.875rem; margin: 10px 0 0; }
.back { margin: 0 0 24px; font-size: 0.9375rem; }
.back a { text-decoration: none; }
.empty { color: var(--muted); }

.messages { list-style: none; padding: 0; margin: 0 0 24px; }
.message { padding: 12px 16px; margin-bottom: 8px; border: 1px solid var(--ink); }
.message--error { border-width: 2px; }

/* Buttons and links */
.button { display: inline-block; padding: 14px 22px; border: 1px solid var(--ink); background: var(--paper); color: var(--ink);
          font: inherit; font-size: 0.9375rem; font-weight: 700; cursor: pointer; text-decoration: none; border-radius: 0; }
.button:hover { color: var(--ink); background: var(--tint); }
.button--primary { background: var(--ink); color: var(--paper); }
.button--primary:hover { background: #33302b; color: var(--paper); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); text-decoration: underline; cursor: pointer; }
.link-button:hover { color: var(--ink); }

/* The banq */
.banq-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; }
.banq-head .lede { margin-bottom: 0; }
.headline-figures { display: flex; flex-wrap: wrap; gap: 32px; margin: 0; font-variant-numeric: tabular-nums; }
.headline-figures dt { font-size: 0.75rem; color: var(--muted); }
.headline-figures dd { margin: 4px 0 0; font-size: 1.75rem; font-weight: 500; }
.headline-figures--grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 32px; }
.finish-prompt { margin: 32px 0 0; padding: 20px 0; border-top: 1px solid var(--line); }
.finish-prompt__progress { margin: 0 0 12px; font-variant-numeric: tabular-nums; }
.rule { height: 2px; background: var(--ink); margin-top: 32px; }
.banq-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 0.9375rem; }
.tabs, .filters { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.tabs a, .filters a { text-decoration: none; color: var(--muted); }
.tabs a span { margin-left: 4px; }
.tabs a[aria-current="page"] { color: var(--ink); font-weight: 700; }
.tabs a[aria-current="page"] span { font-weight: 400; color: var(--muted); }
.filters a[aria-current="true"] { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; }

.piece-grid { list-style: none; padding: 28px 0 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 36px 20px; }
.piece { display: flex; flex-direction: column; gap: 10px; text-decoration: none; }
.piece__image { position: relative; display: block; aspect-ratio: 4 / 5; background: var(--tint); overflow: hidden; }
.piece__image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.piece__text { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 8px; font-size: 0.875rem; line-height: 1.35; }
.piece__text > .muted { white-space: nowrap; }
.marker { position: absolute; top: 10px; left: 10px; background: var(--paper); color: var(--ink); font-size: 0.6875rem; padding: 4px 7px; }

/* Books: titles on spines, in our own type */
.spines { list-style: none; padding: 28px 0 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.spine { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; width: 64px; height: 260px;
         padding: 14px 10px; border: 1px solid var(--ink); text-decoration: none; writing-mode: vertical-rl; }
.spine:hover { background: var(--tint); color: var(--ink); }
.spine__title { font-weight: 700; font-size: 0.9375rem; line-height: 1.2; }
.spine__author { color: var(--muted); font-size: 0.75rem; }
.spine__marker { position: absolute; bottom: 10px; left: 50%; width: 8px; height: 8px; margin-left: -4px; background: var(--ink); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.spine--large { width: 120px; height: 420px; padding: 24px 18px; }
.spine--large .spine__title { font-size: 1.375rem; }

/* A piece */
.piece-page { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.piece-page__photos { display: grid; gap: 12px; }
.piece-page__photos img { width: 100%; background: var(--tint); display: block; }
@media (max-width: 800px) { .piece-page { grid-template-columns: 1fr; gap: 24px; } }
/* Two across on a phone, like a rail, rather than one long column */
@media (max-width: 480px) {
  .piece-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 12px; }
  .piece__text { flex-direction: column; }
}
.facts { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; }
.facts div { display: contents; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

/* Adding your details */
.details-form { display: grid; gap: 8px; margin-top: 8px; }
.question { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 18px 0 14px; }
.question legend { font-weight: 700; padding: 0; margin-bottom: 12px; float: left; width: 100%; }
.question legend + * { clear: both; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; display: inline-flex; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span { display: inline-block; padding: 10px 14px; border: 1px solid var(--line); cursor: pointer; font-size: 0.9375rem; }
.choice input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.choice input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.question input[type="text"], .question input[type="number"] { font: inherit; padding: 10px 12px; border: 1px solid var(--ink); border-radius: 0; width: 100%; max-width: 20em; }
.field-error { margin: 8px 0 0; font-weight: 700; }
.question--error .choice span { border-color: var(--ink); }
.details-form .button { justify-self: start; margin-top: 16px; }

.celebration { padding: 48px 0; }
.celebration .button { margin: 0 8px 8px 0; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px 48px; }
.stat-block h2 { margin-top: 24px; }
.stat-block .hint { margin: 0 0 16px; }
.bars { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.bar { display: grid; grid-template-columns: 9.5em 1fr 2.5em; align-items: center; gap: 12px; font-size: 0.875rem; }
.bar__label { display: flex; align-items: center; gap: 8px; }
.bar__count { text-align: right; font-variant-numeric: tabular-nums; }
.bar__track { display: block; }

/* Photos */
.upload-form { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.upload-form .hint, .upload-status { flex-basis: 100%; }
.upload-status p { margin: 4px 0; }
/* The real file input is hidden visually but stays usable by keyboard and screen readers. */
.file-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.file-input:focus-visible + .button { outline: 3px solid var(--ink); outline-offset: 3px; }
.count { color: var(--muted); font-weight: 400; margin-left: 8px; }
.photo-upload h1 { margin-bottom: 14px; }
.photo-upload .lede { color: var(--ink); }
.photo-grid { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; }
.photo-tile img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--line); }
.photo-tile form { margin-top: 6px; }

/* Form controls shared by member and staff pages */
.question select, .question textarea { font: inherit; padding: 10px 12px; border: 1px solid var(--ink); border-radius: 0; background: var(--paper);
                                       color: var(--ink); width: 100%; max-width: 20em; }
.question textarea { max-width: 100%; min-height: 18em; font-size: 0.9375rem; line-height: 1.5; }
.choices--colours .choice span { display: inline-flex; align-items: center; gap: 8px; }
.swatch { display: block; flex: none; }
.more { border-top: 1px solid var(--line); padding: 14px 0; }
.more summary { cursor: pointer; font-weight: 700; }
.more .question { border-top: 0; padding-bottom: 0; }

/* Staff workspace */
.staff-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.staff-table th, .staff-table td { text-align: left; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.staff-table thead th { font-size: 0.75rem; font-weight: 400; color: var(--muted); }
.staff-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 8px; }
.staff-list { list-style: none; padding: 0; margin: 0; }
.staff-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.pick { position: relative; display: block; cursor: pointer; }
.pick input { position: absolute; top: 8px; left: 8px; width: 20px; height: 20px; margin: 0; accent-color: var(--ink); }
.pick:has(input:checked) img { outline: 3px solid var(--ink); outline-offset: -3px; }
.photo-tile__name { display: block; margin-top: 6px; font-size: 0.875rem; }
.photo-tile a { text-decoration: none; }

.describe { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px; align-items: start; }
.describe__photos { position: sticky; top: 24px; display: grid; gap: 12px; }
.describe__photos > img { width: 100%; background: var(--tint); }
.describe__extra { max-width: 50%; }
.also { border: 0; border-top: 1px solid var(--line); margin: 8px 0 0; padding: 14px 0 0; }
.also legend { font-size: 0.875rem; color: var(--muted); padding: 0; margin-bottom: 10px; }
.also__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.also__grid img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.describe__form h1 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
.describe__heading { margin: 28px 0 0; padding-top: 16px; border-top: 2px solid var(--ink); font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.06em; }
.describe__heading + .question, .describe__heading + .describe__row .question { border-top: 0; }
.describe__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.describe__row .question input, .describe__row .question select { max-width: none; }
.describe__buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; padding: 16px 0; border-top: 1px solid var(--line);
                     position: sticky; bottom: 0; background: var(--paper); }
@media (max-width: 800px) {
  .describe { grid-template-columns: 1fr; gap: 24px; }
  .describe__photos { position: static; }
}
@media (max-width: 480px) {
  .describe__row { grid-template-columns: 1fr; }
}
.edit-link { font-weight: 400; margin-left: 10px; }
.photo-tile .link-button { font-size: 0.8125rem; }

/* Staff desk: tabs, search, members, new types */
.desk-nav { display: flex; flex-wrap: wrap; gap: 24px; margin: 0 0 28px; padding-bottom: 12px; border-bottom: 1px solid var(--line); font-size: 0.9375rem; }
.desk-nav a { text-decoration: none; color: var(--muted); }
.desk-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; }
.badge { display: inline-block; padding: 1px 7px; border: 1px solid var(--ink); font-size: 0.75rem; font-weight: 400; color: var(--ink); vertical-align: 1px; }
.search { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 8px 0 12px; }
.search input { font: inherit; padding: 10px 12px; border: 1px solid var(--ink); border-radius: 0; min-width: min(100%, 24em); }
.pager { display: flex; gap: 24px; margin-top: 20px; }
.staff-table td a, .staff-table th a { color: inherit; }
.type-review { list-style: none; padding: 0; margin: 0; }
.type-review li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.type-review__what { margin: 0 0 12px; }
.type-review__actions { display: flex; flex-wrap: wrap; gap: 12px 32px; }
.type-review__actions form { display: flex; gap: 8px; align-items: center; }
.type-review__actions input, .type-review__actions select { font: inherit; padding: 9px 12px; border: 1px solid var(--ink); border-radius: 0; background: var(--paper); }
@media (max-width: 800px) { .staff-table { display: block; overflow-x: auto; } }
