/* ==========================================================================
   Sarkari Setu — assets/components.css
   Reusable pieces of the interface: the hero, the search strip, the category
   grid, panels, feed rows, the deadline radar, the utility strip, and the
   overlays (quick-look sheet, search palette, toast).
   ========================================================================== */

/* --------------------------------------------------------------- buttons -- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted-light);
  background: rgba(18, 20, 43, 0.05);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s ease;
}
.btn:hover { border-color: var(--line-strong); color: var(--text); background: rgba(18, 20, 43, 0.09); transform: translateY(-1px); }
.btn.primary {
  border: 0;
  color: #ffffff;
  background: var(--mint);
  box-shadow: 0 9px 25px rgba(51, 85, 255, 0.15);
}
.btn.primary:hover { background: #1e3ad6; }
.btn.ghost { background: transparent; }
.btn.small { min-height: 34px; padding: 0 12px; border-radius: 10px; font-size: 10px; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-light);
  background: rgba(18, 20, 43, 0.04);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}
.chip:hover { border-color: var(--line-strong); color: var(--text); background: rgba(18, 20, 43, 0.08); }
.chip.on { border-color: rgba(51, 85, 255, 0.4); color: var(--mint); background: rgba(51, 85, 255, 0.1); }
.chip .n {
  padding: 1px 5px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(18, 20, 43, 0.07);
  font-family: var(--font-num);
  font-size: 8px;
}

/* ------------------------------------------------------------------ hero -- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.8fr);
  gap: 22px;
  min-height: 274px;
  padding: 31px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 23px;
  background:
    radial-gradient(circle at 80% 0%, rgba(51, 85, 255, 0.21), transparent 32%),
    radial-gradient(circle at 0% 100%, rgba(123, 92, 255, 0.15), transparent 34%),
    rgba(18, 20, 43, 0.05);
}
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-width: 0; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--mint);
  font-family: var(--font-num);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.eyebrow-line { width: 22px; height: 1px; background: var(--mint); }
.hero h1 {
  max-width: 590px;
  margin: 14px 0 13px;
  color: var(--text);
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 800;
  letter-spacing: -0.075em;
  line-height: 1.02;
}
.hero h1 span { color: var(--mint); }
.hero-description { max-width: 510px; margin: 0; color: var(--muted-light); font-size: 12px; line-height: 1.7; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-light);
  background: rgba(18, 20, 43, 0.045);
  font-size: 10px;
  font-weight: 700;
}
.meta-pill .icon { width: 13px; height: 13px; color: var(--mint); }

/* The orbit + circular stat to the right of the hero. */
.hero-visual { position: relative; display: flex; min-height: 210px; align-items: center; justify-content: center; }
.orbit {
  position: absolute;
  width: 218px;
  height: 218px;
  border: 1px solid rgba(51, 85, 255, 0.2);
  border-radius: 50%;
  transform: rotate(-21deg);
}
.orbit::before,
.orbit::after { position: absolute; border-radius: 50%; content: ""; }
.orbit::before {
  top: 19px;
  right: 15px;
  width: 8px;
  height: 8px;
  background: var(--mint);
  box-shadow: 0 0 0 7px rgba(51, 85, 255, 0.12);
}
.orbit::after {
  bottom: 22px;
  left: 18px;
  width: 6px;
  height: 6px;
  background: var(--blue);
  box-shadow: 0 0 0 7px rgba(123, 92, 255, 0.12);
}
.orbit-two {
  position: absolute;
  width: 154px;
  height: 154px;
  border: 1px dashed rgba(18, 20, 43, 0.19);
  border-radius: 50%;
  transform: rotate(34deg);
}
.hero-stat {
  position: relative;
  z-index: 1;
  display: flex;
  width: 176px;
  height: 176px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: radial-gradient(circle at 34% 25%, rgba(51, 85, 255, 0.1), transparent 30%), #ffffff;
  box-shadow: 0 18px 40px rgba(24, 34, 92, 0.12);
}
[data-theme="dark"] .hero-stat {
  background: radial-gradient(circle at 34% 25%, rgba(51, 85, 255, 0.28), transparent 30%), rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 18px 40px rgba(0, 0, 0, 0.35);
}
.hero-stat-label {
  padding: 0 12px;
  color: var(--muted);
  font-family: var(--font-num);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
}
.hero-stat strong { margin: 7px 0 2px; color: var(--mint); font-size: 43px; font-weight: 800; letter-spacing: -0.08em; line-height: 1; }
.hero-stat-copy { padding: 0 14px; color: var(--muted-light); font-size: 9px; font-weight: 700; text-align: center; }

