/* The public pages (server/site): /learn/, /guides/ and the legal pages,
   served on heybjorn.com next to the marketing home page and dressed like
   it: its cream or near-black page, its panels, ink and purple
   (frontend/marketing, features/newHomepage/theme.js in the Björn repo), its
   floating header, its theme switch and its buttons with an edge.
   Self-contained: the app's /assets/4ad7c2d09e59ad231402d347/shared/bjorn.css isn't loaded here. */

@font-face {
  font-family: "Font";
  src: url("/assets/4ad7c2d09e59ad231402d347/shared/fonts/font-med.woff2") format("woff2");
  font-display: swap;
  font-weight: 500;
}
@font-face {
  font-family: "Font";
  src: url("/assets/4ad7c2d09e59ad231402d347/shared/fonts/font-semibold.woff2") format("woff2");
  font-display: swap;
  font-weight: 600;
}
@font-face {
  font-family: "Font";
  src: url("/assets/4ad7c2d09e59ad231402d347/shared/fonts/font-bold.woff2") format("woff2");
  font-display: swap;
  font-weight: 700;
}
/* Gonzaga Black, the home page's face for its big purple words. */
@font-face {
  font-family: "Gonzaga Black";
  src: url("/assets/4ad7c2d09e59ad231402d347/shared/fonts/gonzaga-black.woff2") format("woff2");
  font-display: swap;
  font-weight: 900;
}
@font-face {
  font-family: "Bjorn";
  src: url("/assets/4ad7c2d09e59ad231402d347/shared/fonts/font-bjorn-bold.woff2") format("woff2");
  font-display: swap;
  font-weight: 700;
}

/* --- Tokens -------------------------------------------------------------------------- */

:root,
:root[data-theme="dark"] {
  --page: rgb(24 23 21);
  --panel: rgb(33 31 28);
  --raised: rgb(50 47 43);
  --ink: rgb(214 208 198);
  /* Björn's purple for text, links and marks: the home page's, a little
     lighter so it passes 4.5:1 on the raised header and the washes too. */
  --purple: rgb(136 142 255);
  /* The filled button: the home page's lavender, a shade deeper so white
     text on it passes 4.5:1. */
  --cta: rgb(96 100 240);
  --cta-hover: rgb(84 88 226);
  --cta-edge: rgb(58 61 160);
  --on-cta: rgb(255 255 255);
  --mark: rgb(56 60 120);
  --good: rgb(61 227 161);
  --bad: rgb(255 128 132);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 12px 32px rgb(0 0 0 / 0.28);
  /* Things that float over the page: a word's meaning, the phone menu. */
  --pop: rgb(56 53 48);
  --logo: var(--ink);
  /* Purple text on --pop, a step lighter to keep 4.5:1. */
  --purple-pop: rgb(160 165 255);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --page: rgb(250 247 242);
  --panel: rgb(254 252 249);
  --raised: rgb(242 238 232);
  --ink: rgb(29 26 25);
  --purple: rgb(91 63 240);
  /* The home page's button as it shows on screen, its sheen included. */
  --cta: rgb(71 64 226);
  --cta-hover: rgb(58 50 204);
  --cta-edge: rgb(46 36 160);
  --on-cta: rgb(255 255 255);
  --mark: rgb(214 224 253);
  --good: rgb(0 122 74);
  --bad: rgb(184 34 28);
  --shadow: 0 1px 2px rgb(45 37 95 / 0.06), 0 12px 32px rgb(45 37 95 / 0.08);
  --pop: rgb(255 255 255);
  /* The home page's light logo is Björn's deep purple, not the ink. */
  --logo: rgb(45 37 95);
  --purple-pop: var(--purple);
  color-scheme: light;
}

:root {
  --ink-2: color-mix(in srgb, var(--ink) 74%, var(--page));
  --ink-3: color-mix(in srgb, var(--ink) 62%, var(--page));
  --line: color-mix(in srgb, var(--ink) 11%, transparent);
  --line-2: color-mix(in srgb, var(--ink) 18%, transparent);
  --wash: color-mix(in srgb, var(--purple) 12%, var(--panel));
  --font: "Font", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Bjorn", Georgia, serif;
  /* The page's width, and the reading column inside it. */
  --wrap: min(1120px, 100% - 48px);
  --read: 700px;
  --radius: 20px;
  --radius-s: 14px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  background: var(--page);
}
@media (max-width: 640px) {
  :root {
    --wrap: calc(100% - 32px);
    --radius: 18px;
  }
}

/* --- Base ---------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 104px;
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
body.site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 500 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* Plain links. :where() keeps this weaker than a component's own rules, so a
   card's or a button's transition (its lift, its press) isn't replaced. */
