/* ==========================================================
   PLUMBING SERVICE SYSTEM — Calm Chaos portfolio concept
   Deliberately NOT the Next Level red/black identity.
   No inline styles anywhere: the deployed CSP is style-src 'self'.
   ========================================================== */

:root {
  --pl-ink: #061B2B;
  --pl-navy: #0B2D45;
  --pl-blue: #0677C8;
  --pl-aqua: #20B6C8;
  --pl-copper: #E9782C;
  --pl-white: #FFFFFF;
  --pl-canvas: #F4F8FA;
  --pl-surface: #FFFFFF;
  --pl-text: #14212B;
  --pl-muted: #5E6B74;
  --pl-border: #D4E0E6;
  --pl-success: #18794E;
  --pl-warning: #9A6700;
  --pl-danger: #B42318;

  /* derived, accessibility-checked */
  --pl-blue-ink: #05619F;          /* blue that clears 4.5:1 on white text-on-fill */
  --pl-navy-soft: #12405F;
  --pl-shade: rgba(6, 27, 43, .08);
  --pl-shade-2: rgba(6, 27, 43, .14);

  --pl-r: 10px;
  --pl-r-lg: 16px;
  --pl-gutter: clamp(1rem, 4vw, 2.5rem);
  --pl-maxw: 78rem;

  --pl-t-fast: 140ms;
  --pl-t-base: 200ms;
  --pl-ease: cubic-bezier(.2, 0, 0, 1);

  --pl-s1: .25rem; --pl-s2: .5rem;  --pl-s3: .75rem; --pl-s4: 1rem;
  --pl-s5: 1.5rem; --pl-s6: 2rem;   --pl-s7: 2.5rem; --pl-s8: 3.5rem;
  --pl-s9: 5rem;

  --pl-fs-xs: .875rem;   /* 14px control floor */
  --pl-fs-sm: .9375rem;
  --pl-fs-md: 1rem;      /* body 16px */
  --pl-fs-lg: 1.125rem;
  --pl-fs-xl: 1.375rem;
  --pl-fs-2xl: 1.75rem;
  --pl-fs-3xl: 2.25rem;
  --pl-fs-4xl: 3rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body.pl {
  margin: 0;
  background: var(--pl-canvas);
  color: var(--pl-text);
  font: 400 var(--pl-fs-md)/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
}

h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 var(--pl-s3); color: var(--pl-ink); }
h1 { font-size: var(--pl-fs-4xl); letter-spacing: -.02em; }
h2 { font-size: var(--pl-fs-3xl); letter-spacing: -.015em; }
h3 { font-size: var(--pl-fs-xl); }
p { margin: 0 0 var(--pl-s4); }
img { max-width: 100%; height: auto; }

.pl-wrap { width: 100%; max-width: var(--pl-maxw); margin-inline: auto; padding-inline: var(--pl-gutter); }
.pl-measure { max-width: 62ch; }
.pl-muted { color: var(--pl-muted); }
.pl-center { text-align: center; }
.pl-sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.pl-skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--pl-navy); color: var(--pl-white); padding: var(--pl-s3) var(--pl-s4);
}
.pl-skip:focus { left: var(--pl-s4); top: var(--pl-s4); }

/* ---------- concept disclosure ---------- */
.pl-disclose {
  background: var(--pl-ink); color: #DCE7EE;
  font-size: var(--pl-fs-xs); line-height: 1.4;
}
.pl-disclose__in { padding-block: var(--pl-s3); }
.pl-disclose b { color: var(--pl-white); letter-spacing: .06em; }

