/* 智路 zlui.cn — AI与科技博客 */

:root {
  --ink: #141820;
  --ink-soft: #555c6a;
  --paper: #e8ebf0;
  --paper-deep: #d2d7e0;
  --surface: #f2f4f8;
  --line: #c5cad3;
  --zl: #2563a8;
  --zl-deep: #152033;
  --lagoon: #3b82b0;
  --copper: #6b7280;
  --mist: #6b7785;
  --white: #ffffff;
  --font-display: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --max: 1080px;
  --radius: 2px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--zl);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: var(--lagoon);
}

.site-wrap {
  overflow-x: hidden;
}

.container-zl {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

@media (max-width: 575.98px) {
  .container-zl {
    width: min(100% - 1.35rem, var(--max));
  }
}

/* —— Nav —— */
.site-nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  padding: 1rem 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-logo {
  display: block;
  height: 1.65rem;
  width: auto;
}
.brand-mark {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--white);
  text-decoration: none;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

.brand-mark:hover {
  color: var(--white);
}

.page-inner .site-nav {
  position: relative;
  background: var(--zl-deep);
  padding: 0.85rem 0;
}

.page-inner .brand-mark {
  text-shadow: none;
}

.nav-toggle {
  display: none;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 1.25rem;
  margin-inline: auto;
  background: var(--white);
  transition: transform 0.3s var(--ease), opacity 0.3s;
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: flex-end;
  max-width: 54rem;
}

.nav-links a {
  display: block;
  padding: 0.35rem 0.55rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
  border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  border-bottom-color: var(--copper);
}

@media (max-width: 991.98px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    max-width: none;
    background: var(--zl-deep);
    padding: 0.5rem 1.25rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 0.65rem 0.25rem;
    font-size: 0.95rem;
  }
}

/* —— Hero —— */
.hero {
  position: relative;
  min-height: min(46vh, 380px);
  display: flex;
  align-items: flex-end;
  padding: 5rem 0 2.25rem;
  color: var(--white);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(21, 32, 51, 0.92) 0%, rgba(37, 99, 168, 0.55) 48%, rgba(28, 35, 41, 0.35) 100%),
    linear-gradient(180deg, rgba(20, 30, 48, 0.25) 0%, rgba(20, 30, 48, 0.82) 100%),
    radial-gradient(ellipse at 70% 30%, #3b82b0 0%, #152033 55%, #0c121c 100%);
  transform: scale(1.02);
  animation: hero-drift 18s var(--ease) infinite alternate;
}

@keyframes hero-drift {
  from { transform: scale(1.02) translate(0, 0); }
  to { transform: scale(1.06) translate(-1.2%, -0.6%); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 28em;
  animation: rise 0.9s var(--ease) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 7vw, 3.4rem);
  letter-spacing: 0.08em;
  line-height: 1.1;
  margin: 0 0 0.65rem;
  font-weight: 700;
}

.hero-tagline {
  margin: 0 0 0.55rem;
  font-size: clamp(1.15rem, 2.8vw, 1.45rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.35;
}

.hero-lead {
  margin: 0 0 1.5rem;
  font-size: 1rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.88);
  max-width: 22em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.btn-wk {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.2rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.btn-primary {
  background: var(--copper);
  color: var(--ink);
}

.btn-primary:hover {
  background: #c99a4a;
  color: var(--ink);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

@media (max-width: 575.98px) {
  .hero {
    min-height: min(42vh, 340px);
    padding: 4.5rem 0 1.85rem;
  }
}

/* —— Sections —— */
.section {
  padding: 3.75rem 0;
}

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  margin-bottom: 1.65rem;
  max-width: 36em;
}

.section-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lagoon);
  margin-bottom: 0.4rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3.2vw, 1.85rem);
  letter-spacing: 0.02em;
  line-height: 1.3;
  margin: 0 0 0.5rem;
  font-weight: 700;
}

.section-desc {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

/* —— Channel strip (no cards) —— */
.channel-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.15rem;
  list-style: none;
  margin: 0;
  border-top: 2px solid var(--zl);
  border-bottom: 1px solid var(--line);
  padding: 0.85rem 0;
}

.channel-strip a,
.channel-strip span {
  display: inline-block;
  padding: 0.25rem 0.15rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
}