:where(.site) a {
  color: inherit;
  text-decoration-thickness: 1.5px;
  text-decoration-color: color-mix(in srgb, var(--purple) 55%, transparent);
  text-underline-offset: 0.22em;
  transition: color 0.15s, text-decoration-color 0.15s;
}
:where(.site) a:hover {
  text-decoration-color: var(--purple);
}
.site :focus-visible {
  outline: 2.5px solid var(--purple);
  outline-offset: 3px;
  border-radius: 6px;
}
.site h1,
.site h2,
.site h3 {
  margin: 0;
  font-weight: 700;
  text-wrap: balance;
}
.site h1 {
  font-size: clamp(40px, 5.4vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.025em;
}
/* A word in the heading in Björn's own face, as on the home page. */
.site h1 em {
  font: inherit;
  font-family: "Gonzaga Black", var(--display);
  font-style: normal;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--purple);
}
.site h2 {
  font-size: clamp(24px, 2.6vw, 28px);
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.site h3 {
  font-size: 17px;
  line-height: 1.3;
}
.site p {
  margin: 0 0 1em;
  text-wrap: pretty;
}
.site p:last-child {
  margin-bottom: 0;
}
.site b,
.site strong {
  font-weight: 700;
}
.site code {
  padding: 0.12em 0.4em;
  border-radius: 6px;
  background: var(--raised);
  font-size: 0.9em;
}
.site ::selection {
  background: var(--mark);
}
.icon {
  flex: none;
  display: block;
}
.muted {
  color: var(--ink-2);
}
.small {
  font-size: 14px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--cta);
  color: var(--on-cta) !important;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
}
.skip:focus {
  transform: none;
}
/* Where "Skip to content" lands. It takes focus so the next Tab starts in
   the content, and isn't a control, so it gets no ring. */
.site-main:focus {
  outline: none;
}

/* The small purple label above a heading, as the home page's "Learn a language". */
.eyebrow {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--purple);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}
.eyebrow a {
  color: inherit;
}
.eyebrow .dot {
  color: var(--ink-3);
}

/* --- Buttons ------------------------------------------------------------------------- */

/* The home page's button: a solid fill with a darker edge under it, which
   the button presses down onto. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--radius-s);
  corner-shape: superellipse(1.4);
  background: var(--cta);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.16),
    0 3px 0 0 var(--cta-edge);
  color: var(--on-cta);
  font: 700 16px/1.2 var(--font);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background 0.15s,
    transform 0.12s var(--ease),
    box-shadow 0.12s var(--ease);
}
.site a.btn {
  color: var(--on-cta);
  text-decoration: none;
}
.btn:hover {
  background: var(--cta-hover);
}
.btn:active {
  transform: translateY(2px);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.16),
    0 1px 0 0 var(--cta-edge);
}
.btn .icon {
  transition: transform 0.2s var(--ease);
}
.btn:hover .icon {
  transform: translateX(3px);
}
.btn.big {
  min-height: 56px;
  padding: 0 28px;
  font-size: 18px;
}
.btn.small {
  min-height: 40px;
  padding: 0 16px;
  font-size: 15px;
}
/* On a phone the big buttons take the width, and a long label wraps. */
@media (max-width: 480px) {
  .btn.big {
    width: 100%;
    padding: 12px 20px;
    white-space: normal;
    text-align: center;
    text-wrap: balance;
  }
}
/* A quieter button on a panel. */
.btn.quiet {
  background: var(--raised);
  box-shadow: 0 2px 0 0 var(--line-2);
  color: var(--ink);
}
.site a.btn.quiet {
  color: var(--ink);
}
.btn.quiet:hover {
  background: color-mix(in srgb, var(--ink) 9%, var(--raised));
}
.btn.quiet:active {
  box-shadow: 0 0 0 0 var(--line-2);
}
.btn[aria-busy="true"] {
  opacity: 0.6;
  pointer-events: none;
}

/* --- Header -------------------------------------------------------------------------- */

.site-top {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 16px 0 0;
}
.site-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  width: var(--wrap);
  height: 68px;
  margin: 0 auto;
  padding: 0 12px 0 22px;
  border-radius: 21px;
  corner-shape: superellipse(1.4);
  background: color-mix(in srgb, var(--raised) 92%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  transition: box-shadow 0.3s;
}
.scrolled .site-bar {
  box-shadow: 0 0 0 1px var(--line), 0 8px 24px rgb(0 0 0 / 0.12);
}
.site-logo {
  display: flex;
  align-items: center;
  height: 44px;
  margin-right: auto;
  border-radius: 10px;
}
/* .site a would make it the ink. */
.site .site-logo {
  color: var(--logo);
}
.site-logo .face {
  fill: var(--raised);
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: 12px;
}
.site-nav a {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.site-nav a:hover {
  background: color-mix(in srgb, var(--ink) 7%, transparent);
}
.site-nav a[aria-current] {
  color: var(--purple);
}
.icon-btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  corner-shape: superellipse(1.4);
  background: color-mix(in srgb, var(--panel) 70%, transparent);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s, transform 0.12s var(--ease);
}
.icon-btn:hover {
  background: var(--panel);
}
.icon-btn:active {
  transform: scale(0.94);
}
.icon-btn .icon {
  grid-area: 1 / 1;
}
.theme .moon,
:root[data-theme="dark"] .theme .moon,
:root[data-theme="light"] .theme .sun {
  display: none;
}
:root[data-theme="light"] .theme .moon {
  display: block;
}
.site-top .btn {
  margin-left: 8px;
}
.menu-btn {
  display: none;
  border-color: transparent;
  background: transparent;
  color: var(--ink-2);
}
.menu-btn:hover {
  background: color-mix(in srgb, var(--ink) 7%, transparent);
  color: var(--ink);
}
.menu {
  position: fixed;
  inset: 78px 16px auto;
  width: auto;
  height: auto;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--pop);
  box-shadow: var(--shadow);
  color: var(--ink);
}
.menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 0 14px;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
}
.menu a:hover {
  background: var(--raised);
}
.menu a .icon {
  color: var(--ink-3);
}
.menu a[aria-current] {
  background: var(--wash);
  color: var(--purple);
}
@media (prefers-reduced-motion: no-preference) {
  .menu:popover-open {
    animation: pop 0.18s var(--ease);
  }
}
@media (max-width: 760px) {
  .site-top {
    padding-top: 10px;
  }
  .site-bar {
    height: 64px;
    padding: 0 6px 0 18px;
    border-radius: 20px;
  }
  .site-logo svg {
    width: 104px;
    height: auto;
  }
  .site-nav {
    display: none;
  }
  .menu-btn {
    display: grid;
  }
  .site-top .btn {
    margin-left: 4px;
  }
}
@media (max-width: 340px) {
  .site-top .btn {
    display: none;
  }
}

