/* Earth21: the Smart21 systems hub, in the same design language as System21 and
   Electron21 (green hero, status pill, big title, pink-arrow search bar, icon
   tiles). It follows the site's light / dark toggle. */

.ex-page {
  --ex-edge: color-mix(in srgb, var(--s21-primary) 10%, var(--s21-border));
}
.ex-page h1, .ex-page h2 { font-family: var(--font-display); }

/* ---------- Hero ---------- */
.ex-hero { position: relative; overflow: hidden; isolation: isolate; color: #fff; padding: 7rem 0 4rem;
  background: radial-gradient(120% 100% at 15% 0%, #0E8060 0%, var(--s21-primary) 45%, var(--s21-primary-dark) 100%); }
.ex-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .5; background-image: radial-gradient(rgba(255, 255, 255, .12) 1.5px, transparent 1.5px); background-size: 26px 26px; }
.ex-hero::before { content: '\f57d'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; right: -2%; top: 50%; transform: translateY(-50%) rotate(-12deg); font-size: clamp(14rem, 30vw, 26rem); color: rgba(255, 255, 255, .06); z-index: -1; pointer-events: none; line-height: 1; }

.ex-status { display: flex; width: fit-content; max-width: 100%; flex-wrap: wrap; align-items: center; gap: .35rem 1.1rem; padding: .5rem 1rem; margin-bottom: 1.4rem; border-radius: var(--radius-pill); border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .12); backdrop-filter: blur(6px); font: 700 .74rem var(--font-body); color: rgba(255, 255, 255, .9); }
.ex-status b { color: #fff; font-weight: 800; }
.ex-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--s21-secondary); margin-right: .45rem; box-shadow: 0 0 0 0 rgba(255, 209, 102, .6); animation: ex-pulse 2s infinite; }
@keyframes ex-pulse { 70% { box-shadow: 0 0 0 7px rgba(255, 209, 102, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 209, 102, 0); } }

