/* /personalise/assets/personalise.css
   Scoped under .pz-* so Flat UI / Bootstrap can stay loaded for the rest of the site. */

.pz-body {
  --pz-bg: #f6f7fb;
  --pz-card: #ffffff;
  --pz-line: #e3e7ef;
  --pz-ink: #2b3648;
  --pz-ink-soft: #6b7789;
  --pz-ink-faint: #9aa4b4;
  --pz-accent: #5b4bd6;
  --pz-accent-soft: #eeecfd;
  --pz-live: #17a673;
  --pz-live-soft: #e4f6ef;
  --pz-radius: 10px;
  --pz-row: 62px;

  background: var(--pz-bg);
  color: var(--pz-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  padding: 0 16px 96px;
}

@media (prefers-color-scheme: dark) {
  .pz-body {
    --pz-bg: #151a24;
    --pz-card: #1d2432;
    --pz-line: #2b3446;
    --pz-ink: #e7ecf5;
    --pz-ink-soft: #97a3b7;
    --pz-ink-faint: #6d7a8f;
    --pz-accent: #8b7bf5;
    --pz-accent-soft: #262147;
    --pz-live: #3ddba1;
    --pz-live-soft: #17352a;
  }
}

.pz-shell { max-width: 1080px; margin: 0 auto; }

/* display:grid/flex set on a class beats the browser's [hidden] rule — restate it. */
.pz-body [hidden] { display: none !important; }

/* ---- masthead ---- */

.pz-masthead { padding: 34px 0 20px; }

.pz-home { display: inline-flex; align-items: baseline; gap: 14px; text-decoration: none; }
.pz-home:hover { text-decoration: none; }
.pz-wordmark {
  font-size: 20px; font-weight: 800; letter-spacing: -0.02em;
  color: var(--pz-ink);
}
.pz-back { font-size: 13px; color: var(--pz-accent); }
.pz-home:hover .pz-back { text-decoration: underline; }

.pz-h1 {
  font-size: 34px; font-weight: 800; letter-spacing: -0.025em;
  margin: 18px 0 6px; color: var(--pz-ink);
}
.pz-lede { margin: 0; max-width: 56ch; color: var(--pz-ink-soft); font-size: 15px; line-height: 1.55; }

/* ---- sticky control bar ---- */

.pz-bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  padding: 12px 0;
  background: linear-gradient(var(--pz-bg) 78%, rgba(0, 0, 0, 0));
}

.pz-search { position: relative; flex: 1 1 320px; min-width: 240px; }

.pz-input {
  width: 100%; box-sizing: border-box;
  padding: 12px 66px 12px 14px;
  font-size: 16px; color: var(--pz-ink);
  background: var(--pz-card);
  border: 1px solid var(--pz-line);
  border-radius: var(--pz-radius);
  transition: border-color .12s ease, box-shadow .12s ease;
}
.pz-input::placeholder { color: var(--pz-ink-faint); }
.pz-input:focus {
  outline: none;
  border-color: var(--pz-accent);
  box-shadow: 0 0 0 3px var(--pz-accent-soft);
}
.pz-input::-webkit-search-cancel-button { display: none; }

.pz-clear {
  position: absolute; right: 40px; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px; line-height: 1;
  font-size: 18px; color: var(--pz-ink-faint);
  background: none; border: 0; cursor: pointer; padding: 0;
}
.pz-clear:hover { color: var(--pz-ink); }

.pz-kbd {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-size: 11px; font-family: inherit; color: var(--pz-ink-faint);
  border: 1px solid var(--pz-line); border-radius: 5px;
  padding: 1px 6px; background: var(--pz-bg);
}
@media (max-width: 640px) { .pz-kbd { display: none; } .pz-clear { right: 12px; } }

