/* ============================================================
   CAPO CUÒCO CANADA — TRADE PORTAL (/portal)
   Loaded on portal.html only. Built on main.css: its tokens, the
   LinLibertine capitals, proxima-nova light text, 1px outlined
   buttons that fill on hover, hairlines, #f6f5f5 panels, no radius.
   ============================================================ */

.portal { min-height: calc(100vh - var(--header-h)); }
.portal:focus { outline: none; }
/* the hidden attribute wins over the display of buttons and links */
.portal [hidden], .pp-dialog [hidden] { display: none !important; }
.portal [tabindex="-1"]:focus { outline: none; }
.portal-page .footer { border-top-color: var(--line); }

/* a 2px line under the header while the portal is talking to the server */
.pp-busy {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  z-index: 101;
  height: 2px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  overflow: hidden;
}
.pp-busy.on { opacity: 1; }
.pp-busy::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 30%;
  background: var(--ink);
  animation: ppBusy 1.1s var(--ease) infinite;
}
@keyframes ppBusy { from { left: -30%; } to { left: 100%; } }

/* ---------- signing in: a photograph beside the form ---------- */

.pa {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: calc(100vh - var(--header-h));
}
@supports (height: 100svh) {
  .pa { min-height: calc(100svh - var(--header-h)); }
}
.pa__media {
  position: relative;
  overflow: hidden;
  background: var(--panel);
  color: var(--white);
}
.pa__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: paPhoto 1.2s var(--ease) both;
}
@keyframes paPhoto { from { opacity: 0; transform: scale(1.02); } to { opacity: 1; transform: none; } }
.pa__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0.62) 100%), rgba(0, 0, 0, 0.12); }
.pa__caption {
  position: absolute;
  z-index: 2;
  left: clamp(28px, 4vw, 64px);
  right: clamp(28px, 4vw, 64px);
  bottom: clamp(32px, 7vh, 64px);
  max-width: 460px;
}
.pa__caption .label { color: var(--white); margin-bottom: 12px; }
.pa__caption h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.2;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.pa__caption p { margin-top: 12px; font-size: var(--fs-lead); line-height: 1.45; }
.pa__caption ul { margin-top: 18px; display: grid; gap: 9px; }
.pa__caption li { position: relative; padding-left: 20px; font-size: 15px; line-height: 1.4; }
.pa__caption li::before { content: ""; position: absolute; left: 0; top: 0.68em; width: 9px; height: 1px; background: var(--white); }

.pa__panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(40px, 8vh, 96px) clamp(28px, 5vw, 96px);
}
.pa__inner { width: 100%; max-width: 440px; animation: paIn 0.6s var(--ease) both; }
@keyframes paIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.pa__inner > .label { margin-bottom: 14px; }
.pa__inner h1.display { font-size: clamp(26px, 2.3vw, 34px); line-height: 1.15; }
.pa__inner .lede { margin-top: 14px; font-size: 15px; color: var(--body-gray); }

.pa-form { margin-top: clamp(28px, 4.5vh, 40px); display: flex; flex-direction: column; gap: 1.5rem; }
.pa-form .btn-box { width: 100%; height: 48px; }
.pa-form .btn-box[disabled] { opacity: 0.45; cursor: default; }
.pa-form .btn-box[disabled]:hover { background: transparent; color: var(--ink); }
.pa-form .form-row { gap: 1.3rem; }
.field .pa-optional { text-transform: none; letter-spacing: 0.02em; color: var(--soft); }

/* the email once it is chosen, with a way back */
.pa-email {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0 10px;
  border-bottom: 1px solid var(--line);
}
.pa-email__value { font-size: 15px; font-weight: 400; letter-spacing: 0.02em; overflow-wrap: anywhere; }

/* the password or create-password section opening under the email */
.pa-reveal { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows 0.5s var(--ease), opacity 0.5s var(--ease); }
.pa-reveal.open { grid-template-rows: 1fr; opacity: 1; }
.pa-reveal > div { overflow: hidden; min-height: 0; }
.pa-reveal__inner { display: flex; flex-direction: column; gap: 1.5rem; padding-top: 2px; }

