/*
Theme Name: DeepAI321 Academy
Theme URI: https://deepai321.com/
Author: DeepAI321
Description: DeepAI321 AI 实战培训与工具导航主题，支持课程、会员、支付和 AI 工具内容管理。
Version: 1.3.4
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: deepai321
*/

.wp-search-form {
  display: flex;
  align-items: center;
  height: 38px;
  padding-left: 9px;
  border: 1px solid transparent;
  border-radius: 6px;
}

.wp-search-form:focus-within {
  border-color: #bdd2ff;
  background: #f5f8ff;
}

.wp-search-form input {
  width: 70px;
  min-width: 0;
  padding: 0;
  color: #334155;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 12px;
}

.wp-search-form button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  color: #526073;
  background: transparent;
  border: 0;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.wp-search-form button:hover {
  color: #155eef;
}

body.admin-bar .site-header {
  top: 32px;
}

.ai-directory {
  scroll-margin-top: 72px;
  padding-top: 44px;
  background: #f5f7fa;
  border-bottom: 1px solid #e3e8ef;
}

.ai-directory-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 24px;
}

.ai-directory-heading h2 {
  margin: 0;
  color: #101828;
  font-size: 30px;
  line-height: 1.25;
}

.ai-directory-heading > p {
  max-width: 520px;
  margin: 0;
  color: #667085;
  font-size: 14px;
  line-height: 1.7;
  text-align: right;
}

.ai-directory-tab-band {
  background: #fff;
  border-top: 1px solid #e3e8ef;
  border-bottom: 1px solid #e3e8ef;
}

.ai-directory-tabbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
}

