/* The advertiser portal (routes/sponsor.js) and the admin's ad screens
   (routes/admin-ads.js). Loaded only on those pages (layout.njk, portalCss),
   on top of kcbs.css, whose tokens and components it builds on. */

/* ---------- the frame: who you are, and the tabs ---------- */
.pt-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px;
  margin: 6px 0 14px;
}
.pt-eyebrow {
  font-family: "Oswald", sans-serif; font-size: .78rem; letter-spacing: 2px; text-transform: uppercase;
  color: var(--ember-2); margin-bottom: 2px;
}
.pt-head h1 { margin: 0; line-height: 1.05; }
.pt-who { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .88rem; }
.pt-who b { color: var(--text); font-weight: 600; }
.pt-who form { display: inline; }
.pt-tabs {
  display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 0 22px;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.pt-tabs::-webkit-scrollbar { display: none; }
.pt-tabs a {
  position: relative; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 12px 16px 13px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem;
  border-bottom: 2px solid transparent; margin-bottom: -1px; min-height: 44px;
}
.pt-tabs a:hover { color: var(--text); }
.pt-tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--ember); }
/* on a phone the five tabs wrap as pills rather than scroll, so none is out of sight */
@media (max-width: 620px) {
  .pt-tabs { flex-wrap: wrap; gap: 6px; border-bottom: 0; overflow: visible; }
  .pt-tabs a {
    padding: 8px 14px; min-height: 40px; margin: 0; border: 1px solid var(--line); border-radius: 999px;
    background: rgba(255,255,255,.04); font-size: .9rem;
  }
  .pt-tabs a[aria-current="page"] { background: var(--flame-grad); border-color: transparent; color: #fff; }
  .pt-tabs a[aria-current="page"] .pt-badge { background: #fff; color: var(--flame); }
}
.pt-badge {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--flame-grad); color: #fff; font-size: .72rem; font-weight: 700; line-height: 1;
}
.pt-badge.quiet { background: rgba(255,255,255,.1); color: var(--text); }
.pt-section { margin: 30px 0; }
.pt-section > h2:first-child { margin-top: 0; }
.pt-sub { color: var(--muted); margin: -4px 0 14px; max-width: 72ch; }
.pt-card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px;
}
.pt-card h2, .pt-card h3 { margin-top: 0; }
.pt-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 18px; }
.pt-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.pt-empty {
  border: 1px dashed rgba(255,255,255,.16); border-radius: 16px; padding: 28px 24px; text-align: center; color: var(--muted);
}
.pt-empty h3 { color: var(--text); margin: 0 0 6px; }
.pt-empty .pt-actions { justify-content: center; }
.pt-note { color: var(--muted); font-size: .86rem; }
.pt-note b { color: var(--text); }

