/* ==========================================================================
   GetPayslip — document designs
   Every payslip, P60 and P45 is drawn by slips.js at a fixed 420 px design
   width and scaled by the wrapper, so the thumbnail in the chooser and the
   live preview in the rail are one drawing at two sizes. That is deliberate:
   two implementations of six layouts would drift within a week.

   The six layouts come from the printed ranges the two reference sites sell
   (Wageslips4U green/blue standard and premium, Payslips Online standard
   laser, mailer and address versions), photographed, then rebuilt here in
   CSS so the type stays sharp and the figures are the customer's own.
   Nothing below is a bitmap.
   ========================================================================== */

/* ---------- shared document shell ---------------------------------------- */
.slp {
  width: 420px; box-sizing: border-box; background: #fff; color: #17222b;
  display: flex; flex-direction: column;
  font-family: var(--font); font-size: 7.4px; line-height: 1.32;
  font-variant-numeric: tabular-nums; overflow: hidden;
}
.slp--a4 { font-size: 8px; min-height: 594px; }
.slp--payslip { min-height: 297px; }
/* the foot of the sheet is pinned to the bottom edge, not left under the
   last figure: the gap above it is the page margin a printed slip has */
.slp__tail { margin-top: auto; padding-top: 7px; }
.slp__tailnote {
  font-size: 6.2px; color: #6d7b88; border-top: 1px solid #e8eef4;
  padding-top: 4px; margin-bottom: 2px;
}
.slp--ledger-mono .slp__tailnote { border-top-color: #d5d5d5; color: #444; }

.slp__decl {
  margin-top: auto; border: 1px solid #dfe5ee; border-radius: 3px;
  padding: 7px 9px 9px; background: #fbfcfe;
}
.slp__declh {
  font-size: 6.6px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: #7a8794; margin-bottom: 3px;
}
.slp__decl p { font-size: 7px; color: #4d5a66; line-height: 1.5; }
.slp__sign {
  display: flex; justify-content: space-between; gap: 20px; margin-top: 16px;
  font-size: 6.8px; color: #7a8794;
}
.slp__sign span { border-top: 1px solid #b9c5d2; padding-top: 3px; flex: 1; }

.slp__hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.slp__hdright { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: none; }
.slp__emp { display: flex; flex-direction: column; min-width: 0; }
.slp__empn { font-size: 9.6px; font-weight: 800; letter-spacing: -.02em; text-transform: uppercase; }
.slp__empa { font-size: 6.8px; color: #5c6b78; margin-top: 1px; }
.slp__badge {
  font-size: 6.6px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase;
  padding: 3px 6px; border-radius: 3px; background: #eef2f7; color: #17222b;
}
.slp__doctitle { font-size: 19px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.slp__small { font-size: 6.4px; color: #6a7885; }
.slp__fine { font-size: 6px; color: #8b97a2; margin-top: 5px; letter-spacing: .01em; }
.slp__note {
  font-size: 6.6px; color: #4d5a66; background: #f5f8fb; border-left: 2px solid #cfdae5;
  padding: 5px 7px; margin-top: 6px; line-height: 1.45;
}

/* key/value pair, used in nearly every layout */
.slp__kv { display: flex; gap: 4px; align-items: baseline; min-width: 0; }
.slp__k { color: #7a8794; flex: none; }
.slp__v { font-weight: 650; color: #17222b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* money tables */
.slp__t { width: 100%; border-collapse: collapse; }
.slp__t th {
  font-size: 6.2px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: #5c6b78; text-align: right; padding: 2px 3px; white-space: nowrap;
}
.slp__t th.slp__d { text-align: left; }
.slp__t td { padding: 2px 3px; border-bottom: 1px solid #eef2f6; }
.slp__t tbody tr:last-child td { border-bottom: 0; }
.slp__d { text-align: left; color: #26333e; }
.slp__d--soft { color: #7a8794; padding-left: 9px !important; }
.slp__n { text-align: right; white-space: nowrap; }
.slp__n--net, .slp__n--ytd { font-weight: 700; }

/* ================================================== 1. GREEN CLASSIC ===== */
.slp--green-classic { padding: 10px 11px 9px; }
.slp--green-classic .slp__hd { padding-bottom: 6px; }
.slp--green-classic .slp__badge { background: #35784f; color: #fff; }
.slp--green-classic .slp__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.slp--green-classic .slp__bar {
  background: #4a8f61; color: #fff; font-size: 6.6px; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase; padding: 3px 5px; border-radius: 2px 2px 0 0;
}
.slp--green-classic .slp__col2 { border: 1px solid #cfdcd4; border-radius: 0 0 2px 2px; background: #fff; }
.slp--green-classic .slp__col2 .slp__t { padding: 0 2px 3px; }
.slp--green-classic .slp__col2 .slp__t th { background: #f2f7f3; border-bottom: 1px solid #dfeae2; }
.slp--green-classic .slp__foot { display: grid; grid-template-columns: 1fr 1fr 1.15fr; gap: 5px; margin-top: 6px; }
.slp--green-classic .slp__box {
  border: 1px solid #cfdcd4; border-radius: 2px; padding: 4px 5px;
  display: grid; gap: 1px; align-content: start;
}
.slp--green-classic .slp__box--tint { background: #eef6f0; border-color: #c2dcc9; }
.slp--green-classic .slp__box--tint .slp__v { font-weight: 700; }
.slp--green-classic .slp__net {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: #4a8f61; color: #fff; border-radius: 2px; padding: 4px 8px; margin-top: 5px;
  font-size: 7px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.slp--green-classic .slp__net b { font-size: 11.6px; letter-spacing: -.02em; }

/* ==================================================== 2. SAGE PANEL ====== */
.slp--sage-panel {
  padding: 8px; background: #cfe3c0; border: 1px solid #b6d3a4;
}
.slp--sage-panel .slp__hd {
  background: #4b7a3a; color: #fff; padding: 7px 8px; border-radius: 3px;
  align-items: center;
}
.slp--sage-panel .slp__empn { color: #fff; font-size: 10px; }
.slp--sage-panel .slp__empa { color: #d5e6c8; }
.slp--sage-panel .slp__small { color: #d5e6c8; }
.slp--sage-panel .slp__badge { background: #fff; color: #3d6630; }
.slp--sage-panel .slp__card {
  background: #fff; border-radius: 3px; padding: 5px 7px; margin-top: 5px;
}
.slp--sage-panel .slp__card--meta { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 2px 8px; }
.slp--sage-panel .slp__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-top: 5px; }
.slp--sage-panel .slp__col2--card { background: #fff; border-radius: 3px; padding: 4px 6px 3px; }
.slp--sage-panel .slp__bar {
  font-size: 6.4px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: #3d6630; border-bottom: 1.5px solid #c2dca9; padding-bottom: 2px; margin-bottom: 2px;
}
.slp--sage-panel .slp__t td { border-bottom: 1px solid #edf4e6; }
.slp--sage-panel .slp__foot { display: grid; grid-template-columns: 1fr 1fr auto; gap: 5px; margin-top: 5px; align-items: stretch; }
.slp--sage-panel .slp__box--flat {
  background: #fff; border-radius: 3px; padding: 4px 6px; display: grid; gap: 1px; align-content: start;
}
.slp--sage-panel .slp__net--inline {
  background: #4b7a3a; color: #fff; border-radius: 3px; padding: 4px 9px;
  display: flex; flex-direction: column; align-items: flex-end; justify-content: center;
  font-size: 6.2px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
}
.slp--sage-panel .slp__net--inline b { font-size: 12.4px; letter-spacing: -.02em; margin-top: 1px; }
.slp--sage-panel .slp__fine { color: #4a6440; margin-top: 5px; padding-left: 1px; }

/* ================================================== 3. COBALT PANEL ====== */
.slp--cobalt-panel { padding: 0; background: #f3f6fd; border: 1px solid #c8d3ee; }
.slp--cobalt-panel .slp__hd {
  background: #ccd6f6; padding: 8px 11px 7px; border-bottom: 1px solid #b3c2ea;
}
.slp--cobalt-panel .slp__empn { color: #17225c; }
.slp--cobalt-panel .slp__empa { color: #4b5591; }
.slp--cobalt-panel .slp__badge--out { background: #22307a; color: #fff; }
.slp--cobalt-panel .slp__tabs {
  display: grid; grid-template-columns: repeat(4, 1fr); background: #22307a; color: #fff;
  font-size: 6.4px; font-weight: 650; letter-spacing: .02em; padding: 3px 11px; gap: 6px;
}
.slp--cobalt-panel .slp__tabs span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slp--cobalt-panel .slp__tabs span:last-child { text-align: right; }
.slp--cobalt-panel .slp__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 7px 9px 0; }
.slp--cobalt-panel .slp__col2 { background: #fff; border: 1px solid #d3dcf0; border-radius: 3px; overflow: hidden; }
.slp--cobalt-panel .slp__bar--navy {
  background: #22307a; color: #fff; font-size: 6.4px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; padding: 3px 5px;
}
.slp--cobalt-panel .slp__t { padding: 0 3px 3px; }
.slp--cobalt-panel .slp__t td { border-bottom: 1px solid #eef1f9; }
.slp--cobalt-panel .slp__foot {
  display: grid; grid-template-columns: 1fr 1fr auto; gap: 5px; padding: 6px 9px 0;
}
.slp--cobalt-panel .slp__box--line {
  background: #fff; border: 1px solid #d3dcf0; border-radius: 3px; padding: 4px 6px;
  display: grid; gap: 1px; align-content: start;
}
.slp--cobalt-panel .slp__net--block {
  background: #22307a; color: #fff; border-radius: 3px; padding: 4px 9px;
  display: flex; flex-direction: column; align-items: flex-end; justify-content: center;
  font-size: 6.2px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
}
.slp--cobalt-panel .slp__net--block b { font-size: 12.4px; letter-spacing: -.02em; margin-top: 1px; }
.slp--cobalt-panel .slp__fine { padding: 5px 10px 7px; color: #59628f; margin-top: auto; }

/* =================================================== 4. LEDGER MONO ====== */
.slp--ledger-mono { padding: 10px 12px 9px; font-family: var(--font); }
.slp--ledger-mono .slp__hd--rule { border-bottom: 2px solid #111; padding-bottom: 5px; }
.slp--ledger-mono .slp__badge--plain {
  background: #111; color: #fff; letter-spacing: .16em;
}
.slp--ledger-mono .slp__t--ledger { margin-top: 5px; }
.slp--ledger-mono .slp__t th {
  color: #111; border-bottom: 1px solid #111; border-top: 1px solid #111;
  letter-spacing: .07em; padding: 2px 3px;
}
.slp--ledger-mono .slp__t td { border-bottom: 1px dotted #cfcfcf; padding: 2.4px 3px; }
.slp--ledger-mono .slp__row--sum td {
  border-top: 1px solid #111; border-bottom: 0; font-weight: 700; padding-top: 3px;
}
.slp--ledger-mono .slp__row--net td {
  border-top: 2px solid #111; border-bottom: 0; font-weight: 800; font-size: 8.4px;
  padding-top: 3.5px; letter-spacing: -.01em;
}
.slp--ledger-mono .slp__meta {
  width: 100%; border-collapse: collapse; margin-top: 5px;
}
.slp--ledger-mono .slp__meta td {
  padding: 1.4px 0; vertical-align: top; width: 50%;
}
.slp--ledger-mono .slp__meta .slp__k { min-width: 46px; display: inline-block; }
.slp--ledger-mono .slp__foot--rule {
  display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid #111;
  margin-top: 5px; padding-top: 3px; font-size: 6.2px; color: #333;
}

/* ==================================================== 5. TEAL BAND ======= */
.slp--teal-band { padding: 0; }
.slp--teal-band .slp__hd--band {
  background: #0f7a6b; color: #fff; padding: 9px 12px 8px; align-items: center;
}
.slp--teal-band .slp__empn { color: #fff; font-size: 10.4px; }
.slp--teal-band .slp__empa { color: #a9ddd2; }
.slp--teal-band .slp__badge--ghost {
  background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .55);
  letter-spacing: .18em;
}
.slp--teal-band .slp__strip {
  display: grid; grid-template-columns: 1.3fr 1fr .8fr 1fr; gap: 8px;
  padding: 5px 12px; background: #d8efe9; border-bottom: 1px solid #b9e0d7;
}
.slp--teal-band .slp__strip .slp__kv { flex-direction: column; gap: 0; align-items: flex-start; }
.slp--teal-band .slp__strip .slp__k { font-size: 6.2px; text-transform: uppercase; letter-spacing: .07em; color: #3f7a70; }
.slp--teal-band .slp__strip .slp__v { font-size: 7.2px; color: #0c3a33; }
.slp--teal-band .slp__t--wide {
  margin: 5px 12px 0; width: calc(100% - 24px); table-layout: fixed;
}
.slp--teal-band .slp__t--wide th:first-child, .slp--teal-band .slp__t--wide td:first-child {
  width: 55%;
}
.slp--teal-band .slp__t--wide th { color: #43786f; border-bottom: 1px solid #cfe7e1; }
.slp--teal-band .slp__t--wide td { padding: 2.4px 3px; border-bottom: 1px solid #eaf5f2; }
.slp--teal-band .slp__row--sum td { font-weight: 700; border-bottom: 1.2px solid #0f7a6b; }
.slp--teal-band .slp__foot--net {
  display: flex; align-items: stretch; justify-content: space-between; gap: 8px;
  padding: 6px 12px 0;
}
.slp--teal-band .slp__box--flat { display: grid; gap: 1px; align-content: center; }
.slp--teal-band .slp__net {
  background: #0f7a6b; color: #fff; border-radius: 3px; padding: 4px 11px;
  display: flex; flex-direction: column; align-items: flex-end; justify-content: center;
  font-size: 6.2px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
}
.slp--teal-band .slp__net b { font-size: 12.6px; letter-spacing: -.02em; margin-top: 1px; }
.slp--teal-band .slp__tail { padding: 0 12px 8px; }
.slp--teal-band .slp__fine { margin-top: 0; }

/* =================================================== 6. SLATE GRID ====== */
.slp--slate-grid { padding: 10px 11px 9px; background: #fff; }
.slp--slate-grid .slp__hd { padding-bottom: 6px; border-bottom: 2px solid #33445c; }
.slp--slate-grid .slp__badge--slate { background: #33445c; color: #fff; letter-spacing: .16em; }
.slp--slate-grid .slp__grid4 {
  display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 3px; margin-top: 6px;
}
.slp--slate-grid .slp__grid3 {
  display: grid; grid-template-columns: 1fr 1fr 1.1fr; gap: 3px; margin-top: 4px;
}
.slp--slate-grid .slp__cell {
  border: 1px solid #dfe5ee; background: #f7f9fc; border-radius: 2px;
  padding: 3px 4px; min-width: 0;
}
.slp--slate-grid .slp__cell .slp__kv { flex-direction: column; gap: 0; align-items: flex-start; }
.slp--slate-grid .slp__cell .slp__k {
  font-size: 6.1px; text-transform: uppercase; letter-spacing: .08em; color: #7d8b9b;
}
.slp--slate-grid .slp__cell .slp__v { font-size: 7.2px; }
.slp--slate-grid .slp__cell--sum { background: #eff3f9; border-color: #c9d4e3; }
.slp--slate-grid .slp__cell--net { background: #33445c; border-color: #33445c; }
.slp--slate-grid .slp__cell--net .slp__k { color: #b8c6d8; }
.slp--slate-grid .slp__cell--net .slp__v { color: #fff; font-size: 10.4px; font-weight: 800; }
.slp--slate-grid .slp__t--boxed { margin-top: 6px; }
.slp--slate-grid .slp__t--boxed th {
  background: #eff3f9; border: 1px solid #dfe5ee; color: #4a5b70; padding: 2.4px 4px;
}
.slp--slate-grid .slp__t--boxed th.slp__d { border-right: 0; }
.slp--slate-grid .slp__t--boxed td { border: 1px solid #e8edf4; padding: 2.6px 4px; }
.slp--slate-grid .slp__t--boxed th + th, .slp--slate-grid .slp__t--boxed td + td { border-left: 0; }
.slp--slate-grid .slp__fine { margin-top: 6px; }

/* ================================================= P60 / P45 (A4) ======= */
.slp--a4 { padding: 14px 16px 12px; }
.slp--a4 .slp__hd--doc { padding-bottom: 8px; border-bottom: 2px solid #17222b; }
.slp--a4 .slp__doctitle { font-size: 24px; }
.slp--a4 .slp__docrow {
  display: flex; justify-content: space-between; gap: 10px; font-size: 7.4px;
  color: #5c6b78; padding: 5px 0 8px; border-bottom: 1px solid #e6ecf2;
}
.slp--a4 .slp__section {
  font-size: 6.6px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: #7a8794; margin: 9px 0 4px;
}
.slp--a4 .slp__grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.slp--a4 .slp__cell {
  border: 1px solid #dfe5ee; background: #f9fbfd; border-radius: 3px; padding: 5px 7px;
}
.slp--a4 .slp__cell .slp__kv { flex-direction: column; gap: 1px; align-items: flex-start; }
.slp--a4 .slp__cell .slp__k { font-size: 6.5px; text-transform: uppercase; letter-spacing: .08em; }
.slp--a4 .slp__cell .slp__v { font-size: 9px; }
.slp--a4 .slp__cell--big { background: #eef4fb; border-color: #c8d8ea; padding: 8px 9px; }
.slp--a4 .slp__cell--big .slp__v { font-size: 14px; font-weight: 800; letter-spacing: -.02em; }
.slp--a4 .slp__note { font-size: 7.2px; margin-top: 12px; }
.slp--a4 .slp__fine { margin-top: 10px; font-size: 6.6px; }

/* the A4 documents carry a palette from their payslip design */
.slp--a4.slp--green-classic .slp__hd--doc { border-bottom-color: #4a8f61; }
.slp--a4.slp--green-classic .slp__doctitle { color: #35784f; }
.slp--a4.slp--sage-panel { background: #fff; padding: 14px 16px 12px; border: 0; }
.slp--a4.slp--sage-panel .slp__hd--doc { border-bottom-color: #4b7a3a; }
.slp--a4.slp--sage-panel .slp__doctitle { color: #3d6630; }
.slp--a4.slp--cobalt-panel { background: #fff; padding: 14px 16px 12px; border: 0; }
.slp--a4.slp--cobalt-panel .slp__hd--doc { border-bottom-color: #22307a; }
.slp--a4.slp--cobalt-panel .slp__doctitle { color: #22307a; }
.slp--a4.slp--teal-band { padding: 14px 16px 12px; }
.slp--a4.slp--teal-band .slp__hd--doc { border-bottom-color: #0f7a6b; }
.slp--a4.slp--teal-band .slp__doctitle { color: #0f7a6b; }
.slp--a4.slp--slate-grid { background: #fff; padding: 14px 16px 12px; }
.slp--a4.slp--slate-grid .slp__doctitle { color: #33445c; }

/* ---------- the scaled wrapper ------------------------------------------- */
/* flex child, so it shrinks to the tile's content box instead of overflowing
   the padding: width:100% measured the padding box and every thumbnail bled
   8px past the edge. min-width:0 lets it shrink below the sheet's 420px. */
.slipbox { flex: 1 1 auto; min-width: 0; width: auto; }
.slipw { will-change: transform; }

/* ---------- the chooser -------------------------------------------------- */
.designs { margin-top: 2px; }
.designs__head {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 4px;
}
.designs__head b { font-size: 13px; font-weight: 650; }
.designs__head span { font-size: 12px; color: var(--ink); }
.designs__grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 11px;
}
.design {
  position: relative; text-align: left; padding: 0; cursor: pointer;
  background: #fff; border: 1.5px solid var(--line); border-radius: 11px;
  overflow: hidden; font: inherit; color: var(--navy);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.design:hover { border-color: #bcd3f0; box-shadow: var(--shadow-sm); }
.design:focus-visible { outline: 2.5px solid var(--blue); outline-offset: 2px; }
.design[aria-checked="true"] { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-wash); }
.design__shot {
  background: var(--wash); padding: 8px; border-bottom: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: center; min-height: 86px;
}
.design__shot .slp { box-shadow: 0 1px 4px rgba(15, 42, 67, .13); border-radius: 2px; }
.design__foot { padding: 7px 9px 8px; }
.design__name {
  display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700;
  letter-spacing: -.01em;
}
.design__fam { display: block; font-size: 10.5px; color: var(--ink); margin-top: 2px; line-height: 1.3; }
.design__tick {
  position: absolute; top: 7px; right: 7px; width: 17px; height: 17px; border-radius: 50%;
  background: var(--blue); color: #fff; display: none; place-items: center;
  font-size: 10px; font-weight: 800; box-shadow: 0 1px 3px rgba(15, 42, 67, .25);
}
.design[aria-checked="true"] .design__tick { display: grid; }
.design__sw { display: inline-flex; gap: 2px; margin-left: auto; }
.design__sw i {
  width: 8px; height: 8px; border-radius: 2px; display: block;
  border: 1px solid rgba(15, 42, 67, .14);
}
.designs__more {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--line-soft);
  font-size: 12.5px; color: var(--ink);
}
.designs__more b { color: var(--navy); font-weight: 650; }

/* one-line "you chose X" reminder under the preview heading */
.preview__pick {
  display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink);
  padding: 7px 14px; border-bottom: 1px solid var(--line-soft); background: #fff;
}
.preview__pick b { color: var(--navy); font-weight: 650; }
.preview__pickbtn {
  margin-left: auto; background: none; border: 0; cursor: pointer; padding: 2px 0;
  font: inherit; font-weight: 600; color: var(--blue); text-decoration: underline;
  text-underline-offset: 2px;
}
.preview__pickbtn:hover { color: var(--blue-dark); }
.preview__pick a { margin-left: auto; font-weight: 600; }

@media (max-width: 720px) {
  .designs__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .designs__grid { grid-template-columns: 1fr; }
  .design__shot { min-height: 74px; }
}

/* the rail stacks more than one sheet only if a caller asks it to; a gap
   between sheets reads better than a hard join */
.slipgap { height: 10px; }
