/* The screens of the sidebar's "Learn" group (ui/learning-view.js): the Overview, the Pix topics, a topic and the
   walkthrough of a sample payment. */
.learning-wrap {
  max-width: 1330px;
  margin: 0 auto;
  padding: clamp(25px, 3vw, 44px) clamp(22px, 3.6vw, 56px) 48px;
}
.page-heading {
  margin: 0 0 25px;
}
.page-heading h1,
.page-heading h2,
.home-section-head h2,
.topic-card h3,
.reading-card h2,
.walk-body h2 {
  color: var(--heading);
  font-weight: 650;
  letter-spacing: -0.046em;
}
.page-heading h1 {
  margin: 0 0 6px;
  font-size: clamp(36px, 3vw, 46px);
  line-height: 1.12;
}
.page-heading p {
  margin: 0;
  color: var(--ink-2);
  font-size: clamp(14px, 1.1vw, 16px);
  line-height: 1.58;
}
.home-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 241px;
  overflow: hidden;
  border-radius: 15px;
  color: #f6fff6;
  background:
    radial-gradient(ellipse at 80% 75%, #1b5947 0%, transparent 52%),
    linear-gradient(112deg, #103d32, #0a382d 58%, #154737);
}
.hero-copy {
  padding: 26px 0 27px clamp(23px, 3.1vw, 44px);
  z-index: 1;
}
.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #c1ecd3;
  font-size: 11.5px;
  font-weight: 600;
}
.hero-copy h2 {
  font-size: clamp(34px, 3.1vw, 49px);
  letter-spacing: -0.055em;
  font-weight: 600;
  line-height: 1.03;
  margin: 13px 0 10px;
}
.hero-copy p {
  margin: 0 0 18px;
  color: #d1e7dc;
  font-size: 14px;
  line-height: 1.45;
  max-width: 35ch;
}
.hero-button,
.action-primary {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  border: 0;
  border-radius: 6px;
  padding: 10px 15px;
  min-height: 37px;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
}
.hero-button {
  background: #b6f1bc;
  color: #143829;
}
.hero-button:hover {
  background: #d3ffd4;
}
.hero-art {
  position: relative;
  min-width: 0;
  display: grid;
  place-items: center;
}
.hero-art::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(#a8e7c143 0.75px, transparent 0.85px);
  background-size: 13px 13px;
  mask-image: linear-gradient(90deg, transparent, #000);
}
.payment-art {
  position: absolute;
  left: -6%;
  top: -3%;
  width: 107%;
  height: 109%;
  overflow: visible;
  pointer-events: none;
}
.home-section {
  margin-top: 27px;
}
.home-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 13px;
}
.home-section-head h2 {
  font-size: clamp(20px, 1.7vw, 25px);
  margin: 0;
  line-height: 1.25;
}
.work-text-link,
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: 600 13px/1.4 var(--ui);
  background: transparent;
  text-decoration: none;
  border: 0;
  color: var(--accent);
  padding: 0;
  cursor: pointer;
}
.work-text-link:hover,
.back-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.back-link {
  margin: 0 0 20px;
  color: var(--ink-2);
  flex-direction: row-reverse;
}
.back-link .work-icon {
  transform: rotate(180deg);
}
.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}
.topic-card,
.reading-card,
.walk-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 11px;
}
.topic-card {
  text-decoration: none;
  padding: 20px 20px 16px;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  color: var(--ink);
  box-shadow: 0 2px 3px #102f2004;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.topic-card:hover,
.resource-row:hover {
  border-color: var(--pix);
  box-shadow: 0 3px 12px #0b392318;
}
.topic-tile {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  border-radius: 11px;
}
/* The tiles take the page's tokens, so they follow the dark theme too. */
.topic-tile.mint {
  background: var(--pix-tint);
  color: var(--pix-strong);
}
.topic-tile.blue {
  background: var(--gen-tint);
  color: var(--gen);
}
.topic-tile.amber {
  background: var(--link-tint);
  color: var(--link);
}
.topic-tile.violet {
  background: var(--prof-tint);
  color: var(--prof);
}
.topic-card h3 {
  font-size: 19px;
  margin: 13px 0 4px;
  line-height: 1.3;
}
.topic-card p {
  font-size: 13.5px;
  line-height: 1.48;
  margin: 0 0 15px;
  color: var(--ink-2);
  max-width: 38ch;
}
.card-action {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 650;
  color: var(--accent);
}
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.resource-row {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 9px;
  padding: 15px 17px;
  text-align: left;
  cursor: pointer;
}
.resource-row > .work-icon:first-child {
  color: var(--accent);
}
.resource-row > .work-icon:last-child {
  margin-left: auto;
  color: var(--ink-3);
}
.resource-row strong,
.resource-row small {
  display: block;
}
.resource-row strong {
  font-weight: 640;
  font-size: 14px;
}
.resource-row small {
  font-size: 12px;
  margin-top: 2px;
  color: var(--ink-2);
}
.all-topics {
  margin-top: 25px;
}
.reading-grid {
  display: grid;
  grid-template-columns: 1.42fr 1fr;
  gap: 18px;
}
.topic-page .page-heading .topic-tile {
  margin-bottom: 14px;
}
.reading-card,
.walk-body {
  padding: clamp(22px, 2.6vw, 38px);
}
.reading-card h2,
.walk-body h2 {
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.2;
  margin: 0 0 12px;
}
.reading-card p,
.walk-body p {
  color: var(--ink-2);
  line-height: 1.65;
  font-size: 16px;
  margin: 0;
}
.takeaway,
.tech-note {
  background: var(--surface-2);
  border-left: 3px solid var(--pix);
  padding: 15px 18px;
  margin: 22px 0;
}
.takeaway p,
.tech-note p,
.detail-tools p {
  font-size: 14px;
}
.takeaway strong {
  display: block;
  margin-bottom: 4px;
}
.detail-tools .work-text-link {
  display: flex;
  margin-top: 18px;
}
.work-code {
  display: block;
  font: 500 13px/1.6 var(--mono);
  padding: 12px;
  margin-top: 16px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow-wrap: anywhere;
  color: var(--ink);
  background: var(--surface-2);
}
.walk-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--surface);
  margin-bottom: 18px;
  overflow: hidden;
}
.walk-steps a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 550;
  font-size: 13px;
  line-height: 1.35;
  border-bottom: 3px solid transparent;
}
.walk-steps a:hover {
  background: var(--surface-2);
}
.walk-steps a[aria-current] {
  border-color: var(--accent);
  background: var(--nav-sel);
  color: var(--accent);
}
.walk-steps a span {
  width: 23px;
  height: 23px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--rule-strong);
  border-radius: 50%;
  font: 600 12px var(--mono);
}
.walk-steps a[aria-current] span {
  background: var(--accent);
  color: var(--surface);
  border-color: transparent;
}
.walk-steps .passed span {
  color: var(--accent);
}
.walk-card {
  display: grid;
  grid-template-columns: 1.4fr minmax(230px, 0.85fr);
  align-items: center;
}
.walk-body .work-kicker {
  color: var(--accent);
  margin-bottom: 7px;
}
.tech-note {
  margin: 19px 0 0;
}
.tech-note strong {
  font: 600 13px var(--mono);
  color: var(--accent);
}
.tech-note .work-text-link {
  margin-top: 10px;
}
.sample-transfer {
  margin: 20px 24px 20px 0;
  padding: 20px;
  background: var(--surface-2);
  border-radius: 9px;
  border: 1px solid var(--rule);
}
.sample-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
}
.sample-party,
.party-names {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sample-party {
  gap: 4px;
  margin-top: 20px;
  color: var(--accent);
}
.sample-party i {
  flex: 1;
  border-bottom: 1px dashed var(--rule-strong);
}
.sample-party span {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  background: var(--nav-sel);
  border-radius: 50%;
  font-weight: 650;
}
.party-names {
  font-size: 12px;
  color: var(--ink-2);
  margin: 4px 0 15px;
}
.sample-amount {
  font-size: 29px;
  letter-spacing: -0.05em;
  font-weight: 650;
  color: var(--heading);
}
.sample-transfer dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  margin: 12px 0 0;
  border-top: 1px solid var(--rule);
  padding-top: 12px;
  font-size: 12px;
}
.sample-transfer dt {
  color: var(--ink-3);
}
.sample-transfer dd {
  margin: 0;
  text-align: right;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.walk-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
}
.walk-controls .back-link {
  margin: 0;
}
.action-primary {
  background: var(--accent);
  color: var(--surface);
}
@media (max-width: 1020px) {
  .topic-grid {
    gap: 10px;
  }
  .topic-card {
    padding: 16px;
  }
  .learning-wrap {
    padding-left: 23px;
    padding-right: 23px;
  }
  .walk-steps a {
    font-size: 12px;
    padding: 12px 7px;
    gap: 5px;
  }
  .reading-grid {
    grid-template-columns: 1.15fr 1fr;
  }
}
@media (max-width: 760px) {
  .learning-wrap {
    padding: 25px 16px 35px;
  }
  .page-heading {
    margin-bottom: 19px;
  }
  .page-heading h1 {
    font-size: 35px;
  }
  .topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .home-section .topic-grid > :last-child:nth-child(odd) {
    grid-column: 1/-1;
  }
  .home-hero {
    min-height: 218px;
    grid-template-columns: 1.1fr 0.9fr;
  }
  .hero-copy {
    padding: 20px 0 23px 20px;
  }
  .hero-copy h2 {
    font-size: 34px;
  }
  .hero-copy p {
    font-size: 13px;
  }
  .payment-art {
    width: 155%;
    left: -25%;
    height: 105%;
    top: 6%;
  }
  .reading-grid,
  .walk-card {
    grid-template-columns: 1fr;
  }
  .sample-transfer {
    margin: 0 20px 20px;
  }
  .walk-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .topic-grid,
  .resource-grid {
    grid-template-columns: 1fr;
  }
  .topic-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 18px;
    column-gap: 13px;
    align-items: start;
    padding: 16px;
  }
  .topic-card .topic-tile {
    grid-area: 1/1/3/2;
  }
  .topic-card h3 {
    margin: 0 0 3px;
    grid-area: 1/2;
  }
  .topic-card p {
    margin: 0;
    grid-area: 2/2;
    font-size: 13px;
  }
  .card-action {
    grid-area: 1/3/3/4;
    align-self: center;
    font-size: 0;
    margin: 0;
    gap: 0;
  }
  .home-section {
    margin-top: 24px;
  }
  .home-section-head {
    align-items: center;
    gap: 8px;
  }
  .resource-grid {
    gap: 9px;
  }
  .hero-art {
    overflow: hidden;
  }
  .hero-copy {
    padding-right: 0;
  }
  .home-hero {
    grid-template-columns: 59% 41%;
  }
  .payment-art {
    width: 205%;
    left: -54%;
    top: 12%;
    height: 86%;
  }
  .home-section .topic-grid > :last-child:nth-child(odd) {
    grid-column: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .topic-card {
    transition: none;
  }
}
.outcome-options {
  display: inline-flex;
  border: 1px solid var(--rule);
  border-radius: 7px;
  overflow: hidden;
  margin: 0 0 14px;
}
.outcome-options a {
  padding: 7px 14px;
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
}
.outcome-options a[aria-current='true'] {
  background: var(--nav-sel);
  color: var(--accent);
}

