/*
 * English Versity public design system
 * Loaded after the legacy and database-generated theme styles so public pages
 * share one predictable visual language without changing application screens.
 */

:root {
  --ev-canvas: #f4f7fb;
  --ev-surface: #ffffff;
  --ev-surface-soft: #eef5fa;
  --ev-ink: #10233f;
  --ev-ink-soft: #31465f;
  --ev-muted: #607287;
  --ev-brand: #075ea8;
  --ev-brand-strong: #06497f;
  --ev-brand-deep: #073554;
  --ev-brand-light: #e8f3fb;
  --ev-accent: #ff7a1a;
  --ev-accent-strong: #db5f05;
  --ev-success: #16835b;
  --ev-line: #dbe6ef;
  --ev-line-strong: #c7d7e4;
  --ev-radius-sm: 9px;
  --ev-radius: 14px;
  --ev-radius-lg: 22px;
  --ev-shadow-sm: 0 6px 20px rgba(16, 35, 63, 0.07);
  --ev-shadow: 0 18px 46px rgba(16, 35, 63, 0.11);
  --ev-container: 1180px;
  --ev-reading: 76ch;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body.site-public {
  background: var(--ev-canvas);
  color: var(--ev-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.site-public main {
  width: 100%;
  max-width: none !important;
  min-height: 48vh;
  margin: 0 !important;
  padding: 0 !important;
}

body.site-public .container {
  width: min(100% - 32px, var(--ev-container));
  max-width: var(--ev-container);
}

body.site-public :where(h1, h2, h3, h4, h5, h6) {
  color: var(--ev-ink);
  font-family: inherit;
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.2;
  text-wrap: balance;
}

body.site-public :where(p, li) {
  color: var(--ev-ink-soft);
}

body.site-public a {
  color: var(--ev-brand);
  text-underline-offset: 3px;
}

body.site-public img {
  height: auto;
}

body.site-public :where(button, .btn, input, select, textarea) {
  font: inherit;
}

body.site-public :where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid #ffc14d !important;
  outline-offset: 3px;
  box-shadow: none;
}

.skip-to-content {
  position: fixed;
  z-index: 10000;
  top: 10px;
  left: 16px;
  padding: 10px 14px;
  border-radius: var(--ev-radius-sm);
  background: #fff;
  color: var(--ev-brand-deep) !important;
  font-weight: 750;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.16s ease;
}

.skip-to-content:focus {
  transform: translateY(0);
}

/* Shared controls */
body.site-public .btn {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--ev-radius-sm);
  border-width: 1px;
  font-size: 0.94rem;
  font-weight: 720;
  line-height: 1.35;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

body.site-public .btn:hover {
  transform: translateY(-1px);
}

body.site-public .btn-primary {
  border-color: var(--ev-brand);
  background: var(--ev-brand);
  color: #fff;
  box-shadow: 0 8px 18px rgba(7, 94, 168, 0.18);
}

body.site-public .btn-primary:hover,
body.site-public .btn-primary:focus {
  border-color: var(--ev-brand-strong);
  background: var(--ev-brand-strong);
  color: #fff;
}

body.site-public .btn-outline-primary {
  border-color: var(--ev-line-strong);
  background: var(--ev-surface);
  color: var(--ev-brand);
  box-shadow: none;
}

body.site-public .btn-outline-primary:hover,
body.site-public .btn-outline-primary:focus {
  border-color: var(--ev-brand);
  background: var(--ev-brand-light);
  color: var(--ev-brand-strong);
}

body.site-public .btn-light {
  border-color: rgba(255, 255, 255, 0.68);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: none;
  backdrop-filter: blur(8px);
}

body.site-public .btn-light:hover,
body.site-public .btn-light:focus {
  border-color: #fff;
  background: #fff;
  color: var(--ev-brand-deep);
}

body.site-public .form-control,
body.site-public .form-select {
  min-height: 44px;
  border: 1px solid var(--ev-line-strong);
  border-radius: var(--ev-radius-sm);
  background-color: var(--ev-surface);
  color: var(--ev-ink);
}

body.site-public .form-control:focus,
body.site-public .form-select:focus {
  border-color: var(--ev-brand);
  box-shadow: 0 0 0 3px rgba(7, 94, 168, 0.12);
}

.section-spacing {
  padding-top: 72px;
  padding-bottom: 72px;
}

.section-kicker,
.inner-page-kicker,
.hero-card-kicker {
  display: inline-flex;
  margin: 0 0 10px;
  color: var(--ev-accent-strong);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  line-height: 1.2;
  text-transform: uppercase;
}

body.site-public .default-title {
  margin-bottom: 12px;
  color: var(--ev-ink);
  font-size: clamp(1.75rem, 3vw, 2.35rem);
}

.section-lead {
  max-width: 68ch;
  margin: 0;
  color: var(--ev-muted) !important;
  font-size: 1.04rem;
  line-height: 1.75;
}

.text-center .section-lead {
  margin-right: auto;
  margin-left: auto;
}

/* Header and primary navigation */
body.site-public .site-header,
body.site-public .site-header.sticky-header {
  position: sticky;
  z-index: 1030;
  top: 0;
  width: 100%;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  background: linear-gradient(115deg, #073b67 0%, #075ea8 58%, #0879c7 100%);
  box-shadow: 0 8px 28px rgba(5, 39, 67, 0.16);
  animation: none;
  transition: padding 0.18s ease, box-shadow 0.18s ease;
}

body.site-public .site-header .container {
  width: min(100% - 28px, 1280px);
  max-width: 1280px;
}

body.site-public .site-header-row {
  min-height: 58px;
}

body.site-public .site-brand {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
}

body.site-public .site-brand #logo {
  width: auto;
  max-width: 188px;
  max-height: 52px;
  object-fit: contain;
}

body.site-public .site-nav-col {
  gap: 10px;
}

body.site-public .primary-menu {
  align-items: center;
  gap: 3px;
}

body.site-public .primary-menu .nav-item {
  margin: 0;
}

body.site-public .primary-menu .nav-link {
  min-height: 40px;
  margin: 0;
  padding: 9px 10px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.86rem;
  font-weight: 680;
  line-height: 1.35;
  white-space: nowrap;
}

body.site-public .primary-menu .nav-link-effect::before {
  display: none;
}

body.site-public .primary-menu .nav-link-effect:hover,
body.site-public .primary-menu .nav-link-effect:focus,
body.site-public .primary-menu .nav-link-effect.active {
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
}

body.site-public .primary-menu .nav-link-effect.active {
  box-shadow: inset 0 -2px 0 var(--ev-accent);
}

body.site-public .primary-menu .site-nav-cta {
  margin-left: 5px;
}

body.site-public .primary-menu .site-nav-cta .nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: none;
}

body.site-public .primary-menu .btn-sign-up {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(3, 45, 78, 0.34);
  color: #fff;
}

body.site-public .primary-menu .btn-sign-up:hover,
body.site-public .primary-menu .btn-sign-up:focus {
  border-color: #fff;
  background: rgba(3, 45, 78, 0.58);
  color: #fff !important;
}

body.site-public .primary-menu .btn-sign-in {
  border-color: var(--ev-accent);
  background: var(--ev-accent);
  color: #172334;
}

body.site-public .primary-menu .btn-sign-in:hover,
body.site-public .primary-menu .btn-sign-in:focus {
  border-color: #ff9a4f;
  background: #ff9a4f;
  color: #172334 !important;
}

body.site-public .theme-icon,
body.site-public .custom-toggler {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  min-width: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

body.site-public .theme-icon:hover,
body.site-public .custom-toggler:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* Breadcrumb */
.site-breadcrumb {
  border-bottom: 1px solid var(--ev-line);
  background: var(--ev-surface);
}

.site-breadcrumb ol {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  margin: 0;
  padding: 8px 0;
  list-style: none;
  color: var(--ev-muted);
  font-size: 0.82rem;
}

.site-breadcrumb li {
  min-width: 0;
  color: inherit;
}

.site-breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: #9aabba;
}

.site-breadcrumb li:last-child {
  overflow: hidden;
  flex: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-breadcrumb a {
  color: var(--ev-brand);
  font-weight: 650;
  text-decoration: none;
}

/* Homepage hero */
body.page-home #hero.home-hero {
  position: relative;
  display: block;
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
  padding: 82px 0;
  background-position: center;
  background-size: cover;
}

body.page-home #hero.home-hero::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  content: "";
  background: linear-gradient(102deg, rgba(4, 42, 72, 0.96) 0%, rgba(6, 70, 116, 0.91) 53%, rgba(7, 73, 111, 0.76) 100%);
}