.pz-views {
  display: inline-flex; padding: 3px; gap: 2px;
  background: var(--pz-card); border: 1px solid var(--pz-line);
  border-radius: var(--pz-radius);
}
.pz-view {
  border: 0; background: none; cursor: pointer;
  padding: 8px 16px; border-radius: 7px;
  font-size: 14px; font-weight: 600; color: var(--pz-ink-soft);
}
.pz-view:hover { color: var(--pz-ink); }
.pz-view.is-active { background: var(--pz-accent); color: #fff; }

.pz-status {
  margin: 2px 0 18px; min-height: 18px;
  font-size: 13px; color: var(--pz-ink-faint);
}

/* ---- groups ---- */

.pz-group, .pz-letter { margin: 0 0 26px; }

.pz-group-head {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 2px; font-size: 13px; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase; color: var(--pz-ink-soft);
}
.pz-count {
  font-size: 11px; letter-spacing: 0; font-weight: 700;
  background: var(--pz-accent-soft); color: var(--pz-accent);
  border-radius: 20px; padding: 2px 9px;
}
.pz-group-note { margin: 0 0 10px; font-size: 13px; color: var(--pz-ink-faint); }

.pz-group-toggle {
  border: 0; background: none; padding: 6px 0; cursor: pointer;
  font-family: inherit;
}
.pz-group-toggle::after {
  content: "›"; font-size: 16px; color: var(--pz-ink-faint);
  transition: transform .15s ease; display: inline-block;
}
.pz-group-toggle[aria-expanded="true"]::after { transform: rotate(90deg); }
.pz-group-toggle:hover { color: var(--pz-ink); }

.pz-letter-head {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px 14px; text-align: left; cursor: pointer;
  background: var(--pz-card); border: 1px solid var(--pz-line);
  border-radius: var(--pz-radius); color: var(--pz-ink);
}
.pz-letter-head:hover { border-color: var(--pz-accent); }
.pz-letter-mark { font-size: 17px; font-weight: 800; min-width: 20px; }
.pz-letter-n { font-size: 13px; color: var(--pz-ink-faint); }
.pz-letter-head::after {
  content: "›"; margin-left: auto; font-size: 18px; color: var(--pz-ink-faint);
  transition: transform .15s ease;
}
.pz-letter-head[aria-expanded="true"]::after { transform: rotate(90deg); }
.pz-letter-head[aria-expanded="true"] { border-radius: var(--pz-radius) var(--pz-radius) 0 0; }
.pz-letter .pz-list { margin-top: 8px; }

/* ---- rows ---- */

.pz-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px;
}
@media (min-width: 780px) { .pz-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }


/* Fixed row height so a hovered row can grow over its neighbours instead of
   pushing the rest of the grid around. */
.pz-item { margin: 0; min-width: 0; position: relative; min-height: var(--pz-row); }

.pz-btn {
  display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: var(--pz-row); box-sizing: border-box;
  padding: 11px 14px; text-align: left; cursor: pointer;
  background: var(--pz-card);
  border: 1px solid var(--pz-line);
  border-radius: var(--pz-radius);
  color: var(--pz-ink);
  user-select: none; -webkit-user-select: none;
  transition: border-color .12s ease, background .12s ease;
}

/* Hold Alt/Option to select and copy a title instead of ticking the row.
   The hover lift is dropped while selecting so a drag can cross rows. */
.pz-selecting .pz-btn {
  user-select: text; -webkit-user-select: text; cursor: text;
}
.pz-selecting .pz-item:hover .pz-btn,
.pz-selecting .pz-item:focus-within .pz-btn {
  position: static; box-shadow: none;
}
.pz-btn:hover { border-color: var(--pz-accent); }
.pz-btn:focus-visible { outline: 3px solid var(--pz-accent-soft); outline-offset: 1px; }

.pz-box {
  flex: none; width: 20px; height: 20px; border-radius: 6px;
  border: 2px solid var(--pz-line); background: transparent;
  position: relative; transition: background .12s ease, border-color .12s ease;
}
.pz-box::after {
  content: ""; position: absolute; left: 7px; top: 2px;
  width: 5px; height: 10px; border: solid #fff;
  border-width: 0 2px 2px 0; transform: rotate(45deg) scale(0);
  transition: transform .12s ease;
}