/* --- Page layout --------------------------------------------------------------------- */

.site-main {
  flex: 1;
  width: var(--wrap);
  margin: 0 auto;
  padding: 40px 0 96px;
}
.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 6px;
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 600;
}
.crumbs li {
  display: flex;
  align-items: center;
  gap: 6px;
}
.crumbs li + li::before {
  content: "";
  width: 14px;
  height: 14px;
  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.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%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.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: 0.7;
}
.crumbs a {
  color: var(--ink-2);
  text-decoration: none;
  border-radius: 4px;
}
.crumbs a:hover {
  color: var(--ink);
}
.crumbs [aria-current] {
  color: var(--ink-3);
}

/* The top of a page: the label, the heading, a line or two and the button. */
.hero {
  max-width: 820px;
  margin-bottom: 56px;
}
.hero .lede {
  max-width: 640px;
  margin: 20px 0 0;
  color: var(--ink-2);
  font-size: clamp(18px, 1.6vw, 20px);
  line-height: 1.55;
}
.hero .native {
  margin: 12px 0 0;
  color: var(--ink-2);
  font-family: var(--display);
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.3;
}
.hero .actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 20px;
  margin-top: 32px;
}
.hero .note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 16px 0 0;
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 600;
}
.hero .note .icon {
  color: var(--good);
}

