:root {
  --pde-bg: #f4f8fc;
  --pde-panel: #ffffff;
  --pde-panel-alt: #eef7ff;
  --pde-text: #162033;
  --pde-muted: #5d6b7e;
  --pde-line: #d8e2ee;
  --pde-line-strong: #bfd1e3;
  --pde-accent: #289DCC;
  --pde-accent-soft: rgba(40, 157, 204, 0.12);
  --pde-shadow: 0 18px 40px rgba(17, 24, 39, 0.08);
  --pde-radius: 24px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: #ffffff;
  color: var(--pde-text);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

body.is-embed {
  background: transparent;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.pde-page {
  width: min(1600px, calc(100% - 12px));
  margin: 8px auto 28px;
}

.pde-toolbar {
  margin: 18px 0;
}

.pde-search-form {
  margin: 0;
}

.pde-search-shell {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 16px;
  border: 1px solid #d9e8f2;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #f8fcff);
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.05);
}

.pde-search-shell:focus-within {
  border-color: rgba(40, 157, 204, 0.55);
  box-shadow: 0 0 0 5px var(--pde-accent-soft), 0 12px 30px rgba(17, 24, 39, 0.08);
}

.pde-search-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
  appearance: none;
  -webkit-appearance: none;
  outline: 0;
  background: transparent;
  color: var(--pde-text);
  font: inherit;
  font-size: 1rem;
  padding: 10px 2px;
  margin: 0;
  border-radius: 0;
}

.pde-search-shell input[type="search"],
.pde-search-shell input[type="search"]:focus,
.pde-search-shell input[type="search"]:active {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  outline: 0 !important;
}

.pde-search-shell input[type="search"]::-webkit-search-decoration,
.pde-search-shell input[type="search"]::-webkit-search-cancel-button,
.pde-search-shell input[type="search"]::-webkit-search-results-button,
.pde-search-shell input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none !important;
}

.pde-search-shell input[type="search"]::-ms-clear,
.pde-search-shell input[type="search"]::-ms-reveal {
  display: none;
  width: 0;
  height: 0;
}

.pde-search-input::placeholder {
  color: #8798aa;
}

.pde-search-button,
.pde-clear-button,
.pde-page-link {
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.pde-search-shell > .pde-search-button {
  flex: 0 0 auto;
  appearance: none !important;
  -webkit-appearance: none !important;
  border: none !important;
  border-radius: 0 !important;
  background: none !important;
  background-color: transparent !important;
  color: inherit !important;
  padding: 6px !important;
  cursor: pointer;
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-shadow: none !important;
  min-width: auto !important;
  width: auto !important;
  height: auto !important;
  line-height: 0;
}

.pde-search-shell > .pde-search-button:hover {
  transform: scale(1.1);
  opacity: 0.9;
}

.pde-search-shell > .pde-search-button:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(40, 157, 204, 0.2);
}

.pde-search-shell > .pde-search-button svg {
  width: 24px;
  height: 24px;
  stroke: #289DCC !important;
  stroke-width: 2.2 !important;
  fill: none !important;
  display: block;
  flex: 0 0 auto;
}

.pde-clear-button {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: #eef6fb;
  color: #5f7388;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.pde-clear-button:hover {
  background: #ddeef7;
  color: var(--pde-text);
}

.pde-clear-button.is-hidden {
  display: none;
}

.pde-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 12px;
  right: 12px;
  z-index: 20;
  overflow: hidden;
  border: 1px solid var(--pde-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 36px rgba(17, 24, 39, 0.12);
}

.pde-suggestion-item,
.pde-suggestion-more,
.pde-suggestion-empty {
  display: block;
  width: 100%;
  padding: 13px 16px;
  border: 0;
  border-bottom: 1px solid #edf2f7;
  background: transparent;
  color: var(--pde-text);
  text-align: left;
  font: inherit;
}

.pde-suggestion-item:last-child,
.pde-suggestion-more:last-child,
.pde-suggestion-empty:last-child {
  border-bottom: 0;
}

.pde-suggestion-item {
  cursor: pointer;
}

.pde-suggestion-item:hover,
.pde-suggestion-more:hover {
  background: var(--pde-panel-alt);
}

.pde-suggestion-more {
  color: var(--pde-accent);
  font-weight: 700;
}

.pde-suggestion-empty {
  color: var(--pde-muted);
}

.pde-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.pde-card {
  overflow: hidden;
  border: 1px solid var(--pde-line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 16px 34px rgba(17, 24, 39, 0.06);
}

.pde-card-media {
  display: block;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #dceeff, #eef7ff);
}

.pde-card-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.pde-card-image--placeholder {
  width: 100%;
  height: 100%;
  background:
    linear-gradient(135deg, rgba(21, 112, 239, 0.14), rgba(111, 191, 115, 0.18)),
    #edf4fb;
}

.pde-card-body {
  padding: 12px 12px 14px;
}

.pde-card-title {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.3;
}

.pde-card-title a {
  color: inherit;
  text-decoration: none;
}

.pde-card-title a:hover {
  color: var(--pde-accent);
}

.pde-card-excerpt {
  margin: 8px 0 0;
  color: var(--pde-muted);
  line-height: 1.45;
  font-size: 0.88rem;
}

.pde-pagination {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
  width: 100%;
  overflow: hidden;
  padding-bottom: 0;
}

.pde-page-link,
.pde-page-gap {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--pde-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--pde-text);
  text-decoration: none;
  font-weight: 600;
}

.pde-page-link:hover {
  border-color: var(--pde-accent);
  transform: translateY(-1px);
}

.pde-page-link.is-current {
  background: var(--pde-accent);
  color: #fff;
  border-color: var(--pde-accent);
}

.pde-page-link.is-disabled {
  opacity: 0.45;
}

.pde-empty {
  padding: 32px;
  border: 1px dashed var(--pde-line-strong);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.8);
  text-align: center;
}

.pde-empty h2 {
  margin: 0;
}

.pde-empty p {
  margin: 10px 0 0;
  color: var(--pde-muted);
}

@media (max-width: 700px) {
  .pde-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .pde-page {
    width: calc(100% - 14px);
    margin-top: 10px;
  }

  .pde-search-shell,
  .pde-card,
  .pde-empty {
    border-radius: 20px;
  }

  .pde-card-body,
  .pde-empty {
    padding-left: 16px;
    padding-right: 16px;
  }

  .pde-search-shell {
    flex-wrap: nowrap;
    border-radius: 22px;
    gap: 6px;
    padding: 6px 6px 6px 12px;
  }

  .pde-search-input {
    font-size: 0.92rem;
    padding: 8px 0;
  }

  .pde-search-shell > .pde-search-button {
    padding: 4px;
  }

  .pde-search-shell > .pde-search-button svg {
    width: 22px;
    height: 22px;
    stroke-width: 2;
  }

  .pde-clear-button {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }

  .pde-suggestions {
    left: 8px;
    right: 8px;
  }

  .pde-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .pde-card {
    border-radius: 16px;
  }

  .pde-card-media {
    aspect-ratio: 3 / 4;
  }

  .pde-card-body {
    padding: 10px 8px 12px;
  }

  .pde-card-title {
    font-size: 0.8rem;
    line-height: 1.2;
  }

  .pde-card-excerpt {
    display: none;
  }

  .pde-pagination {
    justify-content: center;
    gap: 6px;
    padding-inline: 2px;
  }

  .pde-page-link,
  .pde-page-gap {
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    font-size: 0.85rem;
  }
}