/* ---------- header ---------- */
.pl-head {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--pl-border);
}
@supports (backdrop-filter: blur(8px)) {
  .pl-head { background: rgba(255, 255, 255, .82); backdrop-filter: blur(12px); }
}
.pl-head__in {
  display: flex; align-items: center; gap: var(--pl-s4);
  min-height: 66px; flex-wrap: wrap; padding-block: var(--pl-s2);
}
.pl-logo {
  display: inline-flex; align-items: baseline; gap: .4rem;
  text-decoration: none; color: var(--pl-ink); flex: none;
  min-height: 44px; align-content: center; flex-wrap: wrap;
}
.pl-logo__mark {
  font-weight: 800; font-size: var(--pl-fs-lg); letter-spacing: -.02em;
  color: var(--pl-navy);
}
.pl-logo__sub {
  font-size: var(--pl-fs-xs); color: var(--pl-muted); letter-spacing: .04em;
}
.pl-nav { display: flex; gap: var(--pl-s1); flex-wrap: wrap; align-items: center; margin-inline-start: auto; }
.pl-nav a, .pl-nav button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding-inline: var(--pl-s3);
  font-size: var(--pl-fs-xs); font-weight: 600;
  color: var(--pl-navy); text-decoration: none;
  background: transparent; border: 0; border-radius: var(--pl-r); cursor: pointer;
  font-family: inherit;
}
.pl-nav a:hover, .pl-nav button:hover { background: var(--pl-shade); }
.pl-nav svg, .pl-btn svg, .pl-appt svg, .pl-table svg { width: 18px; height: 18px; flex: none; }
.pl-badge {
  display: inline-flex; align-items: center; min-height: 28px;
  padding: 0 var(--pl-s3); border-radius: 999px;
  background: var(--pl-copper); color: #2B1103;
  font-size: var(--pl-fs-xs); font-weight: 800; letter-spacing: .08em;
  /* `white-space: nowrap` is right for a short status pill and wrong for the
     demonstration-mode banner, whose sentence is 544-575 CSS px on one line.
     With `width=device-width` Chrome does not scroll that overflow — it widens
     the LAYOUT VIEWPORT, so a 320px device reported innerWidth 560 and every
     measurement taken at "320" was really taken at 560. Wrapping is the fix;
     the pill shape survives because the radius is larger than one line. */
  white-space: normal;
  max-width: 100%;
}
@media (min-width: 900px) { .pl-badge { white-space: nowrap; } }

