@import url("https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700&family=Merriweather:wght@400;700&display=swap");

/* Main site styles. Loads after tokens.css and bundle.css. */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  line-height: 1.6;
  color: var(--text);
}

/* Selection uses the blue tint: ink on the orange signal fails 4.5:1. */
::selection {
  background: var(--blue-tint);
  color: var(--ink);
}

.header {
  background: var(--paper);
  box-shadow: var(--shadow-header);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

/* Equal 1fr sides keep the sections exactly centered. */
.header-bar {
  align-items: center;
  display: grid;
  gap: var(--space-8);
  grid-template-areas: "brand sections actions";
  grid-template-columns: 1fr auto 1fr;
  min-height: 64px;
}
.header-bar .logo { grid-area: brand; justify-self: start; }

.logo {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  font-size: 1.25rem;
  font-weight: bold;
  gap: 1px;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.logo-b { display: block; flex: none; height: 30px; width: 30px; }

.header-sections {
  display: flex;
  gap: var(--space-6);
  grid-area: sections;
  justify-content: center;
}

.header-sections a {
  border-bottom: 2px solid transparent;
  color: var(--ink);
  font-weight: 500;
  padding-block: var(--space-1);
  text-decoration: none;
  white-space: nowrap;
}

.header-sections a:hover { color: var(--blue); }
.header-sections a[aria-current] { border-bottom-color: var(--blue); }

.header-actions {
  align-items: center;
  display: flex;
  gap: var(--space-2);
  grid-area: actions;
  justify-self: end;
}

.icon {
  fill: none;
  flex: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.language,
.account-header {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.875rem;
  font-weight: 500;
  gap: 6px;
  min-height: 36px;
  padding: 0 var(--space-3);
  text-decoration: none;
}

.language { color: var(--muted); }
.language:hover { background: var(--surface); color: var(--ink); }

.account-header {
  border-color: var(--rule);
  color: var(--ink);
  max-width: 11rem;
}

.account-header span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-header:hover { border-color: var(--ink); }

/* On mobile the sections take a second row and the header grows 32px;
   body padding and anchor offsets grow to match. */
@media (max-width: 599px) {
  html { scroll-padding-top: 32px; }
  body { padding-top: 32px; }
  .header-bar {
    column-gap: var(--space-4);
    grid-template-areas: "brand actions" "sections sections";
    grid-template-columns: 1fr auto;
    grid-template-rows: 56px 40px;
    row-gap: 0;
  }
  .logo { font-size: 1.05rem; }
  .logo-b { height: 26px; width: 26px; }
  .header-actions { gap: var(--space-1); }
  .language, .account-header { padding: 0 var(--space-2); }
  .account-header { max-width: 8.5rem; }
  .header-sections { align-self: start; gap: var(--space-3); font-size: 14px; }
}

.hero:not(.block) {
  background: var(--surface);
  color: var(--ink);
  padding: 6.5rem 2rem 2.25rem;
  text-align: left;
  border-bottom: 1px solid var(--rule);
}

.chapter-number {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-family: var(--font-sans);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 1rem;
}

.chapter-number span + span::before {
  content: "/";
  margin-right: 0.6rem;
  opacity: 0.45;
}

.chapter-number .card-type {
  color: var(--ink);
}

.hero:not(.block) h1 {
  font-size: 2.15rem;
  line-height: 1.22;
  letter-spacing: -0.01em;
  margin-bottom: 0;
  font-weight: bold;
  text-wrap: balance;
}

.hero:not(.block) p {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--text);
  margin: 0.9rem 0 0;
  max-width: 34em;
}

.hero:not(.block) p.chapter-author {
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 0.9rem;
}

.hero:not(.block) p.chapter-author a {
  color: inherit;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.hero-text {
  flex: 1;
  min-width: 0;
}

.hero-art {
  flex: none;
  width: 176px;
}

.hero-art img {
  display: block;
  width: 100%;
  height: auto;
}

.content a.cta-button {
  background: var(--ink);
  box-shadow: none;
  color: var(--paper);
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  margin-top: 0.4rem;
  padding: 0.72rem 1.15rem;
  text-decoration: none;
}

.content a.cta-button:hover {
  background: var(--ink);
  box-shadow: none;
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

.prev-chapter {
  margin-bottom: 1rem;
}

.prev-chapter a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
}

.prev-chapter a:hover {
  text-decoration: underline;
}

.content {
  background: white;
  padding: 2rem 1rem;
  min-height: 60vh;
  font-size: 1.1875rem;
}

.container {
  max-width: var(--column-book);
  margin: 0 auto;
}

.content h1 {
  color: var(--ink);
  margin-bottom: 1rem;
  font-size: 1.8rem;
  scroll-margin-top: 60px;
}

.content h2 {
  color: var(--ink);
  margin: 2rem 0 1rem;
  font-size: 1.4rem;
}

.content h3 {
  color: var(--ink);
  margin: 1.5rem 0 0.5rem;
  font-size: 1.2rem;
}

.content p {
  margin-bottom: 1.35em;
  text-wrap: pretty;
}

.content ul,
.content ol {
  margin-bottom: 1.35em;
  padding-left: 2rem;
}

.content hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2.5rem 0;
}

.content li {
  margin-bottom: 0.5rem;
}

.content blockquote {
  background: var(--surface);
  border-left: 4px solid var(--ink);
  padding: 1rem;
  margin: 1.5rem 0;
  font-style: italic;
  font-size: 90%;
  display: flow-root;
}

.content blockquote p {
  margin-bottom: 0;
}

.content code {
  background: var(--surface);
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
  font-size: 0.9rem;
}

.content pre {
  background: var(--surface);
  padding: 1rem;
  border-radius: 5px;
  overflow-x: auto;
  margin: 1rem 0;
}

.content pre code {
  background: none;
  padding: 0;
}

.content a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--signal);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: background 0.15s ease;
}

