:root {
  --color-primary: #0d4f8b;
  --color-primary-light: #1a6bb5;
  --color-accent: #00a896;
  --color-accent-soft: #e8f7f5;
  --color-warm: #f4a261;
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --color-border: #e2e8f0;
  --font-sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.1);
  --shadow-lg: 0 20px 48px rgba(13, 79, 139, 0.15);
  --radius: 12px;
  --radius-lg: 20px;
  --header-h: 76px;
  --nav-link: #334155;
  --nav-link-hover: #0d4f8b;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--color-primary-light);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--color-accent);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: min(1120px, 92vw);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  height: var(--header-h);
  gap: 0.75rem 1rem;
}

.site-header .header-auth-slot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: nowrap;
  min-width: 0;
}

.site-header .header-login-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  border: 1px solid var(--color-primary);
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.site-header .header-login-btn:hover {
  background: var(--color-primary);
  color: #fff;
}

.site-header .auth-user-pill {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  max-width: 8em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-header .auth-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  white-space: nowrap;
}

.site-header .auth-link:hover {
  text-decoration: underline;
}

.site-header .auth-logout-btn {
  border: none;
  background: none;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
}

.site-header .auth-logout-btn:hover {
  color: var(--color-primary);
}

/* —— 登录后页头（对内界面） —— */
body.site-logged-in {
  --header-h: 68px;
}

body.site-logged-in .site-header {
  background: rgba(255, 255, 255, 0.96);
  border-bottom-color: #e8eef4;
}

body.site-logged-in .header-inner {
  grid-template-columns: auto 1fr auto auto;
  gap: 0.5rem 0.65rem;
}

body.site-logged-in .logo-text-sub {
  display: none;
}

body.site-logged-in .nav-main {
  flex-wrap: nowrap;
  justify-content: center;
  gap: 0.2rem;
}

body.site-logged-in .nav-link {
  padding: 0.38rem 0.72rem;
  font-size: 0.84rem;
}

body.site-logged-in .nav-link--internal {
  background: rgba(0, 168, 150, 0.08);
  color: #0f766e;
}

body.site-logged-in .nav-link--internal.active {
  background: linear-gradient(135deg, #0d9488 0%, #0d4f8b 100%);
  color: #fff;
}

body.site-logged-in .header-user-menu {
  position: relative;
  display: flex;
  align-items: center;
  max-width: min(100%, 220px);
}

body.site-logged-in .header-user-trigger {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.55rem 0.28rem 0.35rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  font: inherit;
  color: inherit;
  max-width: 100%;
}

body.site-logged-in .header-user-trigger:hover,
body.site-logged-in .header-user-trigger[aria-expanded="true"] {
  border-color: var(--color-accent);
}

body.site-logged-in .header-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

body.site-logged-in .header-user-name {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text);
  max-width: 5.5em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.site-logged-in .header-user-chevron {
  flex-shrink: 0;
  color: #64748b;
  transition: transform 0.15s ease;
}

body.site-logged-in .header-user-trigger[aria-expanded="true"] .header-user-chevron {
  transform: rotate(180deg);
}

body.site-logged-in .header-user-dropdown {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  min-width: 168px;
  padding: 0.4rem;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
  z-index: 80;
}

body.site-logged-in .header-user-dropdown[hidden] {
  display: none !important;
}

body.site-logged-in .header-user-drop-link,
body.site-logged-in .header-user-drop-logout {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.7rem;
  border: none;
  border-radius: 8px;
  background: none;
  text-align: left;
  font: inherit;
  font-size: 0.88rem;
  color: var(--color-text);
  text-decoration: none;
  cursor: pointer;
}

body.site-logged-in .header-user-drop-link:hover,
body.site-logged-in .header-user-drop-logout:hover {
  background: #f1f5f9;
  color: var(--color-primary);
}

body.site-logged-in .header-user-drop-logout {
  color: #64748b;
}

body.site-logged-in .nav-link--internal,
body.site-logged-in .nav-link[href="portal.html"],
body.site-logged-in .nav-link[href="../portal.html"] {
  display: none !important;
}

/* 兜底：登录后强制隐藏对外入口 */
body.site-logged-in .nav-link[href="yingdi.html"],
body.site-logged-in .nav-link[href="peixun.html"] {
  display: none !important;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--color-primary);
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
}

.logo-img {
  height: 48px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 8px;
}

.logo-img[src$=".png"] {
  background: #fff;
  padding: 4px 10px;
}

.logo--on-dark .logo-img {
  height: 56px;
}

.logo-text-sub {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
  max-width: 10em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .logo-text-sub {
    display: none;
  }
}

/* —— 主导航（分组 + 下拉） —— */
.nav-main {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-width: 0;
}

.nav-main:not(.nav-main--ready) {
  min-height: 2.5rem;
}

