.explore-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
  line-height: 1.7;
}

.explore-page .breadcrumb {
  color: #999;
  font-size: 0.85rem;
  margin-bottom: 20px;
}
.explore-page .breadcrumb a {
  color: #0066cc;
  text-decoration: none;
}
.explore-page .breadcrumb a:hover { text-decoration: underline; }

.explore-hero {
  text-align: center;
  padding: 28px 0 20px;
  border-bottom: 2px solid #2e7d32;
  margin-bottom: 20px;
}
.explore-hero h1 { font-size: 1.9rem; color: #222; margin: 0 0 10px; line-height: 1.3; }
.explore-hero p { color: #666; margin: 0 auto; max-width: 640px; font-size: 1rem; }

.explore-intro { color: #444; font-size: 0.98rem; margin-bottom: 20px; }

/* Question input */
.explore-form { display: flex; gap: 10px; margin-bottom: 20px; position: relative; }
.explore-input-wrap { flex: 1; position: relative; }
.explore-input {
  width: 100%;
  box-sizing: border-box;
  padding: 13px 16px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  outline: none;
}
.explore-input:focus { border-color: #2e7d32; box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.12); }
.explore-submit {
  padding: 0 22px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: #2e7d32;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.explore-submit:hover { background: #256428; }

.explore-suggest {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  max-height: 240px;
  overflow-y: auto;
  z-index: 20;
  display: none;
}
.explore-suggest.is-open { display: block; }
.explore-suggest button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  border: none;
  background: none;
  font-size: 0.92rem;
  cursor: pointer;
}
.explore-suggest button:hover { background: #f2f8f2; }

/* Preset question cards */
.explore-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}
.explore-card {
  text-align: left;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  font-size: 0.9rem;
  color: #333;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}
.explore-card:hover {
  border-color: #2e7d32;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

/* Tree container (single column) */
.explore-tree { min-height: 320px; }

.explore-empty {
  color: #999;
  text-align: center;
  padding: 40px 16px;
  font-size: 0.95rem;
}

/* ---- DOM card tree (progressive disclosure) ---- */
.ex-tree { position: relative; }

.ex-layer {
  position: relative;
  padding-left: 40px;
  margin-bottom: 28px;
}

/* Left rail connecting layers */
.ex-layer::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 26px;
  bottom: -14px;
  width: 2px;
  background: #e0e6e0;
}
.ex-layer:last-child::before { display: none; }

.ex-layer-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}
.ex-step {
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  border-radius: 50%;
  background: #2e7d32;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
}
.ex-layer-title { font-size: 1.05rem; font-weight: 700; color: #222; margin: 0; }
.ex-layer-summary {
  color: #555;
  font-size: 0.92rem;
  margin: 0 0 14px;
  padding: 10px 14px;
  background: #f2f8f2;
  border-left: 3px solid #2e7d32;
  border-radius: 0 8px 8px 0;
}

.ex-nodes { display: flex; flex-direction: column; gap: 10px; }

.ex-node { position: relative; }

.ex-node-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #e3e3e3;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.92rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ex-node-card:hover {
  border-color: #2e7d32;
  box-shadow: 0 3px 10px rgba(0,0,0,0.06);
}
.ex-node.is-open > .ex-node-card {
  border-color: #2e7d32;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.ex-node.is-selected > .ex-node-card {
  border-color: #2e7d32;
  background: #f2f8f2;
  box-shadow: 0 3px 10px rgba(46, 125, 50, 0.12);
}

.ex-node-thumb { flex-shrink: 0; }
.ex-node-thumb img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #eee;
  background: #fafafa;
  display: block;
}

.ex-node-body { flex: 1; min-width: 0; }
.ex-node-title { display: block; font-weight: 600; color: #222; line-height: 1.35; }
.ex-node-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 4px;
  align-items: center;
}
.ex-node-why { color: #2e7d32; font-size: 0.82rem; }
.ex-node-badge {
  font-size: 0.76rem;
  padding: 1px 8px;
  border-radius: 10px;
  background: #fdecea;
  color: #c62828;
  font-weight: 600;
}
.ex-node-detail { color: #888; font-size: 0.8rem; }
.ex-node-meta { color: #888; font-size: 0.8rem; }
.ex-node-score { color: #b8860b; font-size: 0.82rem; font-weight: 600; }

.ex-node-chevron {
  flex-shrink: 0;
  color: #999;
  font-size: 1rem;
  width: 18px;
  text-align: center;
}

/* Inline evidence */
.ex-evidence {
  background: #fafbfa;
  border: 1px solid #e3e3e3;
  border-top: none;
  border-radius: 0 0 10px 10px;
  padding: 14px 16px;
  font-size: 0.88rem;
}
.ex-evidence-severity {
  display: inline-block;
  font-size: 0.74rem;
  padding: 2px 8px;
  border-radius: 10px;
  background: #fdecea;
  color: #c62828;
  margin-bottom: 8px;
}
.ex-quote {
  background: #fff;
  border-left: 3px solid #cfd8cf;
  padding: 10px 12px;
  margin: 8px 0;
  font-size: 0.85rem;
  color: #555;
  border-radius: 0 6px 6px 0;
}
.ex-evidence-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #888;
  margin: 14px 0 8px;
}
.ex-evidence-label:first-child { margin-top: 0; }

.ex-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
}
.ex-photos img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #eee;
  background: #fafafa;
}

.ex-list { margin: 0; padding-left: 20px; }
.ex-list li { margin: 4px 0; }
.ex-list-pros li::marker { color: #2e7d32; }
.ex-list-cons li::marker { color: #c62828; }

.ex-reddit { color: #666; font-size: 0.82rem; margin: 10px 0 0; }

.ex-more-hint {
  color: #999;
  font-size: 0.85rem;
  margin: 20px 0 0 40px;
  font-style: italic;
}

/* Pagination for subtype-filtered product layers */
.ex-pager {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}
.ex-pager-btn {
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #2e7d32;
  background: #fff;
  border: 1px solid #c8dcc8;
  border-radius: 8px;
  cursor: pointer;
}
.ex-pager-btn:hover:not(:disabled) {
  background: #f2f8f2;
  border-color: #2e7d32;
}
.ex-pager-btn:disabled {
  color: #bbb;
  border-color: #eee;
  cursor: default;
}
.ex-pager-info {
  color: #666;
  font-size: 0.85rem;
  min-width: 80px;
  text-align: center;
}

/* Product cards (inline + grid) */
.ex-product-card {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
  text-decoration: none;
  color: inherit;
}
.ex-product-card:last-child { border-bottom: none; }
.ex-product-card img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 6px;
  flex-shrink: 0;
}
.ex-product-info { min-width: 0; }
.ex-product-title {
  font-size: 0.85rem;
  color: #222;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 4px;
}
.ex-product-meta { font-size: 0.78rem; color: #888; }
.ex-product-score { font-size: 0.8rem; color: #2e7d32; font-weight: 600; }
.ex-product-link { display: inline-block; font-size: 0.78rem; color: #0066cc; margin-top: 4px; }
.ex-affiliate-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 18px;
  font-size: 0.86rem;
  font-weight: 600;
  color: #0f1111;
  background: linear-gradient(180deg, #ffd76e, #f7c948);
  border: 1px solid #e6b63a;
  border-radius: 20px;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.ex-affiliate-btn:hover { filter: brightness(1.05); color: #0f1111; }

/* Recommended products strip */
.explore-products {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px dashed #e0e0e0;
}
.explore-products h3 { font-size: 0.95rem; color: #222; margin: 0 0 12px; }
.explore-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.explore-products-grid .ex-product-card {
  flex-direction: column;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 12px;
}
.explore-products-grid .ex-product-card img { width: 100%; height: 120px; }

.explore-error {
  margin-top: 16px;
  padding: 14px 18px;
  background: #fdecea;
  border: 1px solid #f5c6cb;
  color: #c62828;
  border-radius: 8px;
  font-size: 0.9rem;
}

/* Index list page */
.explore-index {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.explore-index-card {
  display: block;
  padding: 20px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.2s;
}
.explore-index-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.1); transform: translateY(-2px); }
.explore-index-card h2 { margin: 0 0 6px; font-size: 1.2rem; color: #2e7d32; }
.explore-index-sub { color: #888; margin: 0 0 12px; font-size: 0.9rem; }
.explore-index-cta { color: #0066cc; font-size: 0.88rem; font-weight: 600; }

@media (max-width: 820px) {
  .explore-form { flex-direction: column; }
  .explore-submit { padding: 12px; }
  .ex-layer { padding-left: 34px; }
  .ex-more-hint { margin-left: 34px; }
}