body.page-home #hero.home-hero::after {
  position: absolute;
  z-index: -1;
  right: -160px;
  bottom: -240px;
  width: 620px;
  height: 620px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 50%;
  content: "";
  box-shadow: 0 0 0 80px rgba(255, 255, 255, 0.025), 0 0 0 160px rgba(255, 255, 255, 0.018);
}

.home-hero-copy {
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px !important;
  color: #cfeaff !important;
  font-size: 0.8rem !important;
  font-weight: 780;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
}

.hero-eyebrow > span {
  width: 24px;
  height: 2px;
  border-radius: 99px;
  background: var(--ev-accent);
}

body.page-home #hero h1 {
  max-width: 16.5ch;
  margin: 0 0 22px;
  color: #fff;
  font-size: clamp(2.55rem, 4.5vw, 3.95rem);
  font-weight: 790;
  letter-spacing: -0.052em;
  line-height: 1.04;
  text-shadow: none;
}

body.page-home #hero .translate-sub-title {
  max-width: 61ch;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.08rem;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

body.page-home #hero .hero-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  padding: 12px 19px;
  border-radius: 10px;
  font-size: 0.96rem;
}

body.page-home #hero .hero-actions .btn-primary {
  border-color: var(--ev-accent);
  background: var(--ev-accent);
  color: #172334;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.17);
}

body.page-home #hero .hero-actions .btn-primary:hover,
body.page-home #hero .hero-actions .btn-primary:focus {
  border-color: #ff9a4f;
  background: #ff9a4f;
  color: #172334;
}

body.page-home #hero .hero-actions .btn-light {
  border-color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: none;
}

body.page-home #hero .hero-actions .btn-light:hover,
body.page-home #hero .hero-actions .btn-light:focus {
  border-color: #fff;
  background: #fff;
  color: var(--ev-brand-deep);
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  margin: 28px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  list-style: none;
}

.hero-proof li {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.84rem;
  font-weight: 650;
}

.hero-proof i {
  color: #ffad70;
}

.hero-quick-card {
  position: relative;
  z-index: 1;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--ev-radius-lg);
  background: rgba(5, 41, 68, 0.66);
  box-shadow: 0 24px 60px rgba(2, 25, 43, 0.32);
  backdrop-filter: blur(14px);
}

.hero-quick-card .hero-card-kicker {
  color: #ffb37c;
}

.hero-quick-card h2 {
  margin: 0 0 18px;
  color: #fff;
  font-size: 1.55rem;
}

.hero-quick-link {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 12px;
  margin-top: 9px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  color: #fff !important;
  text-decoration: none;
  transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.hero-quick-link:hover,
.hero-quick-link:focus {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.13);
  transform: translateX(2px);
}

.hero-quick-link > span:nth-child(2) {
  min-width: 0;
}

.hero-quick-link strong,
.hero-quick-link small {
  display: block;
}

.hero-quick-link strong {
  font-size: 0.92rem;
  line-height: 1.35;
}

.hero-quick-link small {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.76rem;
  line-height: 1.45;
}

.hero-quick-icon {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(255, 122, 26, 0.16);
  color: #ffb37c;
  font-size: 1.05rem;
}

/* Homepage sections */
body.page-home #tutor-kami {
  background: var(--ev-surface);
}

body.page-home .home-tutor-grid > [class*="col-"] {
  display: flex;
}

