/* Home components share their palette and typography with shell.css. */
.home-shell,
.home-shell *,
.home-shell *::before,
.home-shell *::after {
  box-sizing: border-box;
}

.home-shell {
  padding: 4px 18px 0;
}

.home-shell [hidden] {
  display: none !important;
}

.home-topbar,
.home-section-head,
.home-section-title,
.home-update,
.home-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.home-topbar {
  min-height: 42px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--shell-line);
}

.home-breadcrumb,
.home-text-button,
.home-section-hint {
  font-size: 12px;
  color: var(--shell-muted);
}

.home-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
}

.home-breadcrumb > i { color: var(--shell-accent); }
.home-breadcrumb > span { color: var(--shell-muted); }

.home-text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 4px 0;
  flex-shrink: 0;
  background: none;
  border: 0;
  cursor: pointer;
}

.home-text-button:hover,
.home-footer a:hover { color: var(--shell-accent); }

.home-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 0 24px;
}

.hero-copy { position: relative; z-index: 1; }

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  color: var(--shell-accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.hero-eyebrow > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.hero-copy h1 {
  margin: 0;
  color: var(--shell-text);
  font-size: clamp(25px, 2.4vw, 38px);
  line-height: 1.4;
  font-weight: 650;
  letter-spacing: -0.035em;
}

.hero-subline {
  margin: 13px 0 0;
  color: var(--shell-muted);
  font-size: 13px;
  line-height: 1.8;
}

.hero-compass {
  position: relative;
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  margin-right: 28px;
  flex: 0 0 112px;
  color: var(--shell-accent);
}

.hero-compass > i {
  font-size: 64px;
  opacity: 0.65;
  transform: rotate(-20deg);
}

.hero-compass-orbit {
  position: absolute;
  inset: 0;
  border: 1px solid var(--shell-line-strong);
  border-radius: 50%;
}

.hero-compass-orbit::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px dashed var(--shell-line);
  border-radius: 50%;
}

.hero-compass-axis {
  position: absolute;
  left: -18px;
  right: -18px;
  top: 50%;
  border-top: 1px solid var(--shell-line);
  transform: rotate(-35deg);
}

.hero-compass-north {
  position: absolute;
  top: -5px;
  padding: 0 6px;
  background: var(--shell-bg-0);
  color: var(--shell-muted);
  font: 10px ui-monospace, monospace;
}

.hero-compass-point {
  position: absolute;
  right: 6px;
  top: 28px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--shell-accent);
}

.home-update {
  justify-content: flex-start;
  gap: 12px;
  min-height: 48px;
  margin-bottom: 30px;
  padding: 6px 14px;
  border: 1px solid var(--shell-line);
  border-radius: 8px;
  background: var(--shell-panel-soft);
}

.home-update-label {
  flex-shrink: 0;
  color: var(--shell-accent);
  font-size: 11px;
  font-weight: 650;
}

.home-update p {
  margin: 0;
  color: var(--shell-muted);
  font-size: 12px;
  line-height: 1.7;
}

.home-update .home-text-button {
  margin-left: auto;
  color: var(--shell-muted);
  font-size: 11px;
}

.home-section-head { margin-bottom: 18px; }
.home-section-title { justify-content: flex-start; gap: 10px; }
.home-section-title h2 { margin: 0; font-size: 18px; font-weight: 650; }

#tool-count {
  padding: 3px 8px;
  border: 1px solid var(--shell-line);
  border-radius: 5px;
  color: var(--shell-muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.home-search {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--shell-line-strong);
  border-radius: 9px;
  background: var(--shell-panel);
  color: var(--shell-muted);
}

.home-search:focus-within {
  border-color: var(--shell-accent);
  outline: 2px solid var(--shell-accent-soft);
  outline-offset: 1px;
}

.home-search input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 0;
  border: 0;
  outline: 0;
  background: none;
  color: var(--shell-text);
  font: inherit;
  font-size: 13px;
}

.home-search input::placeholder { color: var(--shell-muted); }
.home-search input::-webkit-search-cancel-button { appearance: none; }

.home-search kbd {
  display: grid;
  place-items: center;
  width: 24px;
  height: 25px;
  flex-shrink: 0;
  border: 1px solid var(--shell-line-strong);
  border-radius: 4px;
  color: var(--shell-muted);
  font-size: 12px;
}

.home-search-clear {
  width: 32px;
  height: 36px;
  flex-shrink: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--shell-muted);
  cursor: pointer;
}

.home-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 15px 0 18px;
}

.home-filter {
  min-height: 34px;
  padding: 5px 13px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: none;
  color: var(--shell-muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}

.home-filter:hover { background: var(--shell-panel); color: var(--shell-text); }
.home-filter.is-active { border-color: var(--shell-accent-border); background: var(--shell-accent-soft); color: var(--shell-accent); }

.entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.entry-card {
  --entry-accent: var(--shell-info);
  --entry-icon-bg: var(--shell-info-soft);
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--shell-line);
  border-radius: 10px;
  background: var(--shell-panel);
  color: var(--shell-text);
  text-decoration: none;
  transition: border-color 140ms ease, background 140ms ease;
}

