.learning-home {
  background: #f8f5ee;
  color: #192e39;
}

.learning-home .site-header {
  position: sticky;
  background: #f3faf7;
  color: #143631;
  border-bottom-color: #b6d5cd;
}
.learning-home .nav-links a { background: #fff; color: #143631; border: 1px solid #b6d5cd; }
.learning-home .nav-links a:hover { background: #e3f1ed; }

.learning-home main { padding-top: 0; }

.home-intro {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(190px, 1fr);
  align-items: center;
  gap: clamp(24px, 6vw, 90px);
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 84px) clamp(16px, 4vw, 48px);
}

.home-intro h1 {
  max-width: 14ch;
  margin: 0;
  color: #192e39;
  font-size: clamp(2.6rem, 6.5vw, 6rem);
  line-height: .98;
}

.home-intro p { max-width: 52ch; margin: 20px 0; }
.home-intro-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.home-intro-actions a {
  padding: 9px 16px;
  border: 1px solid #192e39;
  border-radius: 6px;
  font-weight: 800;
  text-decoration: none;
}
.home-intro-actions a:first-child { color: white; background: #192e39; }
.home-intro-profile {
  display: grid;
  justify-items: center;
  align-content: end;
  gap: 10px;
  padding: 16px 12px;
  border-radius: 10px;
  background: #ecd3b2;
  text-align: center;
  text-decoration: none;
  font-weight: 800;
}
.home-intro-profile img { width: min(100%, 190px); aspect-ratio: 1; object-fit: cover; border-radius: 50%; }
.home-intro-profile small { display: block; font-weight: 600; }

.learning-home .track-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.learning-home .track-grid .track-card {
  grid-column: auto;
  min-height: 150px;
  border: 1px solid #d7cabb;
  border-radius: 10px;
  background: #fffefa;
  box-shadow: none;
}
.learning-home .track-card small { display: none; }
.learning-home .track-card strong { color: #934316; }
.learning-home .instructor-profile {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 180px);
  align-items: center;
  gap: clamp(12px, 3vw, 26px);
  width: min(calc(100% - 32px), 1084px);
  min-height: 0;
  margin: 18px auto;
  padding: clamp(14px, 4vw, 32px);
  border: 1px solid #b6d5cd;
  border-radius: 14px;
  background: #f3faf7;
  color: #143631;
}
.learning-home .instructor-profile::before,
.learning-home .instructor-profile::after,
.learning-home .instructor-profile .hero-portrait::before { display: none; }
.learning-home .instructor-profile .hero-content { grid-area: 1 / 1; width: auto; min-width: 0; }
.learning-home .instructor-profile .hero-portrait {
  grid-area: 1 / 2;
  position: static;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  margin: 0;
  opacity: 1;
  border: 1px solid #b6d5cd;
  border-radius: 12px;
  box-shadow: none;
}
.learning-home .instructor-profile :is(h2, .hero-copy) { color: inherit; }
.learning-home .instructor-profile .kicker { max-width: none; min-height: 0; background: #e3f1ed; border-color: #b6d5cd; color: #126153; }
.learning-home .instructor-profile .button.primary { background: #126153; color: #fff; }
.learning-home .instructor-profile .button.secondary { background: #fff; color: #126153; border-color: #b6d5cd; }

.learning-home .home-intro {
  width: min(calc(100% - 32px), 1084px);
  grid-template-columns: minmax(0, 1fr);
  margin-block: 22px 14px;
  padding: clamp(20px, 4vw, 38px);
  border-radius: 14px;
  background: #126153;
  color: #fff;
}
.learning-home .home-intro h1 {
  max-width: 24ch;
  color: inherit;
  font-size: clamp(2rem, 5vw, 3.5rem);
}
.learning-home .home-intro p { margin: 12px 0 16px; }
.learning-home .home-intro-actions a { border-color: #fff; }
.learning-home .home-intro-actions a:first-child { background: #fff; color: #126153; }
.learning-home .track-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.learning-home .track-grid .track-card {
  min-height: 132px;
  padding: 14px;
  border-color: #b6d5cd;
  background: #fff;
  overflow-wrap: anywhere;
}
.learning-home .track-grid :is(.centre, .subscription) { grid-column: span 2; min-height: 0; }
.learning-home .track-card strong { color: #126153; }
.learning-home { background: #e3f1ed; }

#home.passage-list:not(.hidden) {
  box-sizing: border-box;
  width: min(100%, 880px);
  margin-inline: auto;
  padding: 16px clamp(12px, 4vw, 28px) 68px;
  justify-content: flex-start;
  align-items: stretch;
  min-height: auto;
  text-align: start;
}
.ielts-home-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 15rem);
  align-items: center;
  gap: 4px 12px;
  padding: 12px;
  border: 1px solid #b7d7d0;
  border-radius: 14px;
  background: #e3f1ed;
  color: #192e39;
}
#home .ielts-home-heading .home-title { grid-area: 2 / 1; width: auto; min-width: 0; margin: 0; color: inherit; font-size: clamp(1.15rem, 3vw, 1.7rem); text-align: start; }
#home .ielts-home-heading .home-return-link { grid-area: 1 / 1; justify-self: start; margin: 0; padding: 6px 9px; color: #103b36; background: #fff; border: 1px solid #99bfb5; border-radius: 8px; font-size: .8rem; }
.ielts-header-progress { grid-area: 1 / 2 / span 2; min-width: 0; }
#home .ielts-header-progress .diamond-home { grid-template-columns: auto minmax(0, 1fr); width: 100%; max-width: none; min-width: 0; margin: 0; padding: 6px; box-sizing: border-box; box-shadow: none; }
.ielts-header-progress .diamond-meta { min-width: 0; order: 0; }
.ielts-header-progress .diamond-progress { min-width: 0; max-width: 100%; }
.ielts-header-progress .diamond-title,
.ielts-header-progress .diamond-progress-text { box-sizing: border-box; max-width: 100%; overflow-wrap: anywhere; white-space: normal; }
.ielts-header-progress .diamond-bar { box-sizing: border-box; min-width: 0; max-width: 100%; padding-inline: 6px; gap: 4px; }
#home .ielts-header-progress .diamond-home {
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
  padding: 10px 14px;
  border: 1px solid #b7d7d0;
  border-radius: 16px;
  background: #fff;
  backdrop-filter: none;
}
.ielts-header-progress .diamond-bar {
  justify-self: start;
  height: auto;
  padding: 0;
  border: 0;
  background: none;
  color: #103b36;
  box-shadow: none;
}
.ielts-header-progress .diamond-icon-wrapper { width: 20px; height: 20px; background: none; }
.ielts-header-progress .diamond-icon { width: 20px; height: 20px; filter: none; }
.ielts-header-progress .diamond-count { font-size: 1.25rem; }
.ielts-header-progress .diamond-title { padding: 0; border: 0; background: none; text-transform: none; font-size: .95rem; font-weight: 500; }
.ielts-header-progress .diamond-progress { height: 4px; }
.ielts-header-progress .diamond-progress-fill { background: #126153; }
.ielts-header-progress .diamond-progress-fill::after,
.ielts-header-progress .diamond-progress-text { display: none; }
.ielts-home-layout {
  display: grid;
  gap: 10px;
  margin-block: 10px;
}
#home .ielts-skill-grid {
  display: grid;
  width: 100%;
  max-width: none;
  margin: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
#home .ielts-skill-grid button {
  position: relative;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-direction: row;
  min-width: 0;
  min-height: 112px;
  padding: 10px 12px;
  gap: 12px;
  border-radius: 10px;
  text-align: start;
  border: 1px solid #c3d6df;
  background: #fff;
  color: #192e39;
  font: 700 1rem/1.2 var(--platform-font-body, system-ui);
  cursor: pointer;
}
#home .ielts-skill-grid button > svg { width: 34px; height: 34px; aspect-ratio: 1; flex: none; }
#home .ielts-home-aside button > svg { width: 24px; height: 24px; aspect-ratio: 1; flex: none; }
#home .ielts-skill-grid button:has(> .content-view-badge) { padding-bottom: 30px; }
#home .ielts-skill-grid button > .content-view-badge { position: absolute; inset-inline-end: 9px; inset-block-end: 7px; margin: 0; }
#home .ielts-skill-grid .content-eye-icon { width: 16px; height: auto; }
#home .ielts-skill-grid button > span:not(.content-view-badge) { min-width: 0; overflow-wrap: anywhere; }
.ielts-home-aside { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; min-width: 0; }
.ielts-home-aside > button {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid #c3d6df;
  border-radius: 8px;
  background: #f4f8fa;
  color: #192e39;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.ielts-home-aside > .ielts-mock-action { background: #192e39; color: #fff; }
.ielts-home-aside .content-eye-icon { width: 18px; height: auto; flex: none; }
.ielts-skill-copy { display: grid; gap: 6px; }
.ielts-skill-copy small { font-size: .85em; font-weight: 500; }
.ielts-subscription-link {
  display: block;
  padding: 13px;
  border: 1px solid #add0c8;
  border-radius: 13px;
  color: #103b36;
  text-decoration: none;
}
html:not([data-focus-sample]) #home.passage-list:not(.hidden) {
  width: min(calc(100% - 24px), 700px);
  margin: 8px auto 64px;
  padding: clamp(12px, 4vw, 28px);
  border-radius: 24px;
  background: #eaf5f2;
  color: #103b36;
}
html:not([data-focus-sample]) .ielts-home-heading {
  grid-template-columns: minmax(0, 1fr) minmax(0, 40%);
  border: 0;
  align-items: start;
  color: inherit;
}
html:not([data-focus-sample]) .ielts-home-layout { gap: 20px; margin-block: 12px 20px; }
html:not([data-focus-sample]) #home .ielts-skill-grid button {
  min-height: clamp(100px, 23vw, 160px);
  border-color: #add0c8;
  border-radius: 17px;
  color: #103b36;
}
html:not([data-focus-sample]) #home .ielts-skill-grid button > svg { display: none; }
html:not([data-focus-sample]) #home .ielts-home-layout .content-view-badge { display: none; }
html:not([data-focus-sample]) .ielts-home-aside > button { border-color: #add0c8; }
html:not([data-focus-sample]) .ielts-home-aside > .ielts-mock-action { background: #126153; }

#home .home-subscribe-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 14px;
  border-radius: 10px;
}
#home .home-subscribe-card::before { display: none; }
#home .home-subscribe-card h3 { margin: 0; font-size: 1rem; }
#home .home-subscribe-card p { flex: 1 1 15rem; margin: 0; font-size: .875rem; }
#home .home-subscribe-actions { margin: 0; gap: 8px; }
#home .home-subscribe-link { padding: 7px 10px; font-size: .8rem; }

@media (max-width: 760px) {
  .learning-home .track-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .learning-home .site-header { position: static; }
  .learning-home .instructor-profile { grid-template-columns: minmax(0, 1fr); }
  .learning-home .instructor-profile .hero-content { grid-area: 2 / 1; }
  .learning-home .instructor-profile .hero-portrait { grid-area: 1 / 1; width: min(100%, 106px); }
  .ielts-home-heading { grid-template-columns: minmax(0, 1fr) minmax(0, 46%); }
  #home .ielts-header-progress .diamond-home { grid-template-columns: minmax(0, 1fr); justify-items: stretch; gap: 4px; }
  .ielts-header-progress .diamond-bar { order: -1; }
  .home-intro { grid-template-columns: minmax(0, 1fr); }
  .home-intro-profile { display: flex; align-items: center; text-align: start; }
  .home-intro-profile img { width: 48px; }
  .learning-home .track-grid { grid-template-columns: minmax(0, 1fr); }
  .learning-home .track-grid :is(.centre, .subscription) { grid-column: auto; }
  #home .ielts-skill-grid button { min-height: 96px; padding: 9px 8px; gap: 6px; font-size: .85rem; }
  #home .ielts-skill-grid button > svg { width: 28px; height: 28px; }
  #home .ielts-home-aside button > svg { width: 20px; height: 20px; }
  .ielts-home-aside > button { padding: 8px; gap: 6px; font-size: .82rem; }
}

.ielts-book-menu { display: grid; gap: 8px; text-align: start; }
.ielts-book-menu details { min-width: 0; border: 1px solid var(--theme-line, #b6d5cd); border-radius: 10px; background: var(--theme-panel, #fff); }
.ielts-book-menu details details { margin: 6px 9px; }
.ielts-book-menu summary { padding: 10px 13px; color: var(--theme-ink, #143631); font-weight: 700; cursor: pointer; overflow-wrap: anywhere; }
.ielts-book-menu details[open] > summary { background: var(--theme-soft, #f3faf7); border-radius: 9px 9px 0 0; }
.ielts-book-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr)); gap: 8px; padding: 10px; }
.ielts-book-actions button { min-height: 42px; border: 1px solid var(--theme-line, #b6d5cd); border-radius: 8px; background: #fff; color: #143631; cursor: pointer; }
.ielts-book-actions .ielts-book-full { grid-column: 1 / -1; background: #126153; color: #fff; }

.ielts-catalog-search { display: grid; gap: 5px; margin-bottom: 12px; text-align: start; font-weight: 700; }
.ielts-catalog-search input {
  box-sizing: border-box;
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--theme-line, #b6d5cd);
  border-radius: 9px;
  background: var(--theme-panel, #fff);
  color: var(--theme-ink, #143631);
  font-size: 1rem;
}