/* Numbers under the heading of a course. */
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}
.facts li {
  display: flex;
  flex-direction: column;
}
.facts b {
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.facts span {
  margin-top: 4px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}
@media (max-width: 520px) {
  .facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

/* A reading column with a rail beside it that stays in view. */
.layout {
  display: grid;
  grid-template-columns: minmax(0, var(--read)) minmax(0, 300px);
  justify-content: space-between;
  gap: 64px;
  align-items: start;
}
.content > * + * {
  margin-top: 64px;
}
.rail {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 16px;
}
@media (max-width: 960px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
  }
  .rail {
    position: static;
  }
  /* The rail's start panel repeats the page's own call to start, and its
     contents list is for a wide screen: on a phone only its links stay. */
  .rail .toc:not(.rail-end),
  .rail .rail-start {
    display: none;
  }
  .rail:not(:has(.rail-end)) {
    display: none;
  }
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.section-head h2 {
  margin: 0;
}
.section-head p,
.section-head a {
  margin: 0;
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 600;
}
.content > section > h2,
.content > article > h2 {
  margin-bottom: 16px;
}
.content > section > p {
  max-width: 66ch;
}

/* --- Panels and cards ---------------------------------------------------------------- */

.panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  corner-shape: superellipse(1.4);
  background: var(--panel);
}
.panel h2 {
  font-size: 17px;
  letter-spacing: 0;
}
.panel > * + * {
  margin-top: 12px;
}
.panel .btn {
  width: 100%;
}
.panel .btn + p {
  margin-top: 16px;
}
.panel p {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.5;
}

/* The rail's "On this page". */
.toc h2 {
  margin-bottom: 8px;
  color: var(--ink-3);
  font-size: 14px;
}
.toc ol {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.toc a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 12px;
  margin: 0 -12px;
  border-radius: 10px;
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.toc a:hover {
  background: var(--raised);
  color: var(--ink);
}
.toc a[aria-current="true"] {
  color: var(--purple);
}
.toc small {
  color: var(--ink-3);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

/* A link that is a whole card: languages, units, stories, apps. */
.card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  corner-shape: superellipse(1.4);
  background: var(--panel);
  color: var(--ink);
  text-decoration: none;
  transition:
    border-color 0.15s,
    background 0.15s,
    transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}
.site a.card {
  text-decoration: none;
}
.card:hover {
  border-color: color-mix(in srgb, var(--purple) 45%, var(--line));
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.card:active {
  transform: translateY(0);
  box-shadow: none;
}
.card .text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.card b {
  font-size: 17px;
  line-height: 1.3;
}
.card small,
.card .sub {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.4;
}
.card > .go {
  color: var(--ink-3);
  transition: color 0.15s, transform 0.2s var(--ease);
}
.card:hover > .go {
  color: var(--purple);
  transform: translateX(3px);
}
.grid {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.grid.two {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.grid.three {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* The flags are waving flags with room around them (public/shared/img/flags),
   drawn whole, as the app does: cropped into a circle they lose their edges. */
.flag {
  flex: none;
  width: 40px;
  height: 40px;
  object-fit: contain;
}
.flag.small {
  width: 24px;
  height: 24px;
}

/* An app's icon: white on a purple disc, as on the home page's feature cards. */
.badge {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--cta);
  color: var(--on-cta);
}
.badge.small {
  width: 32px;
  height: 32px;
}
.badge.small .icon {
  width: 16px;
  height: 16px;
}

/* --- /learn/ ------------------------------------------------------------------------- */

.filter {
  position: relative;
  max-width: 420px;
  margin-bottom: 20px;
}
.filter .icon {
  position: absolute;
  top: 50%;
  left: 16px;
  color: var(--ink-3);
  transform: translateY(-50%);
  pointer-events: none;
}
.filter input {
  width: 100%;
  height: 52px;
  padding: 0 16px 0 46px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-s);
  corner-shape: superellipse(1.4);
  background: var(--panel);
  color: var(--ink);
  font: 600 17px var(--font);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.filter input::placeholder {
  color: var(--ink-3);
}
.filter input:hover {
  border-color: color-mix(in srgb, var(--ink) 30%, transparent);
}
.filter input:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--purple) 28%, transparent);
}
.filter input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}
.empty p {
  margin: 0;
}
.empty p + p {
  margin-top: 6px;
}
.empty {
  padding: 32px 24px;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
  color: var(--ink-2);
  text-align: center;
}
.lang-grid li[hidden] {
  display: none;
}

/* --- A course ------------------------------------------------------------------------ */

/* On a narrow screen, where the rail isn't beside the units, a bar of the
   levels stays under the header. */
.level-nav {
  display: none;
}
@media (max-width: 960px) {
  .level-nav {
    position: sticky;
    top: 78px;
    z-index: 20;
    display: block;
    margin: -24px -16px 32px;
    padding: 8px 16px;
    background: color-mix(in srgb, var(--page) 88%, transparent);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }
  .level-nav ol {
    display: flex;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .level-nav a {
    display: grid;
    place-items: center;
    min-width: 52px;
    height: 40px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--panel);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
  }
  .level-nav a[aria-current] {
    border-color: transparent;
    background: var(--cta);
    color: var(--on-cta);
  }
  html {
    scroll-padding-top: 140px;
  }
}
@media (max-width: 760px) {
  .level-nav {
    top: 70px;
  }
}

.level-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}
.level-tag {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  corner-shape: superellipse(1.4);
  background: var(--wash);
  color: var(--purple);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.level-head h2 {
  margin: 0;
}
.level-head p {
  margin: 0;
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 600;
}
.stage {
  margin-top: 28px;
}
.stage h3 {
  margin-bottom: 12px;
  color: var(--ink-2);
  font-size: 15px;
}
.units {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.units .card {
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
}
.units .num {
  display: grid;
  place-items: center;
  flex: none;
  min-width: 30px;
  height: 30px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--raised);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.units .card:hover .num {
  background: var(--wash);
  color: var(--purple);
}
.units b {
  font-size: 16px;
}
.units .sub {
  font-size: 14px;
}

.story-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.level-pill {
  display: inline-grid;
  place-items: center;
  flex: none;
  min-width: 40px;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--wash);
  color: var(--purple);
  font-size: 13px;
  font-weight: 700;
}
.more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  color: var(--purple) !important;
  font-weight: 700;
  text-decoration: none !important;
}
.more .icon {
  transition: transform 0.2s var(--ease);
}
.more:hover .icon {
  transform: translateX(3px);
}

/* The closing call to start, at the foot of a page. */
.cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px 32px;
  padding: 32px;
  border-radius: 24px;
  corner-shape: superellipse(1.4);
  background: var(--wash);
}
.cta .text {
  flex: 1 1 280px;
}
.cta h2 {
  margin-bottom: 6px;
  font-size: 24px;
}
.cta p {
  margin: 0;
  color: var(--ink-2);
}

/* --- A unit -------------------------------------------------------------------------- */

.goals {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.goals li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 18px;
  line-height: 1.45;
}
.goals .icon {
  margin-top: 2px;
  padding: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--good) 18%, transparent);
  color: var(--good);
}

.words-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  corner-shape: superellipse(1.4);
  background: var(--panel);
  overflow: hidden;
}
table.words {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}
table.words th {
  padding: 14px 16px 10px;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}
