/*
Theme Name: Project Black-Pearl Theme
Template: blankslate
Author: Nexus Instruments
Description: A refined child theme for Blankslate featuring a WRX rally-import aesthetic with Obsidian Black Pearl palette and Subaru branding.
Version: 1.3
Text Domain: project-black-pearl
*/

:root {
  --pbp-bg: #090d12;
  --pbp-bg-alt: #0d131b;
  --pbp-surface: #121a24;
  --pbp-surface-2: #192231;
  --pbp-text: #e3eaf4;
  --pbp-muted: #9aa8be;
  --pbp-accent: #ff5a33;
  --pbp-accent-2: #ff9f1c;
  --pbp-cool: #69d0ff;
  --pbp-border: rgba(227, 234, 244, 0.12);
  --pbp-border-strong: rgba(227, 234, 244, 0.2);
  --pbp-focus: #9de1ff;
  --pbp-shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.45);
  --pbp-shadow-md: 0 10px 30px rgba(0, 0, 0, 0.35);
  --pbp-radius-lg: 16px;
  --pbp-radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background:
    radial-gradient(circle at 15% -5%, rgba(255, 90, 51, 0.2), transparent 30%),
    radial-gradient(circle at 100% 0%, rgba(48, 116, 255, 0.18), transparent 34%),
    linear-gradient(180deg, var(--pbp-bg-alt), var(--pbp-bg));
  color: var(--pbp-text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 16px;
  line-height: 1.72;
  min-height: 100vh;
}

.site,
#container {
  margin: 0 auto;
  max-width: 1160px;
  padding: 24px;
}

#content,
main,
article {
  min-width: 0;
}

a {
  color: var(--pbp-accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--pbp-accent-2);
}

a:focus-visible {
  color: var(--pbp-accent-2);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--pbp-focus);
  outline-offset: 2px;
}

/* Keep skip links usable for keyboard users. */
.skip-link {
  background: #fff;
  border-radius: 6px;
  color: #111;
  left: -9999px;
  padding: 10px 12px;
  position: absolute;
  top: 12px;
  z-index: 10000;
}

.skip-link:focus {
  left: 12px;
}

header,
#header {
  background:
    linear-gradient(140deg, rgba(25, 34, 49, 0.9), rgba(13, 19, 27, 0.95));
  border: 1px solid var(--pbp-border-strong);
  border-bottom: 4px solid var(--pbp-accent);
  border-radius: var(--pbp-radius-lg);
  box-shadow: var(--pbp-shadow-lg);
  margin-bottom: 18px;
  overflow: hidden;
  padding: 42px 24px;
  position: relative;
  text-align: center;
}

header::after,
#header::after {
  background: linear-gradient(90deg, transparent, rgba(105, 208, 255, 0.25), transparent);
  content: "";
  height: 1px;
  left: 0;
  position: absolute;
  top: 0;
  width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6,
header h1,
header h2,
#header h1,
#header h2 {
  font-family: "Barlow Condensed", Inter, sans-serif;
  letter-spacing: 0.04em;
}

header h1,
#header h1 {
  color: var(--pbp-accent);
  font-size: clamp(2.3rem, 5.8vw, 3.8rem);
  font-weight: 700;
  line-height: 1.05;
  margin: 0 0 10px;
  text-transform: uppercase;
}

header h2,
#header h2 {
  color: var(--pbp-accent-2);
  font-size: clamp(1rem, 3vw, 1.35rem);
  font-weight: 600;
  margin: 0;
  opacity: 0.96;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.3rem);
  margin: 0 0 0.5rem;
}

h2 {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  margin: 0 0 0.5rem;
}

h3 {
  font-size: clamp(1.35rem, 3vw, 2rem);
  margin: 0 0 0.4rem;
}

p,
ul,
ol,
table,
blockquote {
  margin-top: 0;
  margin-bottom: 1rem;
}

nav,
#menu,
.menu {
  align-items: center;
  backdrop-filter: blur(5px);
  background: rgba(18, 26, 36, 0.8);
  border: 1px solid var(--pbp-border);
  border-bottom: 3px solid var(--pbp-accent);
  border-radius: var(--pbp-radius-md);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 22px;
  padding: 10px;
}

