/* ============================================================================
   tools.jiunotes.top · home page skin (home.css)
   Only loaded by / and /zh/ home pages. Shares the same tokens as tools.css.
   ========================================================================== */

/* ---------- Hero ---------- */

/* optical pair of the brand wordmark: only affects explicit .hero-title */
.hero-title {
  font-family: "Bricolage Grotesque", "Iowan Old Style", Georgia, "Songti SC", serif;
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.1;
}

.home-hero {
  position: relative;
  overflow: hidden;
  padding: 62px 0 46px;
  text-align: center;
}
.home-hero::before {
  content: "";
  position: absolute;
  top: -160px;
  left: 50%;
  width: 1200px;
  height: 420px;
  transform: translateX(-50%);
  pointer-events: none;
  background: radial-gradient(46% 58% at 50% 50%, rgba(200, 51, 43, .13) 0%, rgba(200, 51, 43, .05) 44%, transparent 74%);
}
.home-hero .container { position: relative; }
.home-hero .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  border: 1px solid rgba(200, 51, 43, .18);
  font-size: .82rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
  letter-spacing: .01em;
}
.home-hero h1 {
  font-size: 2.6rem;
  line-height: 1.18;
  margin: 0 0 14px;
  letter-spacing: -.025em;
  font-weight: 800;
}
.home-hero h1 span { color: var(--brand); }
.home-hero .hero-sub {
  color: var(--text-soft);
  font-size: 1.06rem;
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.75;
}
.home-hero .hero-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 30px;
  margin-top: 24px;
  font-size: .87rem;
  color: var(--text-muted);
}
.home-hero .hero-stats b {
  color: var(--text);
  font-size: 1.06rem;
  font-variant-numeric: tabular-nums;
  margin-right: 4px;
}

/* ---------- Section heading ---------- */
.home-section { margin-bottom: 34px; }
.home-section > h2 {
  font-size: 1.32rem;
  margin: 30px 0 6px;
  letter-spacing: -.012em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.home-section > h2::before {
  content: "";
  width: 6px;
  height: 20px;
  border-radius: 3px;
  background: var(--brand);
  flex-shrink: 0;
}
.home-section > .lede {
  margin: 0 0 18px;
  color: var(--text-muted);
  font-size: .92rem;
}

/* ---------- Card grid (home) ---------- */
.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 18px;
}
.home-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 22px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.home-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(200, 51, 43, .35);
  color: var(--text);
}
.home-card .icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: var(--brand-soft);
  flex-shrink: 0;
}
.home-card h3 {
  margin: 0;
  font-size: 1.06rem;
  line-height: 1.4;
  letter-spacing: -.01em;
}
.home-card p {
  margin: 0;
  font-size: .9rem;
  line-height: 1.62;
  color: var(--text-soft);
}
.home-card .tag {
  margin-top: auto;
  padding-top: 10px;
  font-size: .78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.home-card .tag::after {
  content: "→";
  color: var(--brand);
  font-weight: 700;
  margin-left: auto;
  opacity: 0;
  transform: translateX(-3px);
  transition: opacity .18s, transform .18s;
}
.home-card:hover .tag::after { opacity: 1; transform: translateX(0); }

/* featured card (local hardware tool) */
.home-card.featured {
  background: linear-gradient(150deg, #fff 0%, #fdf5f2 100%);
  border-color: rgba(200, 51, 43, .34);
  box-shadow: 0 8px 24px rgba(200, 51, 43, .1);
}
.home-card.featured .icon {
  background: var(--brand);
  color: #fff;
}
.home-card.featured .tag .badge-new {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
}

/* ---------- All-tools collapsible ---------- */
.home-all {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
  overflow: hidden;
}
.home-all > summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 22px;
  font-size: 1.02rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background .15s;
}
.home-all > summary::-webkit-details-marker { display: none; }
.home-all > summary:hover { background: var(--bg-alt); }
.home-all > summary .chev {
  margin-left: auto;
  color: var(--text-muted);
  font-weight: 400;
  transition: transform .2s;
}
.home-all[open] > summary .chev { transform: rotate(90deg); }
.home-all > summary .count {
  font-size: .8rem;
  font-weight: 600;
  color: var(--brand-dark);
  background: var(--brand-soft);
  padding: 2px 9px;
  border-radius: 999px;
}
.home-all .all-body { padding: 4px 22px 22px; }
.home-all .all-body .hint { line-height: 2; }

/* ---------- All-tools: category card grid ---------- */

/* ---------- FAQ ---------- */
.home-faq { padding: 22px 24px; }
.home-faq .q {
  margin: 14px 0 3px;
  font-weight: 700;
  font-size: .96rem;
}
.home-faq .q:first-of-type { margin-top: 4px; }
.home-faq .a {
  margin: 0;
  color: var(--text-soft);
  font-size: .93rem;
  line-height: 1.72;
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .home-hero { padding: 40px 0 34px; }
  .home-hero h1 { font-size: 1.9rem; }
  .home-hero .hero-sub { font-size: .98rem; }
  .home-hero .hero-stats { gap: 8px 18px; font-size: .82rem; }
  .home-grid { grid-template-columns: 1fr; gap: 14px; }
  .home-card { padding: 18px 18px 16px; }
  .home-card .tag .go { opacity: 1; transform: none; }
  .home-all > summary { padding: 14px 16px; font-size: .96rem; }
  .home-all .all-body { padding: 2px 16px 18px; }

}
/* --------------------------------------------------------------------------
   tools-index component (ported from tools-index-component.html)
   -------------------------------------------------------------------------- */
.tools-index {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 8px;
  font-family: var(--font);
}

.tools-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.tools-head__title-group { display: flex; align-items: center; gap: 16px; }

.tools-head__tick {
  flex: none;
  width: 5px;
  height: 40px;
  border-radius: 3px;
  background: #BE3A2E;
}

.tools-head__titles { display: flex; flex-direction: column; gap: 8px; }

.tools-head__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: .5px;
}