table.words td {
  padding: 13px 16px;
  border-top: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.45;
}
table.words tbody tr {
  transition: background 0.12s;
}
table.words tbody tr:hover {
  background: color-mix(in srgb, var(--ink) 3%, transparent);
}
table.words td:first-child {
  width: 30%;
  font-weight: 700;
}
table.words td.meaning {
  color: var(--ink-2);
}
table.words small {
  color: var(--ink-3);
  font-weight: 500;
}
@media (max-width: 600px) {
  table.words thead {
    display: none;
  }
  table.words tr {
    display: block;
    padding: 14px 16px;
    border-top: 1px solid var(--line);
  }
  table.words tbody tr:first-child {
    border-top: 0;
  }
  table.words td {
    display: block;
    width: auto !important;
    padding: 0;
    border: 0;
  }
  table.words td + td {
    margin-top: 2px;
  }
  table.words td.example {
    margin-top: 8px;
    padding-left: 12px;
    border-left: 2px solid var(--line-2);
    color: var(--ink-2);
    font-size: 15px;
  }
}

.story-card {
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding: 22px 24px;
}
.story-card .top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.story-card b {
  font-size: 21px;
}
.story-card .excerpt {
  margin-top: 8px;
  color: var(--ink-3);
  font-size: 15px;
  line-height: 1.5;
}

.frames {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.frames li {
  padding: 14px 18px;
  border-radius: var(--radius-s);
  corner-shape: superellipse(1.4);
  background: var(--panel);
  border: 1px solid var(--line);
  font-size: 19px;
  line-height: 1.5;
}
.blank {
  display: inline-block;
  width: 4.5em;
  height: 1.1em;
  margin: 0 0.15em;
  border-bottom: 2px dashed color-mix(in srgb, var(--purple) 60%, transparent);
  vertical-align: -0.2em;
}
.scene {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

/* A panel's short list of facts, each with its icon. */
.panel h2 + .facts-list {
  margin-top: 16px;
}
.facts-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.facts-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
}
.facts-list .icon {
  flex: none;
  color: var(--ink-3);
}
.site .facts-list a {
  color: var(--purple);
  font-weight: 600;
  text-decoration: none;
}
.site .facts-list a:hover {
  text-decoration: underline;
}
.panel .facts-list + .btn {
  margin-top: 22px;
}

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.pager .card {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.pager .next {
  grid-column: 2;
  align-items: flex-end;
  text-align: right;
}
.pager small {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 600;
}
@media (max-width: 520px) {
  .pager {
    grid-template-columns: 1fr;
  }
  .pager .next {
    grid-column: auto;
  }
}

/* --- A story ------------------------------------------------------------------------- */

.story-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px 12px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  corner-shape: superellipse(1.4);
  background: var(--panel);
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 600;
}
.story-tools .hint {
  flex: 1 1 140px;
  line-height: 1.35;
}
.story-tools .switch {
  margin: -4px -4px -4px 0;
}
.story .hero {
  margin-bottom: 32px;
}
/* Show English, a switch. */
.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font: 700 15px var(--font);
  cursor: pointer;
  transition: background 0.15s;
}
.switch:hover {
  background: var(--raised);
}
.switch .track {
  position: relative;
  width: 38px;
  height: 24px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 22%, var(--page));
  box-shadow: inset 0 0 0 1.5px var(--ink-3);
  transition: background 0.2s, box-shadow 0.2s;
}
.switch .track::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ink-2);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.25);
  transition: transform 0.2s var(--ease);
}
.switch[aria-pressed="true"] .track {
  background: var(--cta);
  box-shadow: inset 0 0 0 1.5px var(--cta);
}
.switch[aria-pressed="true"] .track::after {
  transform: translateX(14px);
  background: white;
}
.story-text {
  margin-top: 32px;
  font-size: 21px;
  line-height: 1.75;
}
.story-text .tl {
  margin: 0 0 0.9em;
}
.story-text .en {
  display: none;
  margin: -0.4em 0 1.4em;
  padding: 2px 0 2px 16px;
  border-left: 3px solid var(--wash);
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.6;
}
.story.show-english .en {
  display: block;
}
@media (prefers-reduced-motion: no-preference) {
  .story.show-english .en {
    animation: rise 0.25s var(--ease);
  }
}
.w {
  margin: 0 -0.08em;
  padding: 0 0.08em;
  border-radius: 5px;
  text-decoration: underline dotted color-mix(in srgb, var(--ink) 28%, transparent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.28em;
  cursor: pointer;
  transition: background 0.12s;
}
.w:hover,
.w.on {
  background: var(--mark);
  text-decoration-color: transparent;
}
.w:focus-visible {
  outline-offset: 1px;
}
.gloss {
  position: absolute;
  z-index: 40;
  max-width: min(320px, 100vw - 24px);
  padding: 12px 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-s);
  corner-shape: superellipse(1.4);
  background: var(--pop);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.4;
}
.gloss b {
  display: block;
  margin-bottom: 2px;
  color: var(--purple-pop);
  font-size: 14px;
}
@media (prefers-reduced-motion: no-preference) {
  .gloss {
    animation: pop 0.16s var(--ease);
  }
}

