/* Learn (BRIEF.md decision 24): the paths as rows of cards, each row sliding sideways. On a
   desk the rows lie on a frosted card over the map's land as Let's talk does, "Learn" on
   the land beside it (Zach chose the rows over the map, Oct 31;
   docs/mockups/learn/learn-rows-over-map.png); on a phone Learn is a page of its own (Zach,
   Oct 31). A tap on a card opens its question on a sheet of its own. Every photo takes the
   same grade, warmed toward the paper (docs/brand/learn-rules.md). */
.learn .num { font-family: var(--serif); color: var(--harvest); }
.learn-map .pic img, .learn-map .hero img { filter: saturate(.85) sepia(.1); }
.learn :is(.qcard .pic, .question .hero, .answer .pic) img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* A question's picture is Zach's sketch on white paper (Nov 14): shown whole, as drawn,
   with no grade, on white */
.learn :is(.qcard:not(.to-post) .pic, .question .hero) { background: var(--paper-2); }
.learn-map :is(.qcard:not(.to-post) .pic, .question .hero) img { object-fit: contain; filter: none; }

/* A phone: Learn is a page of its own (Zach, Oct 31) that scrolls as any page does, so
   going back lands where it was left (UI_STANDARDS 16), with no map behind; the map's
   script isn't even loaded (learn.js) */
