:root {
  --bg: #f3efe4;
  --panel: #fffaf0;
  --panel-strong: #fffdf7;
  --text: #23211d;
  --muted: #6d6559;
  --line: #2f2a24;
  --accent: #2f6b5f;
  --accent-strong: #1f4d45;
  --highlight: #e68a3f;
  --shadow: 6px 6px 0 #2f2a24;
  --shadow-soft: 4px 4px 0 #b8aa8d;
  --radius: 14px;
  --container: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    linear-gradient(to bottom, rgba(255, 250, 240, 0.72), rgba(243, 239, 228, 0.95)),
    repeating-linear-gradient(
      0deg,
      rgba(47, 42, 36, 0.03) 0,
      rgba(47, 42, 36, 0.03) 1px,
      transparent 1px,
      transparent 22px
    );
}

a {
  color: inherit;
  text-decoration: none;
}

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

.page-shell {
  width: min(calc(100% - 32px), var(--container));
  margin: 0 auto;
  padding: 20px 0 40px;
}

main {
  display: block;
}

.site-header {
  position: sticky;
  top: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  margin-bottom: 28px;
  background: rgba(255, 250, 240, 0.92);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(8px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  font-family: "Courier New", monospace;
  font-weight: 700;
  color: var(--panel);
  background: var(--accent-strong);
  border: 2px solid var(--line);
  border-radius: 10px;
  box-shadow: 3px 3px 0 var(--line);
}

.eyebrow,
.section-tag,
.feature-label,
.card-index,
.post-meta,
.contact-label,
.status-title {
  margin: 0;
  font-family: "Courier New", monospace;
  letter-spacing: 0.08em;
}

.eyebrow,
.section-tag,
.post-meta,
.contact-label {
  color: var(--muted);
  font-size: 0.8rem;
}

.brand-name {
  display: inline-block;
  margin-top: 2px;
  font-size: 1.25rem;
  font-weight: 800;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.95rem;
}

.site-nav a {
  padding: 8px 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  border-color: var(--accent);
}

.menu-toggle {
  display: none;
  padding: 10px 14px;
  font: inherit;
  background: var(--panel-strong);
  border: 2px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.hero {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 30px;
}

.hero-copy,
.hero-panel,
.info-card,
.feature-card,
.post-card,
.contact-panel {
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: var(--radius);
}

.hero-copy {
  padding: 34px;
  box-shadow: var(--shadow);
}

.hero-copy h1,
.section-heading h2,
.info-card h3,
.feature-card h3,
.post-card h3 {
  margin-top: 10px;
  margin-bottom: 0;
  line-height: 1.2;
}

.hero-copy h1 {
  font-size: clamp(2.1rem, 5vw, 4rem);
}

.hero-text {
  max-width: 44rem;
  margin: 18px 0 0;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  font-weight: 700;
  border: 2px solid var(--line);
  border-radius: 12px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.button:hover,
.button:focus-visible {
  transform: translate(2px, 2px);
}

.button-primary {
  color: var(--panel);
  background: var(--accent);
  box-shadow: 4px 4px 0 var(--line);
}

.button-secondary {
  background: var(--panel-strong);
  box-shadow: 4px 4px 0 #c5b89d;
}

.hero-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

.status-card {
  padding: 20px;
  background: var(--panel-strong);
  border: 2px dashed var(--line);
  border-radius: 12px;
}

.status-title {
  margin-bottom: 12px;
  color: var(--accent-strong);
  font-size: 0.85rem;
}

.status-list {
  margin: 0;
  padding-left: 20px;
  line-height: 1.8;
  color: var(--muted);
}

.pixel-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 18px;
  background: #f0e6d6;
  border: 2px solid var(--line);
  border-radius: 12px;
}

.pixel-note p {
  margin: 0;
  line-height: 1.7;
}

.pixel-dot {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-top: 5px;
  background: var(--highlight);
  border: 2px solid var(--line);
  box-shadow: 3px 3px 0 rgba(47, 42, 36, 0.2);
}

.section-block {
  margin-top: 42px;
}

.sub-hero {
  padding: 32px;
  background: linear-gradient(135deg, #fffaf0 0%, #eee5d2 100%);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading h2 {
  font-size: clamp(1.5rem, 3vw, 2.3rem);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.card-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.info-card,
.feature-card,
.post-card {
  padding: 22px;
  box-shadow: var(--shadow-soft);
}

.card-index {
  color: var(--accent-strong);
  font-size: 0.92rem;
  font-weight: 700;
}

.info-card p:last-child,
.feature-card p,
.post-card p {
  line-height: 1.75;
  color: var(--muted);
}

.feature-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 18px;
}

.feature-large {
  background: linear-gradient(135deg, #fffaf0 0%, #f1ead8 100%);
}

.feature-label {
  display: inline-flex;
  padding: 6px 10px;
  color: var(--line);
  background: #f6d8bf;
  border: 2px solid var(--line);
  border-radius: 999px;
  font-size: 0.78rem;
}

.meta-list {
  margin: 18px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.8;
}

.post-list {
  display: grid;
  gap: 18px;
}

.quick-link-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.quick-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 76px;
  padding: 12px 14px;
  font-weight: 700;
  text-align: center;
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
}

.quick-link:hover,
.quick-link:focus-visible {
  transform: translate(2px, 2px);
}

.section-cta {
  margin-top: 18px;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.course-card {
  padding: 22px;
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.course-card h3 {
  margin: 10px 0 0;
}

.course-card p:last-of-type {
  line-height: 1.75;
  color: var(--muted);
}

.course-type {
  margin: 0;
  font-family: "Courier New", monospace;
  font-size: 0.8rem;
  color: var(--accent-strong);
  letter-spacing: 0.08em;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumbs a:hover,
.breadcrumbs a:focus-visible {
  text-decoration: underline;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
  margin-top: 18px;
}

.detail-card {
  padding: 24px;
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.detail-card h2,
.detail-card h3 {
  margin-top: 0;
}

.detail-card p,
.detail-card li {
  line-height: 1.8;
  color: var(--muted);
}

.detail-card ul {
  margin: 0;
  padding-left: 20px;
}

.note-block {
  margin-top: 16px;
  padding: 16px 18px;
  background: #f2e7d6;
  border: 2px dashed var(--line);
  border-radius: 12px;
}

.note-block p {
  margin: 0;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  font-family: "Courier New", monospace;
  font-size: 0.8rem;
  background: #f7dbc0;
  border: 2px solid var(--line);
  border-radius: 999px;
}

.back-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.text-link {
  display: inline-flex;
  margin-top: 10px;
  font-weight: 700;
  color: var(--accent-strong);
}

.text-link:hover,
.text-link:focus-visible {
  text-decoration: underline;
}

.contact-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 24px;
  box-shadow: var(--shadow-soft);
}

.contact-panel p:last-child {
  margin-bottom: 0;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 42px;
  padding: 22px;
  color: var(--muted);
  background: rgba(255, 250, 240, 0.75);
  border: 2px solid var(--line);
  border-radius: var(--radius);
}

@media (max-width: 960px) {
  .hero,
  .feature-layout,
  .card-grid,
  .contact-panel,
  .detail-grid,
  .course-grid,
  .quick-link-panel,
  .card-grid-3 {
    grid-template-columns: 1fr;
  }

  .site-header {
    flex-wrap: wrap;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(calc(100% - 20px), var(--container));
    padding-top: 12px;
  }

  .site-header {
    top: 10px;
    padding: 16px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding-top: 6px;
  }

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

  .hero-copy {
    padding: 24px;
  }

  .hero-text,
  .pixel-note p,
  .info-card p,
  .feature-card p,
  .post-card p,
  .course-card p {
    font-size: 0.98rem;
  }

  .site-footer {
    flex-direction: column;
  }
}
