/*
 * Shared header + footer styles for the static mockups.
 * Scoped under #site-header / #site-footer so they override each page's
 * leftover chrome rules and never leak into page content.
 * Rendered by site.js, which injects a <link> to this file.
 */

/* ---------- Header ---------- */
/* The mount itself is the sticky box. (Previously the mount used
   `display: contents` with `position: sticky` on the inner <header>, but a
   sticky child of a display:contents parent fails to stick in iOS/WebKit —
   the header scrolled away on mobile.) The inner <header> stays
   position: relative so the mega menus and mobile panel anchor to it. */
#site-header {
  position: sticky;
  top: 0;
  z-index: 50;
}
#site-header header {
  position: relative;
  background: transparent;
  transition: padding-top 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}
#site-header header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  backdrop-filter: saturate(150%) blur(10px);
  background: rgba(251, 250, 248, 0.78);
  border-bottom: 1px solid var(--line);
  opacity: 1;
  transition: opacity 0.3s ease;
}
#site-header header.is-floating {
  padding-top: 14px;
}
#site-header header.is-floating::before {
  opacity: 0;
}
#site-header .nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transition:
    max-width 0.32s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.32s cubic-bezier(0.4, 0, 0.2, 1),
    border-radius 0.32s cubic-bezier(0.4, 0, 0.2, 1),
    height 0.3s ease,
    background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}
#site-header header.is-floating .nav {
  max-width: 1120px;
  height: 60px;
  padding: 0 14px 0 24px;
  background: rgba(251, 250, 248, 0.82);
  backdrop-filter: saturate(160%) blur(14px);
  border-color: var(--line);
  border-radius: 16px;
  box-shadow:
    0 12px 34px -14px rgba(20, 18, 30, 0.24),
    0 2px 8px -2px rgba(20, 18, 30, 0.08);
}
#site-header .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Cal Sans", sans-serif;
  font-size: 22px;
  letter-spacing: -0.01em;
  text-decoration: none;
}
#site-header .brand .brand-logo {
  height: 30px;
  width: auto;
  display: block;
}
#site-header nav.links {
  display: flex;
  align-items: center;
  gap: 30px;
}
#site-header nav.links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s ease;
}
#site-header nav.links a:hover,
#site-header nav.links a.active {
  color: var(--ink);
}
#site-header .chev {
  width: 7px;
  height: 7px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  opacity: 0.6;
  transition: transform 0.2s ease;
}

/* ---------- Mega menu ---------- */
#site-header .nav-item {
  position: static;
  display: inline-flex;
  align-items: center;
  height: 72px;
}
#site-header .nav-trigger {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink-soft);
  font-size: 14.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  transition: color 0.15s ease;
}
#site-header .nav-trigger:hover,
#site-header .nav-item.open .nav-trigger,
#site-header .nav-trigger.active {
  color: var(--ink);
}
#site-header .nav-item.open .chev {
  transform: rotate(-135deg) translateY(-2px);
  opacity: 0.85;
}
#site-header .mega {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: min(1080px, calc(100vw - 48px));
  padding-top: 12px;
  z-index: 60;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}
#site-header .nav-item.open .mega {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
#site-header .mega-inner {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: 1fr 322px;
  overflow: hidden;
}
#site-header .mega-grid {
  padding: 24px 26px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 24px;
}
#site-header .mega-link {
  display: flex;
  gap: 14px;
  padding: 14px;
  border-radius: 14px;
  text-decoration: none;
  transition: background 0.15s ease;
}
#site-header .mega-link:hover {
  background: var(--violet-50);
}
#site-header .mega-ic {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--violet-50);
  border: 1px solid var(--violet-100);
  color: var(--violet-dark);
  display: grid;
  place-items: center;
}
#site-header .mega-ic svg {
  width: 16px;
  height: 16px;
}
#site-header .mega-link:hover .mega-ic {
  background: #fff;
}
#site-header .mega-tx b {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
#site-header .mega-tx span {
  display: block;
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-top: 3px;
  line-height: 1.45;
}
#site-header .mega-promo {
  background: #1c1a26;
  color: #fff;
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
}
#site-header .mega-promo .promo-k {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c9b6f3;
}
#site-header .mega-promo h3 {
  font-family: "Cal Sans", sans-serif;
  font-weight: 400;
  font-size: 26px;
  letter-spacing: -0.01em;
  margin-top: 14px;
}
#site-header .mega-promo p {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.66);
  line-height: 1.55;
  margin-top: 12px;
}
#site-header .promo-cta {
  margin-top: auto;
  padding-top: 22px;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
