/* Verba learning pages (lists, study pages, tests). Builds on site.css: same tokens, type and card language. */
body.learn { background: var(--cream); }
.learn section { padding: 0; }
.top-badge { margin-left: auto; }
.learn .top nav.sections { gap: 18px; }
.learn .top nav.sections a { font-size: 14.5px; }

/* hero */
.l-hero { position: relative; overflow: hidden; padding: 28px 0 40px; }
.l-hero::before { content: ""; position: absolute; inset: -40% -12% auto auto; width: 640px; height: 640px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(194, 65, 12, .14), rgba(194, 65, 12, 0)); pointer-events: none; }
.l-hero .wrap { position: relative; }
.l-hero h1 { font-size: clamp(36px, 5.4vw, 60px); margin: 16px 0 14px; max-width: 18ch; }
.l-hero .lead { max-width: 60ch; font-size: clamp(17px, 1.7vw, 19.5px); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; list-style: none; margin: 0 0 18px; padding: 0; font-size: 14px; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 8px; color: rgba(29, 26, 22, .35); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--terra-deep); text-decoration: underline; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 18px 0 0; padding: 0; }
.facts li { padding: 6px 12px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); font-size: 14px; font-weight: 800; color: var(--ink-2); }
.l-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 14px;
  border: 1.5px solid var(--terra); background: var(--paper); color: var(--terra-deep); font: 800 15px/1.2 var(--sans); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--terra-soft); }