.home-guidance-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-top: 42px;
  padding: 30px 34px;
  border: 1px solid #cfe0ec;
  border-radius: var(--ev-radius-lg);
  background: linear-gradient(120deg, #edf6fb, #f8fbfd);
}

.home-guidance-card h3 {
  margin: 0 0 7px;
  font-size: 1.5rem;
}

.home-guidance-card p {
  max-width: 72ch;
  margin: 0;
  color: var(--ev-muted);
}

.home-guidance-card .btn {
  flex: 0 0 auto;
}

.home-latest-posts {
  border-top: 1px solid var(--ev-line);
  background: var(--ev-canvas);
}

/* Tutor cards */
body.site-public .card-ai {
  position: relative;
  display: flex !important;
  overflow: hidden;
  flex: 1;
  flex-direction: column;
  width: 100%;
  min-height: 100%;
  margin: 0 0 20px;
  border: 1px solid var(--ev-line);
  border-radius: var(--ev-radius);
  background: var(--ev-surface);
  box-shadow: var(--ev-shadow-sm);
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

body.site-public .card-ai:hover {
  border-color: #b9d2e4;
  box-shadow: var(--ev-shadow);
  transform: translateY(-3px);
}

body.site-public .card-ai .card-ai-image {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1 / 1.04;
  background: #dfeaf1;
}

body.site-public .card-ai .card-ai-image a {
  display: block;
  width: 100%;
  height: 100%;
}

body.site-public .card-ai .card-ai-image img {
  display: block;
  width: 100%;
  min-width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.3s ease;
}

body.site-public .card-ai:hover .card-ai-image img {
  transform: scale(1.025);
}

body.site-public .card-ai .card-ai-bottom {
  position: relative !important;
  inset: auto !important;
  display: flex !important;
  align-items: stretch;
  justify-content: flex-start;
  flex: 1;
  flex-direction: column;
  min-height: 178px;
  padding: 19px !important;
  background: var(--ev-surface) !important;
  text-align: left;
  transform: none !important;
}

body.site-public .card-ai .card-ai-name {
  margin: 0 0 7px;
}

body.site-public .card-ai .card-ai-name h3,
body.site-public .card-ai .card-ai-name strong {
  display: block;
  min-height: 0;
  margin: 0;
  color: var(--ev-ink) !important;
  font-size: 1.03rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.38;
  text-align: left;
}

body.site-public .card-ai .card-ai-job {
  margin: 0 0 17px;
}

body.site-public .card-ai .card-ai-job span,
body.site-public .card-ai .card-ai-job.text-muted span {
  display: block;
  color: var(--ev-muted) !important;
  font-size: 0.86rem;
  line-height: 1.55;
  text-align: left;
}

body.site-public .card-ai .card-ai-bottom > a:last-of-type {
  display: block;
  margin-top: auto;
  text-decoration: none;
}

body.site-public .card-ai .start-chat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 42px;
  margin: 0;
  padding: 9px 13px;
  border-radius: 9px;
  font-size: 0.88rem;
}

body.site-public .card-ai .card-ai-category {
  display: none !important;
}

body.site-public .card-ai .vip-card,
body.site-public .card-ai [class*="vip"] {
  z-index: 2;
}

/* Category cards and crawlable filter */
body.site-public .wrapper-category {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

body.site-public .wrapper-category-item {
  min-width: 0;
  padding: 17px 12px;
  border: 1px solid var(--ev-line);
  border-radius: 12px;
  background: var(--ev-surface);
  box-shadow: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

body.site-public .wrapper-category-item:hover {
  border-color: #accadd;
  box-shadow: var(--ev-shadow-sm);
  transform: translateY(-2px);
}

body.site-public .wrapper-category-item a {
  color: var(--ev-ink);
}

body.site-public .wrapper-category-item img {
  width: 52px;
  height: 52px;
  max-width: 52px;
  max-height: 52px;
  object-fit: contain;
  opacity: 0.92;
}

body.site-public .wrapper-category-item span {
  min-height: 0;
  margin-top: 10px;
  color: var(--ev-ink);
  font-size: 0.82rem;
  font-weight: 700;
}

.category-chip-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 25px 0 38px;
  padding: 15px;
  border: 1px solid var(--ev-line);
  border-radius: var(--ev-radius);
  background: var(--ev-surface);
}

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid var(--ev-line);
  border-radius: 99px;
  background: var(--ev-surface);
  color: var(--ev-ink-soft) !important;
  font-size: 0.82rem;
  font-weight: 680;
  line-height: 1.25;
  text-decoration: none;
  white-space: nowrap;
}

.category-chip small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 21px;
  height: 21px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--ev-surface-soft);
  color: var(--ev-muted);
  font-size: 0.68rem;
}

.category-chip:hover,
.category-chip:focus,
.category-chip.active {
  border-color: var(--ev-brand);
  background: var(--ev-brand-light);
  color: var(--ev-brand-strong) !important;
}

.category-chip.active small {
  background: var(--ev-brand);
  color: #fff;
}

.catalog-intro {
  margin-bottom: 4px;
}

.category-intro {
  max-width: 820px;
}

.catalog-note {
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) minmax(0, 1.4fr);
  gap: 34px;
  margin-top: 34px;
  padding: 32px;
  border: 1px solid var(--ev-line);
  border-radius: var(--ev-radius-lg);
  background: var(--ev-surface-soft);
}

.catalog-note h2 {
  margin: 0;
  font-size: 1.7rem;
}

.catalog-note-copy p {
  margin-bottom: 12px;
  color: var(--ev-muted);
}

.catalog-empty-state {
  padding: 54px 34px;
  border: 1px solid var(--ev-line);
  border-radius: var(--ev-radius-lg);
  background: var(--ev-surface);
  box-shadow: var(--ev-shadow-sm);
  text-align: center;
}

.empty-state-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  margin-bottom: 18px;
  border-radius: 18px;
  background: var(--ev-brand-light);
  color: var(--ev-brand);
  font-size: 1.55rem;
}

