:root {
  --pl-bg: #000000;
  --pl-surface: #111111;
  --pl-surface-2: #0a0a0a;
  --pl-surface-3: #1a1a1a;
  --pl-input-bg: #111111;
  --pl-border: #1f1f1f;
  --pl-border-light: #2a2a2a;
  --pl-text: #f5f5f5;
  --pl-text-muted: #8b8b8b;
  --pl-text-dim: #707070;
  --pl-accent: #f5c518;
  --pl-accent-hover: #ffd84d;
  --pl-accent-text: #000;
  --pl-green: #34d399;
  --pl-radius-sm: 0.5rem;
  --pl-radius-md: 0.75rem;
  --pl-font-base: 16px;
  --pl-text-xs: 0.875rem;
  --pl-text-sm: 0.9375rem;
}

[data-theme=light] {
  --pl-bg: #f0f1f3;
  --pl-surface: #ffffff;
  --pl-surface-2: #f5f6f8;
  --pl-surface-3: #ecedf0;
  --pl-input-bg: #ffffff;
  --pl-border: #d1d5db;
  --pl-border-light: #e5e7eb;
  --pl-text: #111827;
  --pl-text-muted: #4b5563;
  --pl-text-dim: #6b7280;
  --pl-accent: #2563eb;
  --pl-accent-hover: #1d4ed8;
  --pl-accent-text: #fff;
  --pl-green: #047857;
}

@keyframes pl-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: var(--pl-font-base);
}

body {
  margin: 0;
  background-color: var(--pl-bg);
  color: var(--pl-text);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  line-height: 1.5;
}

:focus-visible {
  outline: 3px solid var(--pl-accent);
  outline-offset: 3px;
}

:focus:not(:focus-visible) {
  outline: none;
}

.pl-page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(1rem, 3vw, 2rem);
}

.pl-container {
  width: 100%;
  min-width: 0;
  max-width: 60rem;
}

.pl-top-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.pl-back-btn,
.pl-theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.5rem 1rem;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--pl-text);
  background: var(--pl-surface);
  border: 1px solid var(--pl-text-dim);
  border-radius: var(--pl-radius-sm);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background 0.15s ease;
}
.pl-back-btn:hover,
.pl-theme-btn:hover {
  background: var(--pl-surface-3);
}

.pl-theme-btn svg {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  color: var(--pl-accent);
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pl-theme-btn__sun {
  display: block;
}
.pl-theme-btn__moon {
  display: none;
}
.pl-theme-btn__to-light {
  display: inline;
}
.pl-theme-btn__to-dark {
  display: none;
}

[data-theme=light] .pl-theme-btn .pl-theme-btn__sun {
  display: none;
}
[data-theme=light] .pl-theme-btn .pl-theme-btn__moon {
  display: block;
}
[data-theme=light] .pl-theme-btn .pl-theme-btn__to-light {
  display: none;
}
[data-theme=light] .pl-theme-btn .pl-theme-btn__to-dark {
  display: inline;
}

.pl-header {
  margin-bottom: 1.5rem;
}
.pl-header__title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--pl-text);
}
.pl-header__subtitle {
  margin: 0 0 0.75rem;
  font-size: 1.0625rem;
  color: var(--pl-text-muted);
}
.pl-header__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.75rem;
  font-size: 1rem;
  color: var(--pl-text-muted);
}
.pl-header__meta strong {
  color: var(--pl-text);
  font-weight: 700;
}
.pl-header__dot {
  width: 0.25rem;
  height: 0.25rem;
  border-radius: 50%;
  background: currentColor;
}

.pl-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1rem;
}

.pl-search {
  position: relative;
  flex: 1 1 16rem;
  display: flex;
  align-items: center;
}
.pl-search svg {
  position: absolute;
  left: 0.875rem;
  width: 1.25rem;
  height: 1.25rem;
  stroke: var(--pl-text-dim);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.pl-search input {
  width: 100%;
  min-height: 3rem;
  padding: 0.5rem 0.5rem 0.5rem 2.5rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--pl-text);
  background: var(--pl-input-bg);
  border: 1px solid var(--pl-text-dim);
  border-radius: var(--pl-radius-sm);
  -webkit-appearance: none;
  appearance: none;
}
.pl-search input::placeholder {
  color: var(--pl-text-muted);
}

.pl-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.75rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--pl-text);
  cursor: pointer;
  user-select: none;
}
.pl-toggle input {
  flex-shrink: 0;
  width: 1.375rem;
  height: 1.375rem;
  margin: 0;
  accent-color: var(--pl-accent);
  cursor: pointer;
}

