/* Professional reading overrides for copied topic documents */
html {
  background: #f1f4f6;
}

body {
  margin: 0;
  padding: 18px !important;
  background: #f1f4f6 !important;
  color: #12161a;
  font-family:
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue",
    Arial, sans-serif !important;
}

.double-border {
  max-width: 1180px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #cbd4dc !important;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(18, 22, 26, 0.08);
}

.container {
  grid-template-columns: 1fr !important;
}

.sidebar {
  display: none !important;
}

.main-content {
  padding: 44px clamp(24px, 4vw, 64px);
  background: #fff;
  color: #12161a;
  font-size: 16px;
  line-height: 1.9;
}

.main-content h2 {
  margin: 26px 0 16px;
  padding-left: 14px;
  border-left: 4px solid #e14c2a;
  color: #12161a;
  font-size: 26px;
  line-height: 1.4;
}

.main-content h3 {
  margin: 24px 0 12px;
  color: #24313e;
}

.main-content p {
  line-height: 1.95;
}

.main-content pre {
  margin: 18px 0;
  padding: 18px;
  overflow-x: auto;
  border-radius: 8px;
  background: #20242a !important;
  color: #f3f5f7;
}

.main-content code {
  font-family: "SF Mono", Menlo, Consolas, monospace;
}

.main-content table {
  width: 100%;
  margin: 18px 0;
  border-collapse: collapse;
  border: 1px solid #cbd4dc;
  background: #fff !important;
}

.main-content th,
.main-content td {
  padding: 10px 12px;
  border: 1px solid #cbd4dc;
  text-align: left;
}

.main-content th {
  background: #e4e9ed !important;
  color: #12161a;
}

.main-content .tip {
  margin: 18px 0;
  padding: 14px 18px;
  border-left: 4px solid #087e8b;
  border-radius: 6px;
  background: #e8f3f3 !important;
}

.main-content .warning {
  margin: 18px 0;
  padding: 14px 18px;
  border-left: 4px solid #e14c2a;
  border-radius: 6px;
  background: #fceeeb !important;
}

.main-content .highlight {
  margin: 18px 0;
  padding: 14px 18px;
  border: 1px solid #cbd4dc;
  border-radius: 6px;
  background: #eef2f4 !important;
}

.main-content .footer-nav {
  display: none !important;
}

.main-content footer {
  display: none !important;
}

.course-wrapper {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2rem;
  border: 1px solid #cbd4dc;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(18, 22, 26, 0.08);
}

.course-wrapper .header-title {
  border-bottom: 1px solid #cbd4dc;
}

.course-wrapper .header-title h1 {
  background: none !important;
  background-clip: border-box !important;
  -webkit-background-clip: border-box !important;
  -webkit-text-fill-color: currentColor !important;
  color: #12161a !important;
  font-size: 2rem;
  text-shadow: none;
}

.course-wrapper .header-title h1 small,
.course-wrapper .subhead {
  border-radius: 6px;
  background: #e4e9ed;
  border: 0;
  box-shadow: none;
  color: #5b6772;
}

.course-wrapper .catalog-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.course-wrapper .chapter-card {
  border: 1px solid #cbd4dc;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(18, 22, 26, 0.06);
}

.course-wrapper .chapter-card:hover {
  transform: translateY(-2px) scale(1);
  border-color: #087e8b;
  background: #fff;
  box-shadow: 0 10px 24px rgba(18, 22, 26, 0.1);
}

.course-wrapper .card-badge {
  border-radius: 8px;
  background: #12161a;
  color: #f1f4f6;
  box-shadow: none;
}

.course-wrapper .footer-note {
  border-radius: 6px;
  background: #e4e9ed;
  box-shadow: none;
  color: #5b6772;
}

.container .header .title-group h1 {
  background: none !important;
  background-clip: border-box !important;
  -webkit-background-clip: border-box !important;
  -webkit-text-fill-color: currentColor !important;
  color: #12161a !important;
  text-shadow: none !important;
}

.container .header {
  border-bottom: 1px solid #cbd4dc;
}

.container .header h1 {
  color: #12161a;
  text-shadow: none !important;
}

.container .header h1::before,
.container .header h1::after {
  content: "";
}

.container .header h1 small {
  border: 0;
  border-radius: 6px;
  background: #e4e9ed;
  box-shadow: none;
  color: #5b6772;
}

.container .badge-rtos {
  border: 0;
  border-radius: 6px;
  background: #e4e9ed;
  box-shadow: none;
  color: #5b6772;
}

.container .header-badge {
  border: 0;
  border-radius: 6px;
  background: #e4e9ed;
  box-shadow: none;
  color: #5b6772;
  transform: none;
}

.container .catalog-grid a.card {
  border: 1px solid #cbd4dc;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(18, 22, 26, 0.06);
}

.container .catalog-grid a.card:hover {
  transform: translateY(-2px) scale(1);
  border-color: #2456a6;
  background: #fff;
  box-shadow: 0 10px 24px rgba(18, 22, 26, 0.1);
}

.container .grid .card {
  border: 1px solid #cbd4dc !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: 0 6px 16px rgba(18, 22, 26, 0.06) !important;
}

.container .grid a.card {
  min-height: 70px;
  padding: 14px 16px;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  box-shadow: none !important;
}

.container .grid .card:hover,
.container .grid a.card:hover {
  transform: translateY(-2px) scale(1);
  border-color: #7251b5 !important;
  background: #fff !important;
  box-shadow: 0 10px 24px rgba(18, 22, 26, 0.1) !important;
}

.container .card-number {
  border: 1px solid #cbd4dc;
  border-radius: 8px;
  background: #e4e9ed;
  color: #12161a;
  box-shadow: none;
}

.container .catalog-grid .card-number,
.container .grid .card .card-number {
  border: 1px solid #cbd4dc !important;
  border-radius: 8px !important;
  background: #e4e9ed !important;
  color: #12161a !important;
  box-shadow: none !important;
}

.container .card-title .chapter {
  border-radius: 6px;
  background: #e4e9ed;
  color: #5b6772;
  letter-spacing: 0;
}

.container .card-desc {
  color: #5b6772;
  opacity: 1;
}

.container .card-desc strong {
  color: #2456a6;
}

.course-wrapper .footer-note,
.container .footer,
.container .footer-note {
  display: none !important;
}

.container .footer {
  border-radius: 6px;
  background: #e4e9ed;
  box-shadow: none;
  color: #5b6772;
}

@media (max-width: 700px) {
  body {
    padding: 10px !important;
  }

  .main-content {
    padding: 28px 18px;
  }
}