/* Your sandbox, on the Overview: the setup and what to do when something fails */
.home-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 16px;
}
.home-card {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--surface);
}
.home-card h3 {
  margin: 4px 0 0;
  font-size: 19px;
}
.home-card p {
  margin: 0;
  color: var(--ink-2);
  line-height: 1.55;
}
.home-progress {
  width: 100%;
  height: 8px;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  appearance: none;
  background: var(--surface-2);
}
.home-progress::-webkit-progress-bar {
  background: var(--surface-2);
  border-radius: 999px;
}
.home-progress::-webkit-progress-value {
  background: var(--pix);
  border-radius: 999px;
}
.home-progress::-moz-progress-bar {
  background: var(--pix);
  border-radius: 999px;
}
.home-note {
  font-size: 13.5px;
}
/* A topic's picture: the Guide's own drawing, under the answer, the width of the page. */
.topic-figure {
  margin: 18px 0 0;
}
.topic-figure .gd-scroll {
  background: var(--surface-2);
}
.topic-figure figcaption {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 80ch;
}
.topic-figure .gd-traps {
  margin-top: 12px;
}

/* Your path, on the Overview: the parts in their order, each with how far it is and the way in. The part to do
   next stands out; a line joins the numbers. */
.path-count {
  color: var(--ink-3);
  font-size: 13px;
  white-space: nowrap;
}
.path-lead {
  margin: -5px 0 15px;
  max-width: 78ch;
  color: var(--ink-2);
  line-height: 1.55;
}
.path {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
}
.path-part {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) minmax(0, max-content);
  gap: 6px 18px;
  align-items: start;
  padding: 20px 22px;
  border-top: 1px solid var(--rule);
}
.path-part:first-child {
  border-top: 0;
}
.path-part.is-now {
  background: color-mix(in srgb, var(--nav-sel) 45%, var(--surface));
  box-shadow: inset 3px 0 0 var(--accent);
}
/* The line down the numbers, from one part to the next. */
.path-part:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 37px;
  top: 56px;
  bottom: -20px;
  width: 2px;
  background: var(--rule);
}
.path-part.is-done:not(:last-child)::before {
  background: var(--pix);
  opacity: 0.45;
}
.path-mark {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--rule-strong);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.path-part.is-done .path-mark {
  border-color: transparent;
  background: var(--pix-tint);
  color: var(--pix-strong);
}
.path-part.is-now .path-mark {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--surface);
}
.path-body h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin: 4px 0 4px;
  font-size: 18px;
  line-height: 1.3;
}
.path-said {
  color: var(--ink-3);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0;
}
.path-part.is-done .path-said {
  color: var(--ok);
}
.path-body p {
  margin: 0;
  max-width: 68ch;
  color: var(--ink-2);
  line-height: 1.55;
}
.path-body .path-know {
  margin-top: 4px;
  color: var(--ink-3);
  font-size: 13.5px;
}
.path-know b {
  color: var(--ink-2);
  font-weight: 600;
}
.path-body .path-note {
  margin-top: 8px;
  font-size: 13.5px;
}
.path-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.path-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.4;
  cursor: pointer;
}
.path-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.path-chip.is-read {
  border-color: transparent;
  background: var(--pix-tint);
  color: var(--pix-strong);
}
.path-ways {
  display: grid;
  justify-items: end;
  gap: 8px;
  padding-top: 4px;
  max-width: 280px;
}
.path-ways .action-primary {
  cursor: pointer;
}
.path-way {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 13px;
  min-height: 35px;
  border: 1px solid var(--rule-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.path-way:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.path-aside {
  margin: 0;
  max-width: 30ch;
  color: var(--ink-3);
  font-size: 12.5px;
  line-height: 1.45;
  text-align: right;
}
.hero-copy h2 {
  max-width: 13ch;
  text-wrap: balance;
}
.hero-button {
  cursor: pointer;
  text-align: left;
}
@media (max-width: 900px) {
  .path-part {
    grid-template-columns: 32px minmax(0, 1fr);
  }
  .path-ways {
    grid-column: 2;
    justify-items: start;
    max-width: none;
  }
  .path-aside {
    max-width: none;
    text-align: left;
  }
}
@media (max-width: 560px) {
  .path-part {
    gap: 6px 12px;
    padding: 16px 14px;
  }
  .path-part:not(:last-child)::before {
    left: 29px;
    top: 52px;
    bottom: -16px;
  }
}