.channel-strip a:hover {
  color: var(--zl);
  border-bottom-color: var(--copper);
}

.channel-strip li:not(:last-child)::after {
  content: "·";
  margin-left: 0.55rem;
  color: var(--mist);
  font-weight: 400;
}

/* —— Media feature + lists —— */
.media-feature {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-bottom: 1.15rem;
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
  animation: rise 0.8s var(--ease) 0.1s both;
}

.media-feature-visual {
  min-height: 15.5rem;
  background: var(--zl-deep);
}

.media-feature-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 15.5rem;
}

.media-feature-body {
  padding: 1.6rem 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (max-width: 767.98px) {
  .media-feature {
    grid-template-columns: 1fr;
  }

  .media-feature-visual,
  .media-feature-visual img {
    min-height: 11.5rem;
  }
}

.media-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}

.media-list-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem 1.05rem;
}

@media (max-width: 767.98px) {
  .media-list-grid {
    grid-template-columns: 1fr;
  }
}

.media-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.95rem 1.15rem;
  align-items: stretch;
  padding: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.section-alt .media-row,
.section-alt .media-feature {
  background: var(--paper);
}

.media-row-stack {
  grid-template-columns: 1fr;
  gap: 0.75rem;
  height: 100%;
}

a.media-row:hover {
  border-color: var(--zl);
  transform: translateY(-2px);
  color: inherit;
}

a.media-row:hover .media-title {
  color: var(--zl);
}

.blog-static .media-row,
.blog-static .media-feature {
  cursor: default;
}

.media-thumb {
  overflow: hidden;
  background: var(--zl-deep);
  aspect-ratio: 16 / 9;
}

.media-row-stack .media-thumb {
  aspect-ratio: 16 / 10;
}

.media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s var(--ease);
}

a.media-row:hover .media-thumb img {
  transform: scale(1.04);
}

.media-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 0.15rem 0.15rem 0.15rem 0;
}

.media-row-stack .media-body {
  padding: 0 0.15rem 0.25rem;
}

.media-cat {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--lagoon);
  margin-bottom: 0.3rem;
}

.media-title {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 0.35rem;
  color: var(--ink);
}

.media-feature .media-title {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.5vw, 1.45rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.35;
}

.media-excerpt {
  margin: 0 0 0.45rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

.media-date {
  font-size: 0.78rem;
  color: var(--mist);
}

@media (max-width: 575.98px) {
  .media-row:not(.media-row-stack) {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding: 0.55rem;
  }

  .media-title {
    font-size: 0.95rem;
  }

  .media-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* —— About / prose —— */
.prose p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
  max-width: 40em;
}

.prose strong {
  color: var(--ink);
}

.pull-quote {
  margin: 1.75rem 0 0;
  padding: 1rem 0 0;
  border-top: 2px solid var(--zl);
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--zl);
  max-width: 22em;
}

/* —— Footer —— */
.site-footer {
  background: var(--zl-deep);
  color: rgba(255, 255, 255, 0.78);
  padding: 2.5rem 0 2rem;
}

.footer-inner {
  display: grid;
  gap: 1.25rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--white);
  margin-bottom: 0.35rem;
}

.footer-tag {
  margin: 0;
  font-size: 0.9rem;
  max-width: 20em;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.85rem;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-copy {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.45);
}

@media (min-width: 768px) {
  .footer-inner {
    grid-template-columns: 1.4fr 1fr auto;
    align-items: end;
  }
}

/* —— Inner pages —— */
.page-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 2.25rem 0 2rem;
}

.page-header .section-label {
  margin-bottom: 0.5rem;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.8vw, 2rem);
  letter-spacing: 0.02em;
  font-weight: 700;
  margin: 0 0 0.55rem;
  line-height: 1.3;
}

.page-header p {
  margin: 0;
  color: var(--ink-soft);
  max-width: 36em;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.55rem;
  margin-bottom: 1.5rem;
}

.filter-bar a,
.filter-bar span {
  display: inline-block;
  padding: 0.3rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
}

.filter-bar a:hover {
  color: var(--zl);
  border-color: var(--zl);
}

.filter-bar .is-active {
  color: var(--white);
  background: var(--zl);
  border-color: var(--zl);
}

.blog-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.blog-item + .blog-item {
  margin-top: 0.75rem;
}