/* password field with a show / hide switch */
.pa-pass { position: relative; }
.pa-pass input { padding-right: 58px; }
.pa-pass__toggle {
  position: absolute;
  right: 0;
  bottom: 0;
  height: 38px;
  padding: 0 2px 0 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray);
}
.pa-pass__toggle:hover { color: var(--ink); }
.pa-rules { display: grid; gap: 4px; margin-top: 8px; font-size: 12px; line-height: 1.5; color: var(--soft); }
.pa-rules li { display: flex; align-items: center; gap: 8px; }
.pa-rules li::before { content: ""; width: 7px; height: 7px; border: 1px solid currentColor; flex: none; }
.pa-rules li.ok { color: var(--ink); }
.pa-rules li.ok::before { background: var(--ink); border-color: var(--ink); }

.field input.pa-code {
  height: 50px;
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 0.45em;
  font-variant-numeric: tabular-nums;
}

/* small text actions */
.pa-link,
.pp-link {
  display: inline;
  font-size: inherit;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  cursor: pointer;
}
.pa-link:hover,
.pp-link:hover { text-decoration-thickness: 2px; }
.pa-link:focus-visible,
.pp-link:focus-visible,
.pa-pass__toggle:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.pa-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  font-size: 14px;
  color: var(--gray);
}
/* a lone link sits on the right, where "Forgot password?" is on every step */
.pa-links__end { margin-left: auto; }
.pa-foot { margin-top: clamp(28px, 4vh, 40px); padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.7; color: var(--gray); }

/* notes and errors: monochrome, like the rest of the site */
.pa-msg { padding: 16px 18px; background: var(--panel); font-size: 14px; line-height: 1.6; color: var(--body-gray); }
.pa-msg strong { font-weight: 600; color: var(--ink); }
.pa-error {
  padding: 2px 0 2px 12px;
  border-left: 2px solid var(--ink);
  font-size: 13.5px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--ink);
}
.pa-error:empty { display: none; }
.pa-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pa-legal { font-size: 12.5px; line-height: 1.6; color: var(--gray); }

/* done: the site's drawn check */
.pa-done { margin-top: clamp(24px, 4vh, 36px); }
.pa-done h2 { font-family: var(--serif); font-weight: 400; font-size: var(--fs-sub); letter-spacing: 0.1em; text-transform: uppercase; line-height: 1.2; }
.pa-done p { font-size: 15px; line-height: 1.6; color: var(--body-gray); }

/* before the first answer from the server */
.pa--loading .pa__media { animation: ppPulse 1.6s ease-in-out infinite; }
@keyframes ppPulse { 50% { opacity: 0.6; } }

/* ---------- inside the portal ---------- */

.pp-head { padding-top: clamp(28px, 5vh, 52px); background: var(--white); }
.pp-head__row { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 20px 40px; }
.pp-head .label { margin-bottom: 8px; }
.pp-head h1.display { font-size: clamp(26px, 2.6vw, 38px); line-height: 1.12; }
.pp-who { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 13px; line-height: 1.5; color: var(--gray); text-align: right; }
.pp-who__name { color: var(--ink); font-weight: 600; }
.pp-who__actions { display: flex; gap: 20px; }

.pp-tabs {
  position: sticky;
  top: var(--header-h);
  z-index: 60;
  margin-top: clamp(20px, 3vh, 30px);
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
}
.pp-tabs__inner {
  display: flex;
  align-items: stretch;
  gap: clamp(22px, 2.6vw, 38px);
  overflow-x: auto;
  scrollbar-width: none;
}
.pp-tabs__inner::-webkit-scrollbar { display: none; }
.pp-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  flex: none;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 1.7px;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--gray);
  transition: color 0.25s;
}
.pp-tab:hover { color: var(--ink); }
.pp-tab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.pp-tab[aria-current="page"] { color: var(--ink); font-weight: 700; }
.pp-tab[aria-current="page"]::after { transform: scaleX(1); }
.pp-tab:focus-visible { outline: 2px solid var(--ink); outline-offset: -6px; }
.pp-tabs__sep { flex: none; width: 1px; margin: 15px 0; background: var(--line); }
.pp-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--ink);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
}