/* ----------------------------------------------------------- search strip -- */

.search-strip {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 16px 18px;
  margin: 18px 0 30px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(18, 20, 43, 0.042);
}
.search-strip-icon {
  display: grid;
  width: 37px;
  height: 37px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  color: var(--mint);
  background: rgba(51, 85, 255, 0.09);
}
.search-strip-copy { min-width: 140px; }
.search-strip-copy strong { display: block; margin-bottom: 3px; font-size: 11px; }
.search-strip-copy span { display: block; color: var(--muted); font-size: 10px; }
.main-search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  height: 42px;
  min-width: 0;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
}
[data-theme="dark"] .main-search { background: rgba(0, 0, 0, 0.22); }
.main-search .icon { color: var(--muted); }
.main-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 11px;
}
.main-search input::placeholder { color: var(--muted); }
.search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: var(--mint);
  box-shadow: 0 9px 25px rgba(51, 85, 255, 0.15);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  transition: 0.2s ease;
}
.search-button:hover { background: #1e3ad6; transform: translateY(-1px); }

/* -------------------------------------------------------- section heading -- */

.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.section-heading h2 { margin: 0; color: var(--text); font-size: 16px; font-weight: 800; letter-spacing: -0.04em; }
.section-heading p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.section-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(51, 85, 255, 0.4);
  color: var(--mint);
  font-family: var(--font-num);
  font-size: 9px;
  letter-spacing: 0.05em;
  white-space: nowrap;
  text-transform: uppercase;
  transition: 0.2s ease;
}
.section-link:hover { border-color: var(--mint); color: #1e3ad6; }

/* --------------------------------------------------------- category grid -- */

.category-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--gap); margin-bottom: 30px; }
.category-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 138px;
  padding: 15px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(18, 20, 43, 0.045);
  cursor: pointer;
  transition: 0.25s ease;
}
.category-card::after {
  position: absolute;
  right: -25px;
  bottom: -33px;
  width: 92px;
  height: 92px;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0.14;
  content: "";
}
.category-card:hover,
.category-card:focus-visible {
  border-color: rgba(51, 85, 255, 0.42);
  background: rgba(18, 20, 43, 0.085);
  outline: none;
  transform: translateY(-3px);
}
.category-icon {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  margin-bottom: 19px;
  border: 1px solid currentColor;
  border-radius: 11px;
  background: rgba(18, 20, 43, 0.05);
}
.category-card h3 { margin: 0 0 4px; color: var(--text); font-size: 11px; font-weight: 800; }
.category-card p { margin: 0; color: var(--muted); font-family: var(--font-num); font-size: 9px; }

.category-card.jobs, .feed-icon.jobs { color: var(--mint); }
.category-card.results, .feed-icon.results { color: var(--blue); }
.category-card.admit, .feed-icon.admit { color: var(--yellow-ink); }
.category-card.answer, .feed-icon.answer { color: var(--orange-ink); }
.category-card.syllabus, .feed-icon.syllabus { color: var(--purple-ink); }
.category-card.admissions, .feed-icon.admissions { color: #f5a8d2; }

/* ----------------------------------------------------------------- panels -- */

.lower-grid { display: grid; grid-template-columns: minmax(0, 1.38fr) minmax(290px, 0.62fr); gap: 18px; align-items: start; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: 19px; background: rgba(18, 20, 43, 0.045); }
.panel.flush { background: transparent; border: 0; }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  min-height: 74px;
  padding: 17px 19px;
  border-bottom: 1px solid var(--line);
}
.panel-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.panel-title-icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  color: var(--mint);
  background: rgba(51, 85, 255, 0.1);
}
.panel-title h2 { margin: 0 0 3px; font-size: 12px; font-weight: 800; }
.panel-title p { margin: 0; color: var(--muted); font-size: 9px; }
.panel-body { padding: 19px; }
.panel-body.tight { padding: 12px 19px; }
.panel-foot { padding: 0 19px 19px; }

/* --------------------------------------------------------------- feed tabs -- */