@media (max-width: 899px), (hover: none) {
  /* Over the map's own body rules, which load after this file */
  html:has(> body.explorer.learn-map) { height: auto; overflow: visible; }
  body.explorer.learn-map { position: static; height: auto; overflow: visible; touch-action: auto; padding: 0; }
}
.learn-map #stage { display: none; }
.explorer.learn-map header { background: var(--paper); border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.learn .learn-over { position: relative; background: var(--paper); }
/* Where Learn's rows start in what scrolls them: under the header on a phone, inside the
   card on a desk; a post's way back stays there (Zach, Nov 14) */
.learn { --rows-top: calc(var(--header-bar) + 12px + env(safe-area-inset-top)); --post-back-top: calc(var(--rows-top) + var(--back-gap)); }
.learn .learn-over .rows { padding: var(--rows-top) 0 calc(32px + env(safe-area-inset-bottom)); }
/* Its outline lies where the page will, under the header */
#outline:has(.learn.outline) { padding-top: 0; }
.o-page:has(> .learn.outline) { max-width: none; margin: 0; padding: 0; }
.learn .learn-over .rows::-webkit-scrollbar, .learn .learn-over .track::-webkit-scrollbar { display: none; }
.learn .phone-title { margin: 8px 18px 0; font-family: var(--serif); font-size: 40px; line-height: 1.05; }
.learn .learn-over .line { margin: 8px 18px 0; font-family: var(--serif); font-size: 21px; line-height: 1.2; max-width: 24em; }

/* A path: its numbered heading and count, then its row */
.learn .path { padding-top: 24px; }
.learn .path-head { display: flex; align-items: baseline; gap: 9px; padding: 0 18px; margin-bottom: 10px; }
.learn .path-head h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 22px; line-height: 1.1; }
.learn .path-head .num { margin-right: 3px; }
.learn .path-head .count { margin: 0; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
/* A row's arrows, at its ends, show only on a desk (below) */
.learn .lane { position: relative; }
.learn .lane > button { display: none; }
.learn .track { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 18px; padding: 2px 18px 8px;
         scrollbar-width: none; overscroll-behavior-x: contain; }

/* A card: the picture with its hook, the question, and the time of each way in */
.learn .qcard { flex: none; width: 72vw; max-width: 320px; scroll-snap-align: start; color: var(--ink); text-decoration: none; }
.learn .qcard .pic { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; background: var(--portrait); }
.learn .hook { position: absolute; left: 10px; top: 10px; max-width: calc(100% - 20px); padding: 5px 11px; border-radius: 999px;
        background: var(--glass-strong); font-size: 14px; line-height: 1.2; color: var(--ink); }
/* Two lines at most, and room for two always, so a row's times line up (Zach, Nov 3). The cut
   leaves the serif's g and y whole: lines of 1.25 (Libre Bodoni's full height) and a little room
   below, less than where a third line's letters start (UI_STANDARDS 45) */
.learn .qcard h3 { margin: 9px 2px 0; font-family: var(--serif); font-weight: 400; font-size: 18px; line-height: 1.25;
                   display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
                   padding-bottom: .08em; min-height: calc(2.5em + .08em); min-height: calc(2lh + .08em); }
.learn .times { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 2px 0; }
.learn .times .time { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 13px;
               border: 1px solid var(--line); background: var(--paper-2); color: var(--ink-2); white-space: nowrap; }
.learn .times .watch::before { content: ""; border-left: 7px solid var(--harvest); border-top: 4.5px solid transparent; border-bottom: 4.5px solid transparent; }
.learn .times .read::before { content: ""; width: 8px; height: 10px; border: 1.4px solid var(--slate); border-radius: 2px; }
.learn .learn-over .closing-card { margin: 32px 18px 0; }

/* A question, opened: a sheet over Learn, the page dimmed behind it; the header stays above
   the dim so it answers the first click (UI_STANDARDS 8) */
.learn .questions { display: none; position: fixed; inset: 0; z-index: 45; background: var(--dim); }
.learn .questions.open { display: block; }
body.learn:has(.questions.open) header { z-index: 50; }
.learn .question { display: none; position: absolute; left: 0; right: 0; bottom: 0; top: calc(var(--header-bar) + 6px + env(safe-area-inset-top));
            overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; padding: 0 16px calc(24px + env(safe-area-inset-bottom));
            border-radius: 24px 24px 0 0; background: var(--paper); box-shadow: 0 -10px 40px var(--shadow-deep);
            animation: question-in .32s cubic-bezier(.2, .7, .15, 1); }
.learn .question::-webkit-scrollbar { display: none; }
.learn .question.open { display: block; }
@keyframes question-in { from { transform: translateY(40px); opacity: 0; } }
.learn .question .close { position: sticky; top: 12px; z-index: 2; display: block; width: 44px; height: 44px; margin: 12px 0 -56px auto;
                   border-radius: 50%; border: 1px solid var(--glass-edge); background: var(--glass-strong); font-size: 22px; line-height: 1;
                   color: var(--ink); cursor: pointer; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.learn .question .hero { position: relative; margin-top: 16px; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; background: var(--portrait); }
.learn .question .in { margin: 16px 0 4px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--harvest); }
.learn .question h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 25px; line-height: 1.14; }
.learn .said { display: grid; grid-template-columns: 30px 1fr; column-gap: 10px; margin-top: 12px; }
.learn .said img { grid-row: span 2; width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.learn .said p { margin: 0; font-family: var(--serif); font-style: italic; font-size: 17px; line-height: 1.32; color: var(--ink-2); }
.learn .said .who { font-family: var(--sans); font-style: normal; font-size: 12px; margin-top: 3px; }

/* Its ways in: a row each, the picture large with the time on it */
.learn .answers { display: grid; margin-top: 14px; border-top: 1px solid var(--line); }
.learn .answer { display: grid; grid-template-columns: 124px 1fr; gap: 14px; align-items: center; padding: 12px 0;
          border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.learn .answer:last-child { border-bottom: 0; }
.learn .answer .pic { position: relative; height: 92px; border-radius: 12px; overflow: hidden; background: var(--portrait); }
.learn .answer .pic.paper { background: var(--icon-paper); border: 1px solid var(--line); }
.learn .answer .pic.paper img { position: absolute; inset: 8% 6%; width: 88%; height: 84%; object-fit: contain; opacity: .55; filter: none; }
.learn .answer .time { position: absolute; left: 7px; bottom: 7px; padding: 3px 9px; border-radius: 999px; font-size: 12.5px; white-space: nowrap;
                background: var(--night-veil); color: var(--paper-2); }
.learn .answer .paper .time { background: var(--paper-2); color: var(--ink); border: 1px solid var(--line); }
.learn .answer .kind { display: block; font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); }
.learn .answer .title { display: block; margin-top: 3px; font-size: 16px; line-height: 1.25; }
.learn .answer.soon .kind { color: var(--harvest); }
.learn .answer.soon .title { color: var(--ink-2); }

/* A desk: the rows on a card in the middle of the land, a row's arrows showing when it
   holds more than fits (learn.js), and a question as a card with its picture beside it */
@media (min-width: 900px) and (hover: hover) {
  /* The land shows (its still picture, in site.css, until the 3D draws over it) */
  .learn-map #stage { display: block; }
  .explorer.learn-map header { background: none; border-bottom: 0; padding-bottom: 0; }
  .learn .phone-title { display: none; }
  .learn .learn-over { position: fixed; left: 50%; right: auto; top: 96px; bottom: 24px; z-index: 40; width: min(1080px, calc(100vw - 2 * var(--gutter-desk)));
                transform: translateX(-50%); overflow: hidden; border-radius: 26px; background: var(--frost-strong);
                border: 1px solid var(--glass-edge); -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
                box-shadow: inset 0 1px 0 var(--shine), 0 10px 40px var(--shadow); }
  /* In the card, which scrolls itself, its own padding already counts toward where the way
     back stays */
  .learn { --rows-top: 30px; --post-back-top: var(--back-gap); }
  .learn .learn-over .rows { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
                             padding: var(--rows-top) 0 32px; }
  .learn .learn-over .line { margin: 0 36px; font-size: 28px; }
  .learn .path { padding-top: 30px; }
  .learn .path-head, .learn .track { padding-left: 36px; padding-right: 36px; }
  .learn .track { scroll-padding: 0 36px; gap: 16px; }
  .learn .path-head h2 { font-size: 26px; }
  /* A row's arrows at its ends, over its pictures (Zach chose A, Nov 3): small and see
     through, each hidden until learn.js finds cards past it, so they never flash
     (UI_STANDARDS 18); the cards fade into an end that cuts them off */
  .learn .lane > button { display: grid; top: calc(2px + 280px * 3 / 8 - 18px); }
  .learn .lane > .prev { left: 24px; }
  .learn .lane > .next { right: 24px; }
  .learn .lane::before, .learn .lane::after { content: ""; position: absolute; z-index: 1; top: 0; bottom: 0; width: 56px;
                                              pointer-events: none; opacity: 0; transition: opacity .2s; }
  .learn .lane::before { left: 0; background: linear-gradient(90deg, var(--frost-strong), transparent); }
  .learn .lane::after { right: 0; background: linear-gradient(270deg, var(--frost-strong), transparent); }
  .learn .lane.before::before, .learn .lane.after::after { opacity: 1; }
  .learn .qcard { width: 280px; }
  .learn .qcard h3 { font-size: 19px; }
  .learn .learn-over .closing-card { margin: 40px 36px 0; }
  .learn .question { left: 50%; right: auto; top: 50%; bottom: auto; width: min(940px, calc(100vw - 96px)); max-height: calc(100vh - 120px);
              transform: translate(-50%, -50%); border-radius: 26px; padding: 26px; grid-template-columns: 1fr 1fr;
              gap: 0 28px; align-items: start; animation: question-in-desk .25s ease-out; }
  .learn .question.open { display: grid; }
  @keyframes question-in-desk { from { opacity: 0; } }
  .learn .question .close { position: absolute; top: 18px; right: 18px; margin: 0; }
  .learn .question .hero { margin-top: 0; grid-row: span 2; }
  .learn .question .words { padding-right: 52px; }
  .learn .question .in { margin-top: 4px; }
  .learn .answer { grid-template-columns: 112px 1fr; }
  .learn .answer .pic { height: 84px; }
}
/* Wide enough, the card keeps right of "Learn" on the land (site.css shows it there, and
   keeps it for screen readers alone where narrower, as Let's talk's title) */
@media (min-width: 1280px) and (hover: hover) {
  .learn .learn-over { width: min(1080px, calc(100vw - 480px)); }
}
/* On a phone the page names itself at the top of its rows; "Learn" over the land stays for
   screen readers */
@media (max-width: 899px), (hover: none) {
  .learn .learn-title { clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; padding: 0; border: 0; }
}

/* A post's own page (BRIEF.md decision 40; docs/mockups/learn-post/learn-post-plan.png):
   its path, the question, its time, the bold answer, its sections, Try this in a box, the
   next post, "Tell us about your project." and its sources. On a phone a full page; on a
   desk on Learn's card over the land, narrower, so its lines read easily. */
.learn .post { max-width: 680px; margin: 0 auto; padding: 4px 18px 0; color: var(--ink); }
/* Its back pill names the page before, a post's question at most a line long (UI_STANDARDS 15) */
/* A post's way back stays where it sits at the post's top as it scrolls, past the post's
   padding and its own margin (Zach, Nov 14; UI_STANDARDS 15) */
.learn .post { --post-back-gap: 18px; }
.learn .post .back { position: sticky; top: var(--post-back-top); z-index: 5; display: block; box-sizing: border-box; width: max-content; max-width: 100%; margin: 4px 0 var(--post-back-gap); line-height: var(--back-h);
                     white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.learn .post .back::before { margin-right: 8px; vertical-align: -1px; }
/* Share across from it, staying there with it (Zach, Nov 14) */
/* (as tall as the way back here, whose line is --back-h inside its edge) */
.learn .post .share-top { --tall: calc(var(--back-h) + 2px); position: sticky; top: var(--post-back-top); z-index: 5;
                          width: var(--tall); height: var(--tall); margin: calc(-1 * var(--post-back-gap) - var(--tall)) 0 var(--post-back-gap) auto; }
.learn .post .in { margin: 0 0 6px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--harvest); }
.learn .post h1 { margin: 0; font-size: 34px; line-height: 1.1; }
.learn .post .meta { margin: 10px 0 0; font-size: 13px; color: var(--ink-2); }
/* Who wrote it (BRIEF.md decision 52; docs/mockups/byline-proposal.png): the round
   portrait left of the name (UI_STANDARDS 42), the whole row one link to their page */
.learn .post .byline { display: flex; align-items: center; gap: 12px; margin: 16px 0 0; color: inherit; text-decoration: none; }
/* It presses in as a project's who-led does (UI_STANDARDS 10); on a touch screen the press
   waits (site.css's --tap-press list) */
.learn .post a.byline { width: fit-content; }
/* Light, so the wait for a press on a touch screen (site.css, last) outweighs it */
a.byline { transition: transform .12s ease-out; }
.learn .post a.byline:active { transform: scale(.98); }
.learn .post .byline .portrait { flex: none; width: 44px; aspect-ratio: 1; border-radius: 50%; }
.learn .post .byline .who { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.learn .post .byline .name { font-size: 16px; font-weight: 500; color: var(--ink); }
.learn .post a.byline .name { text-decoration: underline; text-decoration-color: var(--harvest-line); text-underline-offset: 3px; }
.learn .post .byline .cred { font-size: 14px; line-height: 1.35; color: var(--ink-2); }
.learn .post .lede { margin: 20px 0 0; font-size: 18px; line-height: 1.5; }
.learn .post .lede strong { font-weight: 500; }
.learn .post h2 { margin: 34px 0 0; font-family: var(--serif); font-weight: 400; font-size: 25px; line-height: 1.16; }
.learn .post h3 { margin: 24px 0 0; font-size: 17px; font-weight: 500; }
.learn .post :is(p, li) { font-size: 16.5px; line-height: 1.6; color: var(--ink-2); }
.learn .post p { margin: 12px 0 0; }
.learn .post :is(ul, ol) { margin: 12px 0 0; padding-left: 22px; }
.learn .post li p { margin: 0; }
.learn .post strong { font-weight: 500; color: var(--ink); }
.learn .post :is(p, li) a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--harvest-line); text-underline-offset: 3px; }
.learn .post blockquote { margin: 18px 0 0; padding-left: 16px; border-left: 2px solid var(--line); }
/* A picture Zach has picked, as drawn: white paper, no tint, no rounded corners (Nov 13);
   a place still waiting shows nothing */