.pp-body { padding: clamp(28px, 4.5vh, 48px) 0 clamp(64px, 10vh, 104px); font-weight: 400; animation: paIn 0.5s var(--ease) both; }
.pp-section + .pp-section { margin-top: clamp(48px, 8vh, 80px); }
.pp-section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 40px;
  margin-bottom: clamp(18px, 3vh, 28px);
}
.pp-section__head .label { margin-bottom: 8px; }
.pp-section__head h2.display { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.2; }
.pp-section__head p { margin-top: 8px; max-width: 44em; font-size: 14px; line-height: 1.6; color: var(--body-gray); }
.pp-section__head .pp-actions { margin-top: 0; }

.pp-meta { font-size: 12px; font-weight: 400; letter-spacing: 0.15em; text-transform: uppercase; color: var(--taupe); }
.pp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; margin-top: 14px; }
.btn-box.pp-btn { height: 42px; padding: 0 24px; font-size: 12px; }
.btn-box.pp-btn--wide { padding: 0 36px; }
.btn-box[disabled] { opacity: 0.45; cursor: default; }
.btn-box[disabled]:hover { background: transparent; color: var(--ink); }
.btn-box:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.pp-textbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
}
.pp-textbtn:hover { text-decoration-thickness: 2px; }
.pp-textbtn:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.pp-textbtn--quiet { font-weight: 400; color: var(--gray); }
.pp-textbtn--quiet:hover { color: var(--ink); }

/* the catalogue: its cover on a panel, the facts beside it */
.pp-feature { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; gap: clamp(28px, 4.5vw, 80px); }
.pp-feature + .pp-feature { margin-top: clamp(40px, 6vh, 64px); }
.pp-feature__img {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 10;
  padding: clamp(24px, 4vw, 64px);
  background: var(--panel);
  overflow: hidden;
}
.pp-feature__img img { width: 100%; height: auto; box-shadow: 0 20px 44px -26px rgba(26, 24, 24, 0.45); transition: transform 1.1s var(--ease); }
.pp-feature:hover .pp-feature__img img { transform: scale(1.015); }
.pp-feature__body { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.pp-feature__body h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-sub);
  line-height: 1.15;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.pp-feature__body p { font-size: 15px; line-height: 1.6; color: var(--body-gray); max-width: 30em; }

/* price lists and other covers */
.pp-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 36px); }
.pp-card { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pp-card__img { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--panel); }
.pp-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.pp-card__img--doc { display: flex; align-items: center; justify-content: center; padding: 18px; }
.pp-card__img--doc img { width: auto; height: 100%; object-fit: contain; box-shadow: 0 14px 30px -20px rgba(26, 24, 24, 0.5); }
.pp-card:hover .pp-card__img img { transform: scale(1.03); }
.pp-card h3 { margin-top: 6px; font-size: 15px; font-weight: 600; line-height: 1.35; }
.pp-card p { font-size: 14px; line-height: 1.55; color: var(--body-gray); }
.pp-card .pp-actions { margin-top: 2px; gap: 8px 22px; }

/* file lists */
.pp-list { border-top: 1px solid var(--ink); }
.pp-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.pp-ext {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--white);
}
.pp-row__name { font-size: 15px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.pp-row__meta { margin-top: 3px; font-size: 14px; line-height: 1.5; color: var(--body-gray); }
.pp-row__actions { display: flex; align-items: center; gap: 18px; }
.pp-empty { padding: clamp(22px, 3vw, 32px); background: var(--panel); font-size: 15px; line-height: 1.65; color: var(--body-gray); }
.pp-empty strong { color: var(--ink); font-weight: 600; }

.pp-queue { display: grid; gap: 10px; }
.pp-queue:not(:empty) { margin: 12px 0; }
.pp-queue__item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; font-size: 13px; }
.pp-queue__name { font-weight: 600; overflow-wrap: anywhere; }
.pp-queue__state { color: var(--gray); }
.pp-queue__bar { grid-column: 1 / -1; height: 2px; background: var(--line); }
.pp-queue__bar i { display: block; width: 0; height: 100%; background: var(--ink); transition: width 0.2s linear; }
.pp-queue__state { text-align: right; }
.pp-queue__item.is-error .pp-queue__state { grid-column: 1 / -1; order: 3; text-align: left; color: var(--ink); font-weight: 600; }
.pp-check { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--body-gray); cursor: pointer; }
.pp-check input { width: 16px; height: 16px; accent-color: var(--ink); }