.entry-card.category-breeding { --entry-accent: var(--shell-special); --entry-icon-bg: var(--shell-special-soft); }
.entry-card.category-adventure { --entry-accent: var(--shell-good); --entry-icon-bg: var(--shell-good-soft); }
.entry-card.category-fun { --entry-accent: var(--shell-warn); --entry-icon-bg: var(--shell-warn-soft); }
.entry-card:hover { border-color: var(--shell-accent-border); background: var(--shell-panel-strong); }

.entry-topline {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 17px;
}

.entry-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 8px;
  background: var(--entry-icon-bg);
  color: var(--entry-accent);
  font-size: 14px;
}

.entry-category { color: var(--shell-muted); font-size: 10px; }
.entry-arrow { margin-left: auto; color: var(--shell-muted); font-size: 11px; }
.entry-card:hover .entry-arrow { color: var(--shell-accent); }
.entry-copy h3 { margin: 0 0 7px; font-size: 15px; line-height: 1.4; font-weight: 650; }
.entry-copy p { margin: 0; color: var(--shell-muted); font-size: 12px; line-height: 1.8; }

.home-empty {
  padding: 50px 20px;
  border: 1px dashed var(--shell-line-strong);
  border-radius: 10px;
  text-align: center;
  color: var(--shell-muted);
}

.home-empty > i { margin-bottom: 10px; font-size: 23px; }
.home-empty h3 { color: var(--shell-text); font-size: 16px; }
.home-empty p, .home-noscript { font-size: 13px; color: var(--shell-muted); }

.home-reset {
  min-height: 38px;
  margin-top: 8px;
  padding: 8px 16px;
  border: 1px solid var(--shell-accent-border);
  border-radius: 6px;
  background: var(--shell-accent-soft);
  color: var(--shell-accent);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.home-upcoming {
  margin-top: 26px;
  border-top: 1px solid var(--shell-line);
  border-bottom: 1px solid var(--shell-line);
  color: var(--shell-muted);
  font-size: 12px;
}

.home-upcoming summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  list-style: none;
  cursor: pointer;
}

.home-upcoming summary::-webkit-details-marker { display: none; }
.home-upcoming summary i { margin-right: 8px; }
.home-upcoming-count { white-space: nowrap; font-size: 11px; }
.home-upcoming-count i { margin: 0 0 0 12px; font-size: 9px; }
.home-upcoming[open] .home-upcoming-count i { transform: rotate(180deg); }
.home-upcoming-links { display: flex; flex-wrap: wrap; gap: 12px; padding-bottom: 18px; }

.home-upcoming-links a {
  padding: 10px 12px;
  border: 1px solid var(--shell-line);
  border-radius: 6px;
  color: var(--shell-text);
  text-decoration: none;
}

.home-upcoming-links a > span { margin-left: 12px; color: var(--shell-muted); font-size: 10px; }
.home-footer { padding: 24px 0 6px; font-size: 11px; line-height: 1.8; color: var(--shell-muted); }
.home-footer a { color: inherit; text-decoration: none; }
.home-footer a > i { margin-left: 4px; font-size: 9px; }
.home-footer-dot { margin: 0 7px; }
.home-shell :is(a, button, summary):focus-visible { outline: 2px solid var(--shell-accent); outline-offset: 4px; }

@media (min-width: 1500px) {
  .entry-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 1080px) {
  .home-shell { padding: 8px 10px 0; }
  .home-topbar { display: none; }
  .home-hero { padding: 22px 0 28px; }
  .hero-copy h1 { font-size: 30px; }
}

@media (max-width: 700px) {
  .hero-compass { display: none; }
  .home-hero { padding: 18px 0 24px; }
  .hero-copy h1 { font-size: clamp(23px, 4.7vw, 30px); }
  .hero-subline { font-size: 12px; }
  .home-update { flex-wrap: wrap; gap: 4px 10px; padding: 12px; margin-bottom: 26px; }
  .home-update p { flex: 1 1 100%; order: 2; }
  .home-update .home-text-button { min-height: 28px; order: 1; }
  .home-section-hint, .home-search kbd { display: none; }
  .entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .entry-card { padding: 14px; }
  .entry-topline { margin-bottom: 13px; }
  .entry-arrow { display: none; }
  .home-search input { font-size: 16px; }
  .home-filters { gap: 4px; }
  .home-filter { min-height: 40px; padding: 6px 5px; font-size: 11px; }
  .home-footer { align-items: flex-start; flex-direction: column; gap: 4px; }
}

@media (max-width: 380px) {
  .home-shell { padding-inline: 3px; }
  .entry-card { padding: 12px; }
  .entry-category { font-size: 9px; }
  .home-upcoming summary { gap: 8px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .entry-card, .home-filter { transition: none; }
}
