/* The Ankademy website (0.13.1, D-236). One style sheet, two looks chosen on the Studio's Website page; the page's
   <html> carries look-light or look-dark. The colours come from the logo: navy #1b1a4c, purple #9184f1 and white,
   with the other shades worked out from them. The purple is a highlight only: on white, text and buttons are navy or
   a darker purple. No fonts are loaded: the device's own. Readable from 320 pixels wide; every colour pair meets WCAG
   AA (checked by a test, tests/test_website_in_browser.py). */
:root, .look-light {
  --bg: #ffffff; --soft: #f6f5fe; --card: #ffffff; --text: #1b1a4c; --muted: #4b4a72; --line: #e2e0f5;
  --link: #5646c4; --button: #1b1a4c; --button-text: #ffffff; --button-hover: #4535b0;
  --secondary-line: #9184f1; --secondary-text: #1b1a4c; --tag: #ecebfd; --tag-text: #1b1a4c;
  --highlight: #9184f1; --on-highlight: #1b1a4c; --focus: #5646c4; --shadow: 0 1px 2px rgba(27, 26, 76, .06), 0 8px 28px rgba(27, 26, 76, .09);
  --closing: #1b1a4c; --closing-text: #ffffff; --closing-muted: #d9d6f7;
  color-scheme: light;
}
.look-dark {
  --bg: #14133a; --soft: #1b1a4c; --card: #1f1e55; --text: #ffffff; --muted: #cfcdf3; --line: #34327a;
  --link: #b3aaf7; --button: #9184f1; --button-text: #14133a; --button-hover: #aaa1f6;
  --secondary-line: #9184f1; --secondary-text: #ffffff; --tag: #2c2a73; --tag-text: #ffffff;
  --highlight: #9184f1; --on-highlight: #14133a; --focus: #b3aaf7; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
  --closing: #1b1a4c; --closing-text: #ffffff; --closing-muted: #d9d6f7;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; }
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.4rem; }
.narrow { max-width: 48rem; }
a { color: var(--link); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, main:focus-visible, summary:focus-visible, iframe:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px;
}
main:focus { outline: none; }
h1, h2, h3 { letter-spacing: -.015em; }

.skip {
  position: absolute; left: .6rem; top: -5rem; z-index: 10; padding: .65rem 1rem; border-radius: 10px;
  background: var(--button); color: var(--button-text); font-weight: 650; text-decoration: none;
}
.skip:focus { top: .6rem; }
.hidden-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* Buttons: navy on white in the light look, purple with navy text in the dark look. */
.button {
  display: inline-block; padding: .8rem 1.35rem; border-radius: 999px; background: var(--button);
  color: var(--button-text); border: 2px solid var(--button); font-weight: 650; text-decoration: none; line-height: 1.3;
}
.button:hover { background: var(--button-hover); border-color: var(--button-hover); text-decoration: none; }
.button.secondary { background: transparent; color: var(--secondary-text); border-color: var(--secondary-line); }
.button.secondary:hover { background: var(--tag); }
.button.small { padding: .45rem 1rem; font-size: .95rem; }
span.button { opacity: .8; }
.more { font-weight: 650; }

/* The top: the logo, the menu and the account. On a phone: the logo and the account, then the menu below. */
.top { background: var(--bg); border-bottom: 1px solid var(--line); }
/* 0.13.2: the logo 60 pixels high (40 before), so its name reads; the header no taller than before (less space
   above and below it). */
.bar {
  display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "logo nav account";
  align-items: center; gap: .5rem 1.6rem; padding-top: .4rem; padding-bottom: .4rem;
}
.logo { grid-area: logo; display: inline-flex; align-items: center; }
.logo img { display: block; height: 60px; width: auto; }
.top nav { grid-area: nav; justify-self: end; }
.top .account { grid-area: account; }
iframe.account { display: block; border: 0; width: 150px; height: 44px; background: transparent; }
nav ul { display: flex; flex-wrap: wrap; gap: .2rem 1.3rem; list-style: none; margin: 0; padding: 0; }
nav a { display: inline-block; padding: .3rem 0; color: var(--text); text-decoration: none; font-size: .98rem; font-weight: 520; }
nav a:hover { color: var(--link); text-decoration: underline; }
nav a[aria-current="page"] { color: var(--link); font-weight: 680; text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--highlight); }

/* Home */
main { display: block; }
.hero { padding: 4.5rem 0 4rem; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); line-height: 1.08; margin: 0 0 1.1rem; font-weight: 780; }
.hero .lead { font-size: 1.18rem; color: var(--muted); margin: 0 0 1.8rem; max-width: 34rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.6rem; margin: 0; }
/* 0.13.2: the front and the back of a card one above the other, each nearly the column's width and never wider
   than the picture itself, the back set to the right: larger, so their words read. */
