.page-home {
  --page-bg: #f4efe7;
  --page-border: #d8cdbb;
  --page-dark: #2e2620;
  --page-soft: #fffaf2;
  --tag-font-base: 0.8rem;
  background: var(--page-bg);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  padding: 2rem clamp(1rem, 4vw, 3rem);
}

.page-home .section-panel {
  background: var(--page-soft);
  border: 1px solid var(--page-border);
  border-radius: 0.5rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  margin-bottom: 2rem;
}

.page-home .section-panel--tint { background: #f6f0e4; }
.page-home .section-panel--flat { background: #fbf8f2; }
.page-home .section-panel--dark { background: var(--page-dark); color: #f4efe7; }
.page-home .section-panel--rust { background: #e8d9c8; }

.page-home .heading-index {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid var(--page-border);
  padding-bottom: 0.5rem;
}

.page-home .section-heading {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  color: inherit;
  margin: 0;
}

.page-home .index-link {
  font-size: 0.85rem;
  color: var(--accent-rust);
  text-decoration: none;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  white-space: nowrap;
}

.page-home .index-link:hover {
  background: var(--accent-rust);
  color: #fff;
  border-color: var(--accent-rust);
}

.page-home .section-panel--dark .index-link {
  color: #f4efe7;
  border-color: #f4efe7;
}

.page-home .section-panel--dark .index-link:hover {
  background: var(--accent-rust);
  color: #fff;
  border-color: var(--accent-rust);
}

.page-home .search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 36rem;
  margin: 0 0 1.5rem;
  padding: 0.5rem 0.75rem;
  background: #fff;
  border: 1px solid var(--page-border);
  border-radius: 2rem;
}

.page-home .search-icon {
  color: var(--accent-rust);
  display: flex;
  align-items: center;
  align-self: center;
}

.page-home .search-icon svg {
  width: 1rem;
  height: 1rem;
}

.page-home .search-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.25rem 0;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-main);
  outline: none;
}

.page-home .tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.page-home .tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.8rem;
  border-radius: 2rem;
  font-size: var(--tag-font-base);
  line-height: 1.2;
  text-decoration: none;
  color: #2e2620;
  background: #e9e0d2;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.page-home .tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
  border-color: currentColor;
}