/* the studio page: its photo and how to reach it, then four photo steps */
.pp-visit { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 520px); align-items: center; gap: clamp(28px, 4vw, 56px); }
.pp-visit__img { aspect-ratio: 3 / 2; overflow: hidden; background: var(--panel); }
.pp-visit__img img { width: 100%; height: 100%; object-fit: cover; }
.pp-visit h2.display { margin-top: 8px; font-size: clamp(22px, 2vw, 30px); line-height: 1.2; }
.pp-visit__where { margin-top: 14px; font-size: 15px; line-height: 1.7; color: var(--body-gray); }
.pp-visit .pp-actions { margin-top: 22px; gap: 10px 14px; }
.pp-visit__note { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--gray); }
.pp-visit__note a { color: var(--ink); border-bottom: 1px solid currentColor; }
.pp-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); margin: 0; padding: 0; list-style: none; }
.pp-step { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pp-step__img { display: block; aspect-ratio: 4 / 3; margin-bottom: 10px; overflow: hidden; background: var(--panel); }
.pp-step__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.pp-step:hover .pp-step__img img { transform: scale(1.03); }
.pp-step__num { font-size: 11px; font-weight: 700; letter-spacing: 0.16em; color: var(--taupe); }
.pp-step h3 { font-size: 15px; font-weight: 600; line-height: 1.35; }
.pp-step p { font-size: 13.5px; line-height: 1.55; color: var(--body-gray); }
.pp-collections { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 36px); }
.pp-collections a { display: flex; flex-direction: column; gap: 12px; }
.pp-collections .pp-card__img img { transition: transform 1s var(--ease); }
.pp-collections a:hover .pp-card__img img { transform: scale(1.03); }
.pp-collections span { font-family: var(--serif); font-size: 18px; letter-spacing: 0.1em; text-transform: uppercase; }

/* ---------- the studio's admin views ---------- */

/* compact blocks: Admin, Library and every folder. A small caps title with its
   count over one ink rule, tools on the right, then tight rows */
.pp-block + .pp-block,
.pp-section + .pp-block,
.pp-block + .pp-section { margin-top: clamp(36px, 6vh, 56px); }
.pp-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 24px;
  min-height: 42px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--ink);
}
.pp-block__head h2 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.pp-block__head h2 svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.3; }
.pp-block__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  background: var(--line);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
}
.pp-block .pp-list { border-top: 0; }
.pp-quiet { padding: 12px 0; font-size: 14px; line-height: 1.55; color: var(--body-gray); }
.pp-quiet--box { margin-top: 12px; padding: 16px 18px; background: var(--panel); }
.pp-dot { margin: 0 8px; color: var(--soft); }
.pp-sub { display: block; font-size: 13px; color: var(--body-gray); }
.btn-box.pp-btn--sm { gap: 8px; height: 36px; padding: 0 16px; font-size: 12px; letter-spacing: 1.4px; }
.btn-box.pp-btn--sm svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; }

/* a request: who, how to reach them, what they wrote; its buttons at the end */
.pp-req { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 24px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.pp-req__who { font-size: 15px; line-height: 1.4; }
.pp-req__who strong { font-weight: 600; }
.pp-req__who span { color: var(--body-gray); }
.pp-req__meta { margin-top: 4px; font-size: 14px; line-height: 1.5; color: var(--body-gray); overflow-wrap: anywhere; }
.pp-req__meta > * { white-space: nowrap; }
.pp-req__meta > a[href^="mailto:"] { white-space: normal; }
.pp-req__meta a { color: var(--ink); border-bottom: 1px solid var(--dot); transition: border-color 0.2s; }
.pp-req__meta a:hover { border-bottom-color: var(--ink); }
.pp-req__msg { margin-top: 6px; max-width: 70em; font-size: 14px; line-height: 1.55; color: var(--body-gray); white-space: pre-wrap; overflow-wrap: anywhere; }
.pp-req__actions { display: flex; align-items: center; gap: 18px; }

/* the handled and filtered requests, folded under the waiting ones */
.pp-folds { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.pp-fold summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  cursor: pointer;
  list-style: none;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--body-gray);
  transition: color 0.2s;
}
.pp-fold summary::-webkit-details-marker { display: none; }
.pp-fold summary::before { content: "+"; width: 10px; font-weight: 400; letter-spacing: 0; }
.pp-fold[open] summary::before { content: "\2013"; }
.pp-fold summary:hover { color: var(--ink); }
.pp-fold summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.pp-fold[open] { padding-bottom: 12px; }
.pp-fold__note { margin: 2px 0 8px; font-size: 14px; line-height: 1.55; color: var(--body-gray); }