#site-header .promo-cta .arrow {
  transition: transform 0.2s ease;
}
#site-header .promo-cta:hover {
  color: #c9b6f3;
}
#site-header .promo-cta:hover .arrow {
  transform: translateX(4px);
}
#site-header .nav-right {
  display: flex;
  align-items: center;
  gap: 22px;
}
#site-header .btn {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 14.5px;
  border-radius: 12px;
  padding: 11px 20px;
  cursor: pointer;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}
#site-header .btn-primary {
  background: var(--violet);
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(128, 90, 213, 0.7);
}
#site-header .btn-primary:hover {
  background: var(--violet-dark);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -8px rgba(128, 90, 213, 0.8);
}
#site-header .btn-primary .arrow {
  transition: transform 0.2s ease;
}
#site-header .btn-primary:hover .arrow {
  transform: translateX(3px);
}

/* hamburger (hidden on desktop; nav-collapse is transparent on desktop) */
#site-header .nav-collapse {
  display: contents;
}
#site-header .nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 44px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(28, 26, 34, 0.05);
}
#site-header .nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition:
    transform 0.22s ease,
    opacity 0.18s ease;
}
#site-header .nav-toggle.open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
#site-header .nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
#site-header .nav-toggle.open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ---------- Footer ---------- */
#site-footer .footer {
  background: #100e18;
  color: #fff;
  padding: 78px 0 0;
  overflow-x: clip;
}
#site-footer .footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
  gap: 32px;
}
#site-footer .footer .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}
#site-footer .footer .brand .brand-logo {
  filter: brightness(0) invert(1);
  height: 30px;
  width: auto;
  display: block;
}
#site-footer .footer .f-tag {
  color: rgba(255, 255, 255, 0.55);
  font-size: 13.5px;
  margin-top: 16px;
  max-width: 270px;
  line-height: 1.55;
}
#site-footer .footer .f-offices {
  margin-top: 20px;
  max-width: 300px;
  display: grid;
  gap: 7px;
}
#site-footer .footer .f-offices .f-office {
  font-size: 11.5px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.42);
}
#site-footer .footer .f-offices .f-office b {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 10.5px;
  margin-right: 7px;
}
#site-footer .fcol h5 {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
}
#site-footer .fcol a {
  display: block;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 14px;
  margin-top: 13px;
  transition: color 0.15s ease;
}
#site-footer .fcol a:hover {
  color: #fff;
}
#site-footer .footer-word {
  font-family: "Cal Sans", sans-serif;
  font-size: clamp(90px, 19vw, 248px);
  line-height: 0.86;
  text-align: center;
  margin-top: 46px;
  letter-spacing: -0.03em;
  user-select: none;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background-image: radial-gradient(
    circle 260px at var(--torch-x, -500px) var(--torch-y, -500px),
    #c9b6f3 0%,
    var(--violet) 40%,
    rgba(255, 255, 255, 0.06) 70%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
#site-footer .footer-legal {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
#site-footer .footer-legal .links2 a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 13px;
  margin-right: 20px;
}
#site-footer .footer-legal .links2 a:hover {
  color: #fff;
}
#site-footer .footer-legal .copy {
  color: rgba(255, 255, 255, 0.45);
  font-size: 13px;
}

