/* ETO home page (front-page.php). Loads after list.css (cards, chips) and quiz.css (the question card). */
.eto-home { max-width: 1200px; margin: 0 auto; }

/* Hero */
.eto-hero { padding: 12px 0 4px; max-width: 820px; }
.eto-hero__eyebrow { display: inline-flex; margin: 0 0 14px; padding: 4px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-size: 13.5px; font-weight: 650; }
.eto-hero__h1 { margin: 0 0 12px; font-family: var(--font-serif); font-weight: 500; font-size: 46px; line-height: 1.12; letter-spacing: -.02em; }
.eto-hero__lead { margin: 0 0 22px; max-width: 60ch; font-size: 18px; color: var(--text-2); }
.eto-bigsearch { display: flex; gap: 8px; max-width: 680px; }
.eto-bigsearch__field { position: relative; flex: 1; min-width: 0; }
.eto-bigsearch__field .eto-ic { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.eto-bigsearch input { width: 100%; height: 56px; padding: 0 16px 0 46px; border: 1.5px solid var(--line-strong); border-radius: 14px; background: var(--surface); color: var(--text); font: inherit; font-size: 17px; box-shadow: var(--shadow); }
.eto-bigsearch input::placeholder { color: var(--muted); opacity: 1; }
.eto-bigsearch input:focus-visible { outline-offset: 0; border-radius: 14px; }
.eto-bigsearch button { flex: none; min-height: 56px; padding: 0 24px; border: 0; border-radius: 14px; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 16px; box-shadow: 0 2px 0 var(--accent-edge); }
.eto-bigsearch button:hover { background: var(--accent-hover); }
.eto-hero__level { margin: 14px 0 0; max-width: 680px; }
.eto-hero__level a { display: block; padding: 12px 16px; border: 1.5px solid var(--line-strong); border-radius: 14px; background: var(--accent-soft); color: var(--text); text-decoration: none; font-size: 16px; line-height: 1.4; }
.eto-hero__level a:hover { border-color: var(--accent); }
.eto-hero__level strong { color: var(--accent-ink); }
.eto-hero__level-meta { display: block; margin-top: 2px; font-size: 14px; font-weight: 650; color: var(--text-2); }
@media (max-width: 620px) {
	.eto-hero__h1 { font-size: 33px; }
	.eto-hero__lead { font-size: 16.5px; }
	.eto-bigsearch { flex-wrap: wrap; } /* the full placeholder fits: field on its own line, button under it */
	.eto-bigsearch__field { flex-basis: 100%; }
	.eto-bigsearch button { width: 100%; min-height: 48px; }
	.eto-bigsearch input { padding-left: 38px; padding-right: 6px; font-size: 16px; } /* 16px: no zoom on focus in iOS */
	.eto-bigsearch__field .eto-ic { left: 11px; }
}

/* Sections */
.eto-hsec { margin-top: 40px; }
.eto-hsec[hidden] { display: none; }
.eto-hsec__h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.eto-hsec__h h2, .eto-home-band h2 { margin: 0; font-family: var(--font-serif); font-weight: 500; font-size: 26px; line-height: 1.2; }
.eto-hsec__h a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 650; font-size: 15px; text-decoration: none; }
.eto-hsec__h a:hover { text-decoration: underline; }
.eto-home > .eto-ad { margin: 32px 0 0; }
/* Both home ad places keep a 280px ad plus its label at every width (the shared intro place reserves 100px on desktop),
   so a slow ad never pushes the page down and an unfilled one never collapses. */
.eto-home .eto-ad-intro, .eto-home .eto-ad-home { min-height: calc(280px + 22px) !important; }

/* Start by level: the landing chip component, a little larger */
.eto-home-levels { margin: 0; }
.eto-home-lvl { gap: 8px; min-height: 52px; padding: 0 20px; font-size: 15.5px; color: var(--text); }
.eto-home-lvl b { font-family: var(--font-serif); font-size: 21px; font-weight: 600; }
.eto-home-lvl span { color: var(--text-2); }
.eto-home-lvl:hover { border-color: var(--accent-edge); }
/* Phones: Pre-A1 alone on the first row, then three to a row (code above the name), so all seven levels show without scrolling. */
@media (max-width: 620px) {
	.eto-home-levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; overflow: visible; margin-right: 0; padding-right: 0; }
	.eto-home-lvl { flex-direction: column; justify-content: center; gap: 0; min-height: 64px; padding: 6px 8px; border-radius: var(--r); text-align: center; line-height: 1.2; }
	.eto-home-lvl span { font-size: 12.5px; overflow-wrap: anywhere; }
	.eto-home-levels > :first-child { grid-column: 1 / -1; min-height: 52px; flex-direction: row; gap: 8px; }
}

