/* Public binders: a public binder's page (/b/), the gallery (/binders/), the owner's page (/account/binders/), and the two
   dialogs (Report this binder; Who can see my binder, which loads this file when it first opens on the binder page).
   Built only with PUBLIC_BINDERS=on. Every card picture keeps square corners (.scan); both themes come from site.css's colors. */

/* ---------- the dialogs ---------- */
.pbx { width: min(560px, 100vw - 32px); max-width: none; max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 0; background: var(--stock); color: var(--ink); box-shadow: 0 0 0 2px var(--ink), 10px 10px 0 var(--btn-shade-2); overflow: auto; overscroll-behavior: contain; }
.pbx--wide { width: min(680px, 100vw - 32px); }
.pbx::backdrop { background: rgba(8, 11, 13, .8); }
.pbx__top { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 20px 12px; background: var(--stock); border-bottom: 3px solid var(--ink); }
.pbx__top h2 { margin: 0; font: 700 clamp(1.3rem, 3vw, 1.8rem)/1.1 var(--display); }
.pbx__top h2:focus { outline: none; }
.pbx__x { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--stock); color: var(--ink); font: 500 1.5rem/1 var(--sans); display: grid; place-items: center; padding: 0 0 3px; }
.pbx__x:hover { border-color: var(--ink); }
.pbx__body { display: grid; gap: 16px; padding: 18px 20px 24px; }
.pbx__body[hidden] { display: none; }
.pbx__body > p { margin: 0; }
.pbx__opts { margin: 0; padding: 0; border: 0; display: grid; gap: 4px; min-width: 0; }
.pbx__opts legend { padding: 0; margin-bottom: 8px; font: 800 .68rem/1.3 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); }
.pbx__opt { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding: 10px 10px; border-radius: 8px; cursor: pointer; }
.pbx__opt:hover { background: var(--stock-2); }
.pbx__opt input { flex: none; appearance: none; width: 20px; height: 20px; margin: 1px 0 0; border: 2px solid var(--ink); border-radius: 50%; }
.pbx__opt input:checked { background: radial-gradient(circle, var(--ink) 0 46%, transparent 50%); }
.pbx__opt:has(input:checked) { background: var(--stock-3); }
.pbx__opt:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 1px; }
.pbx__opt input:focus-visible { outline: none; }
.pbx__opt span { min-width: 0; }
.pbx__opt--line b { display: block; font-weight: 700; }
.pbx__opt--line small { display: block; margin-top: 3px; color: var(--ink-2); font-size: .9rem; line-height: 1.4; }
.pbx__hint { margin: 0; color: var(--ink-2); font-size: .88rem; }
.pbx__say { margin: 0; font-weight: 600; color: var(--ink-2); }
.pbx__say:empty { display: none; }
.pbx__acts { display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: center; }
.pbx .btn--small, .ab .btn--small { min-height: 44px; }   /* big enough for a thumb */
.pbx textarea { resize: vertical; min-height: 4.5em; }
.pbx__thanks { font: 700 1.2rem/1.3 var(--display); }
.pbx__thanks:focus { outline: none; }

/* Who can see my binder */
.who__pub { display: grid; gap: 16px; padding: 4px 0 2px; }
.who__pub[hidden] { display: none; }
.who__addr { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 2px; border-bottom: 2px solid var(--ink-3); }
.who__addr:focus-within { border-color: var(--ink); box-shadow: 0 2px 0 var(--ink); }
.who__addr span { color: var(--ink-2); font: 500 1rem/1.3 var(--sans); padding: .75em 0 .75em .1em; white-space: nowrap; }
.who__addr input { flex: 1 1 8em; min-width: 0; width: auto; border-bottom: 0; padding-left: 0; }
.who__addr input:focus { box-shadow: none; }
.who__check { margin: 0; min-height: 1.4em; font-weight: 600; font-size: .9rem; }
.who__list { display: flex; align-items: center; gap: 12px; min-height: 44px; font-weight: 600; cursor: pointer; }
.who__list input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--ink); }
.who__first { margin: 0; padding: 12px 14px; border: 2px solid var(--ink); font-weight: 600; }
/* how people get to it: a private link, or a page with a name; a change of way says first what happens to the old address */
.who__ways { margin-top: 4px; }
.who__named { display: grid; gap: 14px; }
.who__named[hidden] { display: none; }
.who__switch { margin: 0; padding: 12px 14px; border-left: 4px solid #16A7B8; background: var(--stock-2, rgba(127,127,127,.08)); font-weight: 600; }
.who__now { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.who__now[hidden], .who__where[hidden], .pbx__acts[hidden] { display: none; }
.who__state { margin: 0; font-weight: 600; }
.who__where { margin: 0; overflow-wrap: anywhere; }
.who__where span { color: var(--ink-2); }
.who__out a { font-weight: 700; }

/* ---------- a public binder's page ---------- */
.pb-head h1:focus { outline: none; }
.pb-who { display: grid; gap: 6px; margin-top: 4px; }
.pb-who[hidden], .pb-none[hidden] { display: none; }
.pb-who p { margin: 0; overflow-wrap: anywhere; }
.pb-handle { font: 700 clamp(1.1rem, 2vw, 1.4rem)/1.2 var(--display); }
.pb-counts { color: var(--ink-3); }
.pb-level, .pb-changed { color: var(--ink-2); }
.pb-link .link { font-weight: 700; }
.pb-acts { display: flex; flex-wrap: wrap; gap: 14px 18px; margin-top: 18px; }
.pb-say:empty { display: none; }
.pb-bind { padding-top: 0; }
.pb-more { padding: clamp(30px, 5vw, 60px) var(--gut) clamp(30px, 5vw, 60px); }
.pb-more section + section { margin-top: clamp(36px, 6vw, 64px); }
.pb-more h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); line-height: 1.1; margin: 0 0 .5em; }
.pb-wants { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-2); }
.pb-wants li { padding: 10px 0; border-bottom: 1px solid var(--line-2); overflow-wrap: anywhere; }
.pb-wants b { display: block; font-weight: 700; }
.pb-wants small { display: block; color: var(--ink-3); font-size: .88rem; margin-top: 2px; }
.pb-own p + p { margin-top: 1em; }
.pb-report { margin-top: clamp(30px, 5vw, 50px); }
.pb-report .textlink { min-height: 44px; background: none; border-top: 0; border-left: 0; border-right: 0; color: var(--ink-2); }