.blog-row {
  display: grid;
  grid-template-columns: minmax(8rem, 11rem) 1fr;
  gap: 1rem 1.2rem;
  padding: 0.85rem;
  background: var(--surface);
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.2s;
}

a.blog-row:hover {
  border-color: var(--zl);
  transform: translateY(-1px);
  color: inherit;
}

a.blog-row:hover .blog-title {
  color: var(--zl);
}

.blog-thumb {
  overflow: hidden;
  background: var(--zl-deep);
  aspect-ratio: 16 / 10;
}

.blog-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  line-height: 1.4;
}

.blog-excerpt {
  margin: 0 0 0.4rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.blog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  font-size: 0.78rem;
  color: var(--mist);
}

.blog-meta .tag {
  color: var(--lagoon);
  font-weight: 600;
}

@media (max-width: 575.98px) {
  .blog-row {
    grid-template-columns: 6.25rem 1fr;
    gap: 0.75rem;
    padding: 0.55rem;
  }

  .blog-title {
    font-size: 0.95rem;
  }

  .blog-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* —— Article —— */
.article-shell {
  padding: 2.5rem 0 1rem;
  background: var(--surface);
}

.article-body {
  max-width: 42rem;
}

.article-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: var(--mist);
}

.article-meta-bar .tag {
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--lagoon);
}

.article-body > p {
  margin: 0 0 1.15rem;
  color: var(--ink-soft);
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.01em;
  font-weight: 700;
  margin: 2rem 0 0.85rem;
  color: var(--ink);
}

.article-body ol,
.article-body ul {
  margin: 0 0 1.15rem;
  padding-left: 1.25rem;
  color: var(--ink-soft);
}

.article-body li + li {
  margin-top: 0.4rem;
}

.article-body blockquote {
  margin: 1.5rem 0;
  padding: 0.85rem 0 0.85rem 1.1rem;
  border-left: 3px solid var(--copper);
  color: var(--zl);
  font-size: 1.05rem;
  line-height: 1.55;
}

.article-body strong {
  color: var(--ink);
}

.article-cover {
  margin: 0 0 1.75rem;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--zl-deep);
  aspect-ratio: 16 / 9;
}

.article-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  font-weight: 600;
}

.article-nav a {
  color: var(--zl);
}

.article-nav a:hover {
  color: var(--lagoon);
}

/* Related / latest */
.article-more {
  padding: 2.5rem 0 3rem;
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.article-more-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.article-more-tab {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 0.55rem 0.85rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--mist);
  cursor: pointer;
  margin-bottom: -1px;
}

.article-more-tab.is-active {
  color: var(--zl);
  border-bottom-color: var(--copper);
}

.article-more-panel[hidden] {
  display: none;
}

.related-card {
  display: grid;
  grid-template-columns: minmax(7rem, 10rem) 1fr;
  gap: 0.9rem;
  padding: 0.65rem;
  margin-bottom: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s;
}

.related-card:hover {
  border-color: var(--zl);
  color: inherit;
}

.related-card-media {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--zl-deep);
}

.related-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-card-body h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.3rem;
  line-height: 1.4;
}

.related-card-excerpt {
  margin: 0 0 0.3rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-card-body time {
  font-size: 0.75rem;
  color: var(--mist);
}

.latest-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.latest-list li + li {
  border-top: 1px solid var(--line);
}

.latest-list a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  color: inherit;
  text-decoration: none;
}

.latest-list a:hover .latest-title {
  color: var(--zl);
}

.latest-title {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.4;
}

.latest-date {
  flex-shrink: 0;
  font-size: 0.8rem;
  color: var(--mist);
}