.ai-directory-tabs {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.ai-directory-tabs::-webkit-scrollbar {
  display: none;
}

.ai-directory-tab {
  position: relative;
  flex: 0 0 auto;
  min-width: 104px;
  min-height: 58px;
  padding: 0 18px;
  color: #4b5565;
  background: transparent;
  border: 0;
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
}

.ai-directory-tab::after {
  position: absolute;
  right: 18px;
  bottom: 0;
  left: 18px;
  height: 3px;
  background: #ff5a36;
  content: "";
  opacity: 0;
  transform: scaleX(0.5);
  transition: 160ms ease;
}

.ai-directory-tab:hover,
.ai-directory-tab.active,
.ai-directory-tab[aria-selected="true"] {
  color: #101828;
}

.ai-directory-tab.active,
.ai-directory-tab[aria-selected="true"] {
  font-weight: 800;
}

.ai-directory-tab.active::after,
.ai-directory-tab[aria-selected="true"]::after {
  opacity: 1;
  transform: scaleX(1);
}

.ai-directory-tab:focus-visible {
  outline: 2px solid #155eef;
  outline-offset: -4px;
}

.ai-directory-more {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  min-height: 40px;
  padding-left: 20px;
  color: #0876c9;
  font-size: 13px;
  font-weight: 750;
}

.ai-directory-more span {
  font-size: 19px;
  line-height: 1;
}

.ai-directory-more:hover {
  color: #155eef;
}

.ai-directory-panels {
  padding-top: 26px;
  padding-bottom: 46px;
}

.ai-directory-panel[hidden] {
  display: none;
}

.ai-directory-panel-heading {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 18px;
}

.ai-directory-panel-heading h3 {
  flex: 0 0 auto;
  margin: 0;
  color: #1d2939;
  font-size: 17px;
  line-height: 1.4;
}

.ai-directory-panel-heading p {
  margin: 0;
  color: #7a8494;
  font-size: 12px;
  line-height: 1.6;
}

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

.ai-tool-link {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 94px;
  padding: 14px;
  background: #fff;
  border: 1px solid #e2e7ee;
  border-radius: 6px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.ai-tool-link:hover {
  border-color: #c5d3e5;
  box-shadow: 0 9px 22px rgba(24, 39, 75, 0.08);
  transform: translateY(-2px);
}

.ai-tool-badge {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  overflow: hidden;
  padding: 3px;
  color: #fff;
  background: var(--tool-accent, #155eef);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 850;
  text-align: center;
}

.ai-tool-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.ai-tool-copy strong {
  overflow: hidden;
  color: #1d2939;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-tool-copy small {
  display: -webkit-box;
  overflow: hidden;
  color: #7a8494;
  font-size: 11px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ai-tool-arrow {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: #98a2b3;
  font-size: 17px;
}

.ai-tool-link:hover .ai-tool-copy strong,
.ai-tool-link:hover .ai-tool-arrow {
  color: #155eef;
}

.ai-directory-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 28px 0;
  color: #667085;
}

.ai-directory-page-hero {
  padding: 28px 0 38px;
  background: #fff;
  border-bottom: 1px solid #e3e8ef;
}

.ai-directory-page-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-top: 28px;
}

.ai-directory-page-title h1 {
  margin: 0 0 10px;
  color: #101828;
  font-size: 42px;
  line-height: 1.15;
}

.ai-directory-page-title p {
  max-width: 680px;
  margin: 0;
  color: #667085;
  font-size: 15px;
  line-height: 1.75;
}

.ai-directory-page-count {
  display: grid;
  gap: 4px;
  min-width: 126px;
  padding-left: 22px;
  border-left: 1px solid #dfe5ec;
}

.ai-directory-page-count strong {
  color: #155eef;
  font-size: 34px;
  line-height: 1;
}

.ai-directory-page-count span {
  color: #667085;
  font-size: 12px;
}

.ai-directory-archive {
  padding-top: 0;
  background: #f5f7fa;
  border-bottom: 0;
}

.ai-directory-archive .ai-directory-panels {
  padding-top: 34px;
  padding-bottom: 52px;
}

.ai-directory-archive .ai-directory-panel-heading h2 {
  margin: 0;
  color: #1d2939;
  font-size: 20px;
  line-height: 1.4;
}

.ai-directory-back-home {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  min-height: 40px;
  padding-left: 20px;
  color: #0876c9;
  font-size: 13px;
  font-weight: 750;
}

.ai-directory-back-home span {
  font-size: 19px;
  line-height: 1;
}

.ai-directory-back-home:hover {
  color: #155eef;
}

.ai-directory-course-band {
  background: #fff;
  border-top: 1px solid #e3e8ef;
}

.ai-directory-course-band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding-top: 38px;
  padding-bottom: 42px;
}

.ai-directory-course-band h2 {
  margin: 0 0 8px;
  color: #101828;
  font-size: 22px;
  line-height: 1.35;
}

.ai-directory-course-band p {
  margin: 0;
  color: #667085;
  font-size: 13px;
  line-height: 1.7;
}

.article-body img {
  height: auto;
}

.article-body a {
  color: #155eef;
}

.topic-cloud a {
  padding: 7px 9px;
  color: #4b5b6f;
  background: #f3f6f9;
  border-radius: 5px;
  font-size: 12px;
}

.topic-cloud a:hover {
  color: #155eef;
  background: #edf3ff;
}

@media (max-width: 900px) {
  .wp-search-form {
    width: 38px;
    padding-left: 0;
  }

  .wp-search-form input {
    display: none;
  }

  .wp-search-form button {
    width: 38px;
  }

  .ai-tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}

.member-page {
  min-height: 65vh;
  padding: 42px 0 80px;
  background: #fff;
}

.member-page-inner {
  width: min(100% - 40px, 960px);
}

.member-page-header {
  padding: 26px 0 30px;
  border-bottom: 1px solid #e7ebf0;
}

.member-page-header h1 {
  margin: 7px 0 0;
  color: #101828;
  font-size: 34px;
  line-height: 1.2;
}

.member-page-content {
  padding-top: 30px;
  color: #344054;
}

.member-page-content > p:first-child,
.membership-lead {
  max-width: 720px;
  margin: 0 0 28px;
  color: #667085;
  font-size: 15px;
  line-height: 1.8;
}

.member-page-content .pms-form,
.member-page-content .pms-account-navigation,
.member-page-content .pms-account-subscriptions-header,
.member-page-content .pms-account-subscription {
  max-width: 820px;
}

.member-page-content .pms-form-fields-wrapper,
.member-page-content .pms-form-fields-wrapper ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.member-page-content .pms-account-section-wrapper {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
  margin: 28px 0;
  padding-top: 28px;
  border-top: 1px solid #e7ebf0;
}

.member-page-content .pms-field {
  margin: 0 0 18px;
}

.member-page-content .pms-field label {
  display: block;
  margin-bottom: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.member-page-content .pms-field input[type="text"],
.member-page-content .pms-field input[type="email"],
.member-page-content .pms-field input[type="password"],
.member-page-content .pms-field select {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  color: #101828;
  background: #fff;
  border: 1px solid #cfd6df;
  border-radius: 5px;
  outline: 0;
}

.member-page-content .pms-field input:focus,
.member-page-content .pms-field select:focus {
  border-color: #155eef;
  box-shadow: 0 0 0 3px rgba(21, 94, 239, 0.1);
}

.member-page-content .pms-subscription-plan {
  padding: 16px 18px;
  border: 1px solid #dfe5ec;
  border-radius: 6px;
}

.member-page-content .pms-subscription-plan + .pms-subscription-plan {
  margin-top: 10px;
}

.member-page-content .pms-form-submit,
.member-page-content input[type="submit"],
.member-page-content .pms-account-navigation-link a {
  min-height: 44px;
  padding: 11px 19px;
  color: #fff;
  background: #155eef;
  border: 0;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}

.member-page-content .pms-form-submit:hover,
.member-page-content input[type="submit"]:hover {
  background: #0f4fd4;
}

.membership-gate {
  padding: 28px 0 8px;
  border-top: 1px solid #e7ebf0;
}

.membership-gate > span {
  color: #155eef;
  font-size: 10px;
  font-weight: 850;
}

.membership-gate h2 {
  margin: 8px 0 10px;
  font-size: 24px;
}

.membership-gate p {
  margin-bottom: 20px;
  color: #667085;
}

.membership-gate > div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.membership-gate form,
.access-panel form {
  display: inline-flex;
  margin: 0;
}

.member-auth-switch {
  margin-top: 18px;
  color: #667085;
  font-size: 14px;
}

.member-auth-switch a {
  color: #155eef;
  font-weight: 750;
}

.membership-login-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.member-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  max-width: 900px;
  margin-top: 26px;
}

.member-choice-item {
  padding: 24px;
  background: #f7f9fc;
  border: 1px solid #e1e7ef;
  border-radius: 8px;
}

.member-choice-item.is-annual {
  background: #f5f8ff;
  border-color: #cddcff;
}

.member-choice-item h2 {
  margin: 8px 0 10px;
  color: #152033;
  font-size: 21px;
}

.member-choice-item p {
  min-height: 50px;
  margin: 0 0 20px;
  color: #536176;
  font-size: 14px;
  line-height: 1.75;
}

.member-choice-item .primary-button,
.member-choice-item .secondary-button {
  display: inline-flex;
}

.course-order-panel,
.course-download-panel {
  margin-top: 28px;
  padding: 22px;
  background: #f5f8ff;
  border: 1px solid #cddcff;
  border-radius: 8px;
}

.course-order-panel h2,
.course-download-panel h2 {
  margin: 8px 0 9px;
  color: #152033;
  font-size: 21px;
}

.course-order-panel p,
.course-download-panel p {
  margin-bottom: 16px;
  color: #536176;
  font-size: 14px;
  line-height: 1.75;
}

.course-order-panel form {
  display: grid;
  gap: 8px;
  max-width: 620px;
}

.course-payment-instructions {
  margin: 0 0 18px;
  padding: 14px 16px;
  color: #344054;
  background: #fff;
  border: 1px solid #dce5f7;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.75;
}

.course-payment-instructions > :last-child {
  margin-bottom: 0;
}

.course-order-panel label {
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.course-order-panel textarea {
  width: 100%;
  min-height: 88px;
  padding: 10px 12px;
  resize: vertical;
  color: #152033;
  background: #fff;
  border: 1px solid #b9c9e8;
  border-radius: 5px;
  outline: 0;
}

.course-order-panel textarea:focus {
  border-color: #155eef;
  box-shadow: 0 0 0 3px rgba(21, 94, 239, 0.1);
}

.course-download-panel {
  background: #effaf6;
  border-color: #b9ead7;
}

.course-download-panel .primary-button {
  display: inline-flex;
}

.course-download-panel.is-empty {
  background: #fffaf0;
  border-color: #f2ddb3;
}

.purchased-courses {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid #e7ebf0;
}

.purchased-courses h2 {
  margin-bottom: 12px;
  font-size: 23px;
}

.purchased-courses-notice {
  color: #087852;
}

.purchased-course-list {
  display: grid;
  gap: 9px;
  max-width: 820px;
}

.purchased-course-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  padding: 12px 15px;
  color: #152033;
  background: #f7f9fc;
  border: 1px solid #e1e7ef;
  border-radius: 6px;
}

.purchased-course-list a > span:first-child {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.purchased-course-list strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchased-course-list small {
  color: #667085;
}

.purchased-course-list a:hover {
  color: #155eef;
  border-color: #bdd2ff;
}

@media (max-width: 640px) {
  .ai-directory {
    scroll-margin-top: 62px;
    padding-top: 30px;
  }

  .ai-directory-heading {
    display: block;
    padding-bottom: 20px;
  }

  .ai-directory-heading h2 {
    font-size: 25px;
  }

  .ai-directory-heading > p {
    margin-top: 10px;
    font-size: 13px;
    text-align: left;
  }

  .ai-directory-tabbar {
    width: 100%;
    padding-left: 14px;
  }

  .ai-directory-tabs {
    flex: 1 1 auto;
  }

  .ai-directory-tab {
    min-width: auto;
    min-height: 54px;
    padding: 0 14px;
    font-size: 13px;
  }

  .ai-directory-tab::after {
    right: 14px;
    left: 14px;
  }

  .ai-directory-more {
    align-self: stretch;
    padding: 0 14px;
    background: #fff;
    border-left: 1px solid #edf0f4;
    font-size: 12px;
  }

  .ai-directory-more span {
    font-size: 17px;
  }

  .ai-directory-panels {
    padding-top: 22px;
    padding-bottom: 34px;
  }

  .ai-directory-page-hero {
    padding: 22px 0 30px;
  }

  .ai-directory-page-title {
    display: block;
    margin-top: 22px;
  }

  .ai-directory-page-title h1 {
    font-size: 31px;
  }

  .ai-directory-page-title p {
    font-size: 13px;
  }

  .ai-directory-page-count {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
    margin-top: 20px;
    padding: 0;
    border-left: 0;
  }

  .ai-directory-page-count strong {
    font-size: 26px;
  }

  .ai-directory-archive .ai-directory-panels {
    padding-top: 22px;
    padding-bottom: 36px;
  }

  .ai-directory-archive .ai-directory-panel-heading h2 {
    font-size: 17px;
  }

  .ai-directory-course-band-inner {
    display: block;
    padding-top: 30px;
    padding-bottom: 34px;
  }

  .ai-directory-course-band h2 {
    font-size: 19px;
  }

  .ai-directory-course-band .primary-button {
    display: inline-flex;
    margin-top: 18px;
  }

  .ai-directory-panel-heading {
    display: block;
    margin-bottom: 15px;
  }

  .ai-directory-panel-heading h3 {
    font-size: 16px;
  }

  .ai-directory-panel-heading p {
    margin-top: 6px;
  }

  .ai-tool-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .ai-tool-link {
    min-height: 82px;
    padding: 11px 12px;
  }

  .member-page {
    padding: 28px 0 64px;
  }

  .member-page-inner {
    width: min(100% - 28px, 960px);
  }

  .member-page-header h1 {
    font-size: 28px;
  }

  .member-page-content .pms-account-section-wrapper {
    grid-template-columns: 1fr;
  }
}

/* Mobile layout hardening */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}

.article-body iframe,
.article-body video,
.article-body table,
.member-page-content table {
  max-width: 100%;
}

@media (max-width: 768px) {
  .site-container,
  .member-page-inner {
    width: calc(100% - 28px);
    max-width: none;
  }

  .header-inner {
    justify-content: space-between;
    gap: 10px;
  }

  .brand {
    min-width: 0;
  }

  .brand-copy {
    min-width: 0;
  }

  .brand-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .header-actions {
    flex: 0 0 auto;
  }

  .menu-button {
    width: 44px;
    height: 44px;
    font-size: 22px;
  }

  .mobile-menu {
    width: min(390px, 92vw);
    padding: max(18px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
  }

  .mobile-menu nav .mobile-group-title,
  .mobile-menu nav > a {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 9px 2px;
  }

  .mobile-menu nav a small {
    max-width: 100%;
    line-height: 1.45;
  }

  .home-hero {
    height: auto;
    min-height: min(680px, calc(100svh - 62px));
  }

  .hero-content {
    min-height: min(680px, calc(100svh - 62px));
    padding-top: 72px;
    padding-bottom: 50px;
  }

  .hero-content h1 {
    max-width: 100%;
    font-size: clamp(38px, 11vw, 52px);
    overflow-wrap: anywhere;
  }

  .hero-content > p {
    max-width: 100%;
    font-size: 15px;
    line-height: 1.7;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .primary-button {
    width: 100%;
    min-height: 48px;
  }

  .ai-directory-heading,
  .section-heading,
  .ai-directory-page-title,
  .ai-directory-course-band-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading {
    gap: 12px;
  }

  .ai-directory-tabbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
    min-height: 54px;
    padding-left: 0;
  }

  .ai-directory-tabs {
    min-width: 0;
    padding-left: 14px;
  }

  .ai-directory-tab {
    min-width: max-content;
  }

  .ai-directory-more,
  .ai-directory-back-home {
    min-width: 92px;
    padding: 0 12px;
    background: #fff;
    border-left: 1px solid #edf0f4;
    white-space: nowrap;
  }

  .path-layout,
  .archive-layout,
  .detail-layout,
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .path-layout {
    gap: 34px;
  }

  .path-copy h2 {
    font-size: clamp(27px, 8vw, 34px);
  }

  .path-steps a {
    grid-template-columns: 34px minmax(0, 1fr) 18px;
    gap: 10px;
  }

  .archive-sidebar,
  .detail-sidebar {
    grid-template-columns: minmax(0, 1fr);
  }

  .detail-sidebar {
    position: static;
    order: 0;
  }

  .article-content,
  .article-body {
    min-width: 0;
    max-width: 100%;
  }

  .article-header h1,
  .category-title-row h1,
  .ai-directory-page-title h1 {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .article-body iframe,
  .article-body video {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .article-body pre,
  .article-body table,
  .member-page-content table,
  .pms-account-subscription,
  .pms-payment-history {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .member-page-content .pms-form,
  .member-page-content form,
  .member-page-content input,
  .member-page-content select,
  .member-page-content textarea {
    max-width: 100%;
  }

  .member-page-content .pms-account-navigation {
    display: flex;
    gap: 8px;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 8px;
    white-space: nowrap;
  }

  .member-page-content .pms-account-navigation-link {
    flex: 0 0 auto;
  }

  .membership-gate > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .member-choice-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .member-choice-item p {
    min-height: 0;
  }

  .membership-gate .primary-button,
  .membership-gate .secondary-button {
    width: 100%;
  }

  .site-footer {
    padding-top: 42px;
  }

  .footer-links {
    gap: 10px 16px;
  }
}

@media (max-width: 480px) {
  body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }

  .site-container,
  .member-page-inner {
    width: calc(100% - 24px);
  }

  .wp-search-form {
    display: none;
  }

  .brand-copy small {
    display: none;
  }

  .home-hero-image {
    object-position: 64% center;
  }

  .hero-content {
    padding-top: 54px;
    padding-bottom: 42px;
  }

  .hero-proof {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .hero-proof span:last-child {
    grid-column: auto;
  }

  .ai-directory-tabbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .ai-directory-more,
  .ai-directory-back-home {
    display: none;
  }

  .featured-grid,
  .latest-grid,
  .archive-grid,
  .related-grid,
  .ai-tool-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .course-card {
    display: block;
    min-height: 0;
  }

  .course-cover {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .course-card-body {
    display: block;
    padding: 14px;
  }

  .course-card h3 {
    font-size: 16px;
  }

  .course-card-body > p {
    display: -webkit-box;
    min-height: 0;
    margin-bottom: 13px;
    -webkit-line-clamp: 2;
  }

  .course-meta span:nth-child(2) {
    display: inline-flex;
  }

  .category-strip-inner,
  .category-nav-scroll {
    padding-inline: 12px;
  }

  .category-strip a,
  .category-nav-scroll a {
    padding: 8px 11px;
    font-size: 13px;
  }

  .article-header h1 {
    font-size: 25px;
  }

  .article-meta {
    gap: 8px 12px;
  }

  .article-cover {
    border-radius: 6px;
  }

  .access-panel {
    padding: 18px;
  }

  .membership-gate form,
  .membership-gate form .primary-button,
  .access-panel form,
  .access-panel form .access-button {
    width: 100%;
  }

  .membership-login-actions,
  .membership-login-actions .primary-button,
  .membership-login-actions .secondary-button,
  .member-choice-item .primary-button,
  .member-choice-item .secondary-button {
    width: 100%;
  }

  .course-order-panel,
  .course-download-panel {
    padding: 17px;
  }

  .course-order-panel h2,
  .course-download-panel h2 {
    font-size: 19px;
  }

  .course-facts {
    grid-template-columns: minmax(0, 1fr);
  }

  .course-facts > div {
    border-right: 0;
  }

  .member-page-header {
    padding: 18px 0 22px;
  }

  .member-page-content {
    padding-top: 22px;
  }

  .member-page-content .pms-subscription-plan {
    padding: 14px;
  }

  .mobile-subnav {
    grid-template-columns: minmax(0, 1fr);
  }

  .mobile-dock {
    height: calc(64px + env(safe-area-inset-bottom));
  }
}