.feed-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
}
[data-theme="dark"] .feed-tabs { background: rgba(0, 0, 0, 0.22); }
.feed-tab {
  padding: 7px 9px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-family: var(--font-num);
  font-size: 9px;
  transition: 0.2s ease;
}
a.feed-tab { display: inline-block; }
.feed-tab:hover, .feed-tab.active { color: var(--text); background: rgba(18, 20, 43, 0.1); }
.feed-tab.active { color: var(--mint); }

/* -------------------------------------------------------------- feed rows -- */

.feed-description {
  padding: 0 19px 10px;
  margin-top: -4px;
  color: var(--muted);
  font-size: 11px;
}
.feed-list { padding: 7px 19px 11px; }
.feed-row {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 80px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.feed-row:last-child { border-bottom: 0; }
.feed-icon {
  display: grid;
  width: 37px;
  height: 37px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 12px;
  background: rgba(18, 20, 43, 0.045);
}
.feed-icon.lg { width: 52px; height: 52px; border-radius: 16px; }
.feed-icon.lg .icon { width: 26px; height: 26px; }
.feed-copy { min-width: 0; flex: 1; }
.feed-eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
  color: var(--muted);
  font-family: var(--font-num);
  font-size: 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.feed-eyebrow .status-dot { width: 5px; height: 5px; flex: 0 0 auto; border-radius: 50%; background: var(--mint); }
.feed-eyebrow .sep { color: rgba(18, 20, 43, 0.2); }
.feed-copy h3 { overflow: hidden; margin: 0 0 4px; font-size: 11px; font-weight: 800; letter-spacing: -0.02em; }
.feed-copy h3 a { transition: color 0.2s ease; }
.feed-copy h3 a:hover { color: var(--mint); }
.feed-copy p { overflow: hidden; margin: 0; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.feed-side { display: flex; flex: 0 0 auto; flex-direction: column; align-items: flex-end; gap: 7px; }
.feed-meta { color: var(--muted); font-family: var(--font-num); font-size: 8px; }
.feed-actions { display: flex; gap: 5px; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border-radius: 999px;
  font-family: var(--font-num);
  font-size: 8px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-transform: uppercase;
}
.status-badge.open { color: var(--mint); background: rgba(51, 85, 255, 0.1); }
.status-badge.new { color: var(--purple-ink); background: rgba(123, 92, 255, 0.11); }
.status-badge.soon { color: var(--yellow-ink); background: rgba(255, 164, 18, 0.1); }
.status-badge.result { color: var(--green); background: rgba(15, 157, 118, 0.11); }
.status-badge.closed { color: var(--muted); background: rgba(18, 20, 43, 0.06); }
.status-badge.plain { color: var(--muted-light); background: rgba(18, 20, 43, 0.07); }

/* --------------------------------------------------------------- deadline -- */

.radar-panel { overflow: hidden; }
.radar-list { padding: 9px 19px 18px; }
.radar-item { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.radar-item:last-child { border-bottom: 0; }
.radar-date {
  display: grid;
  width: 36px;
  height: 39px;
  flex: 0 0 auto;
  align-content: center;
  justify-items: center;
  border: 1px solid rgba(18, 20, 43, 0.12);
  border-radius: 10px;
  color: var(--muted-light);
  background: rgba(18, 20, 43, 0.045);
}
.radar-date strong { font-size: 14px; font-weight: 800; line-height: 1; }
.radar-date span { margin-top: 3px; color: var(--muted); font-family: var(--font-num); font-size: 7px; text-transform: uppercase; }
.radar-copy { min-width: 0; flex: 1; }
.radar-copy h3 { overflow: hidden; margin: 0 0 4px; font-size: 10px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.radar-copy h3 a:hover { color: var(--mint); }
.radar-copy p { overflow: hidden; margin: 0; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.radar-arrow {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  transition: 0.2s ease;
}
.radar-item:hover .radar-arrow { border-color: var(--line-strong); color: var(--mint); }

/* ---------------------------------------------------------- utility strip -- */

.utility-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); margin-top: 18px; }
.utility-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(18, 20, 43, 0.035);
  transition: 0.2s ease;
}
a.utility-card:hover { border-color: var(--line-strong); background: rgba(18, 20, 43, 0.06); transform: translateY(-2px); }
.utility-icon {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  color: var(--blue);
  background: rgba(123, 92, 255, 0.1);
}
.utility-copy { min-width: 0; }
.utility-copy strong { display: block; overflow: hidden; margin-bottom: 3px; font-size: 10px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.utility-copy span { display: block; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

/* ----------------------------------------------------------- empty states -- */

.empty-state { padding: 38px 15px; color: var(--muted); font-size: 11px; text-align: center; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 40px 18px; text-align: center; }
.empty .glyph {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--mint);
  background: rgba(51, 85, 255, 0.08);
}
.empty strong { font-size: 12px; font-weight: 800; }
.empty p { max-width: 320px; color: var(--muted); font-size: 10px; line-height: 1.6; }

/* ------------------------------------------------------- row action buttons -- */

.save-btn {
  display: grid;
  width: 27px;
  height: 27px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: 0.2s ease;
}
.save-btn:hover { border-color: var(--line-strong); color: var(--text); background: rgba(18, 20, 43, 0.07); }
.save-btn[aria-pressed="true"] { border-color: rgba(51, 85, 255, 0.4); color: var(--mint); background: rgba(51, 85, 255, 0.1); }
.save-btn[aria-pressed="true"] .icon { fill: currentColor; }
.quick-btn {
  display: grid;
  width: 27px;
  height: 27px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: 0.2s ease;
}
.quick-btn:hover { border-color: var(--line-strong); color: var(--mint); background: rgba(51, 85, 255, 0.08); }
.feed-row.is-saved .feed-icon { box-shadow: 0 0 0 1px rgba(51, 85, 255, 0.3); }

/* --------------------------------------------------------- filter / sort -- */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  padding: 13px 15px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(18, 20, 43, 0.035);
}
.filter-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 3px;
  color: var(--muted);
  font-family: var(--font-num);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.filter-bar .spacer { flex: 1; }
.result-count { color: var(--muted); font-family: var(--font-num); font-size: 9px; white-space: nowrap; }
.result-count b { color: var(--mint); font-weight: 500; }

/* ------------------------------------------------------------- accordion -- */

.acc { border-bottom: 1px solid var(--line); }
.acc:last-child { border-bottom: 0; }
.acc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 0;
  border: 0;
  color: var(--text);
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}
.acc-head .chev { color: var(--muted); transition: transform 0.2s ease; }
.acc[data-open="true"] .acc-head .chev { color: var(--mint); transform: rotate(180deg); }
.acc-body { display: none; padding: 0 0 15px; color: var(--muted-light); font-size: 11px; line-height: 1.75; }
.acc[data-open="true"] .acc-body { display: block; }
.acc-body p { margin: 0 0 9px; }
.acc-body p:last-child { margin: 0; }
.acc-body a { color: var(--mint); }

/* ------------------------------------------------------------ link rows -- */

.link-list { display: flex; flex-direction: column; gap: 8px; }
.link-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(18, 20, 43, 0.04);
  transition: 0.2s ease;
}
.link-row:hover { border-color: rgba(51, 85, 255, 0.35); background: rgba(51, 85, 255, 0.07); transform: translateX(2px); }
.link-row .icon { color: var(--mint); }
.link-row-copy { min-width: 0; flex: 1; }
.link-row-copy strong { display: block; overflow: hidden; margin-bottom: 3px; font-size: 10px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.link-row-copy span { display: block; overflow: hidden; color: var(--muted); font-family: var(--font-num); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.link-row .go { color: var(--muted); flex: 0 0 auto; }

/* ------------------------------------------------------------- fact grid -- */

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.fact {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(18, 20, 43, 0.035);
}
.fact dt { margin-bottom: 6px; color: var(--muted); font-family: var(--font-num); font-size: 8px; letter-spacing: 0.08em; text-transform: uppercase; }
.fact dd { margin: 0; font-size: 11px; font-weight: 800; line-height: 1.5; }
.fact dd .sub { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 400; }
.fact.alert { border-color: rgba(255, 164, 18, 0.28); background: rgba(255, 164, 18, 0.07); }
.fact.alert dt { color: var(--yellow-ink); }
.fact.mint { border-color: rgba(51, 85, 255, 0.25); background: rgba(51, 85, 255, 0.07); }
.fact.mint dt { color: var(--mint); }

/* ------------------------------------------------------------ trust note -- */

.trust-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 15px;
  border: 1px solid rgba(51, 85, 255, 0.2);
  border-radius: 14px;
  color: var(--muted-light);
  background: rgba(51, 85, 255, 0.06);
  font-size: 10px;
  line-height: 1.65;
}
.trust-note .icon { color: var(--mint); flex: 0 0 auto; margin-top: 1px; }
.trust-note b { color: var(--text); }
.trust-note a { color: var(--mint); }
.trust-note.amber { border-color: rgba(255, 164, 18, 0.24); background: rgba(255, 164, 18, 0.06); }
.trust-note.amber .icon { color: var(--yellow-ink); }

/* ------------------------------------------------------------- overlays -- */

.overlay {
  position: fixed;
  z-index: 40;
  inset: 0;
  display: grid;
  padding: 24px;
  place-items: center;
  background: rgba(18, 20, 43, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.overlay.open { opacity: 1; pointer-events: auto; }

.sheet {
  width: min(560px, 100%);
  max-height: min(84vh, 720px);
  overflow: auto;
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  transform: translateY(14px);
  transition: transform 0.2s ease;
  scrollbar-width: thin;
}
.overlay.open .sheet { transform: translateY(0); }
.sheet-grip { display: none; }
.sheet-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.sheet-head-copy { min-width: 0; flex: 1; }
.sheet-head h2 { margin: 0 0 6px; font-size: 14px; font-weight: 800; line-height: 1.4; }
.sheet-head h3 { margin: 0 0 6px; font-size: 14px; font-weight: 800; line-height: 1.4; }
.sheet-head p { margin: 0; color: var(--muted); font-size: 10px; }
.sheet-close {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  margin-left: auto;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: 0.2s ease;
}
.sheet-close:hover { border-color: var(--line-strong); color: var(--text); background: var(--panel-soft); }
.sheet-body p { margin: 0 0 11px; color: var(--muted-light); font-size: 11px; line-height: 1.75; }
.sheet-body p:last-child { margin: 0; }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.search-panel {
  width: min(640px, 100%);
  max-height: min(76vh, 620px);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  transform: translateY(12px);
  transition: transform 0.2s ease;
}
.overlay.open .search-panel { transform: translateY(0); }
.search-input-row { display: flex; align-items: center; gap: 11px; padding: 15px 17px; border-bottom: 1px solid var(--line); color: var(--muted); }
.search-input-row input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 13px; }
.search-input-row input::placeholder { color: var(--muted); }
.search-input-row .esc { padding: 3px 6px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); font-family: var(--font-num); font-size: 8px; }
.search-meta { padding: 9px 17px; border-bottom: 1px solid var(--line); color: var(--muted); font-family: var(--font-num); font-size: 8px; letter-spacing: 0.06em; text-transform: uppercase; }
.search-results { max-height: 380px; overflow: auto; padding: 7px; scrollbar-width: thin; }
.search-foot { display: flex; gap: 14px; padding: 11px 17px; border-top: 1px solid var(--line); color: var(--muted); font-family: var(--font-num); font-size: 8px; }
.search-foot kbd { padding: 2px 5px; border: 1px solid var(--line); border-radius: 5px; background: rgba(18, 20, 43, 0.05); font-family: inherit; }
.search-hit { display: flex; align-items: center; gap: 11px; padding: 10px; border-radius: 12px; }
.search-hit:hover, .search-hit.cursor { background: rgba(18, 20, 43, 0.07); }
.search-hit .hm { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border: 1px solid var(--line); border-radius: 10px; color: var(--mint); }
.search-hit .hb { min-width: 0; }
.search-hit .ht { display: block; overflow: hidden; margin-bottom: 3px; font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.search-hit .hs { display: block; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.search-hit mark { color: var(--mint); background: transparent; }
.search-hit > .icon { margin-left: auto; color: var(--muted); flex: 0 0 auto; }

/* The kind chips the palette injects once its index has resolved. */
.search-filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 11px 16px; border-bottom: 1px solid var(--line); }

/* ------------------------------------------------------------- skeleton -- */

.skel-wrap { display: flex; flex-direction: column; gap: 10px; }
.skel { border-radius: 10px; background: linear-gradient(90deg, rgba(18, 20, 43, 0.05), rgba(18, 20, 43, 0.11), rgba(18, 20, 43, 0.05)); background-size: 200% 100%; animation: skel 1.3s linear infinite; }
.skel-line { height: 11px; }
.skel-line.short { width: 55%; }
.skel-icon { border-radius: 13px; }
@keyframes skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ----------------------------------------------------------------- toast -- */

/* The host is emitted by the page shell; the chunks only ever append to it. */
.toast-wrap {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 9px;
  max-width: min(340px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 13px 15px;
  border: 1px solid rgba(51, 85, 255, 0.25);
  border-radius: 13px;
  color: var(--text);
  color: #f2f4fb;
  background: #12142b;
  box-shadow: 0 20px 50px rgba(24, 34, 92, 0.3);
  font-size: 11px;
  opacity: 0;
  pointer-events: auto;
  transform: translateY(12px);
  transition: 0.25s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast .icon { color: var(--mint); }
.toast-msg { flex: 1; min-width: 0; }
.toast-act {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--mint);
  background: transparent;
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
  flex: 0 0 auto;
}
.toast.error { border-color: rgba(255, 133, 133, 0.3); }
.toast.error .icon { color: var(--red); }
.toast.ok .icon { color: var(--mint); }

/* --------------------------------------------------------- offline strip -- */

.net-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 15px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 133, 133, 0.28);
  border-radius: 14px;
  color: var(--muted-light);
  background: rgba(255, 133, 133, 0.07);
  font-size: 10px;
}
/* An author-level `display` beats the UA `[hidden]` rule, so say it here. */
.net-banner[hidden] { display: none; }
.net-banner .icon { color: var(--red); flex: 0 0 auto; }

/* ------------------------------------------------------------- utilities -- */

/* A theme flip is only pretty if every element transitions its colours at
   once. `.retheme` is added for ~450ms by the toggle and removed after, so a
   slow device cannot leave the page permanently in transition mode. */
.retheme, .retheme * {
  transition: background-color 0.4s ease, border-color 0.4s ease, color 0.4s ease !important;
}

.row { display: flex; align-items: center; gap: 8px; }
.row.wrap, .wrap { flex-wrap: wrap; }
.row.top { align-items: flex-start; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.grow { min-width: 0; flex: 1; }
.gap-4 { gap: 4px; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-14 { gap: 14px; }

.small { font-size: 10px; line-height: 1.65; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-num); }

.text-input {
  width: 100%;
  height: 42px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  color: var(--text);
  background: var(--panel-soft);
  font-size: 11px;
}
[data-theme="dark"] .text-input { background: rgba(0, 0, 0, 0.22); }
.text-input:focus-visible { border-color: var(--mint); outline: none; }
.text-input::placeholder { color: var(--muted); }

.field { display: block; }
.field-label { display: block; margin-bottom: 7px; font-size: 10px; font-weight: 800; }

/* ------------------------------------------------------------ responsive -- */

@media (max-width: 1180px) {
  .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero { grid-template-columns: minmax(0, 1.35fr) minmax(230px, 0.65fr); }
}

@media (max-width: 960px) {
  .lower-grid { grid-template-columns: 1fr; }
  .utility-strip { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding: 23px; }
  .hero h1 { font-size: 37px; }
  .hero-visual { min-height: 225px; margin-top: -2px; }
  .search-strip { align-items: stretch; flex-direction: column; gap: 11px; padding: 14px; }
  .search-strip-copy { display: flex; align-items: center; justify-content: space-between; }
  .main-search { flex: initial; }
  .search-button { width: 100%; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-card { min-height: 125px; }
  .panel-head { align-items: flex-start; flex-direction: column; }
  .feed-tabs { width: 100%; justify-content: space-between; }
  .feed-tab { flex: 1; padding-right: 4px; padding-left: 4px; }
  .feed-row { align-items: flex-start; }
  .feed-meta { display: none; }
  .feed-copy h3 { white-space: normal; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 9px; }
  .facts { grid-template-columns: 1fr; }
  .toast-wrap { right: 16px; bottom: 16px; left: 16px; align-items: stretch; max-width: none; }
  .overlay { padding: 12px; }
  .sheet { padding: 18px; }
}

@media (max-width: 420px) {
  .category-grid { gap: 8px; }
  .category-card { padding: 12px; }
  .category-card h3 { font-size: 10px; }
  .hero h1 { font-size: 33px; }
  .hero-stat { width: 160px; height: 160px; }
  .orbit { width: 198px; height: 198px; }
  .orbit-two { width: 140px; height: 140px; }
}
