/* ══════════════════════════════════════════════════════════════
   Keln — the Client Portal.

   This is the only page in the product a stranger sees. Most of
   them will never log in, never see the dashboard, and never learn
   what Keln is; they came to book a haircut. So the page has one
   job before it has any other: be obviously trustworthy and
   obviously finished in the first second.

   It inherits the product's sky, its serif, and its palette from
   theme.css — the same tokens the dashboard uses — and then does
   almost nothing else. No orbits, no cinema, no gamification. A
   booking page that performs is a booking page people abandon.

   Everything here is scoped under .kp so this file can never reach
   into the app's own pages.
   ══════════════════════════════════════════════════════════════ */

/* The only rule in this file that is not scoped under .kp, and it has
   to reach the html element: body.kp is height:100% and percentages
   resolve against the parent. The landing page now loads this
   stylesheet too — for the booking demo, which renders in real
   portal.css rather than a mockup of it — and the landing is a long
   scrolling page that must not have its body clamped to the
   viewport. So the html half is keyed to a class only the portal
   page sets. */
html.kp-root, body.kp { height: 100%; }

body.kp {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-xl);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* The sky. Fixed, behind everything, and non-interactive so it can
   never eat a tap meant for a slot button. */
.kp__sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* A soft gravity well behind the card, so the content sits IN the
   field rather than on top of it. */
.kp__glow {
  position: fixed;
  left: 50%;
  top: 38%;
  width: min(900px, 120vw);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(91, 140, 255, calc(.10 * var(--glow, 1))) 0%,
    rgba(34, 211, 166, calc(.05 * var(--glow, 1))) 38%,
    transparent 68%);
  z-index: 0;
  pointer-events: none;
}

/* ─── THE LOADING SCREEN ────────────────────────────────────────
   Short and honest. It covers the moment between "the page exists"
   and "the page knows whose page it is", which is a real wait — the
   business name and its services come from the network. Covering it
   with the mark is better than showing an empty card that then
   jumps. It removes itself; it never waits on a timer alone. */
.kp__boot {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity .5s ease, visibility .5s;
}
.kp__boot[data-done="1"] { opacity: 0; visibility: hidden; }

.kp__bootMark {
  display: grid;
  place-items: center;
  gap: 18px;
  text-align: center;
}
.kp__bootRing {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 1px solid var(--border);
  border-top-color: var(--accent2);
  animation: kp-spin 1.4s linear infinite;
}
.kp__bootName {
  font-family: var(--mono);
  font-size: var(--t-xs);
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--dim);
}
@keyframes kp-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .kp__bootRing { animation: none; border-top-color: var(--border); }
  .kp__boot { transition: none; }
}

/* ─── LAYOUT ──────────────────────────────────────────────────── */

.kp__wrap {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(28px, 6vw, 64px) 20px 80px;
}

.kp__head {
  display: flex;
  align-items: center;
  gap: var(--s-8);
  margin-bottom: 26px;
}
.kp__logo {
  width: 52px;
  height: 52px;
  border-radius: var(--r-md);
  object-fit: cover;
  border: 1px solid var(--border);
  flex: none;
  background: var(--bg2);
}
.kp__mark {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: radial-gradient(circle at 34% 30%,
    rgba(34, 211, 166, .30), rgba(91, 140, 255, .10) 60%, transparent 72%);
  font-family: var(--mono);
  font-size: var(--t-2xl);
  font-weight: 600;
  color: var(--accent2);
}
.kp__title { margin: 0; font-size: clamp(24px, 5vw, 34px); font-weight: 600; letter-spacing: -.01em; }
.kp__tagline { margin: var(--s-1) 0 0; color: var(--muted); font-size: 14.5px; }

.kp__card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: clamp(18px, 4vw, 28px);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}
.kp__card + .kp__card { margin-top: 18px; }

.kp__step {
  font-family: var(--mono);
  font-size: var(--t-2xs);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: var(--s-7);
}
.kp__h2 { margin: 0 0 var(--s-2); font-size: 19px; font-weight: 600; }
.kp__sub { margin: 0 0 18px; color: var(--muted); font-size: var(--t-md); }
.kp__intro {
  margin: 0 0 var(--s-9);
  padding: var(--s-7) var(--s-8);
  border-left: 2px solid var(--border-hi);
  color: var(--muted);
  font-size: 14.5px;
  background: rgba(34, 211, 166, .04);
  border-radius: 0 10px 10px 0;
}

/* ─── SERVICES ────────────────────────────────────────────────── */