@media (max-width: 575.98px) {
  .related-card {
    grid-template-columns: 5.5rem 1fr;
  }

  .latest-list a {
    flex-direction: column;
    gap: 0.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg,
  .hero-content,
  .media-feature {
    animation: none;
  }

  .media-thumb img,
  a.media-row,
  a.blog-row {
    transition: none;
  }
}

/* Media list page (图文列表) */
.media-list-page .media-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.media-list-page .media-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem 1.2rem;
  align-items: stretch;
  padding: 0.8rem;
  border: 1px solid var(--line, #c9d0d9);
  background: var(--surface, #fafbfc);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}

.media-list-page a.media-row:hover {
  transform: translateY(-1px);
  color: inherit;
}

.media-list-page .media-thumb {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #1a1f27;
}

.media-list-page .media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.media-list-page a.media-row:hover .media-thumb img {
  transform: scale(1.04);
}

.media-list-page .media-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.media-list-page .media-cat {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
  opacity: 0.85;
}

.media-list-page .media-title {
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 0.35rem;
}

.media-list-page .media-excerpt {
  margin: 0 0 0.4rem;
  font-size: 0.92rem;
  line-height: 1.55;
  opacity: 0.82;
}

.media-list-page .media-date {
  font-size: 0.78rem;
  opacity: 0.65;
}

.media-list-page .list-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.35rem;
}

.media-list-page .list-switch a,
.media-list-page .list-switch span {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid var(--line, #c9d0d9);
  text-decoration: none;
}

.media-list-page .list-switch .is-active {
  border-color: currentColor;
}

@media (max-width: 575.98px) {
  .media-list-page .media-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding: 0.55rem;
  }

  .media-list-page .media-title {
    font-size: 0.98rem;
  }

  .media-list-page .media-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* List view switch */
.list-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.35rem;
}
.list-switch a,
.list-switch span {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid var(--line, #c9d0d9);
  text-decoration: none;
  color: inherit;
}
.list-switch .is-active {
  border-color: currentColor;
}


.search-box.search-box-light {
  border-color: var(--line);
  background: var(--paper);
}
.search-box.search-box-light input {
  color: var(--ink);
}
.search-box.search-box-light input::placeholder {
  color: var(--mist);
}
.search-box {
  display: flex;
  gap: 0;
  margin: 0 0 1rem;
  max-width: 34rem;
  border: 2px solid rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(6px);
}
.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0.85rem 1rem;
  font-family: var(--font-body);
  font-size: 0.98rem;
  color: var(--white);
  outline: none;
}
.search-box input::placeholder {
  color: rgba(255,255,255,0.65);
}
.search-box button {
  border: 0;
  background: var(--copper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0 1.15rem;
  cursor: pointer;
  white-space: nowrap;
}
.search-box button:hover {
  background: #e0a31f;
}
.search-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.82rem;
}
.search-hints a,
.search-hints span {
  color: rgba(255,255,255,0.78);
}
.search-hints a:hover {
  color: var(--white);
}

/* Direction strip */
.dir-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.dir-strip a,
.dir-strip span {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  text-decoration: none;
}
.dir-strip a:hover {
  color: var(--zl);
  border-color: var(--zl);
}
.section-alt .dir-strip a,
.section-alt .dir-strip span {
  background: var(--paper);
}

/* Course meta chips */
.course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  font-size: 0.78rem;
  color: var(--mist);
  margin-top: 0.25rem;
}
.course-meta .plat {
  color: var(--zl);
  font-weight: 600;
}
.course-meta .type-tag {
  color: var(--lagoon);
  font-weight: 600;
}
.badge-free {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: var(--copper);
  vertical-align: middle;
}

/* Platform grid */
.platform-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}
@media (max-width: 991.98px) {
  .platform-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575.98px) {
  .platform-grid { grid-template-columns: 1fr; }
}
.platform-item {
  display: block;
  padding: 1rem 1.05rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--zl);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.2s;
}
.section-alt .platform-item {
  background: var(--paper);
}
a.platform-item:hover {
  border-color: var(--zl);
  transform: translateY(-1px);
  color: inherit;
}
.platform-item h3 {
  margin: 0 0 0.35rem;
  font-size: 1.02rem;
  font-weight: 700;
}
.platform-item p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--ink-soft);
  line-height: 1.5;
}
.platform-item .plat-region {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lagoon);
  margin-bottom: 0.3rem;
}