/* ---------- the gallery ---------- */
.pg { padding-bottom: clamp(40px, 6vw, 80px); }
.pg__bar { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: flex-end; margin: 6px 0 14px; }
.pg__q { flex: 1 1 260px; max-width: 420px; }
.pg__sort { flex: 0 1 240px; }
.pg__say { margin: 0 0 16px; color: var(--ink-2); font-weight: 600; overflow-wrap: anywhere; }
.pg__tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: clamp(16px, 2.4vw, 28px); }
.pg__tile { display: grid; gap: 4px; padding: 12px 12px 14px; color: var(--ink); text-decoration: none; background: var(--stock-2); box-shadow: 0 0 0 1.5px var(--line-2); transition: box-shadow .15s var(--ease), transform .15s var(--ease); }
.pg__tile:hover { box-shadow: 0 0 0 2px var(--ink), 5px 5px 0 var(--btn-shade-2); transform: translate(-1px, -1px); }
.pg__tile:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.pg__pics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 8px; }
.pg__pic { display: block; aspect-ratio: 2.5 / 3.5; background: var(--stock-3); overflow: hidden; }   /* square corners, like every card */
.pg__pic img { display: block; width: 100%; height: 100%; object-fit: contain; }
.pg__name { font: 700 1.15rem/1.2 var(--display); overflow-wrap: anywhere; }
.pg__handle { color: var(--ink-2); font-weight: 600; overflow-wrap: anywhere; }
.pg__counts { color: var(--ink-3); font: 800 .66rem/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.pg__more { margin-top: 24px; }
.pg__yours { margin-top: clamp(40px, 6vw, 72px); padding-top: 24px; border-top: 1px solid var(--line-2); max-width: 40em; }
.pg__yours h2 { font: 700 clamp(1.4rem, 2.6vw, 1.9rem)/1.15 var(--display); margin: 0 0 .4em; }
.pg__yours p + p { margin-top: 1em; }

/* ---------- the owner's page ---------- */
.ab { padding-bottom: clamp(40px, 6vw, 80px); }
.ab[hidden] { display: none; }
.ab__tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 3px solid var(--ink); margin-bottom: 18px; }
.ab__tabs button { min-height: 44px; padding: 0 16px; border: 2px solid var(--line-2); border-bottom: 0; background: var(--stock); color: var(--ink-2); font: 800 .7rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.ab__tabs [aria-selected="true"] { background: var(--ink); color: var(--stock); border-color: var(--ink); }
.ab__tabs button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.ab__panel:focus { outline: none; }
.ab__say { margin: 0 0 12px; font-weight: 600; color: var(--ink-2); }
.ab__say:focus { outline: none; }
.ab__say:empty { display: none; }
.ab__list { list-style: none; margin: 0; padding: 0; }
.ab__item { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 18px; padding: 18px 0; border-top: 1px solid var(--line-2); }
.ab__item--report { grid-template-columns: minmax(0, 1fr); }
.ab__info { display: grid; gap: 6px; align-content: start; min-width: 0; }
.ab__info p { margin: 0; overflow-wrap: anywhere; }
.ab__name { margin: 0; font: 700 1.2rem/1.2 var(--display); overflow-wrap: anywhere; }
.ab__name span { color: var(--ink-2); font-size: .9em; }
.ab__fine { color: var(--ink-3); font-size: .88rem; }
.ab__note { font-style: italic; }
.ab__acts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 6px; }
.ab__acts .link { min-height: 44px; display: inline-flex; align-items: center; font-weight: 700; }
@media (max-width: 560px) {
  .pbx { width: 100vw; height: 100dvh; max-height: 100dvh; box-shadow: none; }
  .pbx__body { padding: 16px 16px 24px; }
  .pbx__top { padding: 12px 16px 10px; }
  .ab__item { grid-template-columns: minmax(0, 1fr); }
  .ab__pics { max-width: 240px; }
}