nav a,
#menu a,
.menu a {
  border-radius: 8px;
  color: #f7fbff;
  font-size: 0.93rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 10px 14px;
  text-transform: uppercase;
  transition: transform 0.16s ease, background-color 0.2s ease, color 0.2s ease;
}

nav a:hover,
#menu a:hover,
.menu a:hover,
nav .current-menu-item > a,
#menu .current-menu-item > a,
.menu .current-menu-item > a {
  background-color: var(--pbp-accent);
  color: #101215;
  transform: translateY(-1px);
}

.hero {
  background:
    linear-gradient(to bottom right, rgba(4, 8, 14, 0.76), rgba(8, 14, 22, 0.55)),
    url("hero-wrx.jpg") no-repeat center center / cover;
  border: 1px solid var(--pbp-border);
  border-radius: var(--pbp-radius-lg);
  box-shadow: var(--pbp-shadow-lg);
  margin-bottom: 24px;
  padding: clamp(52px, 11vw, 110px) 24px;
  position: relative;
  text-align: center;
}

.hero::before {
  background: linear-gradient(90deg, transparent, rgba(105, 208, 255, 0.2), transparent);
  bottom: 0;
  content: "";
  height: 1px;
  left: 0;
  position: absolute;
  width: 100%;
}

.hero h2 {
  color: #fff;
  font-size: clamp(1.9rem, 5vw, 3rem);
  line-height: 1.2;
  margin: 0;
  text-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.pbp-home {
  display: grid;
  gap: 18px;
}

.pbp-home-hero {
  background:
    linear-gradient(120deg, rgba(255, 90, 51, 0.14), rgba(8, 15, 25, 0.9)),
    radial-gradient(circle at 90% 0, rgba(105, 208, 255, 0.2), transparent 36%),
    var(--pbp-surface);
  border: 1px solid var(--pbp-border-strong);
  border-radius: var(--pbp-radius-lg);
  box-shadow: var(--pbp-shadow-lg);
  overflow: hidden;
  padding: clamp(24px, 5vw, 44px);
  position: relative;
}

.pbp-home-hero::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  content: "";
  height: 1px;
  left: 0;
  position: absolute;
  top: 0;
  width: 100%;
}