.kp__services { display: grid; gap: var(--s-5); }
.kp__svc {
  display: flex;
  align-items: center;
  gap: var(--s-7);
  width: 100%;
  text-align: left;
  padding: 15px var(--s-8);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: rgba(13, 17, 23, .5);
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.kp__svc:hover { border-color: var(--border-hi); background: rgba(34, 211, 166, .05); }
.kp__svc[aria-pressed="true"] {
  border-color: var(--accent2);
  background: rgba(34, 211, 166, .08);
}
.kp__svc:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.kp__svcBody { flex: 1; min-width: 0; }
.kp__svcName { font-weight: 600; }
.kp__svcDesc { color: var(--muted); font-size: 13.5px; margin-top: var(--s-1); }
.kp__svcMeta {
  font-family: var(--mono);
  font-size: var(--t-sm);
  color: var(--muted);
  text-align: right;
  flex: none;
  white-space: nowrap;
}
.kp__svcPrice { color: var(--accent2); display: block; }

/* ─── DAYS AND SLOTS ──────────────────────────────────────────── */

/* The rail scrolls, and it has to LOOK like it scrolls. A row of
   days cut off flush at the card edge reads as the end of the list,
   and a client concludes there is nothing open next week. The mask
   fades the last few pixels so the row visibly continues. */
.kp__days {
  display: flex;
  gap: var(--s-4);
  overflow-x: auto;
  padding: var(--s-1) var(--s-1) var(--s-5);
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 34px), transparent 100%);
          mask-image: linear-gradient(to right, #000 calc(100% - 34px), transparent 100%);
}
/* Once the rail is scrolled to its end there is nothing more to
   hint at, and the fade would just dim a real day. */
.kp__days[data-end="1"] {
  -webkit-mask-image: none;
          mask-image: none;
}
.kp__day {
  flex: none;
  min-width: 82px;
  padding: var(--s-5) var(--s-6);
  border-radius: 11px;
  border: 1px solid var(--border);
  background: rgba(13, 17, 23, .5);
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  text-align: center;
  transition: border-color .18s ease, color .18s ease, background .18s ease;
}
.kp__day:hover { border-color: var(--border-hi); color: var(--ink); }
.kp__day[aria-pressed="true"] {
  border-color: var(--accent2);
  background: rgba(34, 211, 166, .08);
  color: var(--ink);
}
.kp__day:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.kp__dayDow {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--dim);
}
.kp__dayNum { display: block; font-size: 19px; font-weight: 600; line-height: 1.3; }
.kp__dayMon { display: block; font-family: var(--mono); font-size: var(--t-2xs); color: var(--dim); }
.kp__dayCount { display: block; font-family: var(--mono); font-size: 9.5px; color: var(--accent2); }

.kp__slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: var(--s-4);
  margin-top: var(--s-8);
}
.kp__slot {
  padding: 11px var(--s-4);
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(13, 17, 23, .5);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13.5px;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease;
}
.kp__slot:hover { border-color: var(--border-hi); background: rgba(34, 211, 166, .06); }
.kp__slot[aria-pressed="true"] { border-color: var(--accent2); background: rgba(34, 211, 166, .12); }
.kp__slot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.kp__tz {
  margin-top: var(--s-7);
  font-family: var(--mono);
  font-size: var(--t-xs);
  color: var(--dim);
}
.kp__tz b { color: var(--muted); font-weight: 500; }

/* ─── FORM ────────────────────────────────────────────────────── */

.kp__fields { display: grid; gap: var(--s-7); }
.kp__field { display: grid; gap: var(--s-3); }
.kp__label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.kp__label span { color: var(--hot); }
.kp__input,
.kp__textarea {
  width: 100%;
  box-sizing: border-box;
  padding: var(--s-6) var(--s-7);
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(10, 14, 20, .7);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-lg);
  transition: border-color .16s ease;
}
.kp__textarea { min-height: 92px; resize: vertical; font-family: var(--font); }
.kp__input:focus,
.kp__textarea:focus { outline: none; border-color: var(--accent); }
.kp__input[aria-invalid="true"],
.kp__textarea[aria-invalid="true"] { border-color: var(--hot); }

.kp__summary {
  display: grid;
  gap: var(--s-3);
  padding: 15px var(--s-8);
  border-radius: var(--r-md);
  border: 1px solid var(--border-hi);
  background: rgba(34, 211, 166, .05);
  margin-bottom: var(--s-9);
}
.kp__summaryRow { display: flex; justify-content: space-between; gap: var(--s-8); font-size: 14.5px; }
.kp__summaryRow b { font-weight: 600; }
.kp__summaryRow span { font-family: var(--mono); font-size: var(--t-base); color: var(--muted); }