.quiz ol {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: q;
}
.quiz li {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  corner-shape: superellipse(1.4);
  background: var(--panel);
  counter-increment: q;
}
.quiz .q {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}
.quiz .q::before {
  content: counter(q);
  display: grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--wash);
  color: var(--purple);
  font-size: 14px;
}
.quiz .options {
  display: grid;
  gap: 8px;
}
.quiz .options button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 50px;
  padding: 10px 16px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  corner-shape: superellipse(1.4);
  background: var(--page);
  color: var(--ink);
  font: 600 16px/1.35 var(--font);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.12s var(--ease);
}
.quiz .options button:hover:not([aria-disabled]) {
  border-color: var(--purple);
}
.quiz .options button:active:not([aria-disabled]) {
  transform: scale(0.99);
}
.quiz .options button[aria-disabled] {
  cursor: default;
}
.quiz .options button .icon {
  display: none;
}
.quiz .options button.right {
  border-color: var(--good);
  background: color-mix(in srgb, var(--good) 14%, var(--page));
}
.quiz .options button.wrong {
  border-color: var(--bad);
  background: color-mix(in srgb, var(--bad) 12%, var(--page));
}
.quiz .options button.right .icon.check,
.quiz .options button.wrong .icon.cross {
  display: block;
}
.quiz .options button.right .icon {
  color: var(--good);
}
.quiz .options button.wrong .icon {
  color: var(--bad);
}
.quiz .options button.dim {
  opacity: 0.6;
}
.quiz .said {
  min-height: 0;
  margin: 12px 0 0;
  font-size: 15px;
  font-weight: 700;
}
.quiz .said:empty {
  display: none;
}
.quiz .said.right {
  color: var(--good);
}
.quiz .said.wrong {
  color: var(--bad);
}
.score {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  padding: 16px 16px 16px 20px;
  border-radius: var(--radius-s);
  background: var(--wash);
  font-size: 18px;
  font-weight: 700;
}
.score[hidden] {
  display: none;
}
.score p {
  margin: 0;
}
.skip-q {
  display: block;
  width: fit-content;
  margin-top: 2px;
  color: var(--purple) !important;
  font-size: 14px;
}

/* A long page's contents on a phone, where there's no rail. */
details.toc-phone {
  display: none;
}
/* Hidden, it still counts as the column's first item, so the next one
   mustn't take the gap that follows it. */
@media (min-width: 961px) {
  .content > .toc-phone + * {
    margin-top: 0;
  }
}
@media (max-width: 960px) {
  details.toc-phone {
    display: block;
  }
}
details.toc-phone ol {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0 8px 12px;
  list-style: none;
}
details.toc-phone a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
details.toc-phone a:hover {
  background: var(--raised);
  color: var(--ink);
}
details.toc-phone,
details.glossary {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  corner-shape: superellipse(1.4);
  background: var(--panel);
  overflow: hidden;
}
details.toc-phone summary,
details.glossary summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
  padding: 0 20px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  transition: background 0.15s;
}
details.toc-phone summary::-webkit-details-marker,
details.glossary summary::-webkit-details-marker {
  display: none;
}
details.toc-phone summary:hover,
details.glossary summary:hover {
  background: color-mix(in srgb, var(--ink) 3%, transparent);
}
details.toc-phone summary .icon,
details.glossary summary .icon {
  color: var(--ink-3);
  transition: transform 0.2s var(--ease);
}
details.toc-phone[open] summary .icon,
details.glossary[open] summary .icon {
  transform: rotate(180deg);
}
details.glossary table th:first-child,
details.glossary table td:first-child {
  padding-left: 20px;
}
@media (max-width: 600px) {
  details.glossary table tr {
    padding-inline: 20px;
  }
  details.glossary table td:first-child {
    padding-left: 0;
  }
}

/* --- Guides and the legal pages ------------------------------------------------------ */

.prose {
  font-size: 18px;
  line-height: 1.7;
}
.guide .prose > p:first-child {
  color: var(--ink-2);
  font-size: clamp(19px, 1.7vw, 21px);
  line-height: 1.55;
}
.prose h2 {
  margin: 48px 0 12px;
  font-size: 24px;
}
.prose > :first-child,
.prose > section:first-child h2 {
  margin-top: 0;
}
.prose ul,
.prose ol {
  margin: 0 0 1.1em;
  padding-left: 1.3em;
}
.prose li {
  margin-bottom: 10px;
  padding-left: 4px;
}
.prose li::marker {
  color: var(--purple);
}
.prose section + section h2 {
  margin-top: 48px;
}
.legal.prose {
  font-size: 17px;
}
.legal.prose h2 {
  font-size: 21px;
}
/* An app's host, knitted, as in the app. The pictures have room around the
   body, so they're drawn a little larger than their box. */
.host {
  display: block;
  flex: none;
}
.host img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.18);
}
.guide-hero .host {
  margin-bottom: 20px;
}
/* A guide's example of the app at work: a small window of the app, with
   its name in a title bar. */