/* ---------- buttons ---------- */
.pl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--pl-s2);
  min-height: 48px; min-width: 48px; padding: 0 var(--pl-s5);
  border-radius: var(--pl-r); border: 1px solid transparent;
  font: 700 var(--pl-fs-sm)/1 inherit; font-family: inherit;
  cursor: pointer; text-decoration: none; text-align: center;
  transition: background var(--pl-t-fast) var(--pl-ease),
              border-color var(--pl-t-fast) var(--pl-ease);
}
.pl-btn--primary { background: var(--pl-blue-ink); color: var(--pl-white); }
.pl-btn--primary:hover { background: #04517F; }
.pl-btn--ghost { background: var(--pl-white); color: var(--pl-navy); border-color: var(--pl-border); }
.pl-btn--ghost:hover { border-color: var(--pl-navy); }
.pl-btn--quiet { background: transparent; color: var(--pl-navy); }
.pl-btn--quiet:hover { background: var(--pl-shade); }
.pl-btn--danger { background: var(--pl-white); color: #8E1B12; border-color: #E6B4AE; }
.pl-btn--danger:hover { border-color: #B42318; }
.pl-btn--sm { min-height: 44px; padding-inline: var(--pl-s4); font-size: var(--pl-fs-xs); }
.pl-btn[disabled] { opacity: .5; cursor: not-allowed; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--pl-blue-ink); outline-offset: 2px; border-radius: 4px;
}

/* ---------- hero ---------- */
.pl-hero { position: relative; background: var(--pl-ink); color: var(--pl-white); overflow: hidden; }
.pl-hero__media { position: absolute; inset: 0; z-index: 0; }
.pl-hero__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pl-hero__scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    /* The text column stays dark so the 14px eyebrow keeps 4.5:1; the falloff
       is pushed right so the technical artwork still reads. Measured: a flat
       lighter scrim took the eyebrow to 3.43. */
    linear-gradient(90deg, rgba(6,27,43,.96) 0%, rgba(6,27,43,.93) 40%,
                    rgba(6,27,43,.62) 68%, rgba(6,27,43,.28) 100%),
    linear-gradient(0deg, rgba(6,27,43,.55), rgba(6,27,43,.10));
}
.pl-hero__in { position: relative; z-index: 2; padding-block: clamp(3rem, 9vw, 6.5rem); }
.pl-hero__eyebrow {
  font-size: var(--pl-fs-xs); font-weight: 800; letter-spacing: .16em;
  text-transform: uppercase; color: var(--pl-aqua); margin-bottom: var(--pl-s3);
  /* Shrink-wrap the box to the text. As a full-width block its rect reached
     into the bright right-hand side of the hero where no glyph is painted, so
     the worst-pixel sampler measured backdrop the reader never sees behind
     this text. Now the measured box is the painted box. */
  width: max-content; max-width: 100%;
}
.pl-hero h1 { color: var(--pl-white); max-width: 18ch; text-transform: uppercase; }
.pl-hero__copy { color: #CFDDE7; max-width: 54ch; font-size: var(--pl-fs-lg); }
.pl-hero__cta { display: flex; gap: var(--pl-s3); flex-wrap: wrap; margin-top: var(--pl-s5); }

/* ---------- trust bar ---------- */
.pl-trust { background: var(--pl-navy); color: #D6E4EE; }
.pl-trust ul {
  list-style: none; margin: 0; padding-block: var(--pl-s4);
  display: grid; gap: var(--pl-s3);
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  font-size: var(--pl-fs-xs);
}
.pl-trust li { display: flex; gap: var(--pl-s2); align-items: flex-start; }
.pl-trust svg { flex: none; width: 18px; height: 18px; color: var(--pl-aqua); margin-top: 1px; }

/* ---------- sections ---------- */
.pl-sec { padding-block: clamp(2.5rem, 7vw, 5rem); }
.pl-sec--alt { background: var(--pl-white); border-block: 1px solid var(--pl-border); }
.pl-sec__head { margin-bottom: var(--pl-s6); }
.pl-eyebrow {
  font-size: var(--pl-fs-xs); font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--pl-blue-ink); margin-bottom: var(--pl-s2);
}

/* ---------- service selector ---------- */
.pl-svc { display: grid; gap: var(--pl-s3); grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.pl-svc__btn {
  display: flex; align-items: center; gap: var(--pl-s3);
  min-height: 64px; padding: var(--pl-s3) var(--pl-s4);
  background: var(--pl-surface); border: 1px solid var(--pl-border);
  border-radius: var(--pl-r); cursor: pointer; text-align: left;
  font: 700 var(--pl-fs-sm)/1.25 inherit; font-family: inherit; color: var(--pl-ink);
  transition: border-color var(--pl-t-fast) var(--pl-ease),
              box-shadow var(--pl-t-fast) var(--pl-ease);
  width: 100%;
}
.pl-svc__btn:hover { border-color: var(--pl-blue); }
.pl-svc__btn[aria-pressed="true"] {
  border-color: var(--pl-blue-ink); box-shadow: inset 0 0 0 1px var(--pl-blue-ink);
  background: #F2F8FD;
}
.pl-svc__btn[aria-pressed="true"] .pl-svc__ico { background: var(--pl-blue-ink); color: var(--pl-white); }
.pl-svc__ico {
  flex: none; width: 42px; height: 42px; border-radius: 9px;
  display: grid; place-items: center;
  background: #EAF2F8; color: var(--pl-navy);
}
.pl-svc__ico svg { width: 22px; height: 22px; }
.pl-svc__detail {
  margin-top: var(--pl-s5); padding: var(--pl-s5);
  background: var(--pl-surface); border: 1px solid var(--pl-border); border-radius: var(--pl-r-lg);
}
.pl-svc__detail h3 { margin-bottom: var(--pl-s2); }
.pl-svc__acts { display: flex; gap: var(--pl-s3); flex-wrap: wrap; margin-top: var(--pl-s4); }

/* ---------- concierge ---------- */
.pl-conc {
  background: var(--pl-surface); border: 1px solid var(--pl-border);
  border-radius: var(--pl-r-lg); overflow: hidden;
}
.pl-conc__head {
  background: var(--pl-navy); color: var(--pl-white);
  padding: var(--pl-s4) var(--pl-s5);
  display: flex; align-items: center; gap: var(--pl-s3); flex-wrap: wrap;
}
.pl-conc__head h3 { color: var(--pl-white); margin: 0; font-size: var(--pl-fs-md); }
.pl-conc__tag {
  font-size: var(--pl-fs-xs); font-weight: 800; letter-spacing: .08em;
  color: #08202F; background: var(--pl-aqua);
  padding: .15rem var(--pl-s2); border-radius: 999px;
}
.pl-conc__body { padding: var(--pl-s5); }
.pl-conc__log { display: grid; gap: var(--pl-s3); margin-bottom: var(--pl-s4); }
.pl-msg { display: flex; gap: var(--pl-s3); align-items: flex-start; }
.pl-msg__who {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font-size: var(--pl-fs-xs); font-weight: 800;
  background: #EAF2F8; color: var(--pl-navy);
}
.pl-msg--you .pl-msg__who { background: var(--pl-navy); color: var(--pl-white); }
.pl-msg__txt {
  background: #F2F6F9; border: 1px solid var(--pl-border);
  border-radius: var(--pl-r); padding: var(--pl-s3) var(--pl-s4);
  font-size: var(--pl-fs-sm); max-width: 60ch;
}
.pl-msg--you .pl-msg__txt { background: #EAF3FA; }
.pl-msg--stop .pl-msg__txt { background: #FDF3F2; border-color: #E6B4AE; }
.pl-msg--stop .pl-msg__who { background: var(--pl-danger); color: var(--pl-white); }
.pl-msg--urgent .pl-msg__txt { background: #FDF6EE; border-color: #EBCBA6; }
.pl-msg--urgent .pl-msg__who { background: var(--pl-copper); color: #2B1103; }
.pl-msg__label {
  display: block; font-weight: 800; font-size: var(--pl-fs-xs);
  letter-spacing: .06em; text-transform: uppercase; margin-bottom: var(--pl-s1);
}
.pl-chips { display: flex; gap: var(--pl-s2); flex-wrap: wrap; }
.pl-chip {
  min-height: 44px; padding: 0 var(--pl-s4);
  border-radius: 999px; border: 1px solid var(--pl-border);
  background: var(--pl-surface); color: var(--pl-navy);
  font: 600 var(--pl-fs-xs)/1 inherit; font-family: inherit; cursor: pointer;
  display: inline-flex; align-items: center;
}
.pl-chip:hover { border-color: var(--pl-blue); background: #F2F8FD; }
.pl-chip[aria-pressed="true"] {
  background: var(--pl-blue-ink); color: var(--pl-white); border-color: var(--pl-blue-ink);
}
.pl-conc__ask { display: flex; gap: var(--pl-s2); margin-top: var(--pl-s4); flex-wrap: wrap; }
.pl-conc__ask input {
  flex: 1 1 16rem; min-height: 48px; padding: 0 var(--pl-s4);
  border: 1px solid var(--pl-border); border-radius: var(--pl-r);
  font: inherit; font-size: var(--pl-fs-sm); color: var(--pl-text); background: var(--pl-white);
}
.pl-steps { display: flex; gap: var(--pl-s2); flex-wrap: wrap; margin-bottom: var(--pl-s4); }
.pl-step {
  font-size: var(--pl-fs-xs); font-weight: 700; color: var(--pl-muted);
  padding: .2rem var(--pl-s2); border-radius: 999px; border: 1px solid var(--pl-border);
}
.pl-step[data-on="1"] { color: var(--pl-white); background: var(--pl-navy); border-color: var(--pl-navy); }
.pl-step[data-done="1"] { color: var(--pl-success); border-color: #A9D3BE; }

/* ---------- process ---------- */
.pl-proc { display: grid; gap: var(--pl-s4); grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); counter-reset: s; }
.pl-proc__i {
  background: var(--pl-surface); border: 1px solid var(--pl-border);
  border-radius: var(--pl-r-lg); padding: var(--pl-s5);
}
.pl-proc__n {
  display: inline-grid; place-items: center; width: 34px; height: 34px;
  border-radius: 50%; background: var(--pl-navy); color: var(--pl-white);
  font-weight: 800; font-size: var(--pl-fs-sm); margin-bottom: var(--pl-s3);
}
.pl-proc__i h3 { font-size: var(--pl-fs-md); }
.pl-proc__i p { font-size: var(--pl-fs-sm); color: var(--pl-muted); margin: 0; }

/* ---------- feature showcase ---------- */
.pl-feat { display: grid; gap: var(--pl-s5); }
.pl-feat__i {
  display: grid; gap: var(--pl-s5); align-items: center;
  grid-template-columns: 1fr;
  background: var(--pl-surface); border: 1px solid var(--pl-border);
  border-radius: var(--pl-r-lg); overflow: hidden;
}
@media (min-width: 860px) {
  .pl-feat__i { grid-template-columns: 1.05fr .95fr; }
  .pl-feat__i:nth-child(even) .pl-feat__media { order: 2; }
}
.pl-feat__media { margin: 0; background: var(--pl-ink); }
.pl-feat__media img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 3 / 2; }
.pl-feat__txt { padding: var(--pl-s5); }
.pl-feat__txt h3 { margin-bottom: var(--pl-s2); }
.pl-feat__txt ul { margin: 0 0 var(--pl-s4); padding-left: 1.1rem; font-size: var(--pl-fs-sm); color: var(--pl-muted); }
.pl-feat__txt li { margin-bottom: var(--pl-s1); }

/* ---------- plan cards ---------- */
.pl-plans { display: grid; gap: var(--pl-s4); grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.pl-plan {
  background: var(--pl-surface); border: 1px solid var(--pl-border);
  border-radius: var(--pl-r-lg); padding: var(--pl-s5); display: flex; flex-direction: column;
}
.pl-plan h3 { font-size: var(--pl-fs-lg); }
.pl-plan ul { margin: 0 0 var(--pl-s4); padding-left: 1.1rem; font-size: var(--pl-fs-sm); color: var(--pl-muted); }
.pl-plan .pl-btn { margin-top: auto; }
.pl-sample {
  display: inline-block; font-size: var(--pl-fs-xs); font-weight: 800;
  letter-spacing: .05em; color: #6B4A00; background: #FDF3DC;
  border: 1px solid #E8D2A0; border-radius: 4px; padding: .1rem .4rem;
}

/* ---------- zip checker ---------- */
.pl-zip { display: flex; gap: var(--pl-s2); flex-wrap: wrap; align-items: flex-start; }
.pl-zip input {
  min-height: 48px; padding: 0 var(--pl-s4); width: 11rem;
  border: 1px solid var(--pl-border); border-radius: var(--pl-r);
  font: inherit; font-size: var(--pl-fs-sm); background: var(--pl-white); color: var(--pl-text);
}
.pl-note {
  margin-top: var(--pl-s3); padding: var(--pl-s3) var(--pl-s4);
  border-radius: var(--pl-r); font-size: var(--pl-fs-sm);
  background: #EAF3FA; border: 1px solid #BBD8EE; color: #0B3A5C;
}
.pl-note--warn { background: #FDF6EE; border-color: #EBCBA6; color: #6B4A00; }
.pl-note--err { background: #FDF3F2; border-color: #E6B4AE; color: #8E1B12; }
.pl-note--ok { background: #EEF7F2; border-color: #A9D3BE; color: #10603C; }

/* ---------- dialogs ---------- */
.pl-dlg {
  border: 1px solid var(--pl-border); border-radius: var(--pl-r-lg);
  padding: 0; width: min(46rem, calc(100vw - 2rem)); max-height: min(86vh, 52rem);
  background: var(--pl-surface); color: var(--pl-text); overflow: hidden;
}
.pl-dlg::backdrop { background: rgba(6, 27, 43, .6); }
.pl-dlg__head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--pl-s4);
  padding: var(--pl-s4) var(--pl-s5); border-bottom: 1px solid var(--pl-border);
  position: sticky; top: 0; background: var(--pl-surface); z-index: 2;
}
.pl-dlg__head h2 { margin: 0; font-size: var(--pl-fs-xl); }
.pl-dlg__body { padding: var(--pl-s5); overflow-y: auto; max-height: calc(86vh - 9rem); }
.pl-dlg__foot {
  display: flex; gap: var(--pl-s3); flex-wrap: wrap; justify-content: flex-end;
  padding: var(--pl-s4) var(--pl-s5); border-top: 1px solid var(--pl-border);
  background: var(--pl-canvas);
}
.pl-x {
  flex: none; width: 44px; height: 44px; border-radius: var(--pl-r);
  border: 1px solid var(--pl-border); background: var(--pl-white);
  cursor: pointer; font-size: 1.25rem; line-height: 1; color: var(--pl-navy);
}
.pl-x:hover { border-color: var(--pl-navy); }

/* ---------- wizard ---------- */
.pl-wiz__bar { display: flex; gap: var(--pl-s1); margin-bottom: var(--pl-s5); flex-wrap: wrap; }
.pl-wiz__pip {
  flex: 1 1 3rem; height: 6px; border-radius: 3px; background: var(--pl-border);
}
.pl-wiz__pip[data-on="1"] { background: var(--pl-blue-ink); }
.pl-fieldset { border: 0; margin: 0 0 var(--pl-s5); padding: 0; min-inline-size: 0; }
.pl-fieldset legend { font-weight: 800; font-size: var(--pl-fs-lg); padding: 0; margin-bottom: var(--pl-s3); }
.pl-opts { display: grid; gap: var(--pl-s2); grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.pl-opt {
  display: flex; align-items: center; gap: var(--pl-s3); min-height: 48px;
  padding: var(--pl-s2) var(--pl-s4); border: 1px solid var(--pl-border);
  border-radius: var(--pl-r); background: var(--pl-surface); cursor: pointer;
  font-size: var(--pl-fs-sm);
}
.pl-opt:hover { border-color: var(--pl-blue); }
.pl-opt input { width: 20px; height: 20px; accent-color: var(--pl-blue-ink); flex: none; }
.pl-opt:has(input:checked) { border-color: var(--pl-blue-ink); background: #F2F8FD; }
.pl-ta {
  width: 100%; min-height: 6rem; padding: var(--pl-s3) var(--pl-s4);
  border: 1px solid var(--pl-border); border-radius: var(--pl-r);
  font: inherit; font-size: var(--pl-fs-sm); resize: vertical;
  background: var(--pl-white); color: var(--pl-text);
}
.pl-drop {
  border: 2px dashed var(--pl-border); border-radius: var(--pl-r-lg);
  padding: var(--pl-s6); text-align: center; background: #FAFCFD;
}
.pl-thumbs { display: grid; gap: var(--pl-s3); grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); margin-top: var(--pl-s4); }
.pl-thumb { border: 1px solid var(--pl-border); border-radius: var(--pl-r); overflow: hidden; background: var(--pl-white); }
.pl-thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: #EAF2F8; }
.pl-thumb__bar { display: flex; gap: 2px; padding: var(--pl-s1); flex-wrap: wrap; }
.pl-thumb__bar button {
  flex: 1 1 auto; min-height: 44px; min-width: 44px; border: 1px solid var(--pl-border);
  background: var(--pl-white); border-radius: 6px; cursor: pointer;
  font-size: var(--pl-fs-xs); font-family: inherit; color: var(--pl-navy);
}
.pl-thumb__bar button:hover { border-color: var(--pl-navy); }
.pl-thumb[data-primary="1"] { border-color: var(--pl-blue-ink); box-shadow: inset 0 0 0 1px var(--pl-blue-ink); }
.pl-thumb__flag {
  display: block; font-size: var(--pl-fs-xs); font-weight: 800; text-align: center;
  color: var(--pl-blue-ink); padding-bottom: var(--pl-s1);
}
.pl-sum { list-style: none; margin: 0; padding: 0; }
.pl-sum li {
  display: flex; gap: var(--pl-s4); justify-content: space-between;
  padding: var(--pl-s3) 0; border-bottom: 1px solid var(--pl-border);
  font-size: var(--pl-fs-sm); flex-wrap: wrap;
}
.pl-sum dt, .pl-sum b { color: var(--pl-muted); font-weight: 600; }
.pl-sum span { font-weight: 700; text-align: right; }

/* ---------- app shell (owner / customer) ---------- */
.pl-modebar {
  background: var(--pl-ink); color: var(--pl-white);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.pl-modebar__in { display: flex; align-items: center; gap: var(--pl-s3); flex-wrap: wrap; padding-block: var(--pl-s3); }
.pl-modebar__lbl {
  font-size: var(--pl-fs-xs); font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: #9FC0D4;
}
.pl-modebar__set { display: flex; gap: var(--pl-s1); flex-wrap: wrap; }
.pl-modebar__set a {
  min-height: 44px; display: inline-flex; align-items: center; padding-inline: var(--pl-s4);
  border-radius: var(--pl-r); font-size: var(--pl-fs-xs); font-weight: 700;
  color: #D7E6F0; text-decoration: none; border: 1px solid rgba(255, 255, 255, .18);
}
.pl-modebar__set a:hover { background: rgba(255, 255, 255, .10); }
.pl-modebar__set a[aria-current="page"] { background: var(--pl-white); color: var(--pl-ink); border-color: var(--pl-white); }
.pl-modebar__auth {
  font-size: var(--pl-fs-xs); font-weight: 800; letter-spacing: .06em;
  color: var(--pl-copper); margin-inline-start: auto;
}
@media (max-width: 860px) { .pl-modebar__auth { margin-inline-start: 0; width: 100%; } }

.pl-app { display: grid; grid-template-columns: 1fr; min-height: 60vh; }
@media (min-width: 900px) { .pl-app { grid-template-columns: 16rem 1fr; } }
.pl-side { background: var(--pl-navy); padding: var(--pl-s4); }
.pl-side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.pl-side a {
  display: flex; align-items: center; gap: var(--pl-s3); min-height: 46px;
  padding: 0 var(--pl-s4); border-radius: var(--pl-r);
  color: #D3E3EE; text-decoration: none; font-size: var(--pl-fs-sm); font-weight: 600;
}
.pl-side a svg { width: 20px; height: 20px; flex: none; }
.pl-side a:hover { background: rgba(255, 255, 255, .10); }
.pl-side a[aria-current="page"] { background: var(--pl-blue-ink); color: var(--pl-white); }
.pl-main { padding: var(--pl-s5) var(--pl-gutter); min-width: 0; background: var(--pl-canvas); }

.pl-kpis { display: grid; gap: var(--pl-s4); grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
.pl-kpi { background: var(--pl-surface); border: 1px solid var(--pl-border); border-radius: var(--pl-r-lg); padding: var(--pl-s5); }
.pl-kpi__n { font-size: var(--pl-fs-3xl); font-weight: 800; color: var(--pl-ink); line-height: 1; }
.pl-kpi__l { font-size: var(--pl-fs-sm); color: var(--pl-muted); margin-top: var(--pl-s2); }
.pl-kpi__tag {
  display: inline-block; margin-top: var(--pl-s3);
  font-size: var(--pl-fs-xs); font-weight: 800; letter-spacing: .06em;
  color: #6B4A00; background: #FDF3DC; border: 1px solid #E8D2A0;
  border-radius: 4px; padding: .05rem .35rem;
}

.pl-card { background: var(--pl-surface); border: 1px solid var(--pl-border); border-radius: var(--pl-r-lg); padding: var(--pl-s5); margin-top: var(--pl-s5); }
.pl-card > h2, .pl-card > h3 { margin-top: 0; }

.pl-tablewrap { overflow-x: auto; max-width: 100%; }

/* The table declares min-width: 40rem so its columns stay legible. A grid item's
   default min-width is `auto`, so .pl-app's content column refused to shrink
   below that and Chrome widened the LAYOUT VIEWPORT instead of scrolling the
   wrapper: at a 320px device the owner board reported innerWidth 560. The page
   therefore did not scroll sideways — it simply was not 320px wide, which is why
   a horizontal-overflow check alone never saw it. min-width: 0 lets the column
   shrink so the wrapper does the scrolling it was written to do. */
.pl-app, .pl-main, .pl-app > * { min-width: 0; }
.pl-main, [data-owner-main], [data-customer-main] { min-width: 0; overflow-x: hidden; }
.pl-table { width: 100%; border-collapse: collapse; font-size: var(--pl-fs-sm); min-width: 40rem; }
.pl-table th, .pl-table td { text-align: left; padding: var(--pl-s3); border-bottom: 1px solid var(--pl-border); vertical-align: top; }
.pl-table th { font-size: var(--pl-fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--pl-muted); }
.pl-table tr:last-child td { border-bottom: 0; }
.pl-rowacts { display: flex; gap: var(--pl-s1); flex-wrap: wrap; }

.pl-pill {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: var(--pl-fs-xs); font-weight: 700; padding: .15rem var(--pl-s2);
  border-radius: 999px; border: 1px solid currentColor; white-space: nowrap;
}
.pl-pill::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; border: 2px solid currentColor; }
.pl-pill--new { color: #05619F; }
.pl-pill--new::before { background: currentColor; }
.pl-pill--urgent { color: #8E1B12; }
.pl-pill--urgent::before { background: currentColor; }
.pl-pill--sched { color: #10603C; }
.pl-pill--sched::before { background: currentColor; }
.pl-pill--wait { color: #6B4A00; }
.pl-pill--done { color: #45565F; }
.pl-pill--done::before { background: currentColor; }

.pl-board { display: grid; gap: var(--pl-s4); grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.pl-lane { background: var(--pl-surface); border: 1px solid var(--pl-border); border-radius: var(--pl-r-lg); padding: var(--pl-s4); }
.pl-lane h3 { font-size: var(--pl-fs-md); display: flex; align-items: center; gap: var(--pl-s2); }
.pl-lane__dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.pl-lane__dot[data-k="blue"] { background: var(--pl-blue-ink); }
.pl-lane__dot[data-k="aqua"] { background: #0E8A99; }
.pl-lane__dot[data-k="copper"] { background: var(--pl-copper); }
.pl-lane__dot[data-k="none"] { background: var(--pl-muted); }
.pl-appt { border: 1px solid var(--pl-border); border-radius: var(--pl-r); padding: var(--pl-s3); margin-bottom: var(--pl-s3); }
.pl-appt h4 { margin: 0 0 var(--pl-s1); font-size: var(--pl-fs-sm); }
.pl-appt p { margin: 0 0 var(--pl-s2); font-size: var(--pl-fs-xs); color: var(--pl-muted); }
.pl-appt__acts { display: flex; gap: var(--pl-s1); flex-wrap: wrap; }

.pl-est { display: grid; gap: var(--pl-s4); grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.pl-est__o { border: 1px solid var(--pl-border); border-radius: var(--pl-r-lg); padding: var(--pl-s5); background: var(--pl-surface); display: flex; flex-direction: column; }
.pl-est__o[data-sel="1"] { border-color: var(--pl-blue-ink); box-shadow: inset 0 0 0 1px var(--pl-blue-ink); }
.pl-est__k { font-size: var(--pl-fs-xs); font-weight: 800; letter-spacing: .1em; color: var(--pl-blue-ink); }
.pl-est__amt { font-size: var(--pl-fs-2xl); font-weight: 800; margin: var(--pl-s2) 0 0; }
.pl-est__o ul { font-size: var(--pl-fs-sm); color: var(--pl-muted); padding-left: 1.1rem; margin: var(--pl-s3) 0; }
.pl-est__o .pl-btn { margin-top: auto; }

.pl-toast {
  position: fixed; left: 50%; bottom: var(--pl-s5); translate: -50% 0; z-index: 60;
  background: var(--pl-ink); color: var(--pl-white);
  padding: var(--pl-s3) var(--pl-s5); border-radius: var(--pl-r);
  font-size: var(--pl-fs-sm); box-shadow: 0 10px 30px rgba(6, 27, 43, .3);
  max-width: calc(100vw - 2rem);
}
.pl-toast[hidden] { display: none; }

.pl-foot { background: var(--pl-ink); color: #B9CCD9; padding-block: var(--pl-s6); font-size: var(--pl-fs-xs); }
.pl-foot a { color: var(--pl-white); }
.pl-foot p { margin-bottom: var(--pl-s3); }

.pl-imgnote { font-size: var(--pl-fs-xs); color: var(--pl-muted); margin-top: var(--pl-s3); }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
}

/* ---------- narrow ---------- */
@media (max-width: 640px) {
  h1 { font-size: var(--pl-fs-2xl); }
  h2 { font-size: var(--pl-fs-xl); }
  .pl-head__in { min-height: 0; }
  .pl-nav { margin-inline-start: 0; width: 100%; }
  .pl-nav a, .pl-nav button { padding-inline: var(--pl-s2); }
  .pl-hero__copy { font-size: var(--pl-fs-md); }
  .pl-dlg { width: 100%; max-width: none; max-height: 92vh; border-radius: var(--pl-r-lg) var(--pl-r-lg) 0 0; margin: auto auto 0; }
  .pl-dlg__body { max-height: calc(92vh - 9rem); }
}

/* Footer links measured at 78x17 and 84x17 CSS px across all nine viewports and
   both densities — 17px-tall pointer targets. Padding gives each a 44px box
   without moving the baseline or changing the footer's layout. */
.pl-ft a, .pl-foot a, footer a {
  display: inline-block;
  padding: 0.7rem 0.35rem;
  min-height: 44px;
  line-height: 1.55;
}

/* Customer Overview at-a-glance tiles. The markup shipped without these rules,
   so the five figures rendered as an undifferentiated vertical list with the
   value in the same weight as its label — correct content, no hierarchy. */
.pl-stats {
  display: grid; gap: var(--pl-s4);
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}
.pl-stat {
  display: flex; flex-direction: column; gap: var(--pl-s2);
  padding: var(--pl-s4);
  border: 1px solid var(--pl-border); border-radius: var(--pl-r);
  background: var(--pl-canvas);
}
.pl-stat__k {
  font-size: var(--pl-fs-xs); font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--pl-muted);
}
.pl-stat__v {
  font-size: var(--pl-fs-xl); font-weight: 700; line-height: 1.2;
  color: var(--pl-ink); overflow-wrap: anywhere;
}
.pl-stat .pl-btn { align-self: flex-start; margin-top: auto; }