.catalog-empty-state h2 {
  margin-bottom: 10px;
  font-size: 1.65rem;
}

.catalog-empty-state p {
  max-width: 62ch;
  margin: 0 auto 22px;
  color: var(--ev-muted);
}

/* Page title band */
body.site-public #inner-page,
body.site-public .toefl-inner-page {
  padding: 42px 0;
  border: 0;
  background: linear-gradient(120deg, var(--ev-brand-deep), var(--ev-brand));
}

body.site-public #inner-page h1,
body.site-public #inner-page h3 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.8rem, 3.4vw, 2.7rem);
  line-height: 1.16;
}

body.site-public #inner-page .inner-page-kicker,
body.site-public #inner-page .toefl-eyebrow {
  margin-bottom: 9px;
  color: #bfe4ff;
}

.inner-page-summary {
  display: grid;
  gap: 2px;
  padding: 17px 19px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.inner-page-summary strong,
.inner-page-summary span,
.inner-page-summary a {
  color: #fff;
}

.inner-page-summary strong {
  font-size: 1rem;
}

.inner-page-summary span,
.inner-page-summary a {
  font-size: 0.82rem;
  opacity: 0.8;
}

.inner-page-summary a {
  color: #d9efff !important;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.45);
}

/* Blog archive */
body.page-blog-index > main > section.py-4,
body.page-blog-index > main > section.py-5 {
  padding-top: 62px !important;
  padding-bottom: 72px !important;
  background: var(--ev-canvas);
}

body.page-blog-index .wrapper-card-post,
body.page-home .wrapper-card-post {
  display: flex;
  overflow: hidden;
  height: calc(100% - 22px);
  margin-bottom: 22px;
  border: 1px solid var(--ev-line);
  border-radius: var(--ev-radius);
  background: var(--ev-surface);
  box-shadow: var(--ev-shadow-sm);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

body.page-blog-index .wrapper-card-post:hover,
body.page-home .wrapper-card-post:hover {
  border-color: #b9d2e4;
  box-shadow: var(--ev-shadow);
  transform: translateY(-3px);
}

body.site-public .wrapper-card-post .card-post-image {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  background: #e7eef3;
}

body.site-public .wrapper-card-post .card-post-image a {
  position: absolute;
  inset: 0;
  display: block;
}

body.site-public .wrapper-card-post .card-post-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

body.site-public .wrapper-card-post:hover .card-post-image img {
  transform: scale(1.025);
}

body.site-public .wrapper-card-post .card-post-content {
  align-items: stretch;
  justify-content: flex-start;
  flex: 1;
  padding: 20px;
  text-align: left;
}

body.site-public .wrapper-card-post .card-post-content-info {
  display: flex;
  flex: 1;
  flex-direction: column;
}

body.site-public .wrapper-card-post .card-post-title {
  margin-bottom: 10px;
}

body.site-public .wrapper-card-post .card-post-title h2,
body.site-public .wrapper-card-post .card-post-title h3 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.38;
}

body.site-public .wrapper-card-post .card-post-title :where(h2, h3) a,
body.site-public .wrapper-card-post .card-post-title > :where(h2, h3) > a {
  display: -webkit-box;
  min-height: 0;
  overflow: hidden;
  color: var(--ev-ink);
  font-size: inherit;
  line-height: inherit;
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

body.site-public .wrapper-card-post .card-post-title a:hover {
  color: var(--ev-brand);
}

body.site-public .wrapper-card-post .card-post-resume p {
  display: -webkit-box;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  color: var(--ev-muted);
  font-size: 0.92rem;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

body.site-public .wrapper-card-post .card-blog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--ev-line);
}

body.site-public .card-post-content-date,
body.site-public .card-post-author {
  color: var(--ev-muted);
  font-size: 0.76rem;
}

body.site-public .card-post-cta {
  margin: 0;
}

body.site-public .card-post-cta a,
body.site-public .card-post-cta .btn {
  font-size: 0.79rem;
  text-decoration: none;
}

body.site-public .card-post-cta .btn {
  min-height: 36px;
  padding: 7px 11px;
}

body.site-public .blog-pagination {
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 26px;
}

body.site-public .blog-pagination .page-link {
  min-width: 40px;
  border: 1px solid var(--ev-line);
  border-radius: 9px !important;
  color: var(--ev-brand);
  text-align: center;
}

body.site-public .blog-pagination .active .page-link {
  border-color: var(--ev-brand);
  background: var(--ev-brand);
  color: #fff;
}

/* Article reading layout */
body.page-blog-post .blog-post-section {
  padding-top: 60px !important;
  padding-bottom: 76px !important;
  background: var(--ev-surface);
}

body.page-blog-post .blog-container {
  max-width: var(--ev-container);
  padding-top: 0;
}

body.page-blog-post .blog-post-hero h1 {
  max-width: 18ch;
  margin-bottom: 12px;
  color: var(--ev-ink);
  font-size: clamp(2rem, 4.6vw, 3.35rem);
  line-height: 1.09;
}

body.page-blog-post .blog-post-article {
  padding-right: 0 !important;
  padding-left: 0 !important;
}

body.page-blog-post .blog-post-meta {
  color: var(--ev-muted);
  font-size: 0.88rem;
}

body.page-blog-post .post-cover > img {
  width: 100%;
  border: 1px solid var(--ev-line);
  border-radius: var(--ev-radius-lg);
  background: var(--ev-surface-soft);
  box-shadow: var(--ev-shadow-sm);
}

body.page-blog-post .share-post {
  margin-top: 18px;
  padding: 13px 0;
  border-bottom: 1px solid var(--ev-line);
}

body.page-blog-post .wrapper-share-post {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

body.page-blog-post .share-post-label {
  color: var(--ev-muted);
  font-size: 0.84rem;
  font-weight: 700;
}

body.page-blog-post .share-post-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

body.page-blog-post .share-post-icons span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--ev-line);
  border-radius: 9px;
  background: var(--ev-surface);
  color: var(--ev-brand);
  cursor: pointer;
}