.demo {
  margin: 0 0 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  corner-shape: superellipse(1.4);
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.d-top {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.d-meta {
  margin-left: auto;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
}
.d-body {
  display: grid;
  gap: 20px;
  padding: 28px;
  font-size: 17px;
  line-height: 1.5;
}
.d-body p {
  margin: 0;
}
/* A surface inside the window: a field, a card, a line being played. */
.d-label {
  display: block;
  margin-bottom: 8px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 700;
}
.d-anchor {
  position: relative;
  display: inline-block;
}
/* A popover pinned under a word, with a point towards it. */
.d-tip {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  z-index: 1;
  width: max-content;
  max-width: 240px;
  padding: 10px 14px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--pop);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  white-space: normal;
  transform: translateX(-50%);
}
.d-tip::before {
  content: "";
  position: absolute;
  top: -6px;
  left: calc(50% - 6px);
  width: 10px;
  height: 10px;
  border-top: 1px solid var(--line-2);
  border-left: 1px solid var(--line-2);
  background: var(--pop);
  transform: rotate(45deg);
}
.d-tip b {
  display: block;
  margin-bottom: 2px;
  color: var(--purple-pop);
  font-size: 13px;
}
.d-word {
  border-radius: 5px;
  background: var(--mark);
  box-shadow: 0 0 0 2px var(--mark);
}

/* Cards */
.d-input {
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 16px;
  border: 1.5px solid var(--purple);
  border-radius: 12px;
  background: var(--page);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--purple) 12%, transparent);
  font-size: 18px;
}
.d-caret {
  width: 2px;
  height: 22px;
  margin-left: 2px;
  background: var(--purple);
}
@media (prefers-reduced-motion: no-preference) {
  .d-caret {
    animation: blink 1.1s steps(1) infinite;
  }
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
.d-card {
  display: grid;
  gap: 6px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  corner-shape: superellipse(1.4);
  background: var(--page);
}
.d-front {
  font-family: var(--display);
  font-size: 32px;
  line-height: 1.15;
}
.d-meaning {
  color: var(--ink-2);
  font-size: 18px;
}
.d-example {
  margin-top: 6px !important;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.d-example mark {
  padding: 0 2px;
  border-radius: 4px;
  background: var(--mark);
  color: inherit;
}
.d-forms {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px !important;
}
.d-forms .d-label {
  margin: 0;
}
.d-chip {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--raised);
  font-size: 15px;
}
.d-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--ink-2);
  font-size: 15px;
}
.d-note .icon {
  margin-top: 3px;
  color: var(--good);
}

/* Write */
.d-paper {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 24px 24px 140px;
  border-radius: 14px;
  background: var(--page);
  font-size: 19px;
  line-height: 1.6;
}
.d-err {
  text-decoration: underline wavy var(--bad);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.3em;
}
.d-paper .d-tip {
  left: 0;
  width: 300px;
  max-width: 300px;
  text-wrap: balance;
  transform: none;
}
.d-paper .d-tip::before {
  left: 14px;
}

/* Talk */
.d-segs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.d-segs i {
  height: 6px;
  border-radius: 999px;
  background: var(--line-2);
}
.d-segs .done {
  background: var(--good);
}
.d-segs .now {
  background: var(--purple);
}
.d-mic {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 600;
}
.d-mic-btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--cta);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--cta) 16%, transparent);
  color: var(--on-cta);
}
.d-mic .narrow {
  display: none;
}
.d-goals ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.d-goals li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px 0 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 600;
}
.d-goals li.done {
  border-color: transparent;
  background: color-mix(in srgb, var(--good) 16%, transparent);
  color: var(--ink);
}
.d-goals li.done .icon {
  color: var(--good);
}
.d-chat {
  display: grid;
  gap: 10px;
}
.d-chat p {
  max-width: 78%;
  padding: 11px 16px;
  border-radius: 18px;
}
.d-chat .them {
  justify-self: start;
  border-bottom-left-radius: 6px;
  background: var(--raised);
}
.d-chat .you {
  justify-self: end;
  border-bottom-right-radius: 6px;
  background: var(--cta);
  color: var(--on-cta);
}

/* A popover near the right edge lines up from the right. */
.d-tip.end {
  right: -10px;
  left: auto;
  transform: none;
}
.d-tip.end::before {
  right: 22px;
  left: auto;
}

/* Read */
.d-read {
  padding-bottom: 76px;
  font-size: 21px;
  line-height: 1.75;
}

/* Listen */
.d-player {
  display: flex;
  align-items: center;
  gap: 14px;
}
.d-play {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  padding-left: 2px;
  border-radius: 50%;
  background: var(--cta);
  color: var(--on-cta);
}
.d-bar {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: var(--line-2);
  overflow: hidden;
}
.d-bar span {
  display: block;
  width: 11%;
  height: 100%;
  background: var(--purple);
}
.d-time {
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.d-lines {
  padding-bottom: 64px !important;
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.d-lines li {
  display: flex;
  gap: 16px;
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--ink-2);
}
.d-lines li.now {
  background: var(--wash);
  color: var(--ink);
}
.d-lines time {
  flex: none;
  width: 2.4em;
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.8;
}
.d-lines li.now time {
  color: var(--purple);
}

/* Translate */
.d-panes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.d-pane {
  min-height: 112px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--page);
  font-size: 19px;
  line-height: 1.4;
}
.d-pane.to {
  border-color: transparent;
  background: var(--wash);
}
.d-gloss {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}
.d-gloss li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.d-gloss li > span:first-child {
  display: flex;
  flex-direction: column;
}
.d-gloss b {
  font-size: 17px;
}
.d-gloss small {
  color: var(--ink-2);
  font-size: 14px;
}
.d-acts {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink-2);
}
.d-plus,
.d-kept {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 32px;
  min-width: 32px;
  border-radius: 999px;
}
.d-plus {
  border: 1px solid var(--line-2);
  color: var(--ink);
}
.d-kept {
  padding: 0 12px 0 10px;
  background: color-mix(in srgb, var(--good) 16%, transparent);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}