/* ---------- Shared product-demo shell (feature pages) ---------- */
/* A faithful, clickable Pocketknife portal mock in a browser frame.
   Namespaced pkd-* so it never collides with page-inline demo styles
   (e.g. the invoices product-frame). Relies on each page's inline
   :root palette (--line, --violet, --violet-50, --paper-soft, etc.). */
.pkd-frame {
  position: relative;
  margin: 40px auto 0;
  max-width: 900px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  text-align: left;
}
.pkd-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 14px 18px;
}
.pkd-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.pkd-dots {
  display: flex;
  gap: 6px;
}
.pkd-dots i {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
}
.pkd-dots i:nth-child(1) {
  background: #f0c2c2;
}
.pkd-dots i:nth-child(2) {
  background: #f2e0b8;
}
.pkd-dots i:nth-child(3) {
  background: #c5e6cd;
}
.pkd-tab-title {
  color: var(--ink-faint);
  font-size: 12.5px;
  font-weight: 500;
}
.pkd-sync {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(31, 157, 94, 0.18);
  border-radius: 999px;
  background: var(--green-50);
  color: var(--green);
  flex: none;
  font-size: 11.5px;
  font-weight: 800;
  padding: 6px 10px;
}
.pkd-sync .pkd-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(31, 157, 94, 0.5);
  animation: pkdPulse 1.8s infinite;
}
.pkd-body {
  padding: 22px;
}
.pkd-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.pkd-h {
  font-family: "Cal Sans", sans-serif;
  font-size: 23px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.pkd-sub {
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 12.5px;
}
.pkd-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--violet-100);
  border-radius: 13px;
  background: var(--violet-50);
  color: var(--violet-dark);
  font-size: 12.5px;
  font-weight: 700;
  padding: 10px 13px;
  margin-bottom: 16px;
}
.pkd-banner .pkd-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--violet);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 10.5px;
  font-weight: 800;
  overflow: hidden;
  flex: none;
}
.pkd-banner .pkd-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pkd-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.pkd-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-soft);
  color: var(--ink-soft);
  cursor: pointer;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 13px;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}
.pkd-chip:hover {
  color: var(--ink);
}
.pkd-chip.active {
  background: var(--violet);
  border-color: var(--violet);
  color: #fff;
}
.pkd-table {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.pkd-row {
  display: grid;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 13px 15px;
  font-size: 13px;
}
.pkd-row:last-child {
  border-bottom: 0;
}
.pkd-row.head {
  background: rgba(128, 90, 213, 0.045);
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pkd-doc {
  color: var(--violet-dark);
  font-weight: 700;
}
.pkd-amount {
  font-family: "Cal Sans", sans-serif;
  font-size: 15px;
  color: var(--ink);
}
.pkd-was {
  color: var(--ink-faint);
  font-size: 11.5px;
  text-decoration: line-through;
  margin-right: 6px;
}
.pkd-note {
  margin: 2px 0 14px;
  font-size: 12px;
  color: var(--ink-faint);
}
/* Quantity stepper — identical pill on every page (values match
   recurring-orders.html; do not use page --line / --line-strong here). */
.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(28, 26, 34, 0.12);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}
.qty-control button {
  border: 0;
  background: #fff;
  color: #6b46c1;
  cursor: pointer;
  display: grid;
  font-family: "Poppins", sans-serif;
  font-weight: 800;
  height: 28px;
  place-items: center;
  width: 28px;
  line-height: 1;
  flex: none;
}
.qty-control button:active {
  background: var(--violet-50);
}
.qty-control button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
/* centre value — same <span data-qty> markup as recurring-orders */
.qty-control [data-qty] {
  border-left: 1px solid rgba(28, 26, 34, 0.08);
  border-right: 1px solid rgba(28, 26, 34, 0.08);
  min-width: 34px;
  text-align: center;
  font-weight: 700;
  font-family: "Poppins", sans-serif;
  font-size: 13px;
  line-height: 28px;
  flex: none;
}
/* recurring-orders line list — shared by pkd demos on mobile */
.line-name b {
  display: block;
  color: var(--ink);
  font-weight: 700;
}
.line-name span {
  display: block;
  color: var(--ink-faint);
  font-size: 11.5px;
  margin-top: 2px;
}
.line-price {
  font-family: "Cal Sans", sans-serif;
  font-size: 16px;
}
.pkd-row.line-row > :nth-child(2),
.pkd-row.has-stepper > :nth-child(2) {
  justify-self: start;
}
.pkd-row > input.pkd-qty[type="hidden"] {
  display: none;
}
/* bare .pkd-qty only appears briefly before site.js wraps it */
.pkd-qty {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-family: "Cal Sans", sans-serif;
  font-size: 14px;
  text-align: center;
  padding: 6px 4px;
  -moz-appearance: textfield;
}
.pkd-qty:focus {
  outline: none;
  border-color: var(--violet);
  box-shadow: 0 0 0 3px var(--violet-50);
}
.pkd-qty::-webkit-outer-spin-button,
.pkd-qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.pkd-hint {
  display: block;
  margin-top: 3px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-faint);
}
.pkd-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}
.pkd-col-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 10px;
}
.pkd-perm-list {
  display: grid;
  gap: 8px;
}
.pkd-perm {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}
.pkd-perm:hover {
  border-color: var(--violet-100);
}
.pkd-perm input {
  accent-color: var(--violet);
  width: 16px;
  height: 16px;
  flex: none;
}
.pkd-perm.on {
  background: var(--violet-50);
  border-color: var(--violet-100);
  color: var(--violet-dark);
}
.pkd-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 36px;
}
.pkd-pill {
  border: 1px solid var(--violet-100);
  background: var(--violet-50);
  color: var(--violet-dark);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 11px;
}
@media (max-width: 620px) {
  .pkd-cols {
    grid-template-columns: 1fr;
  }
}