.content a:hover {
  color: var(--ink);
  background: var(--signal);
  box-shadow: 0 0 0 2px var(--signal);
  text-decoration-color: transparent;
}

sup a {
  text-decoration: none;
  padding: 0 0.2rem;
}

.content .reversefootnote {
  text-decoration: none;
  color: var(--muted);
  padding: 0 0.2rem;
}

.content .reversefootnote:hover {
  background: none;
  box-shadow: none;
  color: var(--ink);
}

.content .callout {
  padding: 20px;
  margin: 20px 0;
  border: 1px solid var(--rule);
  border-left-width: 5px;
  border-radius: 3px;
  font-size: 95%;
  opacity: 0.9;
}

.content .callout-hint {
  border-left-color: var(--path-start);
}

.content .callout-example {
  border-left-color: var(--blue);
}

.content .callout-warning {
  border-left-color: var(--signal);
}

.reading-time {
  opacity: 0.6;
}

.chapters-list {
  list-style: none;
  padding: 0;
}

.chapters-list li {
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  border: 1px solid var(--rule);
  border-radius: 8px;
  transition: box-shadow 0.2s ease;
}

.chapters-list li:hover {
  box-shadow: var(--shadow-menu);
}

.chapters-list a {
  color: var(--ink);
  text-decoration: none;
  font-weight: bold;
  font-size: 1.2rem;
}

.chapters-list a:hover {
  color: var(--blue);
}