.kp__cta {
  width: 100%;
  margin-top: var(--s-9);
  padding: var(--s-7) var(--s-9);
  border-radius: 11px;
  border: 1px solid var(--accent2);
  background: linear-gradient(180deg, rgba(34, 211, 166, .20), rgba(34, 211, 166, .10));
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-xl);
  font-weight: 600;
  cursor: pointer;
  transition: filter .18s ease, transform .12s ease;
}
.kp__cta:hover:not(:disabled) { filter: brightness(1.18); }
.kp__cta:active:not(:disabled) { transform: translateY(1px); }
.kp__cta:disabled { opacity: .45; cursor: not-allowed; }
.kp__cta:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.kp__ghost {
  padding: 9px var(--s-8);
  border-radius: 9px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-family: var(--font);
  font-size: var(--t-md);
  cursor: pointer;
  transition: color .16s ease, border-color .16s ease;
}
.kp__ghost:hover { color: var(--ink); border-color: var(--border-hi); }
.kp__ghost:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.kp__pay {
  display: inline-block;
  margin-top: var(--s-7);
  padding: var(--s-6) var(--s-9);
  border-radius: 10px;
  border: 1px solid var(--gold);
  background: rgba(255, 209, 102, .10);
  color: var(--gold);
  font-weight: 600;
  text-decoration: none;
}
.kp__pay:hover { background: rgba(255, 209, 102, .18); }

/* Anchors that read as buttons need the button's box, or "Add to
   calendar" sits half a line below "View my appointments". */
a.kp__ghost { display: inline-block; text-decoration: none; }
.kp__doneActs { display: flex; gap: var(--s-5); flex-wrap: wrap; margin-top: var(--s-7); }

.kp__summaryRow--hint { color: var(--dim); }
.kp__summaryRow--hint span { font-size: var(--t-sm); }
.kp__apptHint { color: var(--dim); font-family: var(--mono); font-size: 11.5px; margin-top: var(--s-1); }
.kp__apptActs { display: flex; gap: var(--s-4); flex-wrap: wrap; }

/* Paying is the one action on an appointment with a deadline, so it
   is the one ghost button with colour. Paid and overdue are words in
   the meta line rather than more badges beside the status tag. */
.kp__ghost--pay { color: var(--accent2); border-color: var(--accent2); }
.kp__paid { color: var(--accent2); }
.kp__owed { color: var(--hot); }

/* The move picker, opened inline under the appointment it belongs
   to rather than in a modal — a client on a phone should never lose
   sight of which appointment they are moving. */
.kp__move {
  min-width: 0;
  max-width: 100%;
  margin: -4px 0 var(--s-3);
  padding: var(--s-8);
  border-radius: var(--r-md);
  border: 1px solid var(--border-hi);
  background: rgba(34, 211, 166, .04);
}
.kp__moveHead {
  font-family: var(--mono);
  font-size: var(--t-2xs);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: var(--s-6);
}
.kp__move .kp__slots { margin-top: var(--s-6); }

.kp__msg {
  margin-top: var(--s-7);
  padding: 11px var(--s-7);
  border-radius: 10px;
  font-size: var(--t-md);
  display: none;
}
.kp__msg[data-on="1"] { display: block; }
.kp__msg[data-kind="err"] { background: rgba(255, 107, 139, .10); border: 1px solid rgba(255, 107, 139, .35); color: #ffc2ce; }
.kp__msg[data-kind="ok"]  { background: rgba(34, 211, 166, .10); border: 1px solid var(--border-hi); color: var(--accent2); }

/* ─── APPOINTMENTS ────────────────────────────────────────────── */

/* minmax(0, 1fr), not the default `auto`. A grid item's automatic
   minimum size is its CONTENT, so the horizontally-scrolling day
   rail inside the move picker was making this column wider than the
   card, the card wider than the page, and the whole layout burst its
   banks — the scroll container never got a chance to scroll because
   nothing was ever constraining it. */
.kp__appts { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-5); }
.kp__appt {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: var(--s-8);
  padding: 15px var(--s-8);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: rgba(13, 17, 23, .5);
}
.kp__appt[data-status="cancelled"] { opacity: .5; }
.kp__appt[data-past="1"] { opacity: .68; }
.kp__apptWhen {
  font-family: var(--mono);
  font-size: var(--t-sm);
  color: var(--muted);
  text-align: center;
  flex: none;
  min-width: 62px;
}
.kp__apptWhen b { display: block; font-size: 20px; color: var(--ink); font-weight: 600; }
.kp__apptBody { flex: 1; min-width: 0; }
.kp__apptMeta, .kp__apptName { overflow-wrap: anywhere; }
.kp__apptName { font-weight: 600; }
.kp__apptMeta { color: var(--muted); font-size: 13.5px; font-family: var(--mono); }
.kp__tag {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 3px var(--s-4);
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  white-space: nowrap;
}
.kp__tag[data-status="booked"]    { color: var(--accent2); border-color: var(--border-hi); }
.kp__tag[data-status="pending"]   { color: var(--gold);    border-color: rgba(255, 209, 102, .4); }
.kp__tag[data-status="cancelled"] { color: var(--hot);     border-color: rgba(255, 107, 139, .35); }

