/* HierGeo additions on top of the shared academic theme (styles.css). */

.academic-theme .hero h1 span { display: block; }

.academic-theme .hero-figure { padding: 0; }
.figure-zoom {
  display: block; width: 100%; padding: 18px; border: 0; background: #fff;
  border-radius: 14px 14px 0 0; cursor: zoom-in;
}
.figure-zoom img { display: block; width: 100%; height: auto; }

.academic-theme .button.is-disabled { opacity: 0.55; cursor: not-allowed; }

.section-lede {
  max-width: 760px; margin: 12px auto 0; color: var(--muted); font-size: 17px; line-height: 1.6; text-align: center;
}

/* ---------------------------------------------------------------- parser demo */
.parser-demo {
  max-width: 860px; margin: 34px auto 0; padding: 28px; background: #fff;
  border: 1px solid #dce3df; border-radius: 18px; box-shadow: 0 20px 55px rgba(25, 55, 43, 0.08);
}
.parser-form { display: flex; gap: 12px; }
.parser-form input {
  flex: 1; min-width: 0; padding: 13px 16px; font: inherit; font-size: 17px; color: var(--ink);
  border: 1px solid #cfd8e3; border-radius: 12px; background: #f8fafc;
}
.parser-form input:focus { outline: 2px solid var(--cyan-strong); outline-offset: 1px; background: #fff; }
.parser-examples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.parser-examples button {
  padding: 6px 12px; font: inherit; font-size: 13px; color: var(--ink); background: #eef2f8;
  border: 1px solid #dbe3ee; border-radius: 999px; cursor: pointer;
}
.parser-examples button:hover { background: #e1e9f6; }
.parser-result { margin-top: 22px; padding: 18px 20px; min-height: 92px; background: #f8fafc; border-radius: 14px; }
.route-badge {
  display: inline-block; padding: 4px 12px; font-size: 13px; font-weight: 700; letter-spacing: 0.02em;
  border-radius: 999px; color: #fff;
}
.route-city { background: #2f8f5b; }
.route-country { background: var(--cyan-strong); }
.route-global { background: #b4612f; }
.route-detail { margin-top: 10px; font-size: 18px; font-weight: 600; color: var(--ink); }
.route-count { margin-top: 10px; font-size: 14px; color: var(--muted); }
.route-bar { display: block; height: 8px; margin-top: 8px; background: #e3e8ef; border-radius: 999px; overflow: hidden; }
.route-bar span { display: block; height: 100%; background: var(--cyan-strong); border-radius: 999px; }
.search-status { margin: 16px 2px 0; font-size: 14px; line-height: 1.6; color: var(--muted); }
.is-searching .search-status::before {
  content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px;
  border: 2px solid #cfd8e6; border-top-color: var(--cyan-strong); border-radius: 50%; animation: search-spin 0.8s linear infinite;
}
@keyframes search-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .is-searching .search-status::before { animation: none; } }
.search-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin-top: 14px; }
.search-card { margin: 0; background: #f8fafc; border-radius: 12px; overflow: hidden; }
.search-card img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.search-card figcaption { padding: 10px 12px 12px; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.search-card em { display: block; margin-top: 4px; font-style: normal; }
.search-rank {
  display: inline-block; min-width: 20px; margin-right: 6px; padding: 1px 6px; border-radius: 999px;
  background: var(--cyan-strong); color: #fff; font-weight: 600; font-size: 11.5px; text-align: center;
}
.search-place { font-weight: 600; color: var(--ink); }
.parser-note { margin: 16px 2px 0; font-size: 13px; line-height: 1.6; color: var(--muted); }

/* ---------------------------------------------------------------- sample gallery */
.sample-gallery {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-top: 30px;
}
.sample-card { margin: 0; background: #fff; border: 1px solid #dce3df; border-radius: 14px; overflow: hidden; }
.sample-card img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.sample-card figcaption { padding: 12px 14px 14px; font-size: 13px; line-height: 1.5; color: var(--ink); }
.sample-card figcaption span { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; }
.sample-card figcaption span.is-weak { color: #b23b2e; }
.gallery-note { margin: 14px 0 10px; font-size: 13px; color: var(--muted); text-align: center; }

/* ---------------------------------------------------------------- limitations */
.limitations-section { background: #fff; }
.limitations-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 28px; }
.limitations-grid article { padding: 22px 24px; background: #f8fafc; border: 1px solid #e1e7ef; border-radius: 16px; }
.limitations-grid h3 { margin: 0 0 8px; font-size: 18px; color: var(--ink); }
.limitations-grid p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--muted); }

@media (max-width: 1020px) {
  .sample-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .sample-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .limitations-grid { grid-template-columns: 1fr; }
  .parser-form { flex-direction: column; }
  .parser-demo { padding: 20px; }
}

.academic-theme .hero-subtitle { white-space: normal; max-width: 980px; margin-inline: auto; }