.nav-link,
.nav-group-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--nav-link);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.3;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.nav-link:hover,
.nav-group-trigger:hover {
  color: var(--nav-link-hover);
  background: rgba(13, 79, 139, 0.06);
  border-color: rgba(13, 79, 139, 0.08);
}

.nav-link.active,
.nav-group.is-active > .nav-group-trigger {
  color: #fff;
  background: linear-gradient(135deg, var(--color-primary) 0%, #117a8b 100%);
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(13, 79, 139, 0.28);
}

.nav-group {
  position: relative;
}

.nav-chevron {
  opacity: 0.55;
  transition: transform 0.2s;
}

.nav-group.is-open .nav-chevron,
.nav-group:hover .nav-chevron {
  transform: rotate(180deg);
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  min-width: 12.5rem;
  padding: 0.4rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  z-index: 120;
}

.nav-dropdown::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  width: 10px;
  height: 10px;
  background: var(--color-surface);
  border-left: 1px solid var(--color-border);
  border-top: 1px solid var(--color-border);
  transform: translateX(-50%) rotate(45deg);
}

.nav-group:hover .nav-dropdown,
.nav-group.is-open .nav-dropdown,
.nav-group:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-link {
  display: block;
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-text);
  transition: background 0.15s, color 0.15s;
}

.nav-dropdown-link:hover {
  background: var(--color-accent-soft);
  color: var(--color-primary);
}