.kp__empty {
  padding: 34px var(--s-9);
  text-align: center;
  color: var(--dim);
  font-size: 14.5px;
}

.kp__foot {
  margin-top: 34px;
  text-align: center;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim);
}
.kp__foot a { color: var(--muted); text-decoration: none; }
.kp__foot a:hover { color: var(--accent2); }

.kp__captcha { margin-top: 18px; min-height: 0; }

/* Screen-reader-only, for the live region that announces how many
   slots appeared when a day is chosen. Without it, a change that is
   entirely visual is silent to anyone not looking at the grid. */
.kp__sr {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

[hidden] { display: none !important; }

@media (max-width: 520px) {
  .kp__wrap { padding-left: var(--s-7); padding-right: var(--s-7); }
  .kp__summaryRow { flex-direction: column; gap: var(--s-1); }
  .kp__appt { flex-wrap: wrap; }
}

/* ══ DOCUMENTS AND SIGNING ═══════════════════════════════════ */

.kp__doc-row {
  display: flex; align-items: center; gap: var(--s-6);
  padding: var(--s-7) 0;
  border-bottom: 1px solid var(--border);
}
.kp__doc-row:last-child { border-bottom: 0; }
.kp__doc-main { flex: 1; min-width: 0; }
.kp__doc-t { color: var(--ink); font-weight: 600; font-size: var(--t-md); }
.kp__doc-m { color: var(--gold); font-size: var(--t-xs); margin-top: var(--s-1); }

/* The document itself. Scrolls inside its own box so the agree
   button never sits above an unread wall of text off-screen. */
.kp__doc {
  max-height: 320px; overflow-y: auto;
  border: 1px solid var(--border); border-radius: var(--r-md);
  padding: var(--s-9);
  margin: var(--s-8) 0;
  background: rgba(0,0,0,.22);
  color: var(--muted); font-size: var(--t-md); line-height: 1.7;
  white-space: pre-wrap; word-break: break-word;
}
.kp__doc:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; }

.kp__sign { margin-bottom: var(--s-8); }
.kp__signF { display: block; margin-bottom: var(--s-8); }
.kp__signF > span {
  display: block; font-size: var(--t-sm); color: var(--muted);
  margin-bottom: var(--s-4);
}
.kp__signF input {
  width: 100%; font-family: var(--font); font-size: var(--t-md); color: var(--ink);
  background: rgba(0,0,0,.22); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: var(--s-6) var(--s-7);
}
.kp__signF input:focus { outline: none; border-color: var(--border-hi); }

.kp__signMode { display: flex; gap: var(--s-5); margin-bottom: var(--s-7); }
.kp__signMode .is-on { border-color: var(--accent2); color: var(--accent2); }

/* White, because a signature is ink on paper and because the image
   is shown back to the operator on a light card. touch-action:none
   so a finger draws instead of scrolling the page away. */
.kp__pad {
  display: block; width: 100%; height: 160px;
  background: #fff; border-radius: var(--r-sm);
  border: 1px solid var(--border);
  touch-action: none; cursor: crosshair;
}
.kp__padActs {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-6); margin-top: var(--s-5); flex-wrap: wrap;
}
.kp__padHint { color: var(--dim); font-size: var(--t-2xs); }

.kp__typed {
  min-height: 64px; display: flex; align-items: center;
  padding: var(--s-6) var(--s-8);
  background: #fff; border-radius: var(--r-sm); border: 1px solid var(--border);
  color: #0b0b0d; font-size: var(--t-4xl);
  font-family: Georgia, 'Times New Roman', serif;
  overflow: hidden; word-break: break-word;
}