.hero-cards { display: flex; flex-direction: column; gap: 1.2rem; }
.card-shot { margin: 0; }
.hero-cards .card-shot { width: 92%; max-width: 560px; }
.hero-cards .card-shot:nth-child(2) { align-self: flex-end; }
.card-shot img {
  display: block; width: 100%; border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow);
  background: #ffffff;
}
.card-shot figcaption { margin-top: .6rem; font-size: .92rem; color: var(--muted); text-align: center; }

.band { background: var(--soft); padding: 4.2rem 0; }
.plain { padding: 4.2rem 0; }
.section-title { font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.2; margin: 0 0 .6rem; font-weight: 760; }
.section-lead { color: var(--muted); margin: 0 0 1.6rem; max-width: 40rem; }
/* 0.13.2: two by two, every block the same width and the two in a row the same height (four in a row, or three and
   one, made blocks of different shapes and pictures too small to read); one column on a phone. Each picture under
   its words, as wide as the block allows and never wider than itself. */
.features {
  list-style: none; margin: 1.8rem 0 0; padding: 0; display: grid; gap: 1.3rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.feature { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 1.5rem 1.5rem 1.3rem;
  display: flex; flex-direction: column; }
.feature h3 { font-size: 1.15rem; line-height: 1.3; margin: 0 0 .5rem; }
.feature h3::before { content: ""; display: block; width: 2.2rem; height: 4px; border-radius: 4px; background: var(--highlight); margin-bottom: .9rem; }
.feature p { margin: 0 0 .8rem; color: var(--muted); }
.shot.small { margin: 1rem 0 0; }
.shot.small img { display: block; width: auto; max-width: 100%; margin: 0 auto; border-radius: 10px;
  border: 1px solid var(--line); background: #ffffff; }

.steps { list-style: none; margin: 1.8rem 0 0; padding: 0; display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.steps li { padding: 0; }
.steps .number {
  display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%;
  background: var(--highlight); color: var(--on-highlight); font-weight: 780; font-size: 1.15rem; margin-bottom: .8rem;
}
.steps h3 { font-size: 1.15rem; margin: 0 0 .4rem; }
.steps p { margin: 0; color: var(--muted); }

.deck-cards { list-style: none; margin: 0 0 1.4rem; padding: 0; display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.deck-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 1.4rem 1.5rem; display: flex; flex-direction: column; }
.deck-card h3 { margin: 0 0 .5rem; font-size: 1.2rem; }
.deck-card .go { margin: auto 0 0; padding-top: .8rem; }

.questions { margin-top: 1.4rem; border-top: 1px solid var(--line); }
.questions details { border-bottom: 1px solid var(--line); padding: 0 .2rem; }
.questions summary { cursor: pointer; padding: 1.05rem 0; font-weight: 650; font-size: 1.05rem; }
.questions details p { margin: 0 0 1.1rem; color: var(--muted); }

.closing { background: var(--closing); color: var(--closing-text); padding: 4rem 0; text-align: center; }
.closing h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0 0 .6rem; }
.closing p { color: var(--closing-muted); margin: 0 0 1.6rem; }
.closing .button { background: #9184f1; border-color: #9184f1; color: #1b1a4c; }
.closing .button:hover { background: #aaa1f6; border-color: #aaa1f6; }

/* The other pages */
.prose { max-width: 48rem; padding-top: 3rem; padding-bottom: 4rem; }
.prose h1 { font-size: clamp(2rem, 4vw, 2.6rem); line-height: 1.15; margin: .2rem 0 1.2rem; font-weight: 780; }
.prose h2 { font-size: 1.4rem; line-height: 1.3; margin: 2.4rem 0 .6rem; font-weight: 720; }
.prose h3 { font-size: 1.12rem; margin: 1.6rem 0 .4rem; font-weight: 700; }
.prose p, .prose ul, .prose ol { margin: .5rem 0 1rem; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin: .35rem 0; }
.prose li::marker { color: var(--highlight); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.prose .table { overflow-x: auto; }
.prose table { border-collapse: collapse; width: 100%; }
.prose th, .prose td { border: 1px solid var(--line); padding: .45rem .6rem; text-align: left; vertical-align: top; }
.prose .center { text-align: center; }
.prose .right { text-align: right; }
.panel { background: var(--soft); border: 1px solid var(--line); border-radius: 18px; padding: 1.3rem 1.5rem; margin: 1.4rem 0; }
.panel > :first-child { margin-top: 0; }
.panel > :last-child { margin-bottom: 0; }
.shot { margin: 1.6rem 0; }
.shot img { display: block; border-radius: 12px; border: 1px solid var(--line); }

/* Decks */
.prose .decks { list-style: none; padding: 0; margin: 1.4rem 0; }
.deck h2 { margin-top: 0; }
.facts { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; color: var(--muted); font-size: .95rem; margin: 0 0 .6rem; }
.tag { display: inline-block; padding: .1rem .7rem; border-radius: 999px; background: var(--tag); color: var(--tag-text); font-weight: 650; }

/* 0.13.2 (D-248): a deck's "Add to my account" with the account site's deck page over it. The website's own button
   is underneath, in the same place as without it; the <object> covers it (6 pixels round it, for the focus ring) and
   reaches 1.1rem below it, into the card's own space, for "On your account" and what the account includes. Its
   fallback, shown whenever the deck page cannot be, is the website's button again; with scripts off, the plain
   button alone. The button is 1rem here and on the deck page, so the two are the same size. */
.deck-go { position: relative; display: block; margin: -6px; padding: 6px; }
.panel > .deck-go:last-child { margin-bottom: -6px; }
.deck-go .button, .deck-card .go > .button, .deck > p > .button { font-size: 1rem; white-space: nowrap; }
.deck-go .deck-status {
  position: absolute; left: 0; top: 0; width: 100%; height: calc(100% - 6px + 1.1rem); border: 0; display: block;
  background: transparent; overflow: hidden;
}
.deck-go .deck-status > .button { margin: 6px; }
/* The <object>'s fallback (the deck page could not be shown): the website's own link, over its own button, drawn
   only on hover and focus, so at rest what is seen is that button, exactly as without the deck pages. Hidden by
   opacity, not by clear colours, so that its colours are the website's own whenever it is drawn. */
.deck-go .deck-status > .button:not(:hover):not(:focus-visible) { opacity: 0; }
.deck-go .deck-plain { display: none; }
.deck-go span.deck-under { opacity: 1; }  /* the website's own button, not the "not yet" one (span.button) */
@media (scripting: none) {
  .deck-go .deck-under, .deck-go .deck-status { display: none; }
  .deck-go .deck-plain { display: inline-block; }
}

/* What's new */
.prose .releases { list-style: none; padding: 0; }
.releases > li { border-top: 1px solid var(--line); padding-top: .4rem; }
.releases h2 { font-size: 1.15rem; }

/* The footer */
.foot { border-top: 1px solid var(--line); background: var(--bg); color: var(--muted); font-size: .95rem; padding: 2.4rem 0 2.8rem; }
.foot-grid { display: grid; grid-template-columns: auto 1fr; gap: 1rem 3rem; align-items: start; }
.foot-logo { margin: .2rem 0 0; }
.foot-logo img { display: block; height: 32px; width: auto; }
.foot p { margin: .3rem 0; }
.foot .links { display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; margin-top: .7rem; }

@media (max-width: 52rem) {
  .hero { padding: 2.6rem 0 2.8rem; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 2.2rem; }
  .features { grid-template-columns: minmax(0, 1fr); }
  .bar { grid-template-columns: auto 1fr; grid-template-areas: "logo account" "nav nav"; }
  .top nav { justify-self: start; }
  .top .account { justify-self: end; }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 30rem) {
  body { font-size: 16px; }
  .wrap { padding: 0 1.1rem; }
  /* 0.13.2: the logo 52 pixels high (34 before) with the header no taller: a little less space round the menu's
     links and between the two rows (0.13.1's phone header had no space above or below it, .wrap taking it away). */
  .top .bar { padding-top: .25rem; padding-bottom: .1rem; row-gap: 0; }
  .logo img { height: 52px; }
  nav ul { gap: .1rem 1rem; }
  .top nav a { padding: .2rem 0; }
  .hero h1 { font-size: 2.05rem; }
  .hero .lead { font-size: 1.08rem; }
  .hero-cards { gap: .9rem; }
  .hero-cards .card-shot { width: 100%; }
  .band, .plain, .closing { padding: 3rem 0; }
  .panel, .feature, .deck-card { padding: 1.1rem 1.15rem; }
  iframe.account { width: 132px; }
}
@media (prefers-reduced-motion: no-preference) {
  a, .button { transition: color .15s, background-color .15s, border-color .15s; }
}
@media print {
  .top nav, .top .account, .skip { display: none; }
}