body.page-blog-post .post-content {
  max-width: var(--ev-reading);
  color: var(--ev-ink-soft);
  font-size: 1.05rem;
  line-height: 1.82;
}

body.page-blog-post .post-content p,
body.page-blog-post .post-content li {
  color: var(--ev-ink-soft);
  font-size: inherit;
  line-height: inherit;
}

body.page-blog-post .post-content :where(h2, h3, h4) {
  scroll-margin-top: 105px;
  color: var(--ev-ink);
}

body.page-blog-post .post-content h2 {
  margin: 2.1em 0 0.65em;
  font-size: 1.72rem;
}

body.page-blog-post .post-content h3 {
  margin: 1.7em 0 0.6em;
  font-size: 1.35rem;
}

body.page-blog-post .post-content a {
  font-weight: 620;
}

body.page-blog-post .post-content :where(img, video, iframe) {
  max-width: 100%;
  border-radius: 12px;
}

body.page-blog-post .post-content blockquote {
  margin: 1.5rem 0;
  padding: 18px 22px;
  border-left: 4px solid var(--ev-accent);
  border-radius: 0 12px 12px 0;
  background: var(--ev-surface-soft);
}

body.page-blog-post .post-content table,
body.page-standard .page-content table {
  width: 100%;
  border-collapse: collapse;
  background: var(--ev-surface);
}

body.page-blog-post .post-content :where(th, td),
body.page-standard .page-content :where(th, td) {
  padding: 11px 13px;
  border: 1px solid var(--ev-line);
  vertical-align: top;
}

body.page-blog-post .post-content th,
body.page-standard .page-content th {
  background: var(--ev-surface-soft);
  color: var(--ev-ink);
}

body.page-blog-post .ev-content-notice {
  border-radius: 12px;
}

body.page-blog-post .blog-sidebar-col {
  padding-left: 18px;
}

body.page-blog-post .blog-sidebar-widget,
body.page-blog-post .blog-sidebar {
  margin-bottom: 18px;
  padding: 20px;
  border: 1px solid var(--ev-line);
  border-radius: var(--ev-radius);
  background: var(--ev-surface);
  box-shadow: var(--ev-shadow-sm);
}

body.page-blog-post .blog-sidebar-title {
  margin-bottom: 14px;
  color: var(--ev-ink);
  font-size: 1rem;
  font-weight: 760;
}

body.page-blog-post .latest-post-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--ev-line);
}

body.page-blog-post .latest-post-item:last-child {
  border-bottom: 0;
}

body.page-blog-post .post-tag-chip,
body.page-blog-post .blog-category-list .btn {
  border: 1px solid var(--ev-line);
  background: var(--ev-surface-soft);
  color: var(--ev-brand);
}

body.page-blog-post .blog-related-section {
  margin-top: 38px;
  padding-top: 30px;
  border-top: 1px solid var(--ev-line);
}

body.page-blog-post .blog-related-card {
  overflow: hidden;
  border: 1px solid var(--ev-line);
  border-radius: var(--ev-radius);
  background: var(--ev-surface);
  box-shadow: none;
}

/* Generic database-driven pages */
body.page-standard .page-content-section {
  padding-top: 66px;
  padding-bottom: 78px;
  background: var(--ev-surface);
}

body.page-standard .page-content {
  max-width: 1040px;
  margin: 0 auto;
  color: var(--ev-ink-soft);
  font-size: 1.02rem;
  line-height: 1.78;
}

body.page-standard .page-content > :first-child {
  margin-top: 0;
}

body.page-standard .page-content :where(h1, h2, h3, h4, h5, h6):empty {
  display: none;
}

body.page-standard .page-content h2 {
  margin: 2em 0 0.7em;
  font-size: clamp(1.55rem, 2.8vw, 2rem);
}

body.page-standard .page-content h3 {
  margin: 1.7em 0 0.6em;
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
}

body.page-standard .page-content p,
body.page-standard .page-content li {
  color: var(--ev-ink-soft);
  line-height: 1.78;
}

body.page-standard .page-content a:not(.btn) {
  font-weight: 620;
  overflow-wrap: anywhere;
}

body.page-standard .page-content :where(img, video, iframe) {
  max-width: 100%;
  border-radius: 12px;
}

body.page-standard .page-content :where(.card, .alert, .well) {
  border-color: var(--ev-line);
  border-radius: var(--ev-radius);
}

body.page-standard .page-content blockquote {
  padding: 18px 22px;
  border-left: 4px solid var(--ev-accent);
  border-radius: 0 12px 12px 0;
  background: var(--ev-surface-soft);
}

/* Pricing */
body.page-pricing .pricing {
  background: var(--ev-canvas);
}

body.page-pricing .pricing > .container > p {
  max-width: 75ch;
  margin: -4px auto 30px;
  color: var(--ev-muted);
  text-align: center;
}

body.page-pricing .pricing .card {
  overflow: hidden;
  border: 1px solid var(--ev-line);
  border-radius: var(--ev-radius-lg);
  background: var(--ev-surface);
  box-shadow: var(--ev-shadow-sm);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

body.page-pricing .pricing .card:hover {
  border-color: #b8cfdf;
  box-shadow: var(--ev-shadow);
  transform: translateY(-3px);
}

body.page-pricing .pricing .card-body {
  padding: 30px 26px;
}

body.page-pricing .card-price-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 96px;
  margin-bottom: 14px;
}

body.page-pricing .card-price-thumb img {
  width: auto;
  max-width: 100%;
  max-height: 82px;
  object-fit: contain;
}

body.page-pricing .pricing .card-title {
  color: var(--ev-muted) !important;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
}

body.page-pricing .pricing .card-price {
  color: var(--ev-ink);
  font-size: clamp(2.35rem, 5vw, 3.2rem);
  font-weight: 500;
  letter-spacing: -0.05em;
}

body.page-pricing .pricing hr {
  border-color: var(--ev-line);
  opacity: 1;
}