.pbp-home-kicker {
  color: var(--pbp-cool);
  font-family: "Barlow Condensed", Inter, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.pbp-home-hero h1 {
  font-size: clamp(2rem, 5.5vw, 3.9rem);
  margin: 0 0 10px;
  text-transform: uppercase;
}

.pbp-home-lead {
  color: var(--pbp-text);
  font-size: clamp(1.02rem, 2.2vw, 1.3rem);
  margin-bottom: 18px;
  max-width: 58ch;
}

.pbp-home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pbp-button-secondary {
  background: linear-gradient(135deg, #2f3f55, #405672);
}

.pbp-home-stats {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pbp-stat-card {
  background: linear-gradient(165deg, rgba(25, 34, 49, 0.7), rgba(18, 26, 36, 0.9));
  border: 1px solid var(--pbp-border);
  border-radius: var(--pbp-radius-md);
  box-shadow: var(--pbp-shadow-md);
  padding: 16px;
}

.pbp-stat-value {
  color: #fff;
  font-family: "Barlow Condensed", Inter, sans-serif;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1;
  margin: 0 0 6px;
}

.pbp-stat-label {
  color: var(--pbp-muted);
  margin: 0;
}

.pbp-home-section {
  background: linear-gradient(165deg, rgba(25, 34, 49, 0.55), rgba(18, 26, 36, 0.86));
  border: 1px solid var(--pbp-border);
  border-radius: var(--pbp-radius-md);
  box-shadow: var(--pbp-shadow-md);
  padding: clamp(16px, 3vw, 24px);
}

.pbp-home-section-header {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.pbp-home-section-header h2 {
  margin: 0;
  text-transform: uppercase;
}

.pbp-home-section-header a {
  color: var(--pbp-cool);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pbp-home-section-header a:hover,
.pbp-home-section-header a:focus-visible {
  color: #b9ebff;
}

.pbp-calibration {
  background:
    linear-gradient(165deg, rgba(255, 90, 51, 0.08), rgba(18, 26, 36, 0.9)),
    var(--pbp-surface);
}

.pbp-pill-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pbp-pill-grid p {
  background: rgba(13, 19, 27, 0.85);
  border: 1px solid var(--pbp-border);
  border-radius: 999px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: space-between;
  margin: 0;
  padding: 8px 14px;
}

.pbp-pill-grid strong {
  color: #f9fbff;
  font-size: 0.88rem;
}

.pbp-pill-grid span {
  color: var(--pbp-cool);
  font-size: 0.88rem;
}

.pbp-state-note {
  color: var(--pbp-muted);
  margin: 14px 0 0;
  max-width: 72ch;
}

.pbp-strategy-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pbp-bullet-list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pbp-bullet-list li {
  background: rgba(13, 19, 27, 0.78);
  border: 1px solid var(--pbp-border);
  border-radius: 10px;
  margin: 0;
  padding: 10px 12px 10px 34px;
  position: relative;
}

.pbp-bullet-list li::before {
  color: var(--pbp-accent);
  content: "●";
  left: 13px;
  position: absolute;
  top: 9px;
}

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

.pbp-content-card {
  background: var(--pbp-surface);
  border: 1px solid var(--pbp-border);
  border-radius: 12px;
  box-shadow: var(--pbp-shadow-md);
  overflow: hidden;
  transition: transform 0.16s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.pbp-content-card:hover,
.pbp-content-card:focus-within {
  border-color: var(--pbp-border-strong);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.4);
  transform: translateY(-2px);
}

.pbp-card-media {
  background: #0e141d;
  display: block;
  overflow: hidden;
  position: relative;
  aspect-ratio: 16 / 10;
  min-height: 165px;
}

.pbp-card-media img {
  display: block;
  height: 100%;
  object-fit: cover;
  transition: transform 0.28s ease;
  width: 100%;
}

.pbp-content-card:hover .pbp-card-media img,
.pbp-content-card:focus-within .pbp-card-media img {
  transform: scale(1.03);
}

.pbp-card-fallback {
  align-items: center;
  color: var(--pbp-muted);
  display: flex;
  font-size: 0.9rem;
  height: 100%;
  justify-content: center;
  min-height: 165px;
}

.pbp-card-body {
  padding: 14px;
}

.pbp-card-body h3 {
  margin: 0 0 8px;
}

.pbp-card-body p {
  margin: 0;
}

.pbp-card-meta {
  color: var(--pbp-muted);
  font-size: 0.86rem;
  margin-bottom: 8px;
}

.pbp-list-stack {
  display: grid;
  gap: 12px;
}

.pbp-list-card {
  background: var(--pbp-surface);
  border: 1px solid var(--pbp-border);
  border-radius: 10px;
  padding: 14px;
  transition: border-color 0.2s ease;
}

.pbp-list-card:hover,
.pbp-list-card:focus-within {
  border-color: var(--pbp-border-strong);
}

.pbp-list-card h3 {
  margin: 0 0 6px;
}

.pbp-list-card p:last-child {
  margin-bottom: 0;
}

.pbp-recommendation-intro {
  margin-bottom: 18px;
}

.pbp-recommendation-intro h2 {
  margin: 0 0 10px;
  text-transform: uppercase;
}

.pbp-recommendation-intro p:last-child {
  margin-bottom: 0;
  max-width: 70ch;
}

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

.pbp-recommendation-card {
  background: linear-gradient(160deg, rgba(10, 16, 24, 0.92), rgba(18, 26, 36, 0.94));
  border: 1px solid var(--pbp-border);
  border-radius: 12px;
  box-shadow: var(--pbp-shadow-md);
  padding: 18px;
}

.pbp-recommendation-stage {
  color: var(--pbp-cool);
  font-family: "Barlow Condensed", Inter, sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.pbp-recommendation-card h3 {
  margin: 0 0 12px;
}

.pbp-recommendation-meta {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
}

.pbp-recommendation-meta div {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 10px 12px;
}

.pbp-recommendation-meta dt {
  color: #f9fbff;
  font-size: 0.84rem;
  font-weight: 700;
  margin: 0 0 4px;
  text-transform: uppercase;
}

.pbp-recommendation-meta dd {
  color: var(--pbp-muted);
  margin: 0;
}

.pbp-recommendation-verdict {
  border-top: 1px solid var(--pbp-border);
  color: var(--pbp-text);
  margin: 0;
  padding-top: 12px;
}

.pbp-logbook {
  display: grid;
  gap: 16px;
}

.pbp-logbook-hero {
  background:
    linear-gradient(125deg, rgba(255, 90, 51, 0.12), rgba(8, 15, 25, 0.92)),
    radial-gradient(circle at top right, rgba(105, 208, 255, 0.15), transparent 35%),
    var(--pbp-surface);
  border: 1px solid var(--pbp-border-strong);
  border-radius: var(--pbp-radius-lg);
  box-shadow: var(--pbp-shadow-lg);
  padding: clamp(18px, 4vw, 28px);
}

.pbp-logbook-hero h2 {
  margin: 0 0 10px;
  text-transform: uppercase;
}

.pbp-logbook-hero p:last-child {
  margin-bottom: 0;
  max-width: 64ch;
}

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

.pbp-logbook-card {
  background: linear-gradient(165deg, rgba(25, 34, 49, 0.6), rgba(18, 26, 36, 0.9));
  border: 1px solid var(--pbp-border);
  border-radius: var(--pbp-radius-md);
  box-shadow: var(--pbp-shadow-md);
  padding: 18px;
}

.pbp-logbook-card h3 {
  margin: 0 0 12px;
  text-transform: uppercase;
}

.pbp-logbook-list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pbp-logbook-list li {
  align-items: center;
  background: rgba(13, 19, 27, 0.78);
  border: 1px solid var(--pbp-border);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin: 0;
  padding: 9px 10px;
}

.pbp-logbook-list strong {
  color: #f4f8ff;
  font-size: 0.9rem;
}

.pbp-logbook-list span {
  color: var(--pbp-cool);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: right;
}

.pbp-logbook-template {
  display: grid;
  gap: 8px;
}

.pbp-logbook-template p {
  background: rgba(13, 19, 27, 0.6);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  margin: 0;
  padding: 9px 10px;
}

.pbp-home-page-content .pbp-page-content > *:first-child {
  margin-top: 0;
}

.pbp-home-page-content .pbp-page-content > *:last-child {
  margin-bottom: 0;
}

.home .pbp-home-page-content .pbp-page-content section[style] {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: inherit !important;
  margin: 0 0 14px !important;
  max-width: none !important;
  padding: 0 !important;
  text-align: inherit !important;
}

.home .pbp-home-page-content .pbp-page-content [style*="font-size"],
.home .pbp-home-page-content .pbp-page-content [style*="color"],
.home .pbp-home-page-content .pbp-page-content [style*="text-shadow"],
.home .pbp-home-page-content .pbp-page-content [style*="background"] {
  color: inherit !important;
  text-shadow: none !important;
}

.home .pbp-home-page-content .pbp-page-content a[style] {
  background: transparent !important;
  border: 1px solid var(--pbp-border) !important;
  color: var(--pbp-cool) !important;
  display: inline-flex !important;
  font-weight: 600 !important;
  padding: 0.5rem 0.75rem !important;
}

.pbp-home-cta {
  background:
    linear-gradient(130deg, rgba(255, 90, 51, 0.12), rgba(8, 15, 25, 0.95)),
    var(--pbp-surface);
  border: 1px solid var(--pbp-border-strong);
  border-radius: var(--pbp-radius-lg);
  box-shadow: var(--pbp-shadow-lg);
  padding: clamp(18px, 4vw, 28px);
}

.pbp-home-cta h2 {
  margin: 0 0 8px;
  text-transform: uppercase;
}

.pbp-home-cta > p {
  margin-bottom: 12px;
}

.rally-car,
.tuning-guide,
.recommended-parts,
.car-specs,
.post,
.page,
.widget,
.entry-content > *,
.comment-body {
  background: linear-gradient(165deg, rgba(25, 34, 49, 0.55), rgba(18, 26, 36, 0.85));
  border: 1px solid var(--pbp-border);
  border-radius: var(--pbp-radius-md);
  box-shadow: var(--pbp-shadow-md);
}

.post,
.page,
.widget,
.comment-body {
  margin-bottom: 18px;
  padding: 20px;
}

.entry-content > * {
  margin-bottom: 14px;
  padding: 16px 18px;
}

.entry-content > *:empty {
  display: none;
}

.rally-car,
.tuning-guide,
.recommended-parts,
.car-specs {
  margin: 0 0 18px;
  padding: 22px;
}

.rally-car h3 {
  color: var(--pbp-accent);
  margin-top: 0;
}

.keywords {
  color: var(--pbp-accent);
  font-family: "Barlow Condensed", Inter, sans-serif;
  font-size: clamp(1rem, 3vw, 1.4rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.keywords span {
  display: inline-block;
  margin: 0 12px 8px 0;
}

button,
.button,
input[type="submit"] {
  background: linear-gradient(135deg, var(--pbp-accent), #ff7f36);
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.72rem 1.05rem;
  transition: transform 0.15s ease, filter 0.2s ease;
}

button:hover,
.button:hover,
input[type="submit"]:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

button:disabled,
.button:disabled,
input[type="submit"]:disabled {
  cursor: not-allowed;
  filter: grayscale(0.25);
  opacity: 0.7;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="number"],
textarea,
select {
  background: #0e141d;
  border: 1px solid var(--pbp-border);
  border-radius: 8px;
  color: var(--pbp-text);
  max-width: 100%;
  padding: 10px 12px;
}

input::placeholder,
textarea::placeholder {
  color: #7f8ea7;
}

.pbp-gen-wrap {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 1rem 0;
}

.pbp-gen-status {
  color: var(--pbp-muted);
  font-size: 0.95rem;
}

.pbp-gen-status.is-error {
  color: #ffa7a7;
}

.pbp-gen-btn[aria-busy="true"] {
  filter: grayscale(0.2);
}

.car-specs {
  list-style: none;
  margin: 0;
  padding: 20px 22px;
}

.car-specs li {
  border-bottom: 1px solid var(--pbp-border);
  margin: 0;
  padding: 9px 0;
}

.car-specs li:last-child {
  border-bottom: 0;
}

.pbp-health-card {
  background: linear-gradient(165deg, rgba(25, 34, 49, 0.65), rgba(18, 26, 36, 0.92));
  border: 1px solid var(--pbp-border);
  border-radius: var(--pbp-radius-md);
  box-shadow: var(--pbp-shadow-md);
  margin: 18px 0;
  padding: 18px;
}

.pbp-health-top {
  align-items: baseline;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.pbp-health-top h3 {
  margin: 0;
  text-transform: uppercase;
}

.pbp-health-score {
  color: #fff;
  font-family: "Barlow Condensed", Inter, sans-serif;
  font-size: clamp(2rem, 4vw, 2.9rem);
  font-weight: 700;
  line-height: 1;
  margin: 0;
}

.pbp-health-score span {
  color: var(--pbp-muted);
  font-size: 0.42em;
  margin-left: 4px;
}

.pbp-health-badge {
  border: 1px solid var(--pbp-border);
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 8px 0 12px;
  padding: 6px 10px;
  text-transform: uppercase;
}

.pbp-health-excellent .pbp-health-badge {
  background: rgba(69, 189, 112, 0.15);
  border-color: rgba(69, 189, 112, 0.35);
  color: #9ff2bf;
}

.pbp-health-stable .pbp-health-badge {
  background: rgba(105, 208, 255, 0.13);
  border-color: rgba(105, 208, 255, 0.35);
  color: #b8ebff;
}

.pbp-health-watch .pbp-health-badge {
  background: rgba(255, 159, 28, 0.14);
  border-color: rgba(255, 159, 28, 0.35);
  color: #ffcd85;
}

.pbp-health-risk .pbp-health-badge,
.pbp-health-unknown .pbp-health-badge {
  background: rgba(255, 90, 51, 0.14);
  border-color: rgba(255, 90, 51, 0.35);
  color: #ffb0a0;
}

.pbp-health-metrics {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.pbp-health-metrics li {
  background: rgba(13, 19, 27, 0.78);
  border: 1px solid var(--pbp-border);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding: 8px 10px;
}

.pbp-health-metrics strong {
  color: #f1f6ff;
  font-size: 0.88rem;
}

.pbp-health-metrics span {
  color: var(--pbp-cool);
  font-size: 0.88rem;
  font-weight: 600;
}

.pbp-related-upgrades {
  background: linear-gradient(165deg, rgba(25, 34, 49, 0.6), rgba(18, 26, 36, 0.88));
  border: 1px solid var(--pbp-border);
  border-radius: var(--pbp-radius-md);
  box-shadow: var(--pbp-shadow-md);
  margin: 18px 0;
  padding: 16px 18px;
}

.pbp-related-upgrades h3 {
  margin: 0 0 10px;
  text-transform: uppercase;
}

.pbp-related-upgrades-list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pbp-related-upgrades-list li {
  background: rgba(13, 19, 27, 0.78);
  border: 1px solid var(--pbp-border);
  border-radius: 8px;
  margin: 0;
  padding: 8px 10px;
}

.pbp-related-upgrades-list a {
  color: #f5fbff;
  display: block;
  font-weight: 600;
}

.pbp-related-upgrades-list a:hover,
.pbp-related-upgrades-list a:focus-visible {
  color: var(--pbp-cool);
}

blockquote {
  border-left: 4px solid var(--pbp-cool);
  color: #d4e6ff;
  padding: 12px 16px;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--pbp-border);
  padding: 10px;
  text-align: left;
}

th {
  color: #f4f8ff;
  font-weight: 700;
}

footer,
#footer {
  background: linear-gradient(160deg, rgba(25, 34, 49, 0.7), rgba(13, 19, 27, 0.92));
  border: 1px solid var(--pbp-border-strong);
  border-top: 4px solid var(--pbp-accent);
  border-radius: var(--pbp-radius-lg);
  color: var(--pbp-muted);
  font-size: 0.9rem;
  margin-top: 20px;
  padding: 30px 20px;
  text-align: center;
}

@keyframes pbpRise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

header,
nav,
.hero,
.post,
.page,
.widget,
footer {
  animation: pbpRise 0.5s ease both;
}

@media (max-width: 920px) {
  .site,
  #container {
    padding: 16px;
  }

  .entry-content > * {
    padding: 14px;
  }

  .pbp-home-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pbp-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pbp-pill-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  header,
  #header {
    padding: 28px 16px;
  }

  nav,
  #menu,
  .menu {
    justify-content: flex-start;
    overflow-x: auto;
    white-space: nowrap;
  }

  nav a,
  #menu a,
  .menu a {
    padding: 9px 12px;
  }

  .hero {
    padding: 58px 16px;
  }

  .post,
  .page,
  .widget,
  .rally-car,
  .tuning-guide,
  .recommended-parts,
  .car-specs {
    padding: 16px;
  }

  .pbp-home-stats,
  .pbp-card-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .pbp-pill-grid,
  .pbp-strategy-grid,
  .pbp-recommendation-grid,
  .pbp-logbook-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .pbp-health-metrics {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================================
   New Feature Styles - v1.4
   ============================================================================ */

/* Breadcrumbs */
.pbp-breadcrumbs {
  margin-bottom: 18px;
}

.pbp-breadcrumb-list {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pbp-breadcrumb-item {
  align-items: center;
  color: var(--pbp-muted);
  display: flex;
  font-size: 0.9rem;
  gap: 8px;
}

.pbp-breadcrumb-item:not(:last-child)::after {
  color: var(--pbp-border-strong);
  content: "/";
}

.pbp-breadcrumb-item a {
  color: var(--pbp-cool);
}

.pbp-breadcrumb-item a:hover {
  color: var(--pbp-accent-2);
}

/* Dyno Chart */
.pbp-dyno-chart {
  background: linear-gradient(165deg, rgba(25, 34, 49, 0.6), rgba(18, 26, 36, 0.9));
  border: 1px solid var(--pbp-border);
  border-radius: var(--pbp-radius-md);
  box-shadow: var(--pbp-shadow-md);
  margin: 18px 0;
  padding: 20px;
}

.pbp-dyno-chart h3 {
  margin: 0 0 16px;
  text-transform: uppercase;
}

.pbp-dyno-visual {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.pbp-dyno-bar-container {
  background: rgba(13, 19, 27, 0.78);
  border: 1px solid var(--pbp-border);
  border-radius: 8px;
  overflow: hidden;
  padding: 10px 12px;
}

.pbp-dyno-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.pbp-dyno-label span {
  font-size: 0.9rem;
  font-weight: 600;
}

.pbp-dyno-label .pbp-dyno-value {
  color: var(--pbp-cool);
}

.pbp-dyno-bar {
  background: linear-gradient(90deg, var(--pbp-accent), #ff7f36);
  border-radius: 4px;
  height: 24px;
  position: relative;
  transition: width 0.5s ease;
}

.pbp-dyno-bar span {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  left: 8px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.pbp-dyno-bar.pbp-dyno-torque {
  background: linear-gradient(90deg, var(--pbp-cool), #5bb8e8);
}

.pbp-dyno-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pbp-dyno-meta li {
  color: var(--pbp-muted);
  font-size: 0.88rem;
}

.pbp-dyno-meta li strong {
  color: var(--pbp-text);
}

.pbp-badge {
  background: rgba(105, 208, 255, 0.15);
  border: 1px solid rgba(105, 208, 255, 0.3);
  border-radius: 999px;
  color: var(--pbp-cool);
  font-size: 0.8rem;
  padding: 3px 8px;
}

/* Car Comparison Table */
.pbp-car-compare {
  background: linear-gradient(165deg, rgba(25, 34, 49, 0.6), rgba(18, 26, 36, 0.9));
  border: 1px solid var(--pbp-border);
  border-radius: var(--pbp-radius-md);
  box-shadow: var(--pbp-shadow-md);
  margin: 18px 0;
  overflow-x: auto;
  padding: 20px;
}

.pbp-compare-table {
  min-width: 500px;
  width: 100%;
}

.pbp-compare-table th,
.pbp-compare-table td {
  padding: 12px;
  text-align: center;
}

.pbp-compare-table th:first-child,
.pbp-compare-table td:first-child {
  text-align: left;
}

.pbp-compare-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* Cost Calculator */
.pbp-cost-calculator {
  background: linear-gradient(165deg, rgba(25, 34, 49, 0.6), rgba(18, 26, 36, 0.9));
  border: 1px solid var(--pbp-border);
  border-radius: var(--pbp-radius-md);
  box-shadow: var(--pbp-shadow-md);
  margin: 18px 0;
  padding: 20px;
}

.pbp-cost-calculator h3 {
  margin: 0 0 16px;
  text-transform: uppercase;
}

.pbp-cost-items {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.pbp-cost-item {
  align-items: center;
  background: rgba(13, 19, 27, 0.78);
  border: 1px solid var(--pbp-border);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
}

.pbp-cost-item label {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 10px;
}

.pbp-cost-item input[type="checkbox"] {
  accent-color: var(--pbp-accent);
  height: 18px;
  width: 18px;
}

.pbp-cost-item-title {
  font-size: 0.95rem;
}

.pbp-cost-item-price {
  color: var(--pbp-cool);
  font-weight: 700;
}

.pbp-cost-total {
  align-items: center;
  background: rgba(13, 19, 27, 0.9);
  border: 1px solid var(--pbp-border-strong);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  padding: 14px 16px;
}

.pbp-cost-total span:first-child {
  font-size: 1rem;
  font-weight: 600;
}

.pbp-cost-total-value {
  color: var(--pbp-accent);
  font-family: "Barlow Condensed", Inter, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
}

/* Maintenance Schedule */
.pbp-maintenance-schedule {
  background: linear-gradient(165deg, rgba(25, 34, 49, 0.6), rgba(18, 26, 36, 0.9));
  border: 1px solid var(--pbp-border);
  border-radius: var(--pbp-radius-md);
  box-shadow: var(--pbp-shadow-md);
  margin: 18px 0;
  overflow-x: auto;
  padding: 20px;
}

.pbp-maintenance-schedule h3 {
  margin: 0 0 16px;
  text-transform: uppercase;
}

.pbp-maint-current {
  background: rgba(105, 208, 255, 0.1);
  border: 1px solid rgba(105, 208, 255, 0.25);
  border-radius: 8px;
  color: var(--pbp-cool);
  margin-bottom: 16px;
  padding: 10px 14px;
}

.pbp-maint-table {
  min-width: 600px;
  width: 100%;
}

.pbp-maint-table th,
.pbp-maint-table td {
  padding: 12px;
}

.pbp-maint-table tbody tr.pbp-maint-overdue {
  background: rgba(255, 90, 51, 0.1);
}

.pbp-maint-table tbody tr.pbp-maint-overdue td:first-child {
  color: var(--pbp-accent);
  font-weight: 700;
}

/* Vehicle Selector */
.pbp-vehicle-selector {
  background: linear-gradient(165deg, rgba(25, 34, 49, 0.6), rgba(18, 26, 36, 0.9));
  border: 1px solid var(--pbp-border);
  border-radius: var(--pbp-radius-md);
  box-shadow: var(--pbp-shadow-md);
  margin: 18px 0;
  padding: 20px;
}

.pbp-vehicle-selector h3 {
  margin: 0 0 16px;
  text-transform: uppercase;
}

.pbp-vehicle-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.pbp-vehicle-card {
  background: var(--pbp-surface);
  border: 1px solid var(--pbp-border);
  border-radius: 12px;
  display: block;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.pbp-vehicle-card:hover {
  border-color: var(--pbp-border-strong);
  transform: translateY(-2px);
}

.pbp-vehicle-image {
  aspect-ratio: 16 / 9;
  background: #0e141d;
  overflow: hidden;
}

.pbp-vehicle-image img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.pbp-vehicle-info {
  padding: 14px;
}

.pbp-vehicle-info h4 {
  margin: 0 0 6px;
}

.pbp-vehicle-meta {
  color: var(--pbp-muted);
  display: flex;
  gap: 12px;
  margin: 0;
}

.pbp-vehicle-meta span {
  font-size: 0.85rem;
}

/* Error Messages */
.pbp-error {
  background: rgba(255, 90, 51, 0.15);
  border: 1px solid rgba(255, 90, 51, 0.3);
  border-radius: 8px;
  color: #ffb0a0;
  padding: 12px 16px;
}

/* Pagination */
.pbp-pagination {
  display: flex;
  justify-content: center;
  margin: 24px 0;
}

.pbp-pagination .page-numbers {
  align-items: center;
  background: var(--pbp-surface);
  border: 1px solid var(--pbp-border);
  border-radius: 6px;
  color: var(--pbp-text);
  display: flex;
  margin: 0 3px;
  min-width: 40px;
  justify-content: center;
  padding: 8px 12px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.pbp-pagination .page-numbers:hover {
  background: var(--pbp-surface-2);
  border-color: var(--pbp-border-strong);
}

.pbp-pagination .page-numbers.current {
  background: var(--pbp-accent);
  border-color: var(--pbp-accent);
  color: #fff;
}

/* Search Form */
.pbp-search-form {
  margin-bottom: 20px;
}

.pbp-search-form form {
  display: flex;
  gap: 10px;
}

.pbp-search-form input[type="search"] {
  flex: 1;
}

.pbp-search-form button {
  white-space: nowrap;
}

/* Custom Logo Support */
.custom-logo-link {
  display: inline-block;
  margin-bottom: 12px;
}

.custom-logo {
  height: auto;
  max-height: 80px;
  width: auto;
  max-width: 200px;
}

/* Better Touch Targets for Mobile */
@media (max-width: 480px) {
  .pbp-cost-item,
  .pbp-vehicle-card,
  .pbp-content-card {
    min-height: 44px;
  }

  button,
  .button,
  input[type="submit"] {
    min-height: 44px;
    padding: 0.8rem 1.2rem;
  }

  nav a,
  #menu a,
  .menu a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}