/* ---------- the headline numbers ---------- */
.pt-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 14px; margin: 6px 0 8px; }
.pt-kpi {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, rgba(255,122,24,.08), rgba(255,255,255,.015) 55%), var(--bg-2);
  border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px 14px;
}
.pt-kpi-label { font-family: "Oswald", sans-serif; font-size: .78rem; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); }
.pt-kpi-value {
  font-family: "Oswald", sans-serif; font-weight: 700; font-size: clamp(2rem, 3.4vw, 2.6rem); line-height: 1.1; margin: 4px 0 2px;
  background: var(--flame-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  font-variant-numeric: tabular-nums;
}
.pt-kpi-sub { color: var(--muted); font-size: .84rem; }
.pt-kpi svg.pt-spark { display: block; width: 100%; height: 34px; margin-top: 10px; }
.pt-spark polyline { fill: none; stroke: var(--ember-2); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.pt-spark polygon { fill: rgba(255,122,24,.12); stroke: none; }
.pt-delta {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; padding: 2px 9px; border-radius: 999px;
  font-size: .76rem; font-weight: 600; border: 1px solid var(--line); color: var(--muted);
}
.pt-delta.up { color: var(--ok); border-color: rgba(139,191,74,.45); background: rgba(139,191,74,.08); }
.pt-delta.down { color: var(--muted); }
.pt-range { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 14px; }
.pt-range a {
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.04);
  color: var(--text); text-decoration: none; font-size: .86rem; min-height: 36px; display: inline-flex; align-items: center;
}
.pt-range a:hover { background: rgba(255,255,255,.09); }
.pt-range a[aria-current="true"] { background: var(--flame-grad); border-color: transparent; color: #fff; }
.pt-range .fine { margin-left: 6px; }

/* ---------- good news ---------- */
/* a wrapping row whose last line stretches, so an odd count never leaves
   one card stranded beside a gap */
.pt-highlights { display: flex; flex-wrap: wrap; gap: 12px; }
.pt-hl {
  flex: 1 1 250px;
  display: grid; grid-template-columns: 42px 1fr; gap: 12px; align-items: start;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px;
}
.pt-hl-icon {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.15rem;
  background: rgba(255,122,24,.12); color: var(--ember-2);
}
.pt-hl h3 { font-size: .8rem; font-family: "Oswald", sans-serif; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); margin: 0 0 3px; }
.pt-hl p { margin: 0; font-size: .98rem; line-height: 1.4; }
.pt-hl .fine { display: block; margin-top: 3px; }

/* ---------- getting started ---------- */
.pt-steps { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 6px 0 0; counter-reset: step; }
.pt-steps li {
  position: relative; padding: 14px 14px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-3);
  counter-increment: step; font-weight: 600; font-size: .92rem;
}
.pt-steps li::before {
  content: counter(step); display: grid; place-items: center; width: 28px; height: 28px; margin-bottom: 8px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.2); color: var(--muted); font-size: .8rem;
}
.pt-steps li.done { border-color: rgba(255,122,24,.35); }
.pt-steps li.done::before { content: "✓"; background: var(--flame-grad); border-color: transparent; color: #fff; }
.pt-steps li.next { border-color: var(--ember-2); box-shadow: 0 0 0 1px rgba(255,122,24,.35) inset; }
.pt-steps li a { color: inherit; text-decoration: none; }
.pt-steps li a::after { content: ""; position: absolute; inset: 0; }
.pt-steps .fine { display: block; font-weight: 400; margin-top: 2px; }
@media (max-width: 760px) { .pt-steps { grid-template-columns: 1fr 1fr; } }

/* ---------- campaigns ---------- */
.pt-campaigns { display: grid; gap: 14px; }
.pt-campaign {
  display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 18px; align-items: start;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; padding: 18px;
}
.pt-campaign h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 4px; font-size: 1.08rem; }
.pt-thumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.pt-thumbs img, .pt-thumb {
  display: block; max-width: 100%; max-height: 90px; border-radius: 6px; border: 1px solid var(--line);
  background: repeating-conic-gradient(#222 0 25%, #2a2a2a 0 50%) 0 0 / 16px 16px;
}
.pt-thumbs .pt-noart {
  display: grid; place-items: center; width: 100%; min-height: 80px; border: 1px dashed rgba(255,255,255,.18); border-radius: 10px;
  color: var(--muted); font-size: .85rem; text-align: center; padding: 10px;
}
.pt-progress { height: 8px; border-radius: 999px; background: rgba(255,255,255,.07); overflow: hidden; margin: 10px 0 4px; max-width: 440px; }
.pt-progress > span { display: block; height: 100%; background: var(--flame-grad); border-radius: inherit; }
.pt-nums { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: .92rem; }
.pt-nums b { font-family: "Oswald", sans-serif; font-size: 1.15rem; font-weight: 600; margin-right: 3px; font-variant-numeric: tabular-nums; }
.pt-nums span { color: var(--muted); }
@media (max-width: 640px) { .pt-campaign { grid-template-columns: 1fr; } }

/* ---------- the audience ---------- */
.pt-audience { display: flex; flex-wrap: wrap; gap: 12px; }
.pt-aud { flex: 1 1 190px; background: var(--bg-3); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.pt-aud b { display: block; font-family: "Oswald", sans-serif; font-size: 1.7rem; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pt-aud span { color: var(--muted); font-size: .88rem; }

/* ---------- breakdown bars ---------- */
.pt-bars { list-style: none; display: grid; gap: 10px; margin: 0; }
.pt-bars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; font-size: .92rem; }
.pt-bars .bar { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: rgba(255,255,255,.06); overflow: hidden; }
.pt-bars .bar > span { display: block; height: 100%; background: var(--flame-grad); border-radius: inherit; }
.pt-bars em { font-style: normal; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- artwork ---------- */
.pt-drop {
  position: relative; display: grid; place-items: center; text-align: center; gap: 6px;
  border: 2px dashed rgba(255,255,255,.18); border-radius: 18px; padding: 30px 20px; min-height: 190px;
  background: rgba(255,255,255,.02); transition: border-color .15s, background .15s; cursor: pointer;
}
.pt-drop:hover, .pt-drop.over { border-color: var(--ember-2); background: rgba(255,122,24,.06); }
.pt-drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.pt-drop-empty { display: grid; gap: 6px; justify-items: center; }
.pt-drop-icon { font-size: 2rem; line-height: 1; color: var(--ember-2); }
.pt-drop strong { font-size: 1.05rem; }
.pt-drop .fine { max-width: 46ch; }
.pt-drop-preview { display: none; gap: 14px; align-items: center; justify-items: center; }
.pt-drop.has-file .pt-drop-empty { display: none; }
.pt-drop.has-file .pt-drop-preview { display: grid; }
.pt-drop-preview img {
  max-width: 100%; max-height: 220px; border-radius: 8px; border: 1px solid var(--line);
  background: repeating-conic-gradient(#222 0 25%, #2a2a2a 0 50%) 0 0 / 16px 16px;
}
.pt-check { font-size: .9rem; }
.pt-check.ok { color: var(--ok); }
.pt-check.warn { color: var(--gold); }
.pt-check.bad { color: #f0a2a2; }
.pt-formats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 10px; margin: 14px 0 0; }
.pt-format { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--bg-3); }
.pt-format-shape { display: block; background: rgba(255,122,24,.16); border: 1px solid rgba(255,122,24,.45); border-radius: 3px; margin-bottom: 10px; }
.pt-format b { display: block; }
.pt-format span { color: var(--muted); font-size: .84rem; display: block; }
.pt-art-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 14px; }
.pt-art {
  display: grid; grid-template-rows: auto 1fr; background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
}
.pt-art-img {
  display: grid; place-items: center; min-height: 150px; padding: 14px;
  background: repeating-conic-gradient(#1c1c20 0 25%, #232328 0 50%) 0 0 / 18px 18px;
}
.pt-art-img img { max-width: 100%; max-height: 220px; width: auto; height: auto; display: block; }
.pt-art-body { padding: 14px 16px 16px; display: grid; gap: 6px; align-content: start; }
.pt-art-body h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-size: 1rem; word-break: break-word; }
.pt-art-body .pt-actions { margin-top: 6px; }
.pt-reject { border-left: 3px solid var(--err); padding: 6px 10px; background: rgba(224,82,82,.08); border-radius: 0 8px 8px 0; font-size: .88rem; }
.pt-art-picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 10px 14px; }

/* ---------- buying space ---------- */
.pt-buy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: 26px; align-items: start; }
@media (max-width: 980px) { .pt-buy { grid-template-columns: 1fr; } }
.pt-step-h { display: flex; align-items: center; gap: 12px; margin: 26px 0 12px; }
.pt-step-h:first-child { margin-top: 0; }
.pt-step-h span {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: var(--flame-grad); color: #fff; font-weight: 700; font-size: .9rem;
}
.pt-step-h h2 { margin: 0; font-size: 1.25rem; }
.pt-spaces { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 12px; }
.pt-space { position: relative; display: block; margin: 0; cursor: pointer; font-weight: 400; }
.pt-space input { position: absolute; opacity: 0; pointer-events: none; }
.pt-space-box {
  display: grid; gap: 6px; height: 100%; padding: 16px 16px 14px; border-radius: 16px; border: 1px solid var(--line);
  background: var(--bg-2); transition: border-color .15s, box-shadow .15s, transform .15s;
}
.pt-space:hover .pt-space-box { border-color: rgba(255,255,255,.22); transform: translateY(-1px); }
.pt-space input:checked + .pt-space-box { border-color: var(--ember); box-shadow: 0 0 0 1px var(--ember) inset, 0 10px 30px rgba(255,77,0,.14); }
.pt-space input:focus-visible + .pt-space-box { outline: 2px solid var(--ember-2); outline-offset: 2px; }
.pt-space input:disabled + .pt-space-box { opacity: .5; cursor: not-allowed; transform: none; }
.pt-space-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.pt-space-top b { font-size: 1.02rem; }
.pt-tick {
  flex: none; width: 22px; height: 22px; border-radius: 6px; border: 1px solid rgba(255,255,255,.3);
  display: grid; place-items: center; font-size: .8rem; color: transparent;
}
.pt-space input:checked + .pt-space-box .pt-tick { background: var(--flame-grad); border-color: transparent; color: #fff; }
.pt-price { font-family: "Oswald", sans-serif; font-size: 1.5rem; font-weight: 600; }
.pt-price small { font-family: "Inter", sans-serif; font-size: .8rem; color: var(--muted); font-weight: 400; }
.pt-space-box .fine { line-height: 1.45; }
.pt-avail { font-size: .82rem; font-weight: 600; }
.pt-avail.open { color: var(--ok); }
.pt-avail.few { color: var(--gold); }
.pt-avail.full { color: #f0a2a2; }
.pt-when { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 0 16px; }
.pt-weeks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.pt-weeks label { margin: 0; font-weight: 400; }
.pt-weeks input { position: absolute; opacity: 0; pointer-events: none; }
.pt-weeks span {
  display: inline-grid; justify-items: center; padding: 8px 14px; min-width: 64px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg-3); cursor: pointer; font-weight: 600; line-height: 1.2;
}
.pt-weeks span small { font-weight: 400; color: var(--muted); font-size: .72rem; }
.pt-weeks input:checked + span { border-color: var(--ember); box-shadow: 0 0 0 1px var(--ember) inset; }
.pt-weeks input:focus-visible + span { outline: 2px solid var(--ember-2); outline-offset: 2px; }
.pt-summary { position: sticky; top: calc(var(--head-h) + 16px); }
.pt-summary h2 { font-size: 1.15rem; }
.pt-lines { list-style: none; margin: 10px 0; display: grid; gap: 8px; }
.pt-lines li { display: flex; justify-content: space-between; gap: 12px; font-size: .92rem; }
.pt-lines li span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pt-lines .muted { color: var(--muted); }
.pt-total {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-top: 1px solid var(--line);
  padding-top: 12px; margin-top: 4px;
}
.pt-total b { font-family: "Oswald", sans-serif; font-size: 1.8rem; font-variant-numeric: tabular-nums; }
.pt-summary .btn { width: 100%; justify-content: center; margin-top: 14px; }
.pt-dates { color: var(--muted); font-size: .88rem; }
.pt-closed { text-align: center; padding: 40px 20px; }

/* ---------- forms ---------- */
.pt-form fieldset { border: 0; margin: 0 0 8px; padding: 0; min-width: 0; }
/* a legend floated so it sits inside its fieldset's box, not on its border */
.pt-form legend { float: left; width: 100%; padding: 0; font-family: "Oswald", sans-serif; font-size: 1.15rem; letter-spacing: .6px; text-transform: uppercase; margin-bottom: 4px; }
.pt-form legend + * { clear: both; }
.pt-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.pt-fields .wide { grid-column: 1 / -1; }
@media (max-width: 620px) { .pt-fields { grid-template-columns: 1fr; } }
.pt-form label { margin: 10px 0; }
.pt-form .pt-weeks label, .pt-form label.pt-space { margin: 0; }
.pt-opt { color: var(--muted); font-weight: 400; font-size: .82rem; }
.pt-err { display: block; color: #f2b8b8; font-size: .84rem; font-weight: 400; margin-top: 5px; }
.pt-form [aria-invalid="true"] { border-color: var(--err); box-shadow: 0 0 0 1px var(--err) inset; }
.pt-pw { position: relative; display: block; }
.pt-pw input { padding-right: 76px; }
.pt-pw-toggle {
  position: absolute; right: 6px; top: calc(50% + 2px); transform: translateY(-50%); min-height: 34px; padding: 0 10px;
  background: rgba(255,255,255,.06); border: 1px solid var(--line); border-radius: 8px; color: var(--text);
  font: inherit; font-size: .8rem; cursor: pointer;
}
.pt-pw-toggle:hover { background: rgba(255,255,255,.12); }
.pt-meter { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: .8rem; color: var(--muted); }
.pt-meter-bar { flex: 1; max-width: 220px; height: 6px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.pt-meter-bar span { display: block; height: 100%; width: 0; border-radius: inherit; transition: width .2s, background .2s; background: var(--err); }
.pt-meter[data-score="2"] .pt-meter-bar span { background: var(--gold); }
.pt-meter[data-score="3"] .pt-meter-bar span, .pt-meter[data-score="4"] .pt-meter-bar span { background: var(--ok); }

/* ---------- signing in ---------- */
.pt-login {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); max-width: 940px; margin: 34px auto 20px;
  border: 1px solid var(--line); border-radius: 22px; overflow: hidden; background: var(--bg-2);
}
.pt-login-form { padding: 34px clamp(22px, 4vw, 40px); }
.pt-login-form h1 { margin: 0 0 6px; }
.pt-login-side {
  padding: 34px clamp(22px, 4vw, 40px); display: grid; align-content: center; gap: 16px;
  background: radial-gradient(120% 90% at 100% 0%, rgba(255,90,31,.35), transparent 60%), linear-gradient(160deg, #1d1410, #121214);
  border-left: 1px solid var(--line);
}
.pt-login-side h2 { margin: 0; font-size: 1.6rem; line-height: 1.15; }
.pt-login-side ul { list-style: none; display: grid; gap: 12px; margin: 0; }
.pt-login-side li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; color: #e6dfd6; }
.pt-login-side li span { font-size: 1.1rem; }
.pt-login .btn-primary { width: 100%; justify-content: center; margin-top: 6px; }
.pt-login details { margin-top: 16px; color: var(--muted); font-size: .9rem; }
.pt-login summary { cursor: pointer; color: var(--ember-2); }
@media (max-width: 760px) {
  .pt-login { grid-template-columns: 1fr; margin-top: 16px; }
  .pt-login-side { border-left: 0; border-top: 1px solid var(--line); }
}

/* ---------- the welcome wizard ---------- */
.wz { max-width: 760px; margin: 10px auto 30px; }
.wz-head { text-align: center; margin-bottom: 18px; }
.wz-head h1 { margin: 0 0 6px; }
.wz-steps { list-style: none; display: flex; justify-content: center; gap: 8px; margin: 18px 0 22px; flex-wrap: wrap; }
.wz-steps li {
  display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--muted); font-size: .88rem; font-weight: 600;
}
.wz-steps li b {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.08); color: var(--text); font-size: .8rem;
}
.wz-steps li.on { color: var(--text); border-color: var(--ember-2); }
.wz-steps li.on b, .wz-steps li.done b { background: var(--flame-grad); color: #fff; }
.pt-form .wz-panel { background: var(--bg-2); border: 1px solid var(--line); border-radius: 18px; padding: 22px clamp(18px, 3vw, 30px) 24px; margin-bottom: 14px; }
.wz-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; }
.wz-nav .btn-primary { margin-left: auto; }
.wz.stepped .wz-panel:not(.on) { display: none; }
.wz.stepped .wz-only-nojs { display: none; }
.wz-only-js { display: none; }
.wz.stepped .wz-only-js { display: flex; }

/* ---------- handing over a sign-in ---------- */
.pt-handover {
  border: 1px solid rgba(139,191,74,.45); background: rgba(139,191,74,.07); border-radius: 16px; padding: 18px 20px; margin: 14px 0 20px;
}
.pt-handover h2 { margin: 0 0 6px; font-size: 1.15rem; }
.pt-cred { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; margin: 12px 0; }
.pt-cred dt { color: var(--muted); font-size: .86rem; }
.pt-cred dd { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .95rem; word-break: break-all; }
.pt-copy {
  min-height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255,255,255,.06);
  color: var(--text); font: inherit; font-size: .8rem; cursor: pointer;
}
.pt-copy:hover { background: rgba(255,255,255,.12); }
.pt-copy.copied { border-color: rgba(139,191,74,.6); color: var(--ok); }
.pt-handover textarea { width: 100%; font-size: .88rem; min-height: 120px; }
@media (max-width: 560px) { .pt-cred { grid-template-columns: 1fr auto; } .pt-cred dt { grid-column: 1 / -1; margin-top: 4px; } }

