/* The learn path. Same sheet, same ink, same rules as the rest of the lab —
   set larger and looser, because these pages are read rather than scanned. */

@font-face {
  font-family: "GC Display";
  src: url(/f/d.aca445e3.woff2) format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: "GC Text";
  src: url(/f/t.9f47dd19.woff2) format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #ded8cd;
  --paper-raised: #e7e1d6;
  /* One step below paper, for text the reader copies rather than acts on.
     Buttons sit above the sheet; a field is pressed into it. */
  --paper-sunken: #cdc4b4;
  --ink: #17150f;
  --ink-quiet: #4f493d;
  --rule: #a9a093;
  --accent: #9c3a1c;
  --ok: #526346;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  font-family: "GC Text", system-ui, sans-serif;
  font-size: 1.125rem;
  line-height: 1.75;
  background:
    radial-gradient(circle at 18% 2%, rgb(255 255 255 / 0.24), transparent 31rem),
    var(--paper);
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.22em;
}

a:hover {
  text-decoration-thickness: 0.1em;
}

.shell {
  width: min(40rem, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 1.25rem 0 4rem;
}

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

/* ---- Nav and footer ------------------------------------------------------ */

.site-nav {
  min-height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  border-bottom: 1px solid var(--rule);
}

.brand {
  font-family: "GC Display", Georgia, serif;
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: -0.018em;
  text-decoration: none;
}

.nav-link {
  color: var(--ink-quiet);
  font-size: 0.95rem;
  text-decoration: none;
}

.nav-link[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.28em;
}

.learn-foot {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-quiet);
  font-size: 0.95rem;
  line-height: 1.6;
}

.learn-foot p {
  margin: 0 0 0.6rem;
}

.learn-foot p:last-child {
  margin-bottom: 0;
}

/* ---- Page head ----------------------------------------------------------- */

.page-head {
  padding: clamp(2.75rem, 9vw, 4.5rem) 0 clamp(1.75rem, 5vw, 2.75rem);
}

.kicker {
  margin: 0 0 1rem;
  color: var(--accent);
  font-size: 0.95rem;
  line-height: 1.5;
}

h1 {
  margin: 0 0 1.25rem;
  font-family: "GC Display", Georgia, serif;
  font-weight: 700;
  font-size: clamp(2.1rem, 8.5vw, 3.25rem);
  line-height: 1.06;
  letter-spacing: -0.026em;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.lede {
  margin: 0;
  font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.4rem);
  line-height: 1.6;
  text-wrap: pretty;
}

/* ---- Body copy ----------------------------------------------------------- */

main h2 {
  margin: 2.75rem 0 1rem;
  font-family: "GC Display", Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.55rem, 5.5vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.022em;
  text-wrap: balance;
  overflow-wrap: break-word;
}

main h3 {
  margin: 2rem 0 0.65rem;
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.004em;
}

p {
  margin: 0 0 1.35rem;
  text-wrap: pretty;
}

ul,
ol {
  margin: 0 0 1.35rem;
  padding-left: 1.6rem;
}

li {
  margin-bottom: 0.7rem;
}

li:last-child {
  margin-bottom: 0;
}

.quiet {
  color: var(--ink-quiet);
}

.lingo {
  color: var(--ink-quiet);
  font-size: 1rem;
}

/* ---- Boxes --------------------------------------------------------------- */

.try-it,
.recap,
.one-rule {
  margin: 2.5rem 0;
  padding: clamp(1.15rem, 4vw, 1.75rem);
  background: var(--paper-raised);
  border-top: 4px solid var(--accent);
}

.try-it > :last-child,
.recap > :last-child,
.one-rule > :last-child {
  margin-bottom: 0;
}

/* The wrong-turn exit. Every Try It Now closes with one, because a reader who
   gets stuck should find the way out on the page rather than on the phone. */
.escape {
  margin: 1.5rem 0 0;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-quiet);
  font-size: 1rem;
}

/* One obvious action for a reader who arrived here from a text message and has
   never seen the rest of the site. Same shape as the done control. */
.start-cta {
  margin: 2rem 0 0;
}

/* Solid, because it is a button. It used to be a one-pixel outline, which is
   the same thing the copy panels wore, and a reader could not tell which one
   was for pressing. Buttons are filled here; nothing else is. */