/* Interactive demo shell: stack rows into labelled fields on mobile.
   Rows set grid columns via inline styles, so !important is required. */
@media (max-width: 720px) {
  .pkd-body {
    padding: 16px;
  }
  .pkd-head {
    flex-wrap: wrap;
    gap: 10px;
  }
  .pkd-row {
    grid-template-columns: 1fr !important;
    gap: 6px;
    padding: 14px 15px;
  }
  .pkd-row.head {
    display: none;
  }
  .pkd-row > [data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-faint, #8b8794);
  }
  .qty-control button {
    display: grid;
    width: 44px;
    height: 42px;
    font-size: 18px;
  }
  .qty-control [data-qty] {
    min-width: 46px;
    line-height: 42px;
  }
  /* same grid as recurring-orders .line-row on mobile */
  .pkd-row.line-row,
  .pkd-row.has-stepper {
    grid-template-columns: 1fr auto !important;
    gap: 10px 12px !important;
    align-items: center;
  }
  .pkd-row.line-row > :nth-child(1),
  .pkd-row.line-row .line-name,
  .pkd-row.has-stepper > :nth-child(1) {
    grid-column: 1 / -1;
  }
  .pkd-row.line-row .qty-control,
  .pkd-row.has-stepper > :nth-child(2) {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
  }
  .pkd-row.line-row > :nth-child(3),
  .pkd-row.has-stepper > :nth-child(3) {
    display: none;
  }
  .pkd-row.line-row .line-price,
  .pkd-row.line-row > :nth-child(4),
  .pkd-row.has-stepper > :nth-child(4) {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    align-self: center;
    text-align: right;
  }
  /* read-only line rows (e.g. order approvals): product on top, qty left,
     line total right — same rhythm as recurring-orders without +/- buttons */
  .pkd-row.has-line-qty {
    grid-template-columns: 1fr auto !important;
    gap: 10px 12px;
    align-items: center;
  }
  .pkd-row.has-line-qty > :nth-child(1) {
    grid-column: 1 / -1;
  }
  .pkd-row.has-line-qty > :nth-child(2) {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
    font-weight: 700;
    font-size: 15px;
  }
  .pkd-row.has-line-qty > :nth-child(3) {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    text-align: right;
  }
  .pkd-row.has-stepper > [data-label]::before,
  .pkd-row.has-line-qty > [data-label]::before {
    display: none;
  }
  .pkd-summary {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .pkd-summary-totals {
    min-width: 0;
  }
  .pkd-actions .pkd-btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}
.pkd-break {
  display: block;
  margin-top: 3px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--green);
}
.pkd-status {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.pkd-status.is-pending {
  background: var(--violet-50);
  color: var(--violet-dark);
}
.pkd-status.is-ok {
  background: var(--green-50);
  color: var(--green);
}
.pkd-status.is-warn {
  background: #fdf4f4;
  color: #c0392b;
}
.pkd-meter {
  margin-top: 4px;
  height: 8px;
  border-radius: 999px;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  overflow: hidden;
}
.pkd-meter > i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--violet);
  transition: width 0.4s ease;
}
.pkd-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}
.pkd-btn {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: "Poppins", sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  padding: 10px 14px;
  transition:
    background 0.15s ease,
    transform 0.15s ease;
}
.pkd-btn:hover {
  transform: translateY(-1px);
}
.pkd-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}
.pkd-btn.primary {
  background: var(--violet);
  border-color: var(--violet);
  color: #fff;
}
.pkd-btn.danger {
  color: #c0392b;
  border-color: #f0d0cc;
}
.pkd-summary {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--ink-faint);
  font-size: 12.5px;
  font-weight: 700;
  padding: 11px 13px;
}
.pkd-summary-note {
  flex: 1;
}
.pkd-summary-totals {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 170px;
}
.pkd-summary-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.pkd-summary-line span:last-child {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.pkd-summary-line.grand {
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}
.pkd-summary b {
  color: var(--ink);
  font-family: "Cal Sans", sans-serif;
  font-size: 17px;
  font-weight: 400;
}
.pkd-success {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  border: 1px solid rgba(31, 157, 94, 0.2);
  border-radius: 13px;
  background: var(--green-50);
  color: var(--green);
  font-size: 12.5px;
  font-weight: 800;
  padding: 11px 12px;
  opacity: 0;
  transform: translateY(-4px);
  transition:
    opacity 0.24s ease,
    transform 0.24s ease;
}
.pkd-success.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.pkd-success[hidden] {
  display: none;
}
.pkd-log {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}
.pkd-log-item {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.45;
}
.pkd-log-item::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px var(--green-50);
}
@keyframes pkdPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(31, 157, 94, 0.5);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(31, 157, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(31, 157, 94, 0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .pkd-sync .pkd-pulse {
    animation: none;
  }
}

@media (max-width: 900px) {
  #site-footer .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- Header: mobile nav ---------- */
@media (max-width: 900px) {
  #site-header .nav-toggle {
    display: inline-flex;
  }
  /* keep the bar compact so only the brand + hamburger show, but keep the
     brand aligned to the page gutter rather than jammed to the edge */
  #site-header .nav {
    height: 64px;
    padding: 0 16px;
  }
  /* the floating pill must inset from the viewport edges on phones (its
     desktop max-width of 1120px is wider than the screen, so without a
     side margin it stretches edge to edge and looks too wide) */
  #site-header header.is-floating .nav {
    height: 60px;
    max-width: none;
    margin: 0 12px;
    padding: 0 10px 0 16px;
  }
  /* the wrapper becomes a dropdown panel toggled by the hamburger */
  #site-header .nav-collapse {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 12px;
    right: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    padding: 12px;
    background: var(--paper, #fbfaf8);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
  }
  #site-header .nav-collapse.open {
    display: flex;
  }
  /* display:flex overrides feature pages' inline `nav.links{display:none}`
     so the links still appear inside the mobile panel */
  #site-header nav.links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    width: 100%;
  }
  #site-header .nav-item {
    height: auto;
    display: block;
    width: 100%;
  }
  #site-header .nav-trigger,
  #site-header nav.links > a {
    width: 100%;
    justify-content: space-between;
    padding: 13px 12px;
    border-radius: 11px;
    font-size: 15.5px;
  }
  #site-header .nav-trigger:hover,
  #site-header .nav-item.open .nav-trigger,
  #site-header nav.links > a:hover {
    background: var(--violet-50);
  }
  /* megas render inline inside the panel instead of as floating popovers */
  #site-header .mega {
    position: static;
    transform: none;
    width: 100%;
    padding-top: 4px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    display: none;
  }
  #site-header .nav-item.open .mega {
    display: block;
    transform: none;
  }
  #site-header .mega-inner {
    grid-template-columns: 1fr;
    border-radius: 14px;
  }
  #site-header .mega-grid {
    grid-template-columns: 1fr;
    padding: 8px;
    gap: 2px;
  }
  #site-header .mega-promo {
    display: none;
  }
  #site-header .nav-right {
    width: 100%;
    margin-top: 6px;
  }
  #site-header .nav-right .btn {
    width: 100%;
    justify-content: center;
    padding: 13px 20px;
  }
}