.nav-dropdown-link.active {
  background: linear-gradient(135deg, rgba(13, 79, 139, 0.12) 0%, rgba(0, 168, 150, 0.12) 100%);
  color: var(--color-primary);
  font-weight: 600;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

/* Hero */
.hero {
  position: relative;
  padding: 1.1rem 0 1.35rem;
  min-height: 32rem;
  background:
    url("../assets/images/hero-home-anime.jpg") center right / cover no-repeat;
  color: #fff;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6, 28, 52, 0.55) 0%, rgba(6, 28, 52, 0.12) 38%, rgba(6, 28, 52, 0.16) 68%, rgba(6, 28, 52, 0.48) 100%),
    linear-gradient(90deg, rgba(6, 28, 52, 0.28) 0%, transparent 52%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  min-height: 30rem;
}

.hero-copy {
  max-width: 34rem;
}

.hero-logo {
  display: none;
}

.hero-badge {
  display: none;
}

.hero h1 {
  font-size: clamp(1.15rem, 2.1vw, 1.55rem);
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 10px rgba(6, 28, 52, 0.5);
}

.hero-lead {
  font-size: clamp(0.78rem, 1.1vw, 0.88rem);
  line-height: 1.55;
  opacity: 0.92;
  max-width: 36em;
  margin-bottom: 0;
  text-shadow: 0 1px 8px rgba(6, 28, 52, 0.45);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.35rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 168, 150, 0.4);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.6);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn-dark {
  background: var(--color-primary);
  color: #fff;
}

.btn-dark:hover {
  background: var(--color-primary-light);
  color: #fff;
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section-alt {
  background: var(--color-surface);
}

.section-head {
  text-align: center;
  margin-bottom: 2.75rem;
}

.section-head h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.section-head p {
  color: var(--color-text-muted);
  max-width: 32em;
  margin-inline: auto;
}

/* Cards grid - homepage */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s, transform 0.25s;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.card-icon.keji { background: #dbeafe; }
.card-icon.xinli { background: #fce7f3; }
.card-icon.yanxue { background: #d1fae5; }
.card-icon.yingdi { background: #ffedd5; }
.card-icon.peixun { background: #e0e7ff; }

.card h3 {
  font-size: 1.15rem;
  color: var(--color-primary);
  margin-bottom: 0.6rem;
}

.card p {
  color: var(--color-text-muted);
  font-size: 0.94rem;
  flex: 1;
  margin-bottom: 1.25rem;
}

.card .btn {
  align-self: flex-start;
  font-size: 0.88rem;
  padding: 0.55rem 1.1rem;
}

/* Page banner (inner pages) */
.page-banner {
  padding: 3rem 0 2.5rem;
  background: linear-gradient(120deg, var(--color-primary) 0%, #117a8b 100%);
  color: #fff;
}

.page-banner h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  margin-bottom: 0.5rem;
}

.page-banner p {
  opacity: 0.9;
  max-width: 40em;
}

/* Content block */
.content-block {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 2rem 2.25rem;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.content-block h2 {
  font-size: 1.2rem;
  color: var(--color-primary);
  margin-bottom: 0.85rem;
}

.content-block ul {
  margin-left: 1.25rem;
  color: var(--color-text-muted);
}

.content-block li {
  margin-bottom: 0.4rem;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.feature-item {
  padding: 1.25rem;
  background: var(--color-bg);
  border-radius: var(--radius);
  border-left: 4px solid var(--color-accent);
}

.feature-item strong {
  display: block;
  color: var(--color-primary);
  margin-bottom: 0.35rem;
}

.cta-panel {
  text-align: center;
  padding: 2.5rem;
  background: linear-gradient(135deg, var(--color-accent-soft), #fff);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  margin-top: 2rem;
}

.cta-panel h3 {
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.cta-panel p {
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
}

/* About strip */
.about-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.about-strip .stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.stat-box {
  background: var(--color-surface);
  padding: 1.25rem;
  border-radius: var(--radius);
  text-align: center;
  border: 1px solid var(--color-border);
}

.stat-box strong {
  display: block;
  font-size: 1.5rem;
  color: var(--color-primary);
}

.stat-box span {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* Footer */
.site-footer {
  background: #0f2744;
  color: #cbd5e1;
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-logo {
  height: 52px;
  width: auto;
  max-width: 180px;
  margin-bottom: 0.85rem;
  border-radius: 8px;
}

.footer-brand h3 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-col h4 {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.45rem;
}

.footer-col a {
  color: #94a3b8;
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: var(--color-accent);
}

.footer-contact a {
  color: #e2e8f0;
  font-weight: 600;
  font-size: 1.05rem;
}

.qr-row {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.qr-box {
  text-align: center;
}

.qr-box img {
  width: 108px;
  height: 108px;
  border-radius: 8px;
  background: #fff;
  padding: 4px;
  margin-bottom: 0.4rem;
  object-fit: contain;
}

.qr-box img[alt*="小程序"] {
  border-radius: 50%;
}

.qr-placeholder {
  width: 96px;
  height: 96px;
  border-radius: 8px;
  background: #1e3a5f;
  border: 2px dashed #475569;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  color: #94a3b8;
  margin-inline: auto;
  margin-bottom: 0.4rem;
}

.qr-box span {
  font-size: 0.78rem;
  color: #94a3b8;
}

.contact-qr-row {
  justify-content: center;
  margin-top: 2rem;
  gap: 2.5rem;
}

.contact-qr-row .qr-box img {
  width: 140px;
  height: 140px;
  padding: 6px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
}

.contact-qr-row .qr-box span {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid #1e3a5f;
  text-align: center;
  font-size: 0.82rem;
  color: #64748b;
}

.footer-bottom p + p {
  margin-top: 0.45rem;
}

.footer-icp a {
  color: #94a3b8;
}

.footer-icp a:hover {
  color: var(--color-accent);
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.pillar-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  border-top: 4px solid var(--color-accent);
}

.pillar-card h3 {
  font-size: 1.05rem;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.pillar-card p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.three-core {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.core-item {
  padding: 1.5rem;
  background: linear-gradient(145deg, #0d4f8b, #117a8b);
  color: #fff;
  border-radius: var(--radius-lg);
}

.core-item h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.core-item p {
  font-size: 0.9rem;
  opacity: 0.92;
}

.partner-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.partner-tags span {
  font-size: 0.82rem;
  padding: 0.35rem 0.7rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-text-muted);
}

.advantage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.advantage-card {
  padding: 1.25rem;
  background: var(--color-surface);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.advantage-card h3 {
  font-size: 1rem;
  color: var(--color-primary);
  margin-bottom: 0.4rem;
}

.advantage-card p {
  font-size: 0.88rem;
  color: var(--color-text-muted);
}

.case-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.case-stat {
  text-align: center;
  padding: 1.25rem 0.75rem;
  background: var(--color-accent-soft);
  border-radius: var(--radius);
}

.case-stat strong {
  display: block;
  font-size: 1.5rem;
  color: var(--color-primary);
}

.case-stat span {
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.course-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.course-card {
  padding: 1.25rem;
  background: var(--color-bg);
  border-radius: var(--radius);
  border-left: 4px solid var(--color-primary);
}

.course-card h3 {
  font-size: 1rem;
  color: var(--color-primary);
  margin-bottom: 0.35rem;
}

.course-card .meta {
  font-size: 0.85rem;
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.course-card p {
  font-size: 0.88rem;
  color: var(--color-text-muted);
}

.section-hero-img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0 2rem;
}

.media-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.media-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.media-card figcaption {
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
}

.case-map-wrap {
  margin: 2rem 0 1.5rem;
  text-align: center;
}

.case-map-figure {
  display: inline-block;
  max-width: 100%;
  margin: 0 auto;
}

.case-map-figure img {
  width: 100%;
  max-width: 960px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}

.case-map-figure figcaption {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.case-map-figure figcaption {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* 实践平台 */
.section--practice {
  padding-bottom: 3rem;
}

.container--practice {
  width: min(96vw, 1440px);
}

.practice-editor-stage {
  width: 100%;
  position: relative;
  min-height: clamp(640px, 78vh, 960px);
}

/* 内置编辑器槽位：整块显示/隐藏，避免 Blockly 与 AI 叠在一起 */
.practice-editor-slot[hidden],
.practice-editor-slot[aria-hidden="true"] {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

.practice-editor-slot--blockly:not([hidden]),
.practice-editor-slot--ai:not([hidden]) {
  display: block;
  width: 100%;
}

.practice-editor-stage--blockly .practice-editor-slot--ai,
.practice-editor-stage--ai .practice-editor-slot--blockly {
  display: none !important;
}

.practice-builtin-blockly[hidden],
.practice-builtin-ai[hidden],
.practice-builtin-blockly[aria-hidden="true"],
.practice-builtin-ai[aria-hidden="true"] {
  display: none !important;
}

.practice-build-tag {
  margin: 0 0 0.75rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  color: #0f766e;
  background: #ecfdf5;
  border-radius: 6px;
  border: 1px solid #99f6e4;
}

.page-banner-ai {
  background: linear-gradient(120deg, #4f46e5 0%, #7c3aed 50%, #0d4f8b 100%);
}

.page-banner-split {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
}

.page-banner-split__text {
  flex: 1 1 280px;
}

.page-banner-split__actions {
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 220px;
}

.btn-banner-ai {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  background: #fff;
  color: #5b21b6;
  font-weight: 800;
  font-size: 1rem;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s, box-shadow 0.15s;
  text-align: center;
  line-height: 1.35;
}

.btn-banner-ai:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  color: #4c1d95;
}

.btn-banner-ai-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  border: 2px solid rgba(255, 255, 255, 0.85);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 999px;
  text-decoration: none;
  text-align: center;
}

.btn-banner-ai-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

@media (max-width: 640px) {
  .page-banner-split__actions {
    width: 100%;
  }
  .btn-banner-ai,
  .btn-banner-ai-outline {
    width: 100%;
  }
}

.page-banner--practice {
  background: linear-gradient(120deg, #38bdf8 0%, #6366f1 45%, #0d4f8b 100%) !important;
}

.page-banner--practice p {
  font-size: 1.1rem;
  font-weight: 500;
}

.practice-intro--kids {
  background: linear-gradient(160deg, #fffbeb 0%, #ecfdf5 100%);
  border-color: #fde68a;
}

.practice-howto {
  margin: 0 0 0.75rem 1.25rem;
  color: var(--color-text-muted);
  line-height: 1.9;
}

.practice-hint {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.tool-section-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 0.65rem;
}

.tool-section-label--sub {
  margin-top: 1.25rem;
  color: #64748b;
  font-weight: 600;
}

.tool-card--visual {
  text-align: center;
  padding: 1.25rem 0.85rem;
}

.tool-card--visual .tool-icon {
  display: block;
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 0.35rem;
}

.tool-card--visual h3 {
  font-size: 1.05rem;
}

.tool-cards--compact {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  margin-bottom: 1.5rem;
}

.tool-card--compact {
  padding: 0.85rem 1rem;
}

.tool-card--compact h3 {
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.tool-card--compact p {
  font-size: 0.78rem;
  margin-bottom: 0;
}

.tool-card--advanced {
  opacity: 0.92;
  border-style: dashed;
}

.practice-toolbar--kids h2 {
  font-size: 1.25rem;
}

.practice-note--kids {
  background: #fef3c7;
  border-left-color: #f59e0b;
  font-size: 0.92rem;
}

.btn-kids {
  border-radius: 999px;
  font-weight: 700;
  padding: 0.55rem 1.25rem;
}

.practice-frame-wrap--visual {
  background: linear-gradient(180deg, #e0f2fe 0%, #f8fafc 12%);
}

.practice-editor-stage--blockly .practice-frame-wrap {
  display: none !important;
}

.practice-builtin-blockly {
  width: 100%;
  min-height: clamp(720px, 82vh, 1200px);
  border-radius: var(--radius-lg);
  border: 2px solid #a5f3fc;
  background: #f0f9ff;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.blockly-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(90deg, #0ea5e9, #6366f1);
}

.blockly-toolbar .blockly-status {
  color: #e0f2fe;
  font-size: 0.88rem;
  margin-left: auto;
}

.blockly-toolbar .blockly-status.is-error {
  color: #fecaca;
}

.blockly-layout {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr min(320px, 32%);
  min-height: 0;
}

.blockly-mount {
  min-height: clamp(560px, 72vh, 1000px);
  height: 100%;
}

.blockly-side {
  background: #fff;
  border-left: 1px solid #bae6fd;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.blockly-side h3 {
  font-size: 1rem;
  color: var(--color-primary);
  margin: 0 0 0.65rem;
}

.blockly-output {
  flex: 1;
  min-height: 120px;
  max-height: 280px;
  overflow: auto;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: var(--radius);
  padding: 0.75rem;
  font-family: Consolas, monospace;
  font-size: 0.88rem;
}

.blockly-line--err {
  color: #fca5a5;
}

.blockly-code-details {
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.blockly-code {
  margin-top: 0.5rem;
  padding: 0.65rem;
  background: #f1f5f9;
  border-radius: var(--radius);
  font-size: 0.75rem;
  overflow: auto;
  max-height: 140px;
}

@media (max-width: 900px) {
  .blockly-layout {
    grid-template-columns: 1fr;
  }

  .blockly-side {
    border-left: none;
    border-top: 1px solid #bae6fd;
  }

  .blockly-mount {
    min-height: 420px;
  }
}

.practice-intro {
  margin-bottom: 1.5rem;
}

.practice-setup-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #e0f2fe 0%, #ecfdf5 100%);
  border: 1px solid #bae6fd;
}

.practice-setup-banner p {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  color: var(--color-text-muted);
}

.practice-setup-banner code {
  font-size: 0.82rem;
  background: rgba(255, 255, 255, 0.7);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.practice-builtin-python {
  width: 100%;
  min-height: clamp(720px, 82vh, 1200px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: #0f172a;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.python-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  background: #1e293b;
  border-bottom: 1px solid #334155;
}

.python-status {
  font-size: 0.82rem;
  color: #94a3b8;
  margin-left: auto;
}

.python-status.is-error {
  color: #fca5a5;
}

.python-editor-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto 1fr;
  gap: 0;
  min-height: 0;
}

.python-editor-label {
  grid-column: span 1;
  padding: 0.45rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
  background: #1e293b;
  border-bottom: 1px solid #334155;
}

.python-code,
.python-output {
  margin: 0;
  padding: 1rem;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  border: none;
  resize: none;
  min-height: 0;
}

.python-code {
  grid-row: 2;
  background: #0f172a;
  color: #e2e8f0;
  outline: none;
  border-right: 1px solid #334155;
}

.python-output {
  grid-row: 2;
  background: #020617;
  color: #cbd5e1;
  overflow: auto;
}

.python-line--err {
  color: #fca5a5;
}

@media (max-width: 900px) {
  .python-editor-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto 1fr;
  }

  .python-code {
    border-right: none;
    border-bottom: 1px solid #334155;
    min-height: 240px;
  }

  .python-output {
    min-height: 180px;
  }
}

.tool-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.card-icon.shijian { background: #e0f2fe; }

.tool-card {
  padding: 1.15rem;
  border-radius: var(--radius);
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  text-align: left;
  font: inherit;
  width: 100%;
}

a.tool-card {
  display: block;
  color: inherit;
  text-decoration: none;
  box-sizing: border-box;
}

.page-practice-studio .container--practice {
  width: min(96vw, 1440px);
}

.page-practice-studio .practice-studio-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1rem;
}

.page-practice-studio .practice-studio-head h1 {
  margin: 0.2rem 0 0.35rem;
  font-size: 1.45rem;
}

.page-practice-studio .practice-editor-stage {
  min-height: clamp(560px, 72vh, 920px);
}

.tool-card:hover,
.tool-card.active {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
}

.tool-card h3 {
  font-size: 1rem;
  color: var(--color-primary);
  margin-bottom: 0.35rem;
}

.tool-card p {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.tool-badge {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: var(--color-accent-soft);
  color: var(--color-primary);
  font-weight: 600;
}

.practice-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.practice-toolbar h2 {
  font-size: 1.15rem;
  color: var(--color-primary);
}

.practice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.practice-note {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: var(--color-bg);
  border-radius: var(--radius);
  border-left: 3px solid var(--color-accent);
}

.practice-frame-wrap {
  width: 100%;
  height: clamp(720px, calc(100vh - 240px), 1400px);
  min-height: clamp(720px, 82vh, 1200px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: #1e293b;
  box-shadow: var(--shadow-md);
  position: relative;
}

.practice-client-panel {
  width: 100%;
  min-height: clamp(720px, 82vh, 1200px);
  padding: 2rem 2.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: linear-gradient(160deg, #f8fafc 0%, #e8f7f5 100%);
  box-shadow: var(--shadow-md);
}

.practice-client-panel h3 {
  color: var(--color-primary);
  margin-bottom: 1rem;
  font-size: 1.15rem;
}

.practice-client-panel ol {
  margin: 0 0 1.5rem 1.25rem;
  color: var(--color-text-muted);
  line-height: 1.8;
}

.practice-client-panel .client-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.practice-frame {
  width: 100%;
  height: 100%;
  min-height: clamp(720px, 82vh, 1200px);
  border: none;
  display: block;
  background: #fff;
}

.practice-fallback {
  display: none;
  padding: 2rem;
  text-align: center;
  color: var(--color-text-muted);
}

/* Mobile */
body.site-nav-open {
  overflow: hidden;
}

@media (max-width: 960px) {
  body.site-nav-open::before {
    content: "";
    position: fixed;
    inset: 0;
    top: var(--header-h);
    background: rgba(15, 23, 42, 0.45);
    z-index: 98;
    pointer-events: none;
  }

  .header-inner {
    grid-template-columns: auto 1fr auto auto;
  }

  .site-header .header-auth-slot {
    grid-column: 3;
    grid-row: 1;
  }

  .nav-toggle {
    grid-column: 4;
    grid-row: 1;
  }

  .nav-main[data-nav-root] {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .nav-toggle {
    display: block;
  }

  .nav-main {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.5rem;
    padding: 1rem 1rem 2rem;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    overflow-y: auto;
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.28s ease, opacity 0.28s ease;
  }

  .nav-main.open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-link,
  .nav-group-trigger {
    width: 100%;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    font-size: 1rem;
  }

  .nav-dropdown {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    box-shadow: none;
    border: none;
    padding: 0 0 0.5rem 0.5rem;
    margin-top: 0.25rem;
    display: none;
    min-width: 0;
  }

  .nav-dropdown::before {
    display: none;
  }

  .nav-group.is-open .nav-dropdown {
    display: block;
  }

  .nav-group:hover .nav-dropdown {
    display: none;
  }

  .nav-group.is-open:hover .nav-dropdown {
    display: block;
  }

  .nav-dropdown-link {
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
  }

  .about-strip {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .practice-frame-wrap,
  .practice-client-panel,
  .practice-builtin-blockly {
    height: min(78vh, 900px);
    min-height: 520px;
  }

  .practice-frame {
    min-height: min(78vh, 900px);
  }
}

@media (min-width: 961px) {
  .nav-group .nav-dropdown {
    display: block;
  }
}

@media (max-width: 560px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 0.95rem 0 1.15rem;
  }

  .hero .container {
    min-height: 22rem;
  }
}

/* 实践平台 — 实践工具 / 实践社区 切换按钮 */
.practice-mode-tabs-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.practice-mode-tabs {
  display: inline-flex;
  align-items: stretch;
  padding: 4px;
  gap: 4px;
  background: #e2e8f0;
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
}

.practice-mode-tab {
  border: none;
  background: transparent;
  color: #64748b;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.6rem 1.75rem;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.practice-mode-tab:hover:not(.active) {
  color: #334155;
  background: rgba(255, 255, 255, 0.45);
}

.practice-mode-tab:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}

.practice-mode-tab.active {
  background: #fff;
  color: var(--color-primary);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.1);
}

@media (max-width: 480px) {
  .practice-mode-tab {
    padding: 0.55rem 1.15rem;
    font-size: 0.9rem;
  }
}

.practice-community-panel {
  padding-bottom: 0.5rem;
}

.practice-community-intro {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 1.75rem;
  padding: 0 0.5rem;
}

.practice-community-intro__eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #64748b;
}

.practice-community-intro h2 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  color: var(--color-primary);
}

.practice-community-intro p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--color-text-muted);
}

.practice-community-intro__note {
  margin-top: 0.75rem !important;
  font-size: 0.82rem !important;
  color: #94a3b8 !important;
}

.community-zones {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}

.community-zone {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.community-zone--coding {
  --zone-accent: #0891b2;
  --zone-accent-soft: #ecfeff;
  --zone-gradient: linear-gradient(135deg, #06b6d4 0%, #0d4f8b 100%);
}

.community-zone--ai {
  --zone-accent: #7c3aed;
  --zone-accent-soft: #f5f3ff;
  --zone-gradient: linear-gradient(135deg, #8b5cf6 0%, #4f46e5 100%);
}

.community-zone-hero {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.35rem 1.35rem 1.15rem;
  background: var(--zone-gradient);
  color: #fff;
}

.community-zone-hero__icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
}

.community-zone-hero__icon svg {
  width: 32px;
  height: 32px;
}

.community-zone-hero__eyebrow {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  opacity: 0.88;
  text-transform: uppercase;
}

.community-zone-hero h3 {
  margin: 0 0 0.4rem;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.3;
}

.community-zone-hero__text > p:last-child {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.65;
  opacity: 0.92;
}

.community-compose {
  margin: 1rem 1.15rem 0;
  padding: 1.1rem 1.15rem 1.15rem;
  background: var(--zone-accent-soft);
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.community-compose__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.82rem;
  color: #64748b;
}

.community-compose__badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: var(--zone-accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
}

.community-form-grid {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.community-field__label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
}

.community-field__control input,
.community-field__control select,
.community-field__control textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font: inherit;
  font-size: 0.92rem;
  color: #1e293b;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.community-field__control input::placeholder,
.community-field__control textarea::placeholder {
  color: #94a3b8;
}

.community-field__control input:focus,
.community-field__control select:focus,
.community-field__control textarea:focus {
  outline: none;
  border-color: var(--zone-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--zone-accent) 22%, transparent);
}

.community-field__control textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

.community-form-actions {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
}

.community-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1.5rem;
  border: none;
  border-radius: 999px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  background: var(--zone-gradient);
  cursor: pointer;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--zone-accent) 35%, transparent);
  transition: transform 0.15s, box-shadow 0.15s;
}

.community-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--zone-accent) 42%, transparent);
}

.community-submit--sm {
  padding: 0.5rem 1.1rem;
  font-size: 0.85rem;
}

.community-feed {
  margin: 1.15rem;
  padding-top: 0.25rem;
}

.community-feed__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #f1f5f9;
}

.community-feed__head h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: #334155;
}

.community-feed__head span {
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 600;
}

.community-list {
  max-height: 480px;
  overflow-y: auto;
  padding-right: 0.15rem;
}

.community-list::-webkit-scrollbar {
  width: 6px;
}

.community-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.community-post {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  margin-bottom: 0.65rem;
  background: #f8fafc;
  border-radius: 14px;
  border: 1px solid #f1f5f9;
}

.community-post:last-child {
  margin-bottom: 0;
}

.community-post__avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  color: #fff;
  background: var(--zone-gradient);
}

.community-post__main {
  flex: 1;
  min-width: 0;
}

.community-post__title {
  margin: 0 0 0.35rem;
  font-size: 0.98rem;
  font-weight: 800;
  color: #1e293b;
  line-height: 1.4;
}

.community-post__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  margin-bottom: 0.5rem;
  font-size: 0.78rem;
  color: #94a3b8;
}

.community-post__author {
  font-weight: 700;
  color: #64748b;
}

.community-tag {
  padding: 0.12rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  background: #e0f2fe;
  color: #0369a1;
  border-radius: 999px;
}

.community-zone--ai .community-tag {
  background: #ede9fe;
  color: #5b21b6;
}

.community-body {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.7;
  color: #475569;
}

.community-replies {
  margin-top: 0.85rem;
}

.community-replies__label {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.community-reply {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.community-reply__avatar {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  background: #94a3b8;
}

.community-reply__bubble {
  flex: 1;
  padding: 0.55rem 0.75rem;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.community-reply__head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  margin-bottom: 0.2rem;
  font-size: 0.78rem;
}

.community-reply__head strong {
  color: #334155;
}

.community-reply__head time {
  color: #94a3b8;
}

.community-reply__bubble p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.6;
  color: #475569;
}

.community-reply-form-wrap {
  margin-top: 0.65rem;
}

.community-reply-form-wrap summary {
  list-style: none;
  cursor: pointer;
}

.community-reply-form-wrap summary::-webkit-details-marker {
  display: none;
}

.community-reply-form-wrap__btn {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--zone-accent);
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
}

.community-form-row--reply {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.65rem;
}

.community-field--compact {
  flex: 0 0 120px;
}

.community-field--grow {
  flex: 1 1 180px;
}

.community-reply-form .community-submit {
  margin-top: 0.65rem;
}

.community-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: #94a3b8;
}

.community-empty__icon {
  display: block;
  font-size: 2rem;
  margin-bottom: 0.35rem;
}

.community-empty p {
  margin: 0;
  font-weight: 700;
  color: #64748b;
}

.community-empty small {
  font-size: 0.85rem;
}

.practice-community-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #0d9488, #0f766e);
  color: #fff;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 200;
  box-shadow: 0 12px 32px rgba(15, 118, 110, 0.35);
}

@media (max-width: 640px) {
  .community-zone-hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .community-form-actions {
    justify-content: stretch;
  }

  .community-submit {
    width: 100%;
  }
}

/* 实践社区 — 网页端（宽屏）大气布局 */
@media (min-width: 1024px) {
  .practice-community-panel {
    padding: 0.5rem 0 2.5rem;
    background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 28%, transparent 55%);
  }

  .practice-community-intro {
    max-width: 920px;
    margin: 0 auto 2.25rem;
    padding: 2.25rem 2.5rem 2rem;
    background: #fff;
    border-radius: 24px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.07);
  }

  .practice-community-intro__eyebrow {
    font-size: 0.8rem;
    color: #0891b2;
    letter-spacing: 0.12em;
  }

  .practice-community-intro h2 {
    font-size: 2rem;
    margin-bottom: 0.85rem;
  }

  .practice-community-intro > p:not(.practice-community-intro__note) {
    font-size: 1.05rem;
    max-width: 42em;
    margin-left: auto;
    margin-right: auto;
  }

  .community-zones {
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 0.5rem;
  }

  .community-zone {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
    grid-template-rows: auto 1fr;
    border-radius: 24px;
    box-shadow: 0 20px 56px rgba(15, 23, 42, 0.09);
  }

  .community-zone-hero {
    grid-column: 1 / -1;
    padding: 1.85rem 2.25rem;
    align-items: center;
  }

  .community-zone-hero__icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
  }

  .community-zone-hero__icon svg {
    width: 40px;
    height: 40px;
  }

  .community-zone-hero h3 {
    font-size: 1.55rem;
    margin-bottom: 0.5rem;
  }

  .community-zone-hero__text > p:last-child {
    font-size: 0.95rem;
    max-width: 52em;
  }

  .community-compose {
    margin: 1.5rem 0.75rem 1.5rem 1.75rem;
    padding: 1.5rem 1.65rem 1.65rem;
    border-radius: 18px;
  }

  .community-compose__head {
    font-size: 0.9rem;
    margin-bottom: 1.15rem;
  }

  .community-form-grid {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 1rem 1.25rem;
  }

  .community-field--full {
    grid-column: 1 / -1;
  }

  .community-field__label {
    font-size: 0.85rem;
  }

  .community-field__control input,
  .community-field__control select,
  .community-field__control textarea {
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
    border-radius: 14px;
  }

  .community-field__control textarea {
    min-height: 120px;
  }

  .community-form-actions {
    margin-top: 1.25rem;
  }

  .community-submit {
    padding: 0.8rem 2rem;
    font-size: 1rem;
  }

  .community-feed {
    margin: 1.5rem 1.75rem 1.5rem 0.75rem;
    padding: 1.35rem 1.5rem 1.5rem;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    min-height: 420px;
    display: flex;
    flex-direction: column;
  }

  .community-feed__head {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
  }

  .community-feed__head h4 {
    font-size: 1.05rem;
  }

  .community-list {
    max-height: none;
    flex: 1;
    min-height: 280px;
  }

  .community-post {
    padding: 1.15rem 1.25rem;
    margin-bottom: 0.85rem;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
    border-color: #e2e8f0;
  }

  .community-post__avatar {
    width: 44px;
    height: 44px;
    font-size: 1rem;
  }

  .community-post__title {
    font-size: 1.05rem;
  }

  .community-body {
    font-size: 0.95rem;
  }

  .community-reply__bubble {
    padding: 0.65rem 0.9rem;
  }
}

@media (min-width: 1280px) {
  .community-zones {
    max-width: 1240px;
  }

  .community-compose {
    margin-left: 2rem;
  }

  .community-feed {
    margin-right: 2rem;
  }
}

.news-home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.news-home-loading {
  text-align: center;
  color: var(--color-text-muted);
  grid-column: 1 / -1;
}

.news-home-more {
  text-align: center;
  margin-top: 1.75rem;
}

.news-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  color: inherit;
  box-shadow: var(--shadow-sm);
  height: 100%;
}

.news-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  color: inherit;
}

.news-card-cover {
  height: 140px;
  background: #e8eef4 center/cover no-repeat;
}

.news-card-cover--empty {
  background: linear-gradient(135deg, #0d4f8b, #0d9488);
}

.news-card-body {
  padding: 1rem 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.news-card-meta {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.news-tag {
  background: var(--color-accent-soft);
  color: #0f766e;
  border-radius: 999px;
  padding: 0.12rem 0.55rem;
  font-weight: 600;
}

.news-card-body h3 {
  font-size: 1.02rem;
  line-height: 1.45;
  color: var(--color-text);
}

.news-card-body p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.news-cats a {
  padding: 0.28rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.news-cats a.is-on,
.news-cats a:hover {
  border-color: var(--color-accent);
  color: var(--color-primary);
  background: var(--color-accent-soft);
}

.news-detail {
  max-width: 760px;
}

.news-detail h1 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin: 0.4rem 0 0.5rem;
  color: var(--color-primary);
}

.news-detail-kicker,
.news-detail-meta {
  color: var(--color-text-muted);
  font-size: 0.88rem;
}

.news-detail-cover {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: var(--radius);
  margin: 1rem 0 1.25rem;
}

.news-detail-body {
  color: var(--color-text);
  line-height: 1.85;
}

.news-detail-body img,
.news-detail-body video,
.cms-body-video {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  display: block;
  margin: 1rem 0;
}

.news-detail-body .cms-embed-video {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  margin: 1rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #111;
}

.news-detail-body .cms-embed-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