.learn .post .picture { margin: 24px 0 0; }
.learn .post .picture picture { display: block; }
.learn .post .picture img { display: block; width: 100%; height: auto; background: var(--portrait); }
/* Try this, in a box of its own */
.learn .post .try { margin: 24px 0 0; padding: 14px 18px 16px; border-left: 3px solid var(--harvest); border-radius: 4px 14px 14px 4px;
                    background: var(--harvest-soft); }
.learn .post .try p { margin: 0; color: var(--ink); }
/* Its end: the next post, the invitation, then the sources */
.learn .post .next { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); }
.learn .post :is(.next, .related) p { margin: 0; font-size: 13px; color: var(--ink-2); }
/* The projects that relate it (search audit, Nov 15, item 11), as Next is */
.learn .post .related { margin-top: 24px; }
.learn .post .related ul { list-style: none; margin: 2px 0 0; padding: 0; }
.learn .post :is(.next, .related) a { display: flex; align-items: center; min-height: 44px; margin-top: 2px; padding: 4px 0; font-family: var(--serif); font-size: 21px; line-height: 1.2;
                       color: var(--ink); text-decoration: none; }
.learn .post .tell { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; padding: 18px 0;
                     border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.learn .post .tell p { margin: 0; font-family: var(--serif); font-size: 22px; line-height: 1.2; color: var(--ink); }
.learn .post .tell .talk { flex: none; }
.learn .post .sources { margin-top: 18px; }
.learn .post .sources h2 { margin: 0; font-family: var(--sans); font-size: 13px; font-weight: 500; letter-spacing: .04em; color: var(--ink); }
.learn .post .sources ol { margin: 6px 0 0; padding-left: 20px; }
.learn .post .sources li { padding: 0; font-size: 13.5px; line-height: 1.45; }
/* Each source's link is a tap target 44 pixels tall (UI_STANDARDS 9), its padding reaching
   past its line, as a link in a line of words can */
.learn .post .sources li { padding: 6px 0; line-height: 1.5; }
.learn .post .sources a { padding: 13px 0; }   /* 12px came to 43 (the nightly check, Nov 19) */
.learn .post .sources a { color: var(--ink-2); }

@media (min-width: 900px) and (hover: hover) {
  .learn.learn-post .learn-over { width: min(820px, calc(100vw - 2 * var(--gutter-desk))); }
  .learn .post { padding: 4px 64px 0; }
  .learn .post h1 { font-size: 44px; }
  .learn .post .lede { font-size: 19px; }
  .learn .post h2 { font-size: 28px; }
}

/* Every link and button answers a mouse (UI_STANDARDS 11) */
@media (hover: hover) {
  .learn .qcard:hover h3 { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
  .learn .qcard.to-post:hover .pic img { filter: saturate(1) sepia(.04) brightness(1.04); }
  .learn .lane > button:not(:disabled):hover, .learn .question .close:hover { border-color: var(--harvest); color: var(--harvest); }
  .learn a.answer:hover .title { text-decoration: underline; text-underline-offset: 3px; }
  .learn .post :is(.next, .related) a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
  .learn .post :is(p, li) a:hover, .learn .post .sources a:hover, .learn .post a.byline:hover .name { color: var(--harvest); }
}
@media (prefers-reduced-motion: reduce) {
  .learn .question { animation: none; }
  .learn .lane::before, .learn .lane::after { transition: none; }
}