/* ---------- Comparison tables (.compare / .matrix): mobile cards ---------- */
/* Loaded after each page's inline styles, so this overrides the per-page
   media rules that (incorrectly) forced a single column inside an 780px
   horizontal-scroll row. Each row becomes a labelled card instead. */
@media (max-width: 980px) {
  .compare,
  .matrix {
    display: grid;
    gap: 14px;
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }
  .compare-row,
  .matrix-row {
    grid-template-columns: 1fr;
    min-width: 0;
    border: 1px solid var(--line, rgba(28, 26, 34, 0.08));
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow-sm, 0 8px 20px -10px rgba(43, 28, 80, 0.22));
    overflow: hidden;
  }
  /* header row is redundant once each cell carries its own label */
  .compare-row:first-child,
  .matrix-row:first-child {
    display: none;
  }
  .compare-cell,
  .matrix-cell {
    border-left: 0;
    border-top: 1px solid var(--line, rgba(28, 26, 34, 0.08));
    padding: 14px 16px;
  }
  /* first cell = card title */
  .compare-cell:first-child,
  .matrix-cell:first-child {
    border-top: 0;
    background: var(--dark, #161320);
    color: #fff;
    font-size: 15px;
  }
  .compare-cell[data-label]::before,
  .matrix-cell[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--violet-dark, #6b46c1);
  }
}

