/* Explore page (explore.html): search, links to the Comparison tool
   (compare.html), and the browse lists built by scripts/build-explore-landing.js. */
.xm { max-width: 1120px; margin: 0 auto; padding: 0 20px 64px; }

/* Search */
.xm-hero { text-align: center; padding: 48px 0 28px; }
.xm-hero h1 { font-size: 2.6rem; font-weight: 800; color: var(--navy); margin: 0 0 8px; }
.xm-hero p { color: var(--muted); font-size: 1.05rem; margin: 0 0 22px; }
.xm-search { position: relative; max-width: 640px; margin: 0 auto; }
.xm-search input { width: 100%; box-sizing: border-box; font: inherit; font-size: 1.08rem; padding: 15px 18px 15px 46px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow-md); color: var(--body); }
.xm-search input:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.xm-search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; stroke: var(--muted); fill: none; stroke-width: 2; }
.xm-results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-md); list-style: none; margin: 0; padding: 6px; text-align: left; max-height: 380px; overflow: auto; }
.xm-results[hidden] { display: none; }
.xm-results a { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 8px; text-decoration: none; color: var(--body); }
.xm-results a:hover, .xm-results a.on { background: var(--blue-tint); color: var(--navy); }
.xm-results .k { font-size: .78rem; color: var(--muted); white-space: nowrap; }
.xm-results .xm-none { padding: 10px 12px; color: var(--muted); }

/* Links to the Comparison tool */
.xm-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 640px; margin: 22px auto 0; text-align: left; }
.xm-toolcard { display: block; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease; }
.xm-toolcard:hover { border-color: var(--blue-border); box-shadow: var(--shadow-md); }
.xm-toolcard .t { display: block; font-weight: 700; color: var(--navy); font-size: .98rem; }
.xm-toolcard .d { display: block; color: var(--muted); font-size: .88rem; margin-top: 2px; }

/* Browse */
.xm-sec { margin-top: 44px; }
.xm-sec h2 { font-size: 1.35rem; font-weight: 800; color: var(--navy); margin: 0 0 4px; }
.xm-sec > p { color: var(--muted); margin: 0 0 16px; font-size: .95rem; }
.xm-tabs { display: inline-flex; gap: 4px; background: var(--blue-tint); padding: 4px; border-radius: 10px; margin-bottom: 18px; }
.xm-tabs button { font: inherit; font-size: .9rem; font-weight: 600; border: 0; background: none; padding: 7px 14px; border-radius: 7px; color: var(--body); cursor: pointer; }
.xm-tabs button[aria-selected="true"] { background: #fff; color: var(--navy); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.xm-cols { columns: 4 220px; column-gap: 28px; }
/* Variables: a grid, so opening one group does not re-flow the others. */
.xm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 28px; align-items: start; }
.xm-grid[hidden] { display: none; }
.xm-group { break-inside: avoid; margin: 0 0 18px; }
.xm-group h3 { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); font-weight: 700; margin: 0 0 6px; }
.xm-group ul { list-style: none; margin: 0; padding: 0; }
.xm-group li { margin: 0; padding: 2px 0; font-size: .92rem; line-height: 1.4; }
.xm-group a { color: var(--body); text-decoration: none; }
.xm-group a:hover { color: var(--blue-dark); text-decoration: underline; }
.xm-more { background: none; border: 0; padding: 2px 0; color: var(--blue); font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; }

@media (max-width: 880px) { .xm-hero h1 { font-size: 2rem; } }
@media (max-width: 520px) { .xm-tools { grid-template-columns: 1fr; } }