.btn.primary { background: var(--terra); color: #fff; border-color: var(--terra); }
.btn.primary:hover { background: var(--terra-deep); }
.btn.ghost { border-color: var(--line); color: var(--ink-2); }

/* about + how */
.l-about { padding: 0 0 40px; }
.l-about p { max-width: 70ch; color: var(--ink-2); font-size: 17.5px; }
.l-about h2 { font-size: clamp(26px, 3vw, 34px); margin-bottom: 14px; }
.how { max-width: 70ch; margin: 0; padding-left: 22px; color: var(--ink-2); display: grid; gap: 8px; }

/* cards */
.l-groups { padding: 8px 0 44px; }
.l-groups h2, .l-list h2, .related h2, .l-faq h2 { font-size: clamp(26px, 3vw, 34px); margin-bottom: 18px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.card { display: grid; gap: 4px; padding: 18px 20px 20px; border-radius: 22px; background: var(--paper); border: 1px solid var(--line);
  text-decoration: none; color: var(--ink); box-shadow: 0 1px 2px rgba(29, 26, 22, .04); transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card-k { font: 800 12.5px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--terra); }
.card-t { font: 600 21px/1.2 var(--serif); }
.card-n { color: var(--muted); font-size: 14.5px; }

/* compact list (level and collection pages) */
.l-list { padding: 0 0 30px; }
.group { margin-bottom: 26px; }
.group h3 { font-size: 23px; margin-bottom: 10px; }
.group h3 a { color: var(--ink); text-decoration-color: rgba(194, 65, 12, .4); }
.count { font: 800 13px/1 var(--sans); color: var(--muted); background: var(--sand); border-radius: 999px; padding: 4px 9px; vertical-align: middle; }
.glossary { list-style: none; margin: 0; padding: 0; columns: 3 260px; column-gap: 28px; }
.glossary li { break-inside: avoid; display: flex; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; }
.glossary li span:first-child { font-weight: 800; color: var(--ink); min-width: 38%; }
.glossary li span:last-child { color: var(--ink-2); }

/* study tables */
.l-chunks { padding-bottom: 10px; }
.chunk { margin: 0 0 22px; background: var(--paper); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; }
.chunk-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: #fffaf4; }
.chunk-head h2 { font: 800 14px/1 var(--sans); letter-spacing: .06em; color: var(--muted); }
.add { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border-radius: 12px; background: var(--terra-soft);
  color: var(--terra-deep); font-weight: 800; font-size: 14.5px; text-decoration: none; }
.add::before { content: "+"; margin-right: 6px; font-size: 18px; line-height: 1; }
.add:hover { background: #f8d9c3; }
table.words { width: 100%; border-collapse: collapse; }
table.words thead th { text-align: left; font: 800 12.5px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 12px 18px 8px; }
table.words td, table.words tbody th { text-align: left; vertical-align: top; padding: 14px 18px; border-top: 1px solid var(--line); font-weight: 600; }
table.words tbody th { width: 30%; }
table.words td.m { width: 26%; color: var(--ink); }
.w { font: 600 20px/1.25 var(--serif); color: var(--ink); }
.pr { display: block; margin-top: 3px; color: var(--muted); font-style: italic; font-size: 14.5px; }
.pr b { color: var(--ink-2); font-weight: 800; }
.pos { display: inline-block; margin-top: 6px; font-size: 12.5px; font-weight: 800; color: var(--terra-deep); background: var(--terra-soft); border-radius: 999px; padding: 2px 8px; }
.lv { display: inline-block; margin: 6px 0 0 6px; font-size: 12.5px; font-weight: 800; color: var(--sage); background: #e7f0e8; border-radius: 999px; padding: 2px 8px; }
.note { display: block; margin-top: 6px; font-size: 14.5px; color: var(--sage); }
.ex span[lang="en"] { display: block; color: var(--ink); }
.ex-tr { display: block; margin-top: 4px; color: var(--muted); font-size: 15px; }
.say { display: inline-grid; place-items: center; vertical-align: middle; width: 32px; height: 32px; margin-left: 6px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--cream); color: var(--terra); cursor: pointer; }
.say::before { content: ""; width: 17px; height: 17px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 5 6 9H3v6h3l5 4V5Z'/%3E%3Cpath d='M15.5 8.5a5 5 0 0 1 0 7'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 5 6 9H3v6h3l5 4V5Z'/%3E%3Cpath d='M15.5 8.5a5 5 0 0 1 0 7'/%3E%3C/svg%3E") center / contain no-repeat; }
.say:hover, .say.on { background: var(--terra-soft); }

/* app call to action */
.app-cta { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.2fr) auto; gap: 28px; align-items: center; margin: 26px 0 34px;
  padding: 28px; border-radius: 30px; background: radial-gradient(900px 400px at 90% 0%, rgba(194, 65, 12, .32), transparent 60%), var(--night);
  color: var(--cream-on-night); box-shadow: var(--shadow); }
.app-cta h2 { color: var(--cream-on-night); font-size: clamp(26px, 3vw, 34px); }
.app-cta p { color: var(--muted-on-night); margin-top: 10px; }
.cta-widget { width: 100%; border-radius: 22px; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .35)); }
.cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 18px; }
.cta-actions .badge img { height: 48px; width: auto; }
.app-cta .btn { background: transparent; color: #ffd9c2; border-color: rgba(255, 217, 194, .55); }
.app-cta .btn:hover { background: rgba(255, 255, 255, .08); }
.iphone-only { font-size: 13.5px; opacity: .8; }
.qr { margin: 0; text-align: center; display: none; }
.qr .qr-code { display: block; width: 132px; height: 132px; border-radius: 14px; padding: 8px; background: #fff; }
.qr figcaption { margin-top: 8px; font-size: 12.5px; color: var(--muted-on-night); max-width: 150px; }
@media (hover: hover) and (pointer: fine) { .qr { display: block; } }
.app-cta.compact { grid-template-columns: 1fr; padding: 22px 24px; margin: 8px 0 26px; }
.app-cta.compact h2 { font-size: 24px; }

/* faq + related */
.l-faq { padding: 10px 0 20px; }
.related { padding: 10px 20px 46px; }
.related ul { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.related a { display: inline-block; padding: 9px 14px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); font-weight: 800; font-size: 15px; text-decoration: none; color: var(--ink-2); }
.related a:hover { color: var(--terra-deep); border-color: rgba(194, 65, 12, .35); }

/* quiz */
.quiz { margin: 6px 0 30px; padding: 28px; border-radius: 30px; background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); min-height: 320px; }
.quiz .q-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); font-weight: 800; font-size: 14px; }
.quiz .bar { height: 6px; border-radius: 999px; background: var(--sand); margin: 12px 0 26px; overflow: hidden; }
.quiz .bar i { display: block; height: 100%; background: var(--terra); border-radius: 999px; transition: width .25s; }
.quiz .q-word { font: 600 clamp(36px, 6vw, 54px)/1.1 var(--serif); color: var(--ink); }
.quiz .q-pick { color: var(--muted); margin: 8px 0 20px; }
.quiz .opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quiz .opt { min-height: 56px; padding: 12px 16px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--cream); font: 700 16.5px/1.3 var(--sans);
  color: var(--ink); text-align: left; cursor: pointer; }