body.page-pricing .pricing ul {
  padding-left: 1.25rem;
}

body.page-pricing .pricing ul li {
  margin-bottom: 12px;
  color: var(--ev-ink-soft);
  font-size: 0.91rem;
}

body.page-pricing .pricing .purchase-btn {
  border-radius: 10px;
  letter-spacing: 0.04em;
}

body.page-pricing [itemprop="availability"] {
  padding: 9px 18px;
  border-top: 1px solid var(--ev-line);
  background: #effaf5;
  color: var(--ev-success);
  font-size: 0.78rem;
  font-weight: 750;
  text-align: center;
}

.pricing-guidance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 30px;
  border: 1px solid var(--ev-line);
  border-radius: var(--ev-radius-lg);
  background: var(--ev-surface-soft);
}

.pricing-guidance h3,
.pricing-guidance p {
  margin: 0;
}

.pricing-guidance h3 {
  margin-bottom: 5px;
  font-size: 1.35rem;
}

/* Chat shell: appearance only; interaction and business logic stay intact. */
body.page-chat {
  background: var(--ev-canvas);
}

body.page-chat .chat-background {
  overflow: hidden;
  border: 1px solid var(--ev-line);
  border-radius: var(--ev-radius-lg);
  background: var(--ev-surface);
  box-shadow: var(--ev-shadow);
}

body.page-chat .ai-contacts-top,
body.page-chat .ai-chat-top {
  min-height: 86px;
  border-color: var(--ev-line);
  background: var(--ev-surface);
}

body.page-chat .ai-contacts-item-active {
  background: var(--ev-brand-light);
}

body.page-chat .ai-contacts-item:hover {
  background: var(--ev-surface-soft);
}

body.page-chat .chat-input,
body.page-chat textarea {
  border-color: var(--ev-line-strong);
  border-radius: 12px;
}

/* TOEFL schedule: harmonize the large standalone page with the main site. */
body.page-schedule .toefl-schedule-page {
  background: var(--ev-canvas);
}

body.page-schedule .toefl-schedule-page > .container {
  padding-top: 48px;
  padding-bottom: 68px;
}

body.page-schedule .toefl-page-nav {
  gap: 7px;
}

body.page-schedule .toefl-page-nav .btn {
  min-height: 38px;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: none;
}

body.page-schedule .toefl-page-nav .btn:hover,
body.page-schedule .toefl-page-nav .btn:focus,
body.page-schedule .toefl-page-nav .btn.primary {
  border-color: #fff;
  background: #fff;
  color: var(--ev-brand-deep);
}

body.page-schedule .toefl-schedule-page :where(.card, .cardWhite, .heroCallout) {
  border-color: var(--ev-line);
  border-radius: var(--ev-radius);
  box-shadow: var(--ev-shadow-sm);
}

body.page-schedule .toefl-schedule-page .cardWhite {
  background: var(--ev-surface);
}

body.page-schedule .toefl-schedule-page .sectionTitle,
body.page-schedule .toefl-schedule-page .toefl-hero-title {
  color: var(--ev-ink);
  letter-spacing: -0.03em;
}

body.page-schedule .toefl-schedule-page .grid {
  margin-top: 22px;
}

body.page-schedule .reviewerMonogram {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--ev-brand-deep), var(--ev-brand));
  color: #fff;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

/* Footer */
body.site-public .site-footer {
  padding: 64px 0 0;
  border-top: 0;
  background: #072f4d;
  color: #fff;
}

body.site-public .site-footer-grid {
  row-gap: 36px;
  padding-bottom: 48px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 16px;
  color: #fff !important;
  font-size: 1.3rem;
  font-weight: 780;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.footer-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--ev-accent);
  color: #10233f;
  font-size: 0.85rem;
  font-weight: 850;
}

body.site-public .site-footer .footer-resume {
  max-width: 45ch;
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.87rem;
  line-height: 1.72;
}

body.site-public .site-footer .footer-address {
  display: grid;
  gap: 8px;
  margin: 19px 0 0;
  font-style: normal;
}

body.site-public .site-footer .footer-address a {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: rgba(255, 255, 255, 0.77);
  font-size: 0.84rem;
  line-height: 1.5;
  text-decoration: none;
}

body.site-public .site-footer .footer-address a:hover {
  color: #fff;
  text-decoration: underline;
}

body.site-public .site-footer .footer-address i {
  margin-top: 2px;
  color: #ffad70;
}

.footer-social {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff !important;
  text-decoration: none;
}

.footer-social a:hover {
  background: rgba(255, 255, 255, 0.14);
}

body.site-public .site-footer .footer-heading {
  margin-bottom: 16px;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

body.site-public .footer-link-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

body.site-public .footer-link-list a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.87rem;
  line-height: 1.45;
  text-decoration: none;
}

body.site-public .footer-link-list a:hover,
body.site-public .footer-link-list a:focus {
  color: #fff !important;
  text-decoration: underline;
  text-decoration-color: var(--ev-accent);
  text-underline-offset: 4px;
}

.footer-bottom {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 20px;
  min-height: 72px;
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-bottom p {
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.78rem;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.footer-legal a {
  color: rgba(255, 255, 255, 0.67) !important;
  font-size: 0.78rem;
  text-decoration: none;
}

.footer-legal a:hover {
  color: #fff !important;
  text-decoration: underline;
}

body.site-public .back-to-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
}

body.site-public .back-to-top:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* Dark mode */
body.site-public.dark-mode {
  --ev-canvas: #0b1420;
  --ev-surface: #111e2c;
  --ev-surface-soft: #162636;
  --ev-ink: #edf4fa;
  --ev-ink-soft: #ced9e3;
  --ev-muted: #a8b7c5;
  --ev-brand: #55aef0;
  --ev-brand-strong: #7dc3f5;
  --ev-brand-deep: #092f4d;
  --ev-brand-light: #15344d;
  --ev-line: #26394b;
  --ev-line-strong: #395066;
  --ev-shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.2);
  --ev-shadow: 0 20px 50px rgba(0, 0, 0, 0.32);
  background: var(--ev-canvas) !important;
  color: var(--ev-ink);
}

