/* lessons.css: the extra rules for the private lessons pages.
   The look itself (type, colours, yellow buttons, white message cards, Copy buttons) comes from
   the site's own stylesheet, site.css, which every lessons page loads first. Only what the
   lessons pages need on top of that is here. Every class of ours starts with "ls-" so it can
   never clash with a class in site.css. On this site 1rem is 20px. */

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { overflow-wrap: break-word; }
main { display: block; }
/* Where a heading or a button label runs to two lines, make the lines about the same length. */
.hero h1, .hero .kicker, .ls-card h3, .ls-card .btn, .ls-nav .btn { text-wrap: balance; }

/* Nothing on these pages is smaller than 18px, every link or button is at least 48px tall, and
   all text is in the site's darkest colours (the footer included). */
footer { font-size: 0.9rem; color: var(--ink); }
footer p { margin-bottom: 0; }
.ls-all a, .ls-back { display: inline-block; padding: 0.55rem 0; }
.ls-note { font-size: 0.9rem; margin: 0.7rem 0 0; }
.ls-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* A small yellow label: "Bonus lesson", "Start here". */
.ls-tag { display: inline-block; background: var(--action); border-radius: 0.4rem; padding: 0.1rem 0.6rem; font-size: 0.9rem; font-weight: 700; line-height: 1.5; }

/* ---- Lessons home page ---- */
.ls-lessons, .ls-links { list-style: none; margin: 0; padding: 0; }
.ls-card { position: relative; background: #fff; border: 2px solid var(--ink); border-radius: 0.9rem; padding: 1.1rem 1.1rem 1.15rem; margin: 0 0 1rem; }
.ls-card h3 { font-size: 1.3rem; line-height: 1.25; margin: 0 0 0.5rem; }
.ls-num { display: block; font-size: 1rem; line-height: 1.5; margin-bottom: 0.25rem; }
.ls-num .ls-tag { margin-left: 0.35rem; }
.ls-num .ls-tag:first-child { margin-left: 0; }
.ls-card p { margin: 0 0 0.5rem; }
.ls-card .btn { margin-top: 0.9rem; }
/* The whole card is the tap target, not only its button. */
.ls-card .btn::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: 0.8rem; }

.ls-links li { margin: 0 0 0.8rem; }
.ls-links a { display: block; background: #fff; border: 2px solid var(--ink); border-radius: 0.6rem; padding: 0.8rem 1rem; color: var(--ink); text-decoration: none; }
.ls-links a:hover { background: #e2ebe6; }
.ls-links span { display: block; font-weight: 400; }
/* The email address in "Need a hand?" sits on a line of its own, so it is easy to tap. */
.ls-mail { display: table; padding: 0.55rem 0; }

/* ---- A lesson page ---- */
.ls-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; column-gap: 1rem; padding-top: 0.95rem; }
.ls-top p { margin: 0; }
.hero.ls-lesson { padding-top: 0.9rem; }
.ls-lesson .kicker { margin-bottom: 0.4rem; }
.ls-lesson h1 { font-size: 1.75rem; line-height: 1.15; margin-bottom: 0.9rem; }

/* The video box is a square from the first moment, so nothing below it moves when the picture
   arrives. On a phone held upright it is as wide as the page. On a wide or sideways screen it
   is kept short enough to see the whole picture, captions included, without scrolling. */
.ls-vidbox { width: 100%; }
.ls-vid { position: relative; height: 0; padding-top: 100%; overflow: hidden; background: #fff; border-radius: 0.9rem; box-shadow: 0 0 0 2px var(--ink); }
.ls-vid video { position: absolute; top: 0; left: 0; display: block; width: 100%; height: 100%; }
.ls-vid:has(video:focus-visible) { outline: 3px solid var(--ink); outline-offset: 5px; }
@supports not selector(:has(a)) { .ls-vid:focus-within { outline: 3px solid var(--ink); outline-offset: 5px; } }
@media (min-width: 40rem), (orientation: landscape) {
  .ls-vidbox { width: min(100%, max(16rem, 100vh - 14rem)); }
}
.ls-guide { margin-top: 1.5rem; }

/* Message cards and Copy buttons are the site's own (.msg, .msg-text, .copy). Here the button is
   made full width, like the one on the Messages to copy page. */
.ls-lesson-msgs .msg-text { white-space: pre-wrap; }
.ls-lesson-msgs .copy { display: block; width: 100%; font-size: 1.1rem; line-height: 1.3; padding: 0.85rem 1rem; min-height: 3.1rem; -webkit-tap-highlight-color: transparent; }
.ls-lesson-msgs .copy.ls-failed { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
/* A label above a message that the video sends with a photo or screenshot. It is not part of the words copied. */
.ls-photo { font-size: 0.9rem; font-weight: 700; margin: 0 0 0.45rem; }
.ls-also { margin: 2rem 0 0.8rem; }

/* Next and Previous: two lines in one big button. */
.ls-nav { padding: 2.75rem 0 0; }
.ls-nav .btn { margin: 0 0 0.8rem; }
.ls-nav .btn span { display: block; font-size: 1rem; font-weight: 400; }
.btn.ls-quiet { background: #fff; box-shadow: inset 0 0 0 2px var(--ink); }
.btn.ls-quiet:hover { background: #e2ebe6; }
.ls-nav p { margin: 0; }

@media (min-width: 48rem) {
  .ls-top { padding-top: 1.2rem; }
  .hero.ls-lesson { padding-top: 1.4rem; }
  .ls-lesson h1 { font-size: 2.3rem; }
  .ls-card { padding: 1.4rem 1.4rem 1.5rem; }
}