.page-home .tag--rust { background: #c95f3d; color: #fff; }
.page-home .tag--blue { background: #4a7ea8; color: #fff; }
.page-home .tag--green { background: #5a8f6a; color: #fff; }
.page-home .tag--purple { background: #7a5b8f; color: #fff; }
.page-home .tag--pink { background: #c05f7e; color: #fff; }
.page-home .tag--lime { background: #9aab4a; color: #2e2620; }

.page-home .tag-heat-5 { font-size: 1.25rem; font-weight: 700; }
.page-home .tag-heat-4 { font-size: 1.05rem; font-weight: 600; }
.page-home .tag-heat-3 { font-size: 0.95rem; }
.page-home .tag-heat-2 { font-size: 0.85rem; }
.page-home .tag-heat-1 { font-size: 0.78rem; }

.page-home .seq-num {
  font-size: 0.75em;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
}

.page-home .img-frame {
  display: block;
  overflow: hidden;
  background: #e3d9cb;
  border: 1px solid var(--page-border);
  line-height: 0;
  border-radius: 0.5rem;
}

.page-home .img-frame img {
  max-width: 100%;
  height: auto;
}

.page-home .img-frame--square {
  width: 80px;
  height: 80px;
  border-radius: 0.4rem;
}

.page-home .img-frame--square img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-home .img-frame--wide {
  width: 100%;
}

.page-home .card .img-frame--wide,
.page-home .tag-cloud-bg {
  aspect-ratio: 3 / 2;
}

.page-home .card .img-frame--wide img,
.page-home .tag-cloud-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-home .tile-matrix {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-flow: dense;
  gap: 1rem;
}

.page-home .tile {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.5rem;
  padding: 1rem;
  background: #f1e9dc;
  border: 1px solid var(--page-border);
  border-radius: 0.5rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  min-height: 140px;
}

.page-home .tile:hover {
  border-color: var(--accent-rust);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
}

.page-home .tile--rust { background: linear-gradient(135deg, #c05b38, #a34a28); color: #fff; }
.page-home .tile--blue { background: linear-gradient(135deg, #5a8ea8, #3f6c8f); color: #fff; }
.page-home .tile--lime { background: linear-gradient(135deg, #b3c06a, #8f9f4a); color: #2e2620; }
.page-home .tile--purple { background: linear-gradient(135deg, #8a6da8, #6a4f86); color: #fff; }
.page-home .tile--orange { background: linear-gradient(135deg, #e8a25a, #c97f3a); color: #2e2620; }

.page-home .tile--wide { grid-column: span 2; }
.page-home .tile--tall { grid-row: span 2; }

.page-home .tile-title {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  display: block;
  margin-bottom: 0.5rem;
}

.page-home .tile-count {
  font-size: 0.85rem;
  opacity: 0.85;
  display: block;
  margin-top: auto;
  margin-bottom: 0.25rem;
}

.page-home .status-badge {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 2rem;
  background: #d8cdbb;
  color: #2e2620;
}

.page-home .status-badge--new { background: var(--status-green); color: #fff; }
.page-home .status-badge--complete { background: var(--status-blue); color: #fff; }
.page-home .status-badge--serial { background: var(--status-purple); color: #fff; }
.page-home .status-badge--archived { background: #8a8a8a; color: #fff; }

.page-home .entry-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.page-home .entry-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.5rem;
  transition: border-color 0.15s ease;
}

.page-home .entry-item:hover { border-color: var(--accent-rust); }

.page-home .entry-item .img-frame {
  width: 120px;
  height: 160px;
  flex-shrink: 0;
}

.page-home .entry-item .img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-home .entry-body { flex: 1; min-width: 0; }

.page-home .entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.8rem;
  margin-bottom: 0.25rem;
}

.page-home .entry-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0.25rem 0;
}

.page-home .entry-title a {
  color: var(--text-main);
  text-decoration: none;
}

.page-home .section-panel--dark .entry-title a { color: #fff; }

.page-home .entry-title a:hover { text-decoration: underline; }

.page-home .card-meta {
  font-size: 0.85rem;
  margin: 0.25rem 0;
  color: var(--text-sub);
}

.page-home .section-panel--dark .card-meta { color: rgba(255, 255, 255, 0.75); }

.page-home .scroll-rail {
  overflow-x: auto;
  padding-bottom: 0.75rem;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-rust) transparent;
}

.page-home .card-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 320px);
  gap: 1.25rem;
}

.page-home .card {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--page-border);
  border-radius: 0.5rem;
  padding: 0.85rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.page-home .card:hover {
  border-color: var(--accent-rust);
  transform: translateY(-2px);
}

.page-home .card-grid .card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  color: inherit;
  margin-bottom: 0.5rem;
}

.page-home .card-title {
  font-family: var(--font-head);
  font-size: 1rem;
  margin: 0.5rem 0 0.25rem;
}

.page-home .card-title a { color: inherit; text-decoration: none; }
.page-home .card-title a:hover { text-decoration: underline; }

.page-home .metric {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: inherit;
  margin: 0.25rem 0;
}

.page-home .metric-value {
  font-weight: 700;
  font-size: 1rem;
}

@media (max-width: 700px) {
  .page-home .tile-matrix { grid-template-columns: 1fr; }
  .page-home .tile--wide,
  .page-home .tile--tall { grid-column: auto; grid-row: auto; }
  .page-home .heading-index { flex-direction: column; align-items: flex-start; }
  .page-home .entry-item { flex-direction: column; }
  .page-home .entry-item .img-frame {
    width: 100%;
    height: auto;
  }
  .page-home .entry-item .img-frame img { height: auto; }
}