body.site-public.dark-mode :where(.bg-white, .page-content-section, .blog-post-section) {
  background-color: var(--ev-surface) !important;
}

body.site-public.dark-mode .site-breadcrumb,
body.site-public.dark-mode .wrapper-card-post,
body.site-public.dark-mode .card-ai,
body.site-public.dark-mode .category-chip-nav,
body.site-public.dark-mode .category-chip,
body.site-public.dark-mode .wrapper-category-item,
body.site-public.dark-mode .catalog-empty-state,
body.site-public.dark-mode .pricing .card,
body.site-public.dark-mode .blog-sidebar,
body.site-public.dark-mode .blog-sidebar-widget {
  background: var(--ev-surface);
  color: var(--ev-ink);
}

body.site-public.dark-mode .home-guidance-card,
body.site-public.dark-mode .catalog-note,
body.site-public.dark-mode blockquote {
  background: var(--ev-surface-soft);
}

body.site-public.dark-mode .btn-outline-primary {
  background: var(--ev-surface);
  color: var(--ev-brand-strong);
}

body.site-public.dark-mode :where(input, select, textarea, .form-control, .form-select) {
  background-color: var(--ev-surface) !important;
  color: var(--ev-ink) !important;
}

body.site-public.dark-mode .card-ai .card-ai-bottom {
  background: var(--ev-surface) !important;
}

body.site-public.dark-mode .pricing [itemprop="availability"] {
  background: #102d27;
  color: #6fd5ae;
}

/* Responsive behavior */
@media (max-width: 1199px) {
  body.site-public .site-brand #logo {
    max-width: 164px;
  }

  body.site-public .primary-menu .nav-link {
    padding-right: 7px;
    padding-left: 7px;
    font-size: 0.79rem;
  }

  body.site-public .primary-menu .site-nav-cta .nav-link {
    padding-right: 10px;
    padding-left: 10px;
  }
}

@media (min-width: 992px) {
  body.site-public .navbar-expand-lg .custom-toggler {
    display: none;
  }
}

@media (max-width: 991px) {
  html {
    scroll-padding-top: 80px;
  }

  body.site-public .site-header,
  body.site-public .site-header.sticky-header {
    padding: 8px 0;
  }

  body.site-public .site-brand #logo {
    max-width: 168px;
    max-height: 48px;
  }

  body.site-public .offcanvas-custom {
    width: min(88vw, 350px);
    border-left: 1px solid var(--ev-line);
    background: var(--ev-surface);
    color: var(--ev-ink);
  }

  body.site-public .offcanvas-custom .offcanvas-header {
    padding: 20px;
    border-bottom: 1px solid var(--ev-line);
  }

  body.site-public .offcanvas-custom .offcanvas-title {
    color: var(--ev-ink);
    font-size: 1rem;
    font-weight: 760;
  }

  body.site-public .offcanvas-custom .btn-close {
    position: relative;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 9px;
    background: var(--ev-surface-soft) !important;
    opacity: 1;
  }

  body.site-public .offcanvas-custom .btn-close::before,
  body.site-public .offcanvas-custom .btn-close::after {
    position: absolute;
    top: 17px;
    left: 10px;
    width: 16px;
    height: 2px;
    border-radius: 99px;
    background: var(--ev-ink);
    content: "";
  }

  body.site-public .offcanvas-custom .btn-close::before {
    transform: rotate(45deg);
  }

  body.site-public .offcanvas-custom .btn-close::after {
    transform: rotate(-45deg);
  }

  body.site-public .offcanvas-custom .offcanvas-body {
    padding: 16px 20px 24px;
  }

  body.site-public .offcanvas-custom .primary-menu {
    align-items: stretch;
    gap: 5px;
  }

  body.site-public .offcanvas-custom .primary-menu .nav-link {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    background: transparent !important;
    color: var(--ev-ink) !important;
    font-size: 0.92rem;
    white-space: normal;
  }

  body.site-public .offcanvas-custom .primary-menu .nav-link-effect:hover,
  body.site-public .offcanvas-custom .primary-menu .nav-link-effect:focus,
  body.site-public .offcanvas-custom .primary-menu .nav-link-effect.active {
    background: var(--ev-brand-light) !important;
    color: var(--ev-brand-strong) !important;
  }

  body.site-public .offcanvas-custom .primary-menu .nav-link-effect.active {
    box-shadow: inset 3px 0 0 var(--ev-brand);
  }

  body.site-public .offcanvas-custom .primary-menu .site-nav-cta {
    margin: 5px 0 0;
  }

  body.site-public .offcanvas-custom .primary-menu .site-nav-cta .nav-link {
    justify-content: center;
  }

  body.site-public .offcanvas-custom .primary-menu .btn-sign-up {
    border-color: var(--ev-line-strong);
    background: var(--ev-surface-soft) !important;
    color: var(--ev-brand-strong) !important;
  }

  body.site-public .offcanvas-custom .primary-menu .btn-sign-in {
    border-color: var(--ev-accent);
    background: var(--ev-accent) !important;
    color: #172334 !important;
  }

  body.page-home #hero.home-hero {
    padding: 68px 0;
  }

  body.page-home #hero h1 {
    max-width: 15ch;
  }

  .hero-quick-card {
    max-width: 680px;
  }

  body.site-public .wrapper-category {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .catalog-note {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  body.page-blog-post .blog-sidebar-col {
    margin-top: 30px;
    padding-left: 12px;
  }

  body.page-blog-post .blog-sidebar-widget,
  body.page-blog-post .blog-sidebar {
    max-width: var(--ev-reading);
  }

  body.page-schedule #inner-page .row {
    gap: 22px;
  }

  body.page-schedule .toefl-page-nav {
    justify-content: flex-start;
  }

  .footer-brand-column {
    padding-bottom: 8px;
  }
}