.start-cta a {
  display: inline-block;
  padding: 0.85rem 1.4rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-size: 1.05rem;
  text-decoration: none;
}

.start-cta a:hover,
.start-cta a:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
}

/* The text face, not the display one: the display subset carries only the
   letters of the wordmark, so at this size a mixed heading is obvious. */
.box-title {
  margin: 0 0 0.9rem;
  font-family: "GC Text", system-ui, sans-serif;
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0.004em;
}

.box-note {
  color: var(--ink-quiet);
  font-size: 1rem;
}

.recap ul {
  margin-bottom: 0;
  padding-left: 1.4rem;
}

/* A hairline above rather than a bar beside: same device as .escape, and it
   keeps the aside on the reading measure instead of indenting it off. */
.whats-next {
  margin: 2.5rem 0 0;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-quiet);
}

/* Words the reader copies into the assistant. Sunken and hairlined, so it
   reads as a field to take something out of rather than a control to press,
   on plain paper and inside a raised box alike. The hairline is safe here
   only because buttons are filled now — an outline no longer means pressable.
   It replaced a heavy left bar, which is the side-tab pattern and reads as a
   generated-UI tell no matter what it is marking. */
.script {
  position: relative;
  margin: 0 0 1.35rem;
  padding: clamp(0.9rem, 3.5vw, 1.25rem);
  border: 1px solid var(--rule);
  background: var(--paper-sunken);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* Only when the copy control is actually there: without script the panel keeps
   its normal padding rather than reserving a gap for a button that never came. */
.script.has-copy {
  padding-top: 3.9rem;
}

/* 44px minimum: this is a phone control for readers who are not going to
   chase a small target, and it is the one thing on the page they press most. */
.copy-btn {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.2;
  cursor: pointer;
}

.copy-btn:hover,
.copy-btn:focus-visible {
  border-color: var(--accent);
  background: var(--accent);
}

.copy-btn[data-state="copied"] {
  border-color: var(--ok);
  background: var(--ok);
}

/* ---- The numbered path --------------------------------------------------- */

.path {
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ink);
}

.path > li {
  margin: 0;
  border-bottom: 1px solid var(--rule);
}

.path a {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  gap: 0 0.75rem;
  padding: 1.15rem 0;
  text-decoration: none;
}

.path a:hover .step-title {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.22em;
}

.step-num {
  color: var(--ink-quiet);
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}

.step-title {
  font-size: 1.2rem;
  line-height: 1.4;
}

.step-note {
  display: block;
  color: var(--ink-quiet);
  font-size: 1rem;
  line-height: 1.55;
}

.path > li.is-done .step-num {
  color: var(--accent);
}

.path > li.is-done .step-num::after {
  content: " ✓";
}

.progress-note {
  margin: 0 0 1.5rem;
  color: var(--ink-quiet);
  font-size: 1rem;
}

.progress-note button {
  font: inherit;
  color: inherit;
  padding: 0;
  border: 0;
  background: none;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 0.22em;
  cursor: pointer;
}

/* ---- Done control and pager ---------------------------------------------- */

.done-wrap {
  margin: 2.5rem 0 0;
}

.done-btn {
  font: inherit;
  padding: 0.85rem 1.4rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
}

/* Done reads as done without needing the label: the same green the study page
   already uses for a state that has settled. */
.done-btn[aria-pressed="true"] {
  border-color: var(--ok);
  background: var(--ok);
  color: var(--paper);
}

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
}

.pager a {
  display: block;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--rule);
  background: var(--paper-raised);
  text-decoration: none;
}

.pager .dir {
  display: block;
  color: var(--ink-quiet);
  font-size: 0.95rem;
  line-height: 1.4;
}

.pager .to {
  display: block;
  line-height: 1.4;
  overflow-wrap: break-word;
}

.pager .next {
  grid-column: 2;
  text-align: right;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

::selection {
  background: rgb(156 58 28 / 0.16);
  color: var(--ink);
}

@media (max-width: 30rem) {
  .shell {
    width: min(100% - 2rem, 40rem);
  }

  .pager {
    grid-template-columns: 1fr;
  }

  .pager .next {
    grid-column: 1;
    text-align: left;
  }
}

@media (prefers-contrast: more) {
  :root {
    --ink-quiet: #2a261f;
    --rule: #766f65;
  }
}