/* Continue where you left off: always one row (scrolls sideways on phones), so its height is known before /me answers */
.eto-home-cont__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; min-height: 100px; margin: 0; padding: 0; list-style: none; }
.eto-home-cont__item { display: flex; flex-direction: column; justify-content: space-between; gap: 6px; min-height: 100px; height: 100%; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--surface); text-decoration: none; }
.eto-home-cont__item:hover { border-color: var(--accent); }
.eto-home-cont__t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.eto-home-cont__m { font-size: 14px; color: var(--muted); }
.eto-home-cont[data-eto-loading] .eto-home-cont__list { background: linear-gradient(90deg, var(--surface-2), var(--surface)); border-radius: var(--r); }
@media (max-width: 767px) {
	.eto-home-cont__list { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
	.eto-home-cont__list > li { flex: 0 0 78%; scroll-snap-align: start; }
}

/* Question of the day: ETO Quiz's card, answered by home.js */
.eto-home .eto-qotd { max-width: 720px; margin: 0; }
.eto-home .eto-qotd .eto-card { margin: 0; border-bottom-width: 4px; border-radius: 18px; padding: 20px; }
.eto-home .eto-qotd .eto-opt[aria-disabled="true"] { cursor: default; }
.eto-home .eto-qotd .eto-opt[aria-disabled="true"]:hover { border-color: var(--eto-line); background: var(--eto-surface); }
.eto-home .eto-qotd .eto-opt.eto-correct[aria-disabled="true"]:hover { border-color: var(--eto-correct); background: var(--eto-correct-bg); }
.eto-home .eto-qotd .eto-opt.eto-bad[aria-disabled="true"]:hover { border-color: var(--eto-wrong); background: var(--eto-wrong-bg); }
.eto-home .eto-qotd .eto-opt[aria-disabled="true"]:hover .eto-opt-l { border-color: var(--eto-line); color: var(--eto-muted); }
.eto-home .eto-qotd .eto-opt.eto-correct[aria-disabled="true"] .eto-opt-l { border-color: var(--eto-correct); background: var(--eto-correct); color: var(--eto-on); }
.eto-home .eto-qotd .eto-opt.eto-bad[aria-disabled="true"] .eto-opt-l { border-color: var(--eto-wrong); background: var(--eto-wrong); color: var(--eto-on); }
.eto-qotd__more { margin: 14px 0 0; }

/* Popular quizzes and new lessons: text cards */
.eto-home-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.eto-home-cards > .eto-lc { height: 100%; }
.eto-home-cards .eto-lc-t { font-size: 17px; }

/* Browse by type */
.eto-home-browse { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.eto-home-browse li { display: flex; flex-direction: column; padding: 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.eto-home-browse__ic { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin: 0 0 12px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); }
.eto-home-browse__more { margin-top: auto; padding-top: 12px; font-weight: 650; font-size: 15px; text-decoration: none; }
.eto-home-browse__more:hover { text-decoration: underline; }
.eto-hic { display: inline-flex; vertical-align: -2px; margin-right: 10px; color: var(--muted); }
.eto-hic .eto-ic { width: 22px; height: 22px; }
.eto-home-browse h3 { margin: 0 0 6px; font-size: 17px; line-height: 1.35; }
.eto-home-browse h3 a { display: inline-flex; align-items: center; min-height: 44px; margin: -10px 0 -6px; text-decoration: underline; text-underline-offset: 3px; }
.eto-home-browse h3 a:hover { text-decoration-thickness: 2px; }
.eto-home-browse p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--text-2); }

/* Honest numbers */
.eto-home-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.eto-home-stats li { display: flex; flex-direction: column; gap: 2px; padding: 18px 20px; border-left: 1px solid var(--line); }
.eto-home-stats li:first-child { border-left: 0; }
.eto-home-stats b { font-family: var(--font-serif); font-weight: 500; font-size: 28px; line-height: 1.15; }
.eto-home-stats span { font-size: 14px; color: var(--text-2); }
@media (max-width: 900px) {
	.eto-home-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.eto-home-stats li { border-left: 0; border-top: 1px solid var(--line); }
	.eto-home-stats li:nth-child(even) { border-left: 1px solid var(--line); }
	.eto-home-stats li:nth-child(-n+2) { border-top: 0; }
	.eto-home-stats li:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* Teacher tools and YouTube: a band with actions */
.eto-home-band { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.eto-home-band > div:first-child { flex: 1 1 320px; }
.eto-home-band p { margin: 8px 0 0; color: var(--text-2); max-width: 60ch; }
.eto-home-band__acts { display: flex; flex-wrap: wrap; gap: 10px; }

/* Buttons */
.eto-home .eto-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 20px; border: 1.5px solid var(--line-strong); border-radius: var(--r); background: var(--surface); color: var(--text); font-weight: 650; font-size: 15.5px; text-decoration: none; box-shadow: none; }
.eto-home .eto-btn:hover { background: var(--surface-2); }
.eto-home .eto-btn--primary { border-color: var(--accent); background: var(--accent); color: var(--on-accent); box-shadow: 0 2px 0 var(--accent-edge); }
.eto-home .eto-btn--primary:hover { background: var(--accent-hover); }
.eto-home .eto-btn:disabled { cursor: not-allowed; border-style: dashed; background: transparent; color: var(--muted); }
.eto-home .eto-btn:disabled:hover { background: transparent; }
@media (max-width: 620px) { .eto-home-band__acts, .eto-home-band__acts .eto-btn { width: 100%; justify-content: center; } }