.pl-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pl-card {
  background: var(--pl-surface);
  border: 1px solid var(--pl-border);
  border-radius: var(--pl-radius-md);
  overflow: hidden;
}
.pl-card__main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
}
@media (min-width: 768px) {
  .pl-card__main {
    flex-direction: row;
    align-items: center;
    gap: 1.75rem;
    padding: 1.25rem;
  }
}
.pl-card__identity {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  flex: 1 1 auto;
  min-width: 0;
}
.pl-card__logo, .pl-card__logo-placeholder {
  width: 3.5rem;
  height: 3.5rem;
  flex-shrink: 0;
  border-radius: var(--pl-radius-sm);
  background: var(--pl-surface-2);
  border: 1px solid var(--pl-border-light);
  object-fit: contain;
}
.pl-card__logo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}
.pl-card__logo-placeholder svg {
  width: 1.5rem;
  height: 1.5rem;
  stroke: var(--pl-text-dim);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pl-card__id-text {
  min-width: 0;
}
.pl-card__name {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--pl-text);
  overflow-wrap: anywhere;
}
.pl-card__address {
  margin: 0.25rem 0 0;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--pl-text-muted);
  overflow-wrap: anywhere;
}
.pl-card__stats {
  display: flex;
  gap: 1.5rem;
  flex-shrink: 0;
}
.pl-card__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
}
.pl-card__stat-num {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--pl-text);
  font-variant-numeric: tabular-nums;
}
.pl-card__stat-label {
  margin-top: 0.25rem;
  font-size: var(--pl-text-xs);
  font-weight: 500;
  color: var(--pl-text-muted);
}
.pl-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-shrink: 0;
  min-height: 3rem;
  padding: 0.5rem 1.25rem;
  background: var(--pl-accent);
  color: var(--pl-accent-text);
  font-size: 1.0625rem;
  font-weight: 700;
  border-radius: var(--pl-radius-sm);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease;
}
.pl-card__cta svg {
  width: 1.25rem;
  height: 1.25rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pl-card__cta:hover {
  background: var(--pl-accent-hover);
}
.pl-card__sub {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  padding: 0.875rem 1rem;
  border-top: 1px solid var(--pl-border-light);
}
@media (min-width: 768px) {
  .pl-card__sub {
    padding: 0.875rem 1.25rem;
  }
}

.pl-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.125rem 0 0;
  font-size: 1rem;
  font-weight: 700;
}
.pl-status--live {
  color: var(--pl-green);
}
.pl-status--closed {
  color: var(--pl-text-muted);
}
.pl-status__dot {
  flex-shrink: 0;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background: currentColor;
  animation: pl-pulse 2s infinite;
}

.pl-meta {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: var(--pl-text-sm);
  font-weight: 500;
  color: var(--pl-text-muted);
}
.pl-meta svg {
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.1875rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pl-meta--strong {
  color: var(--pl-text);
  font-weight: 700;
}

.pl-contact-list {
  display: flex;
  flex-direction: column;
}
@media (min-width: 768px) {
  .pl-contact-list {
    flex-direction: row;
  }
}

.pl-contact-row {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  min-height: 3.25rem;
  padding: 0.75rem 1rem;
  color: var(--pl-accent);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  border-top: 1px solid var(--pl-border-light);
}
@media (min-width: 768px) {
  .pl-contact-row {
    flex: 1 1 0;
    padding-left: 1.25rem;
  }
  .pl-contact-row:not(:first-child) {
    border-left: 1px solid var(--pl-border-light);
  }
}
.pl-contact-row svg {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pl-contact-row__text {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.pl-contact-row:hover {
  background: var(--pl-surface-3);
  color: var(--pl-accent-hover);
}
.pl-contact-row:focus-visible {
  outline-offset: -3px;
}

.pl-empty {
  padding: 2rem 1rem;
  text-align: center;
  font-size: 1.0625rem;
  color: var(--pl-text-muted);
  background: var(--pl-surface);
  border: 1px dashed var(--pl-border);
  border-radius: var(--pl-radius-md);
}

.pl-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-top: 1.5rem;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  background: var(--pl-accent);
  color: var(--pl-accent-text);
  border-radius: var(--pl-radius-md);
}
.pl-banner__tag {
  font-size: var(--pl-text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.pl-banner__text {
  flex: 1 1 12rem;
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
}
.pl-banner__cta {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  min-height: 3rem;
  padding: 0.5rem 1.25rem;
  background: var(--pl-accent-text);
  color: var(--pl-accent);
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--pl-radius-sm);
  text-decoration: none;
}
.pl-banner__cta:hover {
  color: var(--pl-accent-hover);
}
.pl-banner__cta:focus-visible {
  outline-color: var(--pl-accent-text);
}

.pl-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0 1rem;
  margin-top: 1.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--pl-border);
  font-size: var(--pl-text-xs);
  color: var(--pl-text-muted);
}
.pl-footer__credit {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 0.5rem;
}
.pl-footer__credit a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--pl-text);
  text-decoration: underline;
}
.pl-footer__logo {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

@media (prefers-reduced-motion: reduce) {
  .pl-status__dot {
    animation: none;
  }
}