.kp__consent {
  color: var(--muted); font-size: var(--t-sm); line-height: 1.6;
  margin-bottom: var(--s-8);
}

/* Purely factual — what's captured, not legal opinion — so the
   product isn't collecting more than the signer was told about.
   See docs/waiver-legal-review.md for what still needs a lawyer's
   wording pass alongside this. */
.kp__notice {
  color: var(--dim); font-size: var(--t-xs); line-height: 1.55;
  margin-bottom: var(--s-8);
}

/* ── Signing inside a PDF ────────────────────────────────────── */
.kp__pdfHint {
  color: var(--muted); font-size: var(--t-sm); line-height: 1.6;
  margin-bottom: var(--s-6);
}
#kpPdfWrap .pdfv {
  max-height: 68vh;
  overflow: auto;
  padding: var(--s-6);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: rgba(6, 10, 16, .4);
  margin-bottom: var(--s-8);
}

/* The pad, opened over the document rather than below it. Losing
   your place in a waiver in order to sign it is a small cruelty,
   and on a phone the scroll back is not small. */
.kp__padModal {
  position: fixed; inset: 0; z-index: 1200;
  background: rgba(4, 6, 10, .72);
  display: grid; place-items: center;
  padding: var(--s-8);
}
.kp__padBox {
  width: min(520px, 100%);
  background: var(--panel);
  border: 1px solid var(--border-hi);
  border-radius: var(--r-lg);
  padding: var(--s-9);
  box-shadow: 0 var(--s-10) var(--s-12) rgba(0, 0, 0, .55);
}
.kp__padT {
  font-weight: 600; color: var(--ink);
  font-size: var(--t-md); margin-bottom: var(--s-6);
}
.kp__padBox .kp__pad {
  width: 100%; height: 180px;
  background: #fff; border-radius: var(--r-sm);
  touch-action: none; cursor: crosshair;
  display: block;
}
.kp__padBox .kp__padActs {
  display: flex; gap: var(--s-5); align-items: center;
  justify-content: flex-end; margin-top: var(--s-7); flex-wrap: wrap;
}
.kp__padDone { width: auto; padding: var(--s-5) var(--s-9); }

/* Who the agreement is with. Given a visible edge rather than being
   another line of grey small print — it is the one sentence on this
   page a signer might need to point at later, and it should not
   read as boilerplate they have already scrolled past. */
.kp__party {
  color: var(--muted); font-size: var(--t-sm); line-height: 1.6;
  border-left: 2px solid var(--border-hi);
  padding: var(--s-4) 0 var(--s-4) var(--s-6);
  margin-bottom: var(--s-8);
}

/* A real checkbox, sized to be hit with a thumb. Agreeing to sign
   electronically is a separate act from agreeing to the document,
   so it gets its own control rather than being folded into the
   button. */
.kp__esign {
  display: flex; align-items: flex-start; gap: var(--s-6);
  color: var(--muted); font-size: var(--t-sm); line-height: 1.6;
  margin-bottom: var(--s-8); cursor: pointer;
}
.kp__esign input {
  flex: 0 0 auto; width: 20px; height: 20px; margin-top: 1px;
  accent-color: var(--accent2); cursor: pointer;
}
.kp__esign:hover { color: var(--ink); }

@media (max-width: 560px) {
  .kp__doc-row { flex-wrap: wrap; }
  .kp__doc-main { flex-basis: 100%; }
}

/* ── Session packs ─────────────────────────────────────────── */
.kp__packs { display: grid; gap: var(--s-5); }
.kp__packForm { margin-top: var(--s-9); }
.kp__pack {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s-4) var(--s-8);
  align-items: center;
  padding: var(--s-7) var(--s-8);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.kp__pack[data-state="used_up"], .kp__pack[data-state="expired"] { opacity: .6; }
.kp__pack .kp__ghost--pay { grid-column: 1 / -1; justify-self: start; }
.kp__packLeft { text-align: right; line-height: 1.1; }
.kp__packLeft b { display: block; font-size: var(--t-3xl); color: var(--ink); }
.kp__packLeft span { font-size: var(--t-xs); color: var(--muted); }
.kp__pack[data-state="active"] .kp__packLeft b { color: var(--accent2); }

/* Back to the client account, when the page was opened from one. */
.kp__account {
  display: inline-block;
  margin: 0 0 var(--s-9);
  font-family: var(--mono);
  font-size: var(--t-xs);
  letter-spacing: .06em;
  color: var(--muted);
  text-decoration: none;
}
.kp__account:hover { color: var(--ink); }
.kp__account[hidden] { display: none; }