@media (max-width: 767px) {
  body.site-public .container {
    width: min(100% - 28px, var(--ev-container));
  }

  .section-spacing {
    padding-top: 54px;
    padding-bottom: 54px;
  }

  body.site-public .default-title {
    font-size: 1.75rem;
  }

  .section-lead {
    font-size: 0.98rem;
  }

  .site-breadcrumb ol {
    min-height: 38px;
    font-size: 0.76rem;
  }

  body.page-home #hero.home-hero {
    padding: 54px 0 58px;
    background-position: 35% center;
  }

  body.page-home #hero.home-hero::before {
    background: linear-gradient(180deg, rgba(4, 42, 72, 0.97) 0%, rgba(6, 67, 108, 0.94) 100%);
  }

  body.page-home #hero h1 {
    max-width: none;
    margin-bottom: 18px;
    font-size: clamp(2.25rem, 10vw, 3.2rem);
    line-height: 1.05;
  }

  body.page-home #hero .translate-sub-title {
    font-size: 1rem;
    line-height: 1.7;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  body.page-home #hero .hero-actions .btn {
    width: 100%;
  }

  .hero-proof {
    gap: 10px 16px;
    margin-top: 24px;
    padding-top: 17px;
  }

  .hero-proof li {
    font-size: 0.78rem;
  }

  .hero-quick-card {
    padding: 21px;
    border-radius: 17px;
  }

  .hero-quick-card h2 {
    font-size: 1.35rem;
  }

  .home-guidance-card,
  .pricing-guidance {
    align-items: flex-start;
    flex-direction: column;
    padding: 25px;
  }

  .home-guidance-card .btn,
  .pricing-guidance .btn {
    width: 100%;
  }

  body.site-public .wrapper-category {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .category-chip-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    margin: 20px -14px 32px;
    padding: 13px 14px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    scrollbar-width: thin;
  }

  .category-chip {
    flex: 0 0 auto;
  }

  body.site-public #inner-page,
  body.site-public .toefl-inner-page {
    padding: 32px 0;
  }

  body.site-public #inner-page h1,
  body.site-public #inner-page h3 {
    font-size: 1.85rem;
  }

  .inner-page-summary {
    margin-top: 18px;
  }

  body.page-blog-index > main > section.py-4,
  body.page-blog-index > main > section.py-5 {
    padding-top: 48px !important;
    padding-bottom: 56px !important;
  }

  body.site-public .wrapper-card-post .card-blog-footer {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  body.page-blog-post .blog-post-section {
    padding-top: 42px !important;
    padding-bottom: 56px !important;
  }

  body.page-blog-post .blog-post-hero h1 {
    max-width: none;
    font-size: 2rem;
    line-height: 1.15;
  }

  body.page-blog-post .post-content {
    font-size: 1rem;
    line-height: 1.76;
  }

  body.page-blog-post .post-content h2 {
    font-size: 1.45rem;
  }

  body.page-blog-post .post-content h3 {
    font-size: 1.22rem;
  }

  body.page-standard .page-content-section {
    padding-top: 48px;
    padding-bottom: 58px;
  }

  body.page-standard .page-content {
    font-size: 1rem;
    line-height: 1.74;
  }

  body.page-standard .page-content .ev-table-scroll,
  body.page-blog-post .post-content .ev-table-scroll {
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
  }

  body.page-pricing .pricing .card-body {
    padding: 25px 21px;
  }

  body.page-schedule .toefl-schedule-page > .container {
    padding-top: 34px;
    padding-bottom: 50px;
  }

  body.page-schedule .toefl-page-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  body.page-schedule .toefl-page-nav .btn {
    width: 100%;
  }

  body.site-public .site-footer {
    padding-top: 50px;
  }

  body.site-public .site-footer-grid {
    padding-bottom: 38px;
  }

  .footer-bottom {
    grid-template-columns: 1fr auto;
  }

  .footer-bottom p {
    grid-column: 1 / -1;
  }
}

@media (max-width: 575px) {
  body.site-public .site-brand #logo {
    max-width: 150px;
    max-height: 44px;
  }

  body.site-public .site-nav-col {
    gap: 7px;
  }

  body.site-public .theme-icon,
  body.site-public .custom-toggler {
    width: 40px;
    height: 40px;
    min-width: 40px;
  }

  .hero-eyebrow {
    font-size: 0.72rem !important;
    letter-spacing: 0.075em;
  }

  .hero-proof {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .hero-quick-link {
    grid-template-columns: 38px minmax(0, 1fr) 18px;
    padding: 11px;
  }

  .hero-quick-icon {
    width: 38px;
    height: 38px;
  }

  .catalog-note,
  .catalog-empty-state {
    padding: 24px 20px;
  }

  body.site-public .wrapper-card-post .card-post-content {
    padding: 18px;
  }

  body.page-blog-post .share-post-icons span {
    width: 34px;
    height: 34px;
  }

  .footer-legal {
    gap: 10px 13px;
  }
}

/* 404 recovery page */
body.site-public .ev-error-page {
  margin: 0 !important;
  padding-block: clamp(64px, 9vw, 112px) !important;
  background:
    radial-gradient(circle at 50% 0%, rgba(31, 111, 235, 0.12), transparent 38%),
    var(--ev-surface-soft);
}

body.site-public .ev-error-page .container {
  max-width: 900px;
}

body.site-public .ev-error-page h1 {
  color: var(--ev-navy-900);
}

body.site-public .ev-error-page img {
  width: min(100%, 360px);
  max-height: 250px;
}

body.site-public .ev-error-links {
  max-width: 620px;
  padding: 22px;
  border: 1px solid var(--ev-border);
  border-radius: var(--ev-radius-lg);
  background: var(--ev-surface);
  box-shadow: var(--ev-shadow-sm);
}

body.site-public .ev-error-links .btn-light {
  color: var(--ev-blue-700);
  border: 1px solid var(--ev-border-strong);
  background: var(--ev-blue-50);
}

body.dark-mode.site-public .ev-error-page,
body[data-theme="dark"].site-public .ev-error-page {
  background: var(--ev-surface-soft);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