.ex-prompt { display: block; font: 800 .78rem var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--s21-secondary); margin-bottom: .6rem; }
.ex-title { font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em; font-size: clamp(2.8rem, 7vw, 4.6rem); line-height: 1.05; margin: 0 0 1rem; color: #fff; }
.ex-title .n { color: var(--s21-secondary); }
.ex-tag { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: rgba(255, 255, 255, .92); max-width: 42rem; margin: 0; }
.ex-tag strong { color: #fff; font-weight: 700; }

/* ---------- Search bar with the pink arrow ---------- */
.ex-search { position: relative; display: flex; align-items: center; gap: .7rem; max-width: 640px; margin: 1.8rem 0 0; padding: .4rem .55rem .4rem 1.2rem; background: #fff; border: 2px solid transparent; border-radius: var(--radius-pill); box-shadow: 0 20px 44px rgba(0, 0, 0, .22); }
.ex-search:focus-within { border-color: var(--s21-secondary); box-shadow: 0 0 0 4px rgba(255, 209, 102, .4), 0 14px 34px rgba(0, 0, 0, .25); }
.ex-search > i { color: #6B7280; }
.ex-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: .65rem 0; font: 600 1rem var(--font-body); color: #111 !important; -webkit-text-fill-color: #111; caret-color: #111; }
.ex-search input::placeholder { color: #6B7280; opacity: 1; -webkit-text-fill-color: #6B7280; font-weight: 500; }
.ex-search input::-webkit-search-cancel-button { display: none; }
.ex-search kbd { font: 700 .72rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #5B6470; background: #F1F3F5; border: 1px solid #E1E4E8; border-radius: 6px; padding: .15rem .5rem; }
.ex-search .ex-clear { appearance: none; border: 0; background: #F1F3F5; color: #111; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; display: none; }
.ex-search .ex-clear:hover { background: var(--s21-primary); color: #fff; }
.ex-search.has-text .ex-clear { display: inline-grid; place-items: center; }
.ex-search.has-text kbd { display: none; }
.ex-search .ex-go { flex: none; appearance: none; border: 0; cursor: pointer; background: var(--s21-accent); color: #fff; width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 1rem; transition: transform .15s, filter .15s; }
.ex-search .ex-go:hover { transform: scale(1.06); filter: brightness(1.08); }
.ex-search .ex-go:focus-visible { outline: 3px solid rgba(239, 71, 111, .45); outline-offset: 2px; }
.ex-result-note { font: 600 .84rem var(--font-body); color: rgba(255, 255, 255, .9); margin: .9rem 0 0; min-height: 1.2em; }
.ex-meta { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.3rem; }
.ex-pill { display: inline-flex; align-items: center; font: 700 .8rem var(--font-body); padding: .45rem .95rem; border: 1px solid rgba(255, 255, 255, .35); border-radius: var(--radius-pill); background: rgba(255, 255, 255, .14); color: #fff; backdrop-filter: blur(6px); }
.ex-pill i { color: var(--s21-secondary); margin-right: .45rem; }

/* ---------- Categories and system tiles ---------- */
.ex-noresult { display: none; text-align: center; padding: 3rem 1rem; font: 600 1rem var(--font-body); color: var(--s21-text-soft); }
.ex-noresult i { display: block; font-size: 2.2rem; margin-bottom: .8rem; color: var(--s21-primary); }
.ex-noresult.show { display: block; }

.ex-cat { --c: var(--s21-primary); padding: 3.2rem 0 .4rem; }
.ex-chip { display: inline-flex; align-items: center; gap: .85rem; font: 700 clamp(1.3rem, 3vw, 1.7rem)/1.2 var(--font-display); color: var(--s21-text); letter-spacing: -.01em; }
.ex-chip i { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; font-size: 1.2rem; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); }
.ex-chip-sub { margin: .6rem 0 0; font: 500 .92rem var(--font-body); color: var(--s21-text-soft); }
.ex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.1rem; margin-top: 1.5rem; }

.ex-slot { position: relative; display: flex; flex-direction: column; gap: .35rem; padding: 1.3rem 1.25rem 1.2rem; background: var(--s21-white); border: 1px solid var(--ex-edge); border-radius: var(--radius-md); box-shadow: var(--card-shadow); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.ex-slot:hover { transform: translateY(-5px); box-shadow: var(--card-shadow-hover); }
.ex-ic { width: 56px; height: 56px; margin-bottom: .6rem; border-radius: 16px; background: color-mix(in srgb, var(--c) 15%, transparent); color: var(--c); display: grid; place-items: center; font-size: 1.4rem; transition: background .25s, transform .25s var(--ease); }
.ex-slot:hover .ex-ic { background: color-mix(in srgb, var(--c) 24%, transparent); transform: scale(1.06); }
.ex-name { margin: 0; font: 600 1.05rem/1.25 var(--font-display); color: var(--s21-text); }
.ex-name a { color: inherit; text-decoration: none; }
.ex-name a::after { content: ''; position: absolute; inset: 0; border-radius: var(--radius-md); }   /* the whole card opens the system */
.ex-name a:focus-visible { outline: none; }
.ex-name a:focus-visible::after { outline: 3px solid color-mix(in srgb, var(--s21-primary) 60%, transparent); outline-offset: 2px; }
.ex-sub { margin: 0; font: 500 .84rem/1.5 var(--font-body); color: var(--s21-text-soft); }
.ex-badge { align-self: flex-start; display: inline-flex; align-items: center; gap: .35rem; font: 700 .68rem var(--font-body); padding: .25rem .7rem; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); }
.ex-badge i { font-size: .4rem; }
.ex-go-arrow { position: absolute; top: 16px; right: 16px; font-size: .75rem; color: var(--s21-text-soft); opacity: 0; transition: opacity .2s; }
.ex-slot:hover .ex-go-arrow { opacity: 1; }
.ex-links { position: relative; z-index: 2; margin-top: auto; padding-top: .8rem; display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
.ex-links a { font: 700 .8rem var(--font-body); color: var(--s21-primary); text-decoration: none; }
.ex-links a:hover { text-decoration: underline; }
.ex-links i { margin-right: .35rem; }
[data-theme="dark"] .ex-links a { color: color-mix(in srgb, var(--subj-science, #4CC9F0) 70%, #fff); }
.ex-slot.soon { border-style: dashed; box-shadow: none; }
.ex-slot.soon:hover { transform: none; box-shadow: none; }
.ex-slot.soon .ex-ic { opacity: .85; }

.ex-note { margin: 2.2rem 0 0; text-align: center; font: 500 .9rem var(--font-body); color: var(--s21-text-soft); }
.ex-cta { margin: 3.2rem 0 4rem; padding: 2.4rem 1.5rem; text-align: center; background: var(--s21-white); border: 1px solid var(--ex-edge); border-radius: var(--radius-lg); box-shadow: var(--card-shadow); }
.ex-cta h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 0 0 .5rem; }
.ex-cta p { max-width: 560px; margin: 0 auto 1.4rem; color: var(--s21-text-soft); }

@media (max-width: 575px) {
  .ex-hero { padding: 5.5rem 0 3rem; }
  .ex-search kbd { display: none; }
  .ex-search input { font-size: 16px; }   /* stops iOS zooming into the field */
}
@media (pointer: coarse) { .ex-search kbd { display: none; } }