.pz-item.is-on .pz-btn { border-color: var(--pz-accent); background: var(--pz-accent-soft); }
.pz-item.is-on .pz-box { background: var(--pz-accent); border-color: var(--pz-accent); }
.pz-item.is-on .pz-box::after { transform: rotate(45deg) scale(1); }

.pz-item.is-saving .pz-btn { opacity: .62; }
.pz-item.is-saved .pz-btn { border-color: var(--pz-live); }

.pz-text { min-width: 0; flex: 1 1 auto; display: block; }

.pz-titleline { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.pz-title {
  flex: 0 1 auto; min-width: 0;
  font-size: 15px; font-weight: 600; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Hover shows the whole title, wrapped. Pointer only — on touch, :hover
   sticks after a tap and would leave a row stuck open. */
@media (hover: hover) {
  .pz-item:hover .pz-btn,
  .pz-item:focus-within .pz-btn {
    position: absolute; top: 0; left: 0; right: 0; z-index: 6;
    box-shadow: 0 6px 20px rgba(20, 26, 38, .16);
  }
  .pz-item:hover .pz-title,
  .pz-item:focus-within .pz-title {
    white-space: normal; overflow: visible;
  }
}
.pz-sub {
  display: block; margin-top: 2px; font-size: 12px; color: var(--pz-ink-faint);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pz-net { color: var(--pz-ink-soft); font-weight: 600; }
.pz-country {
  flex: none;
  font-size: 10px; font-weight: 800; letter-spacing: .07em;
  color: var(--pz-ink-faint); background: var(--pz-bg);
  border: 1px solid var(--pz-line);
  border-radius: 4px; padding: 2px 5px; line-height: 1;
  text-transform: uppercase; white-space: nowrap;
}
/* Ticked rows get the purple badge back, knocked back 25% so it sits under
   the title rather than competing with it. */
.pz-item.is-on .pz-country {
  opacity: .65;
  color: var(--pz-accent);
  background: var(--pz-card);
  border-color: color-mix(in srgb, var(--pz-accent) 30%, transparent);
}
.pz-sep { margin: 0 6px; }
.pz-stat--next { color: var(--pz-live); font-weight: 600; }
.pz-stat--e, .pz-stat--c { color: var(--pz-ink-faint); }

/* ---- odds and ends ---- */

.pz-empty {
  background: var(--pz-card); border: 1px dashed var(--pz-line);
  border-radius: var(--pz-radius); padding: 28px; text-align: center;
  margin-bottom: 26px;
}
.pz-empty h2 { margin: 0 0 6px; font-size: 18px; font-weight: 700; color: var(--pz-ink); }
.pz-empty p { margin: 0; color: var(--pz-ink-soft); font-size: 14px; }

.pz-page { margin-top: 8px; }
.pz-more-btn {
  width: 100%; padding: 10px 14px; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--pz-accent);
  background: var(--pz-card); border: 1px dashed var(--pz-line);
  border-radius: var(--pz-radius);
}
.pz-more-btn:hover { border-color: var(--pz-accent); }

.pz-loading, .pz-more { color: var(--pz-ink-faint); font-size: 14px; padding: 10px 2px; }

.pz-foot {
  margin-top: 42px; padding-top: 20px; border-top: 1px solid var(--pz-line);
  color: var(--pz-ink-faint); font-size: 13px; line-height: 1.6;
}
.pz-foot p { margin: 0 0 4px; }
.pz-foot a, .pz-note a { color: var(--pz-accent); }
.pz-note { margin-top: 10px !important; }

.pz-toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  z-index: 50; max-width: min(520px, calc(100vw - 32px));
  padding: 12px 18px; border-radius: var(--pz-radius);
  background: #2b3648; color: #fff; font-size: 14px;
  box-shadow: 0 8px 28px rgba(20, 26, 38, .28);
}

.pz-noscript {
  background: var(--pz-accent-soft); color: var(--pz-accent);
  padding: 12px 16px; border-radius: var(--pz-radius); font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
  .pz-body * { transition: none !important; }
}