/* invite: labelled white boxes with a clear edge, on the light panel */
.pp-invite-panel { margin-top: 14px; padding: 18px 20px 20px; background: var(--panel); }
.pp-invite { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 170px) auto; align-items: end; gap: 12px; }
.pp-in { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pp-in span { font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--body-gray); }
.pp-invite input,
.pp-invite select,
.pp-tools input {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #b8b3ae;
  border-radius: 0;
  background: var(--white);
  font: inherit;
  font-size: 14px;
  color: var(--ink);
}
.pp-invite input::placeholder,
.pp-tools input::placeholder { color: #8a8a8a; }
.pp-invite input:focus,
.pp-invite select:focus,
.pp-tools input:focus { outline: none; border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.pp-invite .btn-box { height: 40px; background: var(--white); }
.pp-invite .btn-box:hover { background: var(--ink); }
.pp-invite-panel .pa-error { margin-top: 12px; }
.pp-block > .pa-error { margin-top: 10px; }
.pp-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.pp-tools input { width: 210px; height: 36px; }
.pp-filter { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.pp-filter button { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--body-gray); padding: 4px 0; border-bottom: 1px solid transparent; }
.pp-filter button[aria-pressed="true"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--ink); }

/* folders: the Library's tiles, then one folder at a time */
.pp-folders { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pp-folder {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 18px 20px 20px;
  border: 1px solid #d6d2ce;
  background: var(--white);
  color: var(--ink);
  transition: border-color 0.2s, background 0.2s;
}
.pp-folder:hover { border-color: var(--ink); background: var(--panel); }
.pp-folder:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.pp-folder svg { width: 30px; height: 30px; margin-bottom: 8px; fill: none; stroke: currentColor; stroke-width: 1.1; }
.pp-folder__name { font-size: 16px; font-weight: 600; }
.pp-folder__meta { font-size: 14px; line-height: 1.5; color: var(--body-gray); }
.pp-crumbs { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); }
.pp-crumbs a { color: var(--body-gray); transition: color 0.2s; }
.pp-crumbs a:hover { color: var(--ink); }
.pp-crumbs span[aria-hidden] { color: var(--soft); }
.pp-upload { display: flex; align-items: center; gap: 14px; }
.pp-upload__note { font-size: 13px; color: var(--body-gray); }
.pp-folderbox { transition: background 0.2s; }
.pp-folderbox.is-over { background: var(--panel); outline: 1px dashed var(--ink); outline-offset: 10px; }
.pp-folderbox > .pp-check { margin: 2px 0 6px; }

.pp-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.45; }
.pp-table th {
  padding: 0 14px 10px 0;
  border-bottom: 1px solid var(--ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-align: left;
  text-transform: uppercase;
  color: var(--taupe);
}
.pp-table td { padding: 14px 14px 14px 0; border-bottom: 1px solid var(--line); vertical-align: middle; overflow-wrap: anywhere; }
.pp-table td:last-child, .pp-table th:last-child { padding-right: 0; text-align: right; }
.pp-table tbody tr { cursor: pointer; transition: background 0.2s; }
.pp-table tbody tr:hover { background: var(--panel); }
.pp-table .pp-strong { font-weight: 600; }
.pp-table .pp-dim { color: var(--gray); }
.pp-table--static tbody tr { cursor: default; }
.pp-table--static tbody tr:hover { background: none; }
.pp-table--log td:last-child, .pp-table--log th:last-child { text-align: left; }
.pp-table--log td:first-child { white-space: nowrap; }
.pp-table--sm { font-size: 14px; }
.pp-table--sm th { padding: 14px 12px 8px 0; border-bottom-color: var(--line); font-size: 11px; color: var(--body-gray); }
.pp-table--sm td { padding: 12px 12px 12px 0; }

.pp-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border: 1px solid currentColor;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink);
}
.pp-badge--invited, .pp-badge--pending { color: var(--gray); }
.pp-badge--disabled, .pp-badge--declined { color: #767676; }
.pp-badge--admin { background: var(--ink); border-color: var(--ink); color: var(--white); }

.pp-person { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 96px); align-items: start; }
.pp-person dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 22px; font-size: 15px; line-height: 1.5; }
.pp-person dt { padding-top: 3px; font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--taupe); }
.pp-person dd { overflow-wrap: anywhere; }
.pp-person__actions { display: flex; flex-wrap: wrap; gap: 12px 26px; align-items: center; }
.pp-back { display: inline-flex; margin-bottom: 18px; }

