.unpi-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
  color: #1e293b;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.5;
}

.unpi-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Controls Card */
.unpi-controls-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.unpi-search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.unpi-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.unpi-search-flex {
  flex: 2;
  min-width: 240px;
}

.unpi-state-flex,
.unpi-activity-flex {
  flex: 1;
  min-width: 180px;
}

.unpi-btn-flex {
  min-width: 120px;
}

.unpi-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
}

.unpi-input,
.unpi-select {
  height: 44px;
  padding: 0 0.85rem;
  font-size: 0.95rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: inherit;
  box-sizing: border-box;
  width: 100%;
}

.unpi-input:focus,
.unpi-select:focus {
  outline: 2px solid #059669;
  outline-offset: 1px;
  border-color: #059669;
}

.unpi-btn {
  height: 44px;
  min-height: 44px;
  padding: 0 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  transition: background-color 0.15s ease, transform 0.1s ease;
  box-sizing: border-box;
}

.unpi-btn-secondary {
  background: #e2e8f0;
  color: #334155;
}

.unpi-btn-secondary:hover {
  background: #cbd5e1;
}

.unpi-quick-picks {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid #f1f5f9;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.unpi-picks-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  margin-right: 0.25rem;
}

.unpi-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.unpi-pill-btn {
  height: 44px;
  padding: 0 0.85rem;
  font-size: 0.82rem;
  font-weight: 500;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.unpi-pill-btn:hover {
  background: #e2e8f0;
}

.unpi-pill-btn.active {
  background: #059669;
  color: #ffffff;
  border-color: #059669;
}

/* Primary Guide Grid Layout */
.unpi-guide-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 960px) {
  .unpi-guide-grid {
    grid-template-columns: 1fr;
  }
}

/* Park Hero Section */
.unpi-park-hero {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.unpi-hero-header {
  display: flex;
  flex-direction: column;
}

.unpi-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.unpi-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.unpi-badge-established {
  background: #dcfce7;
  color: #166534;
}

.unpi-badge-unesco {
  background: #e0f2fe;
  color: #0369a1;
}

.unpi-badge-fee {
  background: #fef3c7;
  color: #92400e;
}

.unpi-park-title {
  font-size: 1.75rem;
  font-weight: 800;
  margin: 0 0 0.5rem;
  color: #0f172a;
}

.unpi-park-tagline {
  font-size: 1.05rem;
  color: #475569;
  margin: 0 0 1rem;
}

.unpi-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.88rem;
  color: #64748b;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f1f5f9;
}

.unpi-meta-item strong {
  color: #334155;
}

/* Metrics Grid */
.unpi-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.unpi-metric-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

.unpi-metric-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.03em;
  margin-bottom: 0.25rem;
}

.unpi-metric-val {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
}

.unpi-metric-sub {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 0.25rem;
}

/* Advisory Box */
.unpi-advisory-box {
  background: #fffbeb;
  border-left: 4px solid #f59e0b;
  border-radius: 4px 8px 8px 4px;
  padding: 1rem 1.25rem;
}

.unpi-advisory-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.unpi-advisory-icon {
  font-size: 1.2rem;
  color: #d97706;
}

.unpi-advisory-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #92400e;
  margin: 0;
}

.unpi-advisory-text {
  font-size: 0.88rem;
  color: #78350f;
  margin: 0;
  line-height: 1.5;
}

.unpi-section {
  display: flex;
  flex-direction: column;
}

/* Landmarks Grid */
.unpi-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: #0f172a;
}

.unpi-landmarks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.unpi-landmark-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

.unpi-landmark-badge {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 600;
  background: #e2e8f0;
  color: #475569;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.unpi-landmark-name {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: #0f172a;
}

.unpi-landmark-desc {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0;
  line-height: 1.45;
}

/* Trails Table */
.unpi-trails-table-wrap {
  overflow-x: auto;
}

.unpi-trails-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}

.unpi-trails-table th {
  background: #f8fafc;
  padding: 0.75rem 0.85rem;
  border-bottom: 2px solid #e2e8f0;
  font-weight: 600;
  color: #475569;
}

.unpi-trails-table td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid #e2e8f0;
}

.unpi-pill-diff {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.diff-easy {
  background: #dcfce7;
  color: #166534;
}

.diff-moderate {
  background: #fef3c7;
  color: #92400e;
}

.diff-strenuous {
  background: #fee2e2;
  color: #991b1b;
}

/* Sidebar Styling */
.unpi-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.unpi-side-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.unpi-side-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: #0f172a;
}

.unpi-side-desc {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0 0 1rem;
}

/* Calculator Form */
.unpi-calc-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.unpi-calc-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.unpi-calc-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
}

.unpi-calc-input {
  height: 44px;
  padding: 0 0.75rem;
  font-size: 0.92rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
  color: inherit;
  box-sizing: border-box;
}

.unpi-radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: #334155;
}

.unpi-radio-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  min-height: 28px;
}

.unpi-calc-result {
  margin-top: 0.5rem;
  padding: 0.85rem;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.85rem;
}

.unpi-result-line {
  display: flex;
  justify-content: space-between;
  color: #475569;
}

.unpi-result-line.total {
  padding-top: 0.4rem;
  border-top: 1px solid #cbd5e1;
  font-weight: 700;
  color: #0f172a;
}

.unpi-pass-tip {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #047857;
  line-height: 1.4;
  background: #ecfdf5;
  padding: 0.5rem;
  border-radius: 6px;
}

/* Checklist */
.unpi-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: #475569;
}

.unpi-checklist li {
  position: relative;
  padding-left: 1.25rem;
  line-height: 1.4;
}

.unpi-checklist li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: #059669;
  font-weight: bold;
}

/* Filtered Parks Directory */
.unpi-parks-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.unpi-park-list-item {
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  text-align: left;
  transition: background-color 0.15s ease;
  width: 100%;
  box-sizing: border-box;
}

.unpi-park-list-item:hover {
  background: #e2e8f0;
}

.unpi-park-list-item.active {
  background: #ecfdf5;
  border-color: #059669;
}

.unpi-list-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #0f172a;
}

.unpi-list-meta {
  font-size: 0.78rem;
  color: #64748b;
}

/* Ad Containers */
.unpi-ad-container {
  min-height: 280px;
  overflow: hidden;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.85rem;
  margin: 1.5rem 0;
}

/* In-Cluster Links */
.unpi-related-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
}

.unpi-related-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: #0f172a;
}

.unpi-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.unpi-related-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease;
}

.unpi-related-card:hover {
  border-color: #059669;
}

.unpi-related-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #059669;
}

.unpi-related-desc {
  font-size: 0.82rem;
  color: #64748b;
}

.unpi-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