/* ---------- Footer: mobile ---------- */
@media (max-width: 640px) {
  #site-footer .footer {
    padding: 48px 0 0;
  }
  #site-footer .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  #site-footer .footer .f-tag,
  #site-footer .footer .f-offices {
    max-width: none;
  }
  #site-footer .footer-word {
    font-size: clamp(58px, 21vw, 120px);
    margin-top: 30px;
  }
  #site-footer .footer-legal {
    padding: 20px 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  #site-header header,
  #site-header header::before,
  #site-header .nav {
    transition: none;
  }
}

/* ---------- Video Player Modal ---------- */
.pk-video-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.pk-video-modal.is-active {
  opacity: 1;
  pointer-events: auto;
}

.pk-video-container {
  position: relative;
  width: 90%;
  max-width: 1000px;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
  transform: scale(0.95);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pk-video-modal.is-active .pk-video-container {
  transform: scale(1);
}

.pk-video-player {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.pk-video-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, transform 0.2s, border-color 0.2s;
  z-index: 100000;
}

.pk-video-close:hover {
  background-color: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.08);
}

.pk-video-close:active {
  transform: scale(0.95);
}

/* Mobile responsive full screen adjustments */
@media (max-width: 768px) {
  .pk-video-container {
    width: 100%;
    height: 100%;
    max-width: none;
    aspect-ratio: auto;
    border-radius: 0;
  }
  
  .pk-video-player {
    object-fit: contain;
  }
  
  .pk-video-close {
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    font-size: 24px;
    background: rgba(0, 0, 0, 0.5);
  }
}