.d-kept .icon {
  color: var(--good);
}
@media (max-width: 640px) {
  .d-panes {
    grid-template-columns: 1fr;
  }
  .d-pane {
    min-height: 0;
  }
}

/* Lessons */
.d-fix {
  font-family: var(--display);
  font-size: 24px;
}
.d-fix s {
  color: var(--ink-3);
  text-decoration-color: var(--bad);
  text-decoration-thickness: 2px;
}
.d-fix ins {
  padding: 0 4px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--good) 18%, transparent);
  text-decoration: none;
}
.d-rule {
  padding: 14px 16px;
  border-left: 3px solid var(--purple);
  border-radius: 4px 12px 12px 4px;
  background: var(--wash);
  font-size: 16px;
}
.d-q {
  margin-bottom: 12px !important;
  font-size: 18px;
}
.d-gap {
  display: inline-block;
  min-width: 3em;
  padding: 0 4px;
  border-bottom: 2px solid var(--good);
  font-weight: 700;
  text-align: center;
}
.d-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.d-options span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--page);
  font-weight: 600;
}
.d-options .right {
  border-color: var(--good);
  background: color-mix(in srgb, var(--good) 14%, var(--page));
}
.d-options .right .icon {
  color: var(--good);
}

@media (max-width: 640px) {
  .d-body {
    gap: 16px;
    padding: 18px;
  }
  .d-card,
  .d-paper {
    padding: 18px;
  }
  .d-paper {
    padding-bottom: 116px;
    font-size: 19px;
  }
  .d-read {
    font-size: 19px;
  }
  .d-chat p {
    max-width: 88%;
  }
  .d-mic .wide {
    display: none;
  }
  .d-mic .narrow {
    display: inline;
  }
  /* Where the word lands on a narrow line can't be known, so the hint
     sits in the room kept under the letter. */
  .d-paper .d-anchor {
    position: static;
  }
  .d-paper .d-tip {
    top: auto;
    right: 16px;
    bottom: 16px;
    left: 16px;
    width: auto;
    max-width: none;
  }
  .d-paper .d-tip::before {
    display: none;
  }
}

.app-card {
  align-items: flex-start;
  padding: 22px;
  gap: 16px;
}
.app-card .host {
  margin-top: 2px;
}
.app-card .text {
  gap: 4px;
}
.app-card b {
  font-size: 19px;
}
.app-card small {
  color: var(--purple);
  font-size: 14px;
  font-weight: 700;
}

.lang-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.lang-chips a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.lang-chips a:hover {
  border-color: color-mix(in srgb, var(--purple) 45%, var(--line));
}

/* --- Not found ----------------------------------------------------------------------- */

.lost {
  max-width: 640px;
  margin: 48px auto 0;
  text-align: center;
}
.lost .face-big {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  margin: 0 auto 28px;
  border-radius: 24px;
  corner-shape: superellipse(1.4);
  background: var(--ink);
  color: var(--page);
}
.lost .lede {
  margin: 20px auto 0;
}
.lost .actions {
  justify-content: center;
}

/* --- Footer -------------------------------------------------------------------------- */

.site-foot {
  border-top: 1px solid var(--line);
  background: var(--panel);
}
.foot-in {
  width: var(--wrap);
  margin: 0 auto;
  padding: 56px 0 40px;
}
.foot-top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: 40px;
}
.foot-brand p {
  max-width: 320px;
  margin: 14px 0 20px;
  color: var(--ink-2);
  font-size: 15px;
}
.foot-brand .site-logo .face {
  fill: var(--panel);
}
.site-foot h2 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 15px;
  letter-spacing: 0;
}
.site-foot ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-foot li a {
  display: inline-block;
  padding: 3px 0;
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.site-foot li a:hover {
  color: var(--ink);
}
.foot-langs {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.site-foot .foot-langs ul {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 18px;
}
.foot-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 32px;
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 600;
}
@media (max-width: 760px) {
  .foot-top {
    grid-template-columns: 1fr 1fr;
  }
  .foot-brand {
    grid-column: 1 / -1;
  }
}

/* --- Motion -------------------------------------------------------------------------- */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
}
@media (prefers-reduced-motion: no-preference) {
  .hero > * {
    animation: rise 0.5s var(--ease) both;
  }
  .hero > :nth-child(2) {
    animation-delay: 0.04s;
  }
  .hero > :nth-child(3) {
    animation-delay: 0.08s;
  }
  .hero > :nth-child(n + 4) {
    animation-delay: 0.12s;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
/* No transitions while the theme flips. */
:root.theme-switching *,
:root.theme-switching *::before,
:root.theme-switching *::after {
  transition: none !important;
}

@media print {
  .site-top,
  .site-foot,
  .rail,
  .cta {
    display: none;
  }
}