.tools-head__subtitle { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text-muted); }

.tools-head__badge {
  flex: none;
  padding: 8px 18px;
  border-radius: 999px;
  background: #A83226;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .3px;
  white-space: nowrap;
}

/* Collapsible A-Z block (FAQ-style details/summary) */
.tools-index--fold {
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #E6E1D6);
  border-radius: var(--radius, 12px);
  overflow: hidden;
}

.tools-index--fold > summary {
  cursor: pointer;
  list-style: none;
  padding: 26px 24px 24px;
  transition: background .15s;
}

.tools-index--fold > summary::-webkit-details-marker { display: none; }

.tools-index--fold > summary:hover { background: var(--bg-alt, #FAF6EE); }

.tools-index--fold > summary .tools-head {
  margin-bottom: 0;
}

.tools-index--fold .tools-head__chev {
  flex: none;
  align-self: flex-end;
  font-size: 22px;
  line-height: 1;
  color: var(--text-muted, #8A857B);
  font-weight: 400;
  padding-bottom: 4px;
  transition: transform .2s;
}

.tools-index--fold[open] > summary .tools-head__chev { transform: rotate(90deg); }

.tools-index--fold .cat-grid {
  padding: 0 24px 26px;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
  padding-bottom: 24px;
}

.cat-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
  background: var(--card, #fff);
  border: 1px solid var(--border, #E6E1D6);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(28, 26, 23, .05);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.cat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(28, 26, 23, .10);
  border-color: var(--brand, #BE3A2E);
}

.cat-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.cat-card__id { display: flex; align-items: center; gap: 10px; min-width: 0; }

.cat-card__seal {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 15px;
  color: #F7F2E9;
  user-select: none;
}

.cat-card__name {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-card__count { flex: none; font-size: 12px; color: var(--text-muted); }

.cat-card__chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* Wide (horizontal) cards: the first 3 categories span the full row.
   Head sits in a fixed left column; chips flow in the right area. */
.cat-card--wide {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: flex-start;
  gap: 28px;
}

.cat-card--wide .cat-card__head {
  flex: none;
  width: 190px;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.cat-card--wide .cat-card__chips {
  flex: 1;
  min-width: 0;
  align-content: flex-start;
}

/* scoped so it cannot leak onto tools.css's .chip filter buttons */
.tools-index .chip {
  display: inline-block;
  padding: 6px 14px;
  border: 0;
  border-radius: 999px;
  background: var(--bg-soft, #F1EBE0);
  color: var(--text, #2B2824);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  text-decoration: none;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}

.tools-index .chip:hover {
  background: var(--text, #2B2824);
  border-color: var(--text, #2B2824);
  color: #F7F2E9;
}

.tools-index .chip:active { transform: scale(.97); }

.guide-block {
  grid-column: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 100%;
  padding: 28px;
  background: var(--bg-alt, #FBF6EA);
  border: 1px solid var(--brand, #C9A86A);
  border-radius: 12px;
  text-align: center;
  text-decoration: none;
}

.guide-block__title { margin: 0; font-weight: 600; font-size: 20px; color: var(--text, #1C1A17); }

.guide-block__desc { margin: 0; font-size: 13px; line-height: 1.6; color: var(--text-muted); }

@media (max-width: 1024px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .cat-card--wide {
    flex-direction: column;
    gap: 16px;
  }
  .cat-card--wide .cat-card__head {
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }
}
@media (max-width: 760px) {
  .tools-index { padding: 28px 16px 8px; }
  .tools-head { flex-direction: column; align-items: flex-start; margin-bottom: 24px; }
  .tools-head__title-group { gap: 12px; }
  .tools-head__tick { height: 32px; }
  .tools-head__title { font-size: 24px; }
  .cat-grid { grid-template-columns: 1fr; gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .cat-card, .tools-index .chip { transition: none; }
  .cat-card:hover { transform: none; }
}