.quiz .opt:hover:not([disabled]) { border-color: var(--terra); }
.quiz .opt.ok { border-color: var(--sage); background: #e7f0e8; }
.quiz .opt.no { border-color: #b4321a; background: #fbe4df; }
.quiz .opt.idk { grid-column: 1 / -1; min-height: 44px; text-align: center; color: var(--muted); background: transparent; }
.quiz .fb { min-height: 28px; margin-top: 14px; font-weight: 800; }
.quiz .fb.ok { color: var(--sage); }
.quiz .fb.no { color: #b4321a; }
.quiz .res-h { font: 600 clamp(30px, 4.5vw, 44px)/1.1 var(--serif); }
.quiz .res-p { color: var(--ink-2); margin-top: 10px; max-width: 60ch; }
.quiz .missed { list-style: none; margin: 18px 0 0; padding: 0; columns: 2 220px; column-gap: 24px; }
.quiz .missed li { break-inside: avoid; padding: 6px 0; border-bottom: 1px solid var(--line); }
.quiz .missed b { font-family: var(--serif); font-size: 18px; margin-right: 8px; }

/* import page */
.import { padding-bottom: 60px; }
.imp-words { margin: 18px 0 0; padding-left: 22px; columns: 3 180px; color: var(--ink-2); max-width: 760px; }
.imp-note, .imp-desktop { margin-top: 16px; color: var(--muted); max-width: 60ch; }
.imp-desktop { display: none; }
@media (hover: hover) and (pointer: fine) { .imp-desktop { display: block; } }

/* small screens: tables become cards */
@media (max-width: 860px) {
  .app-cta { grid-template-columns: 1fr; padding: 22px; }
  .cta-widget { max-width: 420px; }
}
@media (max-width: 680px) {
  table.words thead { display: none; }
  table.words, table.words tbody, table.words tr, table.words td, table.words tbody th { display: block; width: auto !important; }
  table.words tr { padding: 14px 16px; border-top: 1px solid var(--line); }
  table.words td, table.words tbody th { padding: 0; border: 0; }
  table.words td.m { margin-top: 8px; font-size: 17px; font-weight: 800; }
  table.words td.ex { margin-top: 6px; }
  .quiz { padding: 20px 16px; }
  .quiz .opts { grid-template-columns: 1fr; }
  .glossary { columns: 1; }
  .top-badge { display: none; }
}

/* print and "Save as PDF": the list only */
@media print {
  .top, footer, .l-actions, .app-cta, .related, .l-faq, .chunk-head .add, .say, .crumbs, .skip, .l-groups { display: none !important; }
  body.learn { background: #fff; font-size: 11pt; }
  .l-hero { padding: 0 0 8pt; } .l-hero::before { display: none; }
  .l-hero h1 { font-size: 22pt; } .chunk { border: 0; border-radius: 0; }
  table.words td, table.words tbody th { padding: 5pt 6pt; }
  .w { font-size: 12pt; } tr { break-inside: avoid; }
  .glossary { columns: 2; }
}

/* small screens: keep the list navigation as a scrollable row under the brand */
@media (max-width: 1020px) {
  .learn .top .wrap { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 0; row-gap: 4px; }
  .learn .top nav.sections { display: flex; order: 3; width: 100%; margin: 0; overflow-x: auto; gap: 18px; padding: 6px 0 10px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .learn .top nav.sections::-webkit-scrollbar { display: none; }
  .learn .top nav.sections a { white-space: nowrap; }
}

/* study pages: facts, tip, synonyms and word family, page test */
.l-about .tip { margin-top: 12px; padding: 14px 18px; border-radius: 16px; background: #e7f0e8; color: #24472f; max-width: 70ch; font-size: 16.5px; }
.rel { display: block; margin-top: 6px; font-size: 14.5px; color: var(--ink-2); }
.rel b { color: var(--muted); font-weight: 800; }
.l-pagequiz { padding: 18px 0 0; }
.l-pagequiz h2 { font-size: clamp(26px, 3vw, 34px); }
.l-pagequiz p { color: var(--ink-2); margin-top: 8px; max-width: 62ch; }
.imp-missing { margin-top: 14px; padding: 12px 16px; border-radius: 14px; background: var(--terra-soft); color: var(--terra-deep); font-weight: 800; max-width: 62ch; }