/* Category blocks */
.cat-block {
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}
.cat-block:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}
.cat-block h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.65rem;
  color: var(--zl);
}
.cat-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.cat-tags li {
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.cat-tags li:not(:last-child)::after {
  content: "·";
  margin-left: 0.55rem;
  color: var(--mist);
}

/* Search results table */
.result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.result-table th,
.result-table td {
  padding: 0.85rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.result-table th {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--mist);
  background: var(--surface);
}
.result-table a {
  font-weight: 600;
  color: var(--zl);
}

/* Platform detail */
.platform-hero-cover {
  margin: 0 0 1.5rem;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--zl-deep);
}
.platform-hero-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.fact-list {
  list-style: none;
  margin: 1.25rem 0;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--surface);
}
.fact-list li {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
.fact-list li:last-child { border-bottom: 0; }
.fact-list strong {
  color: var(--mist);
  font-weight: 600;
  font-size: 0.82rem;
}
@media (max-width: 575.98px) {
  .fact-list li {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
}

.nav-links a[href*="feedback.html"],
.channel-links a[href*="feedback.html"] {
  font-weight: 700;
}
.site-nav .nav-links a[href*="feedback.html"],
.channel-bar .channel-links a[href*="feedback.html"] {
  border: 1px solid currentColor;
  border-radius: 2px;
  padding-inline: 0.65rem;
  margin-left: 0.25rem;
}

.btn-feedback-submit {
  background: var(--copper);
  color: var(--ink);
}
.btn-feedback-submit:hover {
  filter: brightness(1.05);
}



/* —— jiwangapp extras —— */
.page-inner .brand-logo { filter: none; }
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (max-width: 767.98px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 479.98px) {
  .cat-grid { grid-template-columns: 1fr; }
}
.cat-tile {
  display: block;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--zl);
  color: inherit;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.cat-tile:hover {
  background: var(--white);
  border-color: var(--zl);
  color: inherit;
}
.cat-tile strong {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.2rem;
}
.cat-tile span {
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.api-row {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}
.api-row:hover { color: inherit; }
.api-row:hover h3 { color: var(--zl); }
.api-row h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  font-weight: 700;
}
.api-row p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.api-meta {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--mist);
  text-transform: uppercase;
}
.api-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}
.api-tags span {
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  background: var(--white);
}
.fact-list {
  list-style: none;
  margin: 1.25rem 0;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--surface);
}
.fact-list li {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
.fact-list li:last-child { border-bottom: 0; }
.fact-list strong {
  color: var(--zl-deep);
  font-weight: 700;
}
@media (max-width: 575.98px) {
  .fact-list li { grid-template-columns: 1fr; gap: 0.25rem; }
}
.feature-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.75rem 0 1.25rem;
  padding: 0;
  list-style: none;
}
.feature-chips li {
  font-size: 0.82rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
}
.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (max-width: 575.98px) {
  .tool-grid { grid-template-columns: 1fr; }
}
.tool-card {
  display: block;
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--line);
  background: var(--white);
  color: inherit;
}
.tool-card:hover {
  border-color: var(--zl);
  color: inherit;
}
.tool-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}
.tool-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.search-hints a {
  border-color: rgba(255,255,255,0.35);
}
.hero-lead { max-width: 36rem; }
.section-label { color: var(--zl); letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.72rem; font-weight: 700; }
.dir-strip a:hover, .hub-item:hover { border-color: var(--zl); }
.score-table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; font-size: 0.95rem; }
.score-table th, .score-table td { border: 1px solid var(--line); padding: 0.65rem 0.85rem; text-align: left; vertical-align: top; }
.score-table th { width: 8.5rem; background: var(--surface); color: var(--zl-deep); font-weight: 700; }
.article-cover img, .platform-hero-cover img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border: 1px solid var(--line); }
.filter-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1.25rem; }
.filter-chips span, .filter-chips a {
  font-size: 0.8rem; padding: 0.3rem 0.7rem; border: 1px solid var(--line); background: var(--white); color: var(--ink-soft);
}
.filter-chips .is-active { border-color: var(--zl); color: var(--zl); background: #eef3f9; }
.list-switch { display: flex; gap: 0.75rem; margin-bottom: 1rem; font-size: 0.9rem; }
.list-switch .is-active { font-weight: 700; color: var(--zl); }
.site-nav.portal-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--zl-deep);
  padding: 0;
}
.site-nav.portal-nav .brand-mark { color: #fff; text-shadow: none; }
.site-nav.portal-nav .nav-links a { color: rgba(255,255,255,0.88); }
.site-nav.portal-nav .nav-links a:hover,
.site-nav.portal-nav .nav-links a.active { color: #fff; }
.nav-sub {
  background: #1a2438;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.nav-sub-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0.45rem 0;
  font-size: 0.8rem;
}
.nav-sub-inner a { color: rgba(255,255,255,0.7); }
.nav-sub-inner a:hover { color: #fff; }
.nav-cta {
  background: var(--copper) !important;
  color: #fff !important;
  padding: 0.35rem 0.75rem !important;
  border-radius: 2px;
}
.portal-strip {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.portal-strip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0.7rem 0;
  font-size: 0.88rem;
}
.portal-strip-list a { color: var(--ink-soft); font-weight: 500; }
.portal-strip-list a:hover { color: var(--zl); }
body.home-portal .hero {
  padding-top: 2.5rem;
}
@media (max-width: 991.98px) {
  .site-nav.portal-nav .nav-links {
    background: var(--zl-deep);
  }
}


/* —— hub / about / media-card —— */
.hub-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.7rem;
}
@media (max-width: 991.98px) {
  .hub-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575.98px) {
  .hub-grid { grid-template-columns: 1fr; }
}
.hub-item {
  display: block;
  padding: 0.95rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 2px solid var(--zl);
  color: inherit;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.hub-item:hover {
  background: var(--white);
  border-color: var(--zl);
  color: inherit;
}
.hub-item h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}
.hub-item p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
  line-height: 1.5;
}
.about-prose {
  max-width: 40rem;
  font-size: 1rem;
  color: var(--ink-soft);
}
.about-prose p + p { margin-top: 0.85rem; }
.about-prose strong { color: var(--ink); }
.media-card a {
  display: block;
  color: inherit;
  border: 1px solid var(--line);
  background: var(--white);
  height: 100%;
}
.media-card a:hover { border-color: var(--zl); color: inherit; }
.media-card-visual img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.media-card-body { padding: 0.85rem 0.95rem; }
.media-card-body h3 {
  margin: 0.25rem 0;
  font-size: 1rem;
}
.media-card-body p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.site-nav.portal-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 0;
  background: var(--zl-deep);
}
.site-nav.portal-nav .nav-inner {
  padding: 0.7rem 0;
}
.page-inner .site-nav.portal-nav {
  padding: 0;
}
.home-portal .hero {
  min-height: min(42vh, 360px);
  padding-top: 2rem;
}
.home-portal .hero-content {
  max-width: 36em;
}
.page-inner .search-box {
  display: flex;
  gap: 0;
  border: 1px solid var(--line);
  background: var(--white);
}
.page-inner .search-box input {
  flex: 1;
  border: 0;
  padding: 0.7rem 0.9rem;
  background: transparent;
  color: var(--ink);
}
.page-inner .search-box button {
  border: 0;
  padding: 0.7rem 1.1rem;
  background: var(--zl);
  color: #fff;
  font-weight: 600;
}
.dir-list { list-style: none; margin: 0; padding: 0; }
.article-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.75rem 0 1.25rem;
  font-size: 0.85rem;
  color: var(--mist);
}
.article-meta-bar .tag {
  color: var(--zl);
  font-weight: 600;
}
.footer-brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--white);
  margin-bottom: 0.25rem;
}