/* ---------- admin to-dos ---------- */
.pt-todo { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 12px; margin: 10px 0 24px; }
.pt-todo a, .pt-todo div {
  display: block; text-decoration: none; color: var(--text); border-radius: 14px; padding: 14px 16px; border: 1px solid var(--line); background: var(--bg-2);
}
.pt-todo a:hover { border-color: rgba(255,255,255,.22); }
.pt-todo b { display: block; font-family: "Oswald", sans-serif; font-size: 1.5rem; font-weight: 600; }
.pt-todo span { color: var(--muted); font-size: .88rem; }
.pt-todo .hot { border-color: rgba(255,122,24,.55); background: rgba(255,122,24,.08); }
.pt-todo .warn { border-color: rgba(245,192,74,.5); background: rgba(245,192,74,.06); }
.pt-rates td input[type="text"], .pt-rates td input[type="number"] { min-width: 90px; margin: 0; }
.pt-rates td { vertical-align: middle; }
.pt-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
/* a one-field form in a table row: the field and its button side by side */
.pt-inline { display: flex; align-items: center; gap: 8px; margin: 0; }
.pt-inline input { margin: 0; min-width: 250px; padding: 8px 12px; }

/* ---------- the invoice ---------- */
.inv-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; max-width: 900px; margin: 0 auto 16px; }
.inv-doc {
  --ink: #17140f; --ink-2: #5f584f; --rule: #e2ddd5;
  background: #fffdf9; color: var(--ink); border-radius: 14px; padding: clamp(22px, 4vw, 48px);
  box-shadow: 0 30px 60px rgba(0,0,0,.45); max-width: 900px; margin: 0 auto; font-family: "Inter", sans-serif; position: relative;
}
.inv-doc h2::before, .inv-doc h3::before { display: none; }
.inv-doc a { color: var(--ink); }
.inv-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px 30px; padding-bottom: 20px; border-bottom: 2px solid var(--ink); }
.inv-brand { font-family: "Oswald", sans-serif; font-size: 1.6rem; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; line-height: 1.1; }
.inv-brand span { color: #e14e12; }
.inv-from { color: var(--ink-2); font-size: .88rem; line-height: 1.55; margin-top: 6px; }
.inv-title { text-align: right; }
.inv-title h2 { font-family: "Oswald", sans-serif; font-size: 2.2rem; letter-spacing: 3px; margin: 0; color: var(--ink); text-transform: uppercase; }
.inv-title dl { display: grid; grid-template-columns: auto auto; gap: 2px 14px; justify-content: end; margin-top: 8px; font-size: .9rem; }
.inv-title dt { color: var(--ink-2); }
.inv-title dd { margin: 0; font-weight: 600; text-align: right; }
.inv-parties { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 18px 30px; margin: 22px 0; }
.inv-parties h3 { font-family: "Oswald", sans-serif; font-size: .8rem; letter-spacing: 1.6px; text-transform: uppercase; color: var(--ink-2); margin: 0 0 6px; }
.inv-parties p { margin: 0; line-height: 1.55; font-size: .94rem; }
.inv-table { width: 100%; border-collapse: collapse; margin: 6px 0 0; font-size: .93rem; }
.inv-table th {
  text-align: left; font-family: "Oswald", sans-serif; font-weight: 500; font-size: .78rem; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--ink-2); border-bottom: 1px solid var(--ink); padding: 8px 8px 8px 0;
}
.inv-table td { border-bottom: 1px solid var(--rule); padding: 12px 8px 12px 0; vertical-align: top; }
.inv-table .num { text-align: right; padding-right: 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.inv-table td small { display: block; color: var(--ink-2); font-size: .82rem; margin-top: 2px; }
.inv-sums { margin: 14px 0 0 auto; width: min(360px, 100%); font-size: .95rem; }
.inv-sums div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-variant-numeric: tabular-nums; }
.inv-sums .grand { border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 10px; font-size: 1.25rem; font-weight: 700; }
.inv-pay { margin-top: 26px; padding: 16px 18px; border: 1px solid var(--rule); border-radius: 10px; background: #f8f4ec; font-size: .92rem; line-height: 1.55; white-space: pre-line; }
.inv-pay h3 { font-family: "Oswald", sans-serif; font-size: .82rem; letter-spacing: 1.6px; text-transform: uppercase; margin: 0 0 4px; color: var(--ink-2); white-space: normal; }
.inv-foot { margin-top: 22px; color: var(--ink-2); font-size: .86rem; text-align: center; }
.inv-stamp-cell { display: flex; justify-content: flex-end; align-items: center; }
.inv-doc .inv-stamp {
  display: inline-block; transform: rotate(-8deg); margin: 0;
  border: 3px solid currentColor; border-radius: 10px; padding: 4px 14px; font-family: "Oswald", sans-serif; font-weight: 700;
  font-size: 1.5rem; letter-spacing: 3px; text-transform: uppercase; opacity: .85; pointer-events: none;
}
.inv-stamp.paid { color: #3c8a2e; }
.inv-stamp.overdue { color: #c0392b; }
.inv-stamp.void { color: #7c7c7c; }
.inv-stamp.unpaid { color: #c26a12; }
.inv-table .inv-phone { display: none; }
@media (max-width: 620px) {
  .inv-title { text-align: left; }
  .inv-title dl { justify-content: start; }
  .inv-title dd { text-align: left; }
  /* weeks and rate fold under the description: four columns don't fit */
  .inv-table .inv-mid { display: none; }
  .inv-table .inv-phone { display: block; }
  .inv-stamp-cell { justify-content: flex-start; }
}

/* the status chips, toned by what they ask of you */
.tagchip.gold { border-color: rgba(245,192,74,.5); color: var(--gold); }

@media print {
  .pt-head, .pt-tabs, .inv-bar, .pt-noprint { display: none !important; }
  main.wrap { padding: 0 !important; }
  .inv-doc { box-shadow: none; border-radius: 0; padding: 0; max-width: none; background: #fff; }
  .inv-doc * { color: #111 !important; }
  .inv-brand span { color: #e14e12 !important; }
  .inv-stamp.paid { color: #3c8a2e !important; }
  .inv-stamp.overdue { color: #c0392b !important; }
  .inv-pay { background: #f6f6f6 !important; }
}