.pp-events { border-top: 1px solid var(--ink); }
.pp-event { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.5; }
.pp-event time { color: var(--gray); font-variant-numeric: tabular-nums; }

/* a short message at the foot of the screen */
.pp-toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom, 0px));
  z-index: 160;
  max-width: min(560px, calc(100vw - 40px));
  padding: 14px 20px;
  background: var(--ink);
  color: var(--white);
  font-size: 14px;
  line-height: 1.5;
  opacity: 0;
  transform: translate(-50%, 14px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  pointer-events: none;
}
.pp-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* confirm and edit boxes */
.pp-dialog {
  margin: auto; /* main.css zeroes every margin; a modal centres itself with auto */
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 0;
  border-top: 2px solid var(--ink);
  color: var(--ink);
  background: var(--white);
  box-shadow: 0 30px 80px -30px rgba(26, 24, 24, 0.5);
}
.pp-dialog::backdrop { background: rgba(26, 24, 24, 0.45); }
.pp-dialog form { display: flex; flex-direction: column; gap: 1.3rem; padding: clamp(24px, 4vw, 34px); }
.pp-dialog h2 { font-family: var(--serif); font-weight: 400; font-size: 20px; line-height: 1.25; letter-spacing: 0.1em; text-transform: uppercase; }
.pp-dialog p { font-size: 15px; line-height: 1.6; color: var(--body-gray); }
.pp-dialog .pp-actions { justify-content: flex-end; margin-top: 6px; }
.pp-copy { display: flex; gap: 12px; align-items: stretch; }
.pp-copy input { flex: 1; min-width: 0; height: 42px; padding: 0 12px; border: 1px solid var(--line); background: var(--panel); font-size: 13px; color: var(--ink); }

/* ---------- responsive ---------- */

@media (max-width: 1100px) {
  .pp-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pp-invite { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pp-invite .btn-box { justify-self: start; }
  .pp-folders { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pp-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .pa { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .pa__media { height: clamp(200px, 34vh, 300px); }
  .pa__caption { bottom: 22px; }
  .pa__caption h2 { font-size: 20px; }
  .pa__caption p, .pa__caption ul { display: none; }
  .pa__panel { align-items: flex-start; padding: 36px var(--side) 64px; }
  .pa__inner { max-width: 520px; }
  .field input.pa-code { font-size: 22px; }

  .pp-who { align-items: flex-start; text-align: left; }
  .pp-tab { height: 50px; }
  .pp-feature { grid-template-columns: minmax(0, 1fr); }
  .pp-visit, .pp-person { grid-template-columns: minmax(0, 1fr); }
  .pp-collections { grid-template-columns: minmax(0, 1fr); }
  .pp-row { grid-template-columns: 40px minmax(0, 1fr); gap: 10px 14px; }
  .pp-row__actions { grid-column: 2; gap: 20px; }
  .pp-req { grid-template-columns: minmax(0, 1fr); }
  .pp-tools { width: 100%; }
  .pp-tools input { flex: 1; width: auto; }
  .pp-upload__note { display: none; }
  .pp-event { grid-template-columns: minmax(0, 1fr); gap: 2px; }

  /* tables become stacked rows */
  .pp-table thead { display: none; }
  .pp-table, .pp-table tbody, .pp-table tr, .pp-table td { display: block; width: 100%; }
  .pp-table tr { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .pp-table td { padding: 2px 0; border: 0; text-align: left !important; }
}

@media (max-width: 560px) {
  .pp-cards { grid-template-columns: minmax(0, 1fr); }
  .pp-invite { grid-template-columns: minmax(0, 1fr); }
  .pp-person dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .pp-person dd { margin-bottom: 8px; }
  .pp-folders { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .pa__media img, .pa__inner, .pp-body { animation: none; }
  .pa-reveal { transition: none; }
  .pp-busy::before { animation-duration: 3s; }
  .pp-card__img img, .pp-feature__img img, .pp-step__img img { transition: none; }
}