.portal-nav .nav-toggle span { background: #fff; }
.portal-nav .nav-links { max-width: none; }


/* screamingfrog blog tweaks */
.home-portal .hero {
  min-height: min(38vh, 320px);
}
.home-portal .hero-brand {
  letter-spacing: 0.04em;
}
.home-portal .hero-content { max-width: 34em; }
.blog-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.blog-list .media-item + .media-item {
  margin-top: 0;
}
.cat-nav-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  font-size: 0.88rem;
}
.cat-nav-strip a {
  color: var(--ink-soft);
  border-bottom: 1px solid transparent;
}
.cat-nav-strip a:hover,
.cat-nav-strip a.active {
  color: var(--zl);
  border-bottom-color: var(--zl);
}
.portal-nav .nav-toggle span { background: #fff; }

.home-portal .hero { min-height: min(36vh, 300px); }
.home-portal .hero-brand { letter-spacing: 0.12em; }
.home-portal .hero-content { max-width: 32em; }
.portal-nav .nav-toggle span { background: #fff; }
.portal-nav .nav-links { max-width: none; }

.home-portal .hero { min-height: min(36vh, 300px); }
.home-portal .hero-brand { letter-spacing: 0.08em; }
.home-portal .hero-content { max-width: 34em; }
.portal-nav .nav-toggle span { background: #fff; }