.chapter-description {
  color: var(--muted);
  margin-top: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.book-cover {
  float: right;
  width: 200px;
  height: auto;
  margin: 0.4rem 0 1.25rem 1.75rem;
  box-shadow: var(--shadow-menu);
}

@media (max-width: 600px) {
  .book-cover {
    float: none;
    display: block;
    width: 170px;
    margin: 0 auto 1.75rem;
  }
}

.content-footer {
  background: var(--surface);
  border-top: 1px solid var(--rule);
  color: var(--text);
  padding: 2rem;
  text-align: right;
}

.next-chapter {
  font-family: var(--font-sans);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
}

.next-chapter small {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.next-chapter:hover {
  opacity: 0.8;
}

.chapter-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.prev-link,
.next-link {
  background: var(--ink);
  color: white;
  padding: 0.8rem 1.5rem;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background 0.3s ease;
}

.prev-link:hover,
.next-link:hover {
  background: var(--ink);
}

.prev-link.disabled,
.next-link.disabled {
  background: var(--rule);
  cursor: not-allowed;
  pointer-events: none;
}

.footer {
  background: var(--surface);
  color: var(--ink);
  opacity: 0.6;
  padding: 1rem 2rem 2rem;
  text-align: left;
}

.footer h3 {
  color: var(--ink);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.footer img {
  float: left;
  margin-right: 1rem;
  width: 100%;
  max-width: 64px;
  height: auto;
}

.footer-nav {
  list-style: none;
  display: flex;
  justify-content: left;
  gap: 2rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.footer-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-nav a:hover {
  color: var(--blue);
}

.copyright {
  font-size: 0.8rem;
  margin-top: 1rem;
  text-align: center;
}

.copyright img {
  max-width: 1em;
  max-height: 1em;
  margin-left: 0.2em;
  float: none;
}

.copyright a {
  color: var(--ink);
}

.content p strong:only-child {
  display: inline-block;
  margin-top: 0.5rem;
}

.content--entry h2,
.content--section h2 {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 3rem 0 1.1rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.content--entry h2::after,
.content--section h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.content--entry h2::before,
.content--section h2::before {
  content: "";
  flex: none;
  width: 11px;
  height: 11px;
  background: var(--signal);
}

.content--system h2::before {
  background: var(--ink);
  box-shadow: 4px 4px 0 var(--signal);
}

.content--entry h2:first-child,
.content--section h2:first-child {
  margin-top: 0;
}

/* The pull quote is the blockquote right after an h2; other blockquotes are
   fill-in templates. */
.content--entry h2 + blockquote {
  margin: 1.25rem 0 2.5rem;
  padding: 0 0 1.5rem;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  background: none;
  font-family: var(--font-serif);
  font-style: normal;
  font-size: 1.45rem;
  line-height: 1.45;
  font-weight: bold;
  color: var(--ink);
  text-wrap: pretty;
}

.content--entry blockquote {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--signal);
  padding: 1.15rem 1.3rem;
  margin: 1.6rem 0 1.9rem;
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--text);
}

.content--section .container > p:first-of-type {
  font-size: 1.34rem;
  line-height: 1.55;
  color: var(--ink);
}

.content--section h2 + ul {
  list-style: none;
  padding-left: 0;
}

.content--section h2 + ul li {
  margin-bottom: 0;
  border-bottom: 1px solid var(--rule);
}

.content--section h2 + ul li a {
  display: block;
  padding: 0.85rem 0;
  font-size: 1.0625rem;
  line-height: 1.45;
  text-decoration: none;
}

.content--section h2 + ul li a:hover {
  background: var(--surface);
  box-shadow: none;
  color: var(--blue);
}

@media (min-width: 768px) {
  .content--entry h2::before,
  .content--section h2::before {
    position: absolute;
    left: -2rem;
  }


  .chapter-navigation {
    flex-direction: row;
  }
}

@media (min-width: 1024px) {
  .content {
    padding: 3rem 2rem;
  }

  .hero {
    padding: 6.5rem 2rem 2.5rem;
  }
}

@media (max-width: 767px) {
  .chapter-navigation {
    flex-direction: column;
  }

  .hero {
    padding: 6rem 1rem 1.75rem;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .hero-inner {
    gap: 1.25rem;
  }

  .hero-art {
    width: clamp(80px, 26vw, 120px);
  }

  .content li {
    margin-bottom: 0.75rem;
  }
}

/* Clears the fixed header. */
.content [id] {
  scroll-margin-top: 80px;
}

.content .footnotes {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9rem;
  opacity: 0.85;
}

.content .footnotes ol {
  padding-left: 1.5rem;
}

.content .footnotes p {
  margin-bottom: 0.75rem;
  overflow-wrap: anywhere;
}

.content .footnotes li {
  margin-bottom: 1rem;
}

.content--notes {
  min-height: 0;
}

.content--notes .footnotes {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.content--notes .footnotes ol {
  margin-bottom: 0;
}

.content--notes .footnotes li:last-child,
.content--notes .footnotes li:last-child p:last-child {
  margin-bottom: 0;
}

/* Below the fixed header (z-index 1000). */
.share {
  position: absolute;
  z-index: 999;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top: 1px solid var(--rule);
  box-shadow: var(--shadow-menu);
  font-family: var(--font-sans);
}

.share[hidden] {
  display: none;
}

.share-bar[hidden],
.share-channels[hidden] {
  display: none;
}

.share-channels {
  display: flex;
}

.share button,
.share-channels a {
  display: block;
  padding: 0.55rem 0.95rem;
  background: none;
  border: 0;
  font-family: inherit;
  font-size: 0.92rem;
  line-height: 1.35;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.share-channels a + a,
.share-channels a + button {
  border-left: 1px solid var(--rule);
}

.share button:hover,
.share-channels a:hover {
  background: var(--surface);
}

.share-button {
  font-weight: 500;
}

/* The auto margin lives here, not on the buttons: two auto margins in a flex
   split the free space. */
.chapter-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.share-page {
  display: flex;
  padding: 0;
  background: none;
  border: 0;
  color: var(--muted);
  opacity: 0.55;
  cursor: pointer;
}

.share-page:hover,
.share-page[aria-expanded="true"] {
  opacity: 1;
}

@media (max-width: 480px) {
  .share-channels {
    flex-direction: column;
  }

  .share-channels a + a,
  .share-channels a + button {
    border-left: 0;
    border-top: 1px solid var(--rule);
  }
}

.keep[aria-pressed="true"] {
  opacity: 1;
}

.keep[aria-pressed="true"] svg {
  fill: var(--signal);
}

.filter-symptoms {
  display: block;
  width: 100%;
  max-width: 26rem;
  margin: 0 0 2rem;
  padding: 0.6rem 0.8rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 0;
  -webkit-appearance: none;
}

.filter-symptoms:focus {
  outline: 0;
  border-color: var(--blue);
}

.filter-empty {
  font-family: var(--font-sans);
  color: var(--muted);
}

/* Explicit so a future display rule can't silently break the filter. */
.content h2[hidden],
.content ul[hidden],
.content li[hidden],
.filter-empty[hidden] {
  display: none;
}

.note {
  background: var(--surface);
  padding: 2rem;
  font-family: var(--font-sans);
}

.note[hidden] {
  display: none;
}

.note-question {
  margin: 0 0 0.8rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.note-values,
.note-reasons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.note button {
  font-family: inherit;
  font-size: 0.92rem;
  padding: 0.5rem 1.1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  cursor: pointer;
}

.note button:hover {
  background: var(--surface);
}

.note button[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.note-next {
  margin-top: 1.8rem;
}

.note-next[hidden],
.note-thanks[hidden] {
  display: none;
}

.note-next .note-question {
  margin-top: 0;
}

.note-free {
  display: block;
  margin: 1.3rem 0 0.9rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.note-free textarea {
  display: block;
  width: 100%;
  max-width: 40rem;
  margin-top: 0.4rem;
  padding: 0.6rem 0.75rem;
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 0;
  -webkit-appearance: none;
  resize: vertical;
}

.note-free textarea:focus {
  outline: 0;
  border-color: var(--blue);
}

.note-send {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.note-thanks {
  margin: 1.2rem 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.discussion {
  background: var(--surface);
  padding: 2.5rem 2rem;
  font-family: var(--font-sans);
  border-top: 1px solid var(--rule);
}

.discussion-title {
  margin: 0 0 1.2rem;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.discussion-open {
  font-family: inherit;
  font-size: 0.92rem;
  padding: 0.5rem 1.1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  cursor: pointer;
}

.discussion-open:hover {
  background: var(--surface);
}

.discussion-open[hidden],
.discussion-thread[hidden],
.discussion-box[hidden],
.discussion-passage[hidden] {
  display: none;
}

.comment {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--rule);
  padding: 1rem 1.2rem;
  margin-bottom: 1rem;
}

.comment--author {
  border-left-color: var(--signal);
}

.comment--answer {
  margin: 1rem 0 0 1.2rem;
  background: var(--surface);
}

.comment-who {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin: 0 0 0.5rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
}

.comment-who a {
  color: var(--ink);
}

.comment-who small {
  font-size: 0.76rem;
  font-weight: normal;
  color: var(--muted);
}

.comment-text p {
  margin: 0 0 0.7rem;
  font-size: 0.95rem;
  line-height: 1.65;
}

.comment-text p:last-child {
  margin-bottom: 0;
}

.comment-passage,
.discussion-passage {
  margin: 0 0 0.8rem;
  padding: 0.6rem 0.9rem;
  background: var(--surface);
  border-left: 3px solid var(--signal);
  font-size: 0.9rem;
  font-style: italic;
  line-height: 1.55;
}

.comment-reply {
  margin-top: 0.6rem;
  padding: 0;
  font-family: inherit;
  font-size: 0.82rem;
  color: var(--muted);
  background: none;
  border: 0;
  text-decoration: underline;
  cursor: pointer;
}

.discussion-box {
  margin-top: 1.4rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top: 1px solid var(--rule);
  padding: 1.4rem;
}

.discussion-filter {
  margin: 0 0 1.2rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.discussion-form label,
.discussion-form legend {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink);
}

.discussion-form fieldset {
  margin-top: 1.1rem;
  padding: 0;
  border: 0;
}

.discussion-form legend {
  font-weight: normal;
  color: var(--muted);
}

.discussion-form label.discussion-radio {
  display: inline-block;
  margin: 0 1.2rem 0.5rem 0;
  font-weight: normal;
}

.discussion-form input[type="text"],
.discussion-form input[type="url"],
.discussion-form select,
.discussion-form textarea {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.55rem 0.7rem;
  font-family: inherit;
  font-size: 0.93rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 0;
  -webkit-appearance: none;
}

.discussion-form textarea {
  line-height: 1.6;
  resize: vertical;
}

.discussion-form input:focus,
.discussion-form select:focus,
.discussion-form textarea:focus {
  outline: 0;
  border-color: var(--blue);
}

.discussion-who {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.1rem;
}

@media (min-width: 620px) {
  .discussion-who {
    grid-template-columns: repeat(3, 1fr);
  }
}

.discussion-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.4rem;
}

.discussion-actions button {
  font-family: inherit;
  font-size: 0.93rem;
  font-weight: 500;
  padding: 0.6rem 1.3rem;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  cursor: pointer;
}

.discussion-actions button:hover {
  background: var(--blue);
  border-color: var(--blue);
}

.discussion-actions button:disabled {
  opacity: 0.45;
  cursor: default;
}

.discussion-state,
.discussion-thanks {
  font-size: 0.9rem;
  color: var(--muted);
}

.discussion-elsewhere {
  margin: 1.8rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.discussion-elsewhere a {
  color: var(--muted);
}

.contact-fields {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.4rem;
}

@media (min-width: 560px) {
  .contact-fields {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    align-items: end;
  }
}

.contact-fields[data-channel="mail"] .contact-dial-code {
  display: none;
}

.contact-fields[data-channel="mail"] {
  grid-template-columns: 1fr;
}

.contact-dial-code {
  font-size: 0.82rem;
  color: var(--muted);
}

/* appearance: none so the select matches the input's height; the arrow is redrawn. */
.contact-dial-code select {
  -webkit-appearance: none;
  appearance: none;
  line-height: 1.5;
  padding-right: 2.1rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%235a6472' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
}

.contact-fields > input {
  align-self: end;
}

/* Draft badge: scaffolding, red is off-palette on purpose. Remove at launch
   with the badge in layouts/_header.html.erb and draft_banner in config/site.yml. */

.draft-badge {
  position: fixed;
  bottom: 0.6rem;
  left: 0.6rem;
  /* Above the fixed header (z-index 1000). */
  z-index: 1100;
  pointer-events: none;
}

.draft-badge span {
  display: block;
  padding: 0.3rem 0.7rem;
  border-radius: 2px;
  background: var(--signal);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.band {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  padding: 6.5rem 0 2.25rem;
}

.band-body {
  max-width: var(--column-prose);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
}

.band-text {
  flex-grow: 1;
  min-width: 0;
}

.band-kicker {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

.band-kicker a {
  color: inherit;
  text-decoration: none;
}

.band-kicker a:hover {
  text-decoration: underline;
}

.band-title {
  color: var(--ink);
  font-size: 2.15rem;
  font-weight: bold;
  line-height: 1.22;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

.band-hook {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--text);
  margin: 0.9rem 0 0;
  max-width: 34em;
}

.band-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.6rem;
}

.band-filter {
  margin-top: 1.6rem;
}

.band-filter .filter-symptoms {
  margin-bottom: 0;
  min-height: 44px;
  border-color: var(--ink);
}

.band-side {
  flex: 0 0 10rem;
  border-left: 1px solid var(--rule);
  padding-left: 1.5rem;
  margin-top: 0.35rem;
}

.band-cover {
  display: block;
  width: 8rem;
  height: auto;
  margin-bottom: 1.1rem;
  border: 1px solid var(--rule);
}

.band-meta {
  margin: 0;
  font-family: var(--font-sans);
}

.band-caption {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
}

.band-meta dt {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.band-meta dd {
  margin: 0.2rem 0 1.15rem;
  font-size: 0.95rem;
  color: var(--ink);
}

.band-meta dd:last-child {
  margin-bottom: 0;
}

.rail {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
}

.rail-body {
  max-width: var(--column-prose);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  flex-wrap: wrap;
  column-gap: 2rem;
}

.band--narrow .band-body,
.band--narrow + .rail .rail-body {
  max-width: 42.5rem;
}

.rail--home .rail-body {
  max-width: 44rem;
}

/* No dividers between items: the rail wraps, and a divider would dangle at line ends. */
.rail-item {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  padding: 0.85rem 0;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.3;
  color: var(--ink);
  text-decoration: none;
}

.rail-item:hover span:last-child {
  text-decoration: underline;
  text-decoration-color: var(--signal);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.rail-num,
.rail-arrow {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.warning .landing-wrap > p:first-child,
.warning .container > p:first-child {
  background: var(--surface);
  border-left: 3px solid var(--signal);
  padding: 0.9rem 1.1rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.6;
}

@media (max-width: 767px) {
  .band {
    padding: 5.5rem 0 1.75rem;
  }

  .band-body {
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
  }

  .band-title {
    font-size: 1.65rem;
  }

  .band-actions {
    flex-direction: column;
  }

  .band-actions .button {
    justify-content: center;
  }

  .band-side {
    flex: 0 0 auto;
    border-left: 0;
    border-top: 1px solid var(--rule);
    padding: 1rem 0 0;
    margin-top: 0;
  }

  .band-cover {
    width: 7rem;
  }

  .band-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.4rem;
  }

  .band-meta dd {
    margin: 0;
  }

  .band-meta dt ~ dt {
    margin-left: 0.85rem;
  }

  .rail-body {
    column-gap: 1.5rem;
  }
}

.content--prose .container {
  max-width: var(--column-prose);
}

/* All four values set: overriding only the vertical padding drops .content's side gutter. */
.content--prose {
  padding: 3rem var(--gutter-mobile) 4rem;
}

@media (min-width: 768px) {
  .content--prose { padding-inline: var(--space-8); }
}

.content--prose table {
  display: block;
  overflow-x: auto;
  max-width: 100%;
}

/* Clears the fixed header. */
.content--prose h2,
.content--prose h3 {
  scroll-margin-top: 6rem;
}

.content--book {
  font-family: var(--font-serif);
  line-height: 1.75;
}

/* The chapter title band sits outside the reading column, so it sets its own serif. */
.hero:not(.block) h1 {
  font-family: var(--font-serif);
}

.content:not(.content--book) {
  font-size: 1.0625rem;
}

.hero-cover {
  border: 1px solid var(--rule);
  justify-self: center;
  max-width: 17rem;
}

.hero-cover img { display: block; width: 100%; }
.hero-cover:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.band-side--scene {
  border-left: 0;
  padding-left: 0;
}

.band-scene {
  display: block;
  height: auto;
  max-width: 100%;
  width: 20rem;
}

@media (max-width: 720px) {
  .band-scene { margin-inline: auto; width: 15rem; }
}


/* `.content a` underlines every link; a card is one big link, so undo it here. */

.content .path-card,
.content .book-card,
.content .path-card:hover,
.content .book-card:hover {
  background: var(--paper);
  text-decoration: none;
}

.content .grid { margin: var(--space-8) 0; }

img {
  height: auto;
  max-width: 100%;
}

.account {
  background: var(--surface);
  min-height: 70vh;
  padding: 7rem var(--gutter-mobile) var(--space-16);
}

.account-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  margin-inline: auto;
  max-width: 28rem;
  padding: var(--space-8) var(--space-6);
}

.account-card h1 {
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1.25;
  margin: 0 0 var(--space-4);
}

.account-intro,
.account-email { margin: 0 0 var(--space-6); }
.account-email { color: var(--muted); font-size: 0.93rem; overflow-wrap: anywhere; }

.account-form { display: grid; gap: var(--space-2); }

.account-form label {
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 500;
  margin-top: var(--space-2);
}

.account-form input[type="email"],
.account-form input[type="text"],
.account-form input[type="password"] {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 0;
  color: var(--ink);
  font: inherit;
  min-height: 44px;
  padding: 0.55rem 0.7rem;
  width: 100%;
  -webkit-appearance: none;
}

.account-form input:focus { border-color: var(--blue); outline: 0; }
.account-form .button { justify-content: center; margin-top: var(--space-4); }
.account-form .cf-turnstile { margin-top: var(--space-4); }

.account-two { display: grid; gap: var(--space-2) var(--space-4); }
.account-two > div { display: grid; gap: var(--space-2); }

@media (min-width: 480px) {
  .account-two { grid-template-columns: 1fr 1fr; }
}

.account-help { color: var(--muted); font-size: 0.85rem; margin: 0; }
.account-link { font-size: 0.93rem; margin: var(--space-6) 0 0; }
.account-link a,
.account-email a { color: var(--blue); }

.account-message {
  border-left: 3px solid var(--blue);
  background: var(--blue-tint);
  color: var(--ink);
  font-size: 0.93rem;
  margin: 0 0 var(--space-4);
  padding: var(--space-3) var(--space-4);
}

.account-message--alert { background: var(--signal-tint); border-left-color: var(--signal); }
ul.compte-message { list-style: none; }

@media (max-width: 599px) {
  .account { padding-top: 5.5rem; }
  .account-card { padding: var(--space-6) var(--space-4); }
}

.flash-site {
  animation: flash-site 0.3s ease 6s forwards;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.93rem;
  left: 50%;
  max-width: calc(100% - 2 * var(--gutter-mobile));
  padding: var(--space-3) var(--space-4);
  position: fixed;
  top: calc(64px + var(--space-4));
  transform: translateX(-50%);
  z-index: 1000;
}

.flash-site p { margin: 0; }

@keyframes flash-site { to { opacity: 0; visibility: hidden; } }

@media (max-width: 599px) {
  .flash-site { top: calc(96px + var(--space-4)); }
}

.dashboard-header { padding-top: calc(64px + var(--space-12)); }

@media (min-width: 600px) {
  .dashboard-header { padding-top: calc(64px + var(--space-16)); padding-bottom: var(--space-12); }
}

.dashboard .card .block-kicker { margin: 0; }

.dashboard-alert {
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--signal);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-6);
  justify-content: space-between;
  padding: var(--space-4);
}

.dashboard-alert p { margin: 0; overflow-wrap: anywhere; }

.dashboard-account { max-width: 40rem; }
.dashboard-account dl { display: grid; gap: var(--space-4); margin: 0; }
.dashboard-account dl > div { display: grid; gap: var(--space-1); }
.dashboard-account dt { color: var(--muted); font-size: 13px; }
.dashboard-account dd { color: var(--ink); margin: 0; overflow-wrap: anywhere; }

@media (min-width: 600px) {
  .dashboard-account dl > div { grid-template-columns: 10rem 1fr; }
}

.dashboard-state {
  background: var(--blue-tint);
  color: var(--blue);
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  margin-left: var(--space-2);
  padding: 0 var(--space-2);
}

.dashboard-state--waiting { background: var(--signal-tint); color: var(--signal-text); }

.dashboard-deletion { margin-top: var(--space-8); max-width: 40rem; }
.dashboard-deletion summary { color: var(--muted); cursor: pointer; font-size: 0.93rem; }
.dashboard-deletion summary:hover { color: var(--signal-text); }
.dashboard-deletion .card { border-color: var(--signal); margin-top: var(--space-4); }

.button--danger { background: var(--signal-text); border-color: var(--signal-text); }
.button--danger:hover { background: var(--ink); border-color: var(--ink); }

.dashboard .block-title + .block-text { margin-top: calc(-1 * var(--space-2)); }
.dashboard .block-title ~ .block-title { margin-top: var(--space-12); }
.dashboard .card h3 a { color: inherit; }

.dashboard-goals { margin-top: var(--space-6); }
.dashboard-goals .path-card { cursor: pointer; font: inherit; text-align: left; width: 100%; }
.dashboard-goals .path-card[aria-pressed="true"] {
  border-color: var(--path-color, var(--ink));
  box-shadow: inset 0 0 0 1px var(--path-color, var(--ink));
}

.dashboard-goal { color: var(--path-color, var(--ink)) !important; }
.dashboard-change summary { color: var(--muted); cursor: pointer; font-size: 0.93rem; min-height: 44px; padding-top: var(--space-2); }
.dashboard-change .dashboard-goals { grid-template-columns: 1fr; }

.dashboard-close { display: grid; gap: var(--space-4); margin-top: var(--space-4); }
.dashboard-close fieldset { border: 0; display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); margin: 0; padding: 0; }
.dashboard-close legend { color: var(--ink); font-weight: 500; margin-bottom: var(--space-2); padding: 0; }
.dashboard-close label { align-items: center; display: flex; gap: var(--space-2); min-height: 44px; }
.dashboard-close > label { align-items: stretch; flex-direction: column; min-height: 0; }
.dashboard-close textarea,
.dashboard-settings select {
  border: 1px solid var(--rule);
  font: inherit;
  padding: var(--space-2) var(--space-3);
  width: 100%;
}

.dashboard-resume { margin: var(--space-8) 0 0; }
.dashboard-resume small { color: var(--muted); display: block; }


.dashboard-list { display: grid; gap: var(--space-4); list-style: none; margin: 0; max-width: 44rem; padding: 0; }
.dashboard-list li { align-items: baseline; border-bottom: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); padding-bottom: var(--space-4); }
.dashboard-list li p { flex-basis: 100%; margin: 0; }
.dashboard-list small { color: var(--muted); }
.dashboard-list form { margin: 0 0 0 auto; }

.dashboard-state--done { background: var(--blue-tint); color: var(--blue); }
.dashboard-state--failed { background: var(--signal-tint); color: var(--signal-text); }
.dashboard-state--dropped { background: var(--surface); color: var(--muted); }
.dashboard-list .dashboard-state { margin-left: 0; }

.dashboard-notes { display: grid; gap: var(--space-6); max-width: 44rem; }
.dashboard-note { border-top: 1px solid var(--rule); padding-top: var(--space-3); }
.dashboard-note blockquote { border-left: 2px solid var(--signal); color: var(--muted); margin: 0 0 var(--space-2); padding-left: var(--space-3); }
.dashboard-note blockquote a { color: inherit; text-decoration: none; }
.dashboard-note blockquote a:hover { color: var(--ink); text-decoration: underline; }
.dashboard-note form { margin-top: var(--space-1); }

.dashboard-settings { display: grid; gap: var(--space-3); }
.dashboard-settings > label { align-items: center; display: flex; gap: var(--space-2); min-height: 44px; }
.dashboard-settings > label:first-of-type { color: var(--ink); font-weight: 500; min-height: 0; }

.goal-choice[aria-pressed="true"]::before { content: "✓"; }

.visually-hidden { clip: rect(0 0 0 0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }

/* The four dashboard pages, as tabs under the greeting. */
.dashboard-nav { border-bottom: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 0 var(--space-4); margin-top: var(--space-8); }

@media (min-width: 600px) {
  .dashboard-nav { gap: 0 var(--space-6); }
}

.dashboard-nav a { border-bottom: 3px solid transparent; color: var(--muted); flex: none; font-weight: 500; padding: var(--space-3) 0; text-decoration: none; }
.dashboard-nav a:hover { color: var(--ink); }
.dashboard-nav a[aria-current="page"] { border-bottom-color: var(--signal); color: var(--ink); }

.dashboard-label { color: var(--muted); font-size: 13px; font-weight: 500; letter-spacing: 0.02em; margin: var(--space-4) 0 var(--space-1); text-transform: uppercase; }
.dashboard-subtitle { margin: var(--space-8) 0 var(--space-4); }

.dashboard-pace { display: block; height: 6px; margin: var(--space-2) 0; max-width: 24rem; width: 100%; }
.dashboard-pace-background { fill: var(--surface); }
.dashboard-pace-full { fill: var(--blue); }
.dashboard-pace--over .dashboard-pace-full { fill: var(--signal); }
.dashboard-overdue { color: var(--signal-text); margin: 0; }

/* Now: one card, one action. */
.dashboard-now { border-left: 3px solid var(--signal); max-width: 44rem; }
.dashboard-now h3 { font-size: 1.4rem; }
.dashboard-card { font-size: 1.1rem; margin: 0; }
.dashboard-card a { color: var(--ink); }
.dashboard-others { color: var(--muted); font-size: 14px; margin: var(--space-4) 0 0; }
.dashboard-phrase { color: var(--muted); font-family: var(--font-serif); font-style: italic; margin: 0; }
.dashboard-move { color: var(--ink); font-size: 1.1rem; margin: 0; }
.dashboard-moves { display: grid; gap: var(--space-2); list-style: none; margin: var(--space-2) 0 0; padding: 0; }
.dashboard-moves li { align-items: baseline; display: flex; gap: var(--space-3); }
.dashboard-moves li[data-done] { color: var(--muted); }
.dashboard-moves-case { border: 1px solid var(--rule); color: var(--blue); flex: none; font-size: 12px; height: 18px; line-height: 16px; text-align: center; width: 18px; }
.dashboard-moves li[data-done] .dashboard-moves-case { background: var(--blue-tint); border-color: var(--blue); }

.dashboard-moments { display: grid; gap: var(--space-2); list-style: none; margin: 0 0 var(--space-6); max-width: 44rem; padding: 0; }
.dashboard-moments li { background: var(--paper); border-left: 3px solid var(--blue); color: var(--ink); padding: var(--space-3) var(--space-4); }

/* The ten steps, from the last test. */
.dashboard-ladder { display: grid; gap: var(--space-1); list-style: none; margin: var(--space-6) 0 0; max-width: 44rem; padding: 0; }
.dashboard-ladder li { align-items: center; background: var(--paper); border: 1px solid var(--rule); border-left-width: 4px; display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3); padding: var(--space-3); }
.dashboard-ladder li[data-state="solid"] { border-left-color: var(--blue); }
.dashboard-ladder li[data-state="partial"] { border-left-color: var(--blue-tint); }
.dashboard-ladder li[data-state="blocked"] { border-left-style: dashed; }
.dashboard-ladder-number { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 600; min-width: 1.5em; text-align: right; }
.dashboard-ladder-text { display: grid; flex: 1 1 14rem; gap: 2px; }
.dashboard-ladder-name { color: var(--ink); font-weight: 500; }
.dashboard-ladder-phrase { color: var(--muted); font-size: 14px; }
.dashboard-ladder-facts { display: flex; flex-wrap: wrap; gap: 0 var(--space-3); font-size: 13px; color: var(--muted); }
.dashboard-ladder li[data-state="solid"] .dashboard-ladder-facts > :first-child { color: var(--blue); font-weight: 500; }
.dashboard-ladder-move--up { color: var(--blue); font-weight: 500; }
.dashboard-ladder-move--down { color: var(--signal-text); font-weight: 500; }
.dashboard-ladder-mark { background: var(--ink); color: var(--paper); font-size: 12px; font-weight: 600; padding: 2px var(--space-2); white-space: nowrap; }
.dashboard-ladder-mark--holds { background: var(--signal-text); }

.dashboard-drop { border-left: 3px solid var(--signal); padding-left: var(--space-3); }
.dashboard-goal-history { color: var(--muted); font-size: 14px; margin: 0; padding-left: var(--space-4); }

.dashboard-earned { display: grid; gap: var(--space-6); max-width: 44rem; }
.dashboard-earned h3 { color: var(--muted); font-size: 14px; font-weight: 500; margin: 0 0 var(--space-2); }
.dashboard-earned ul { margin: 0; padding-left: var(--space-4); }
.dashboard-earned p { margin: 0; }

/* What you did: a timeline, month by month. */
.dashboard-counts { align-items: baseline; display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3); margin: 0 0 var(--space-6); }
.dashboard-counts .dashboard-state { margin-left: 0; }
.dashboard-month { color: var(--muted); font-size: 14px; font-weight: 600; letter-spacing: 0.02em; margin: var(--space-8) 0 var(--space-3); }
.dashboard-timeline { border-left: 2px solid var(--rule); display: grid; gap: var(--space-6); list-style: none; margin: 0; max-width: 44rem; padding: 0 0 0 var(--space-6); }
.dashboard-timeline li { position: relative; }
.dashboard-timeline li::before { background: var(--paper); border: 2px solid var(--rule); border-radius: var(--radius-round); content: ""; height: 12px; left: calc(-1 * var(--space-6) - 7px); position: absolute; top: 4px; width: 12px; }
.dashboard-timeline li[data-kind="test"]::before { background: var(--ink); border-color: var(--ink); }
.dashboard-timeline li[data-kind="try"]::before { border-color: var(--signal); }
.dashboard-timeline li[data-kind="goal"]::before { border-color: var(--blue); }
.dashboard-timeline p { margin: 0 0 var(--space-1); }
.dashboard-timeline-meta { color: var(--muted); display: flex; flex-wrap: wrap; font-size: 13px; gap: var(--space-2); }
.dashboard-timeline-meta span { color: var(--ink); font-weight: 500; }
.dashboard-timeline-title { color: var(--ink); font-weight: 500; }
.dashboard-timeline-title a { color: inherit; }
.dashboard-timeline .dashboard-state { margin: 0 var(--space-2) 0 0; }
.dashboard-timeline small { color: var(--muted); }
.dashboard-timeline .dashboard-note { border-top: 0; padding-top: 0; }
.dashboard-lesson { color: var(--ink); font-family: var(--font-serif); }
.dashboard-share { align-items: center; display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3); }
.dashboard-share .dashboard-state { margin-left: 0; }
.dashboard-share a { overflow-wrap: anywhere; }
.dashboard-share small { color: var(--muted); flex-basis: 100%; }

/* A published try. */
.shared-try > .block:first-child { padding-top: calc(64px + var(--space-12)); }
.shared-try .dashboard-state { margin-left: 0; }
.shared-try-label { color: var(--muted); font-size: 14px; font-weight: 500; margin: var(--space-8) 0 var(--space-2); }
.shared-try-lesson { border-left: 3px solid var(--signal); color: var(--ink); font-family: var(--font-serif); font-size: 1.25rem; margin: 0 0 var(--space-6); padding-left: var(--space-4); }
