/*
  The About and Progress pages' own pieces: the About page's opening, facts
  and sections; stage cards; the paths to the journal and the captures; the
  gallery's picture cards; a picture's page; the stage plan. Proportions
  follow Skylark's site. Pictures are always shown whole (object-fit:
  contain), never cropped: they are evidence.
*/

/* About: the opening, text beside a real capture. */
.project-hero { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 32px; align-items: center; margin: 28px 0 36px; }
.project-intro h1 { font-size: clamp(2.1rem, 3.4vw, 3.4rem); letter-spacing: -.035em; line-height: 1.08; max-width: 15ch; margin: 0 0 24px; }
.project-intro > p { color: var(--text-2); font-size: .95rem; }
.project-intro .project-lead { color: var(--text); font-size: 1.15rem; }
.project-seed { margin: 24px 0 0; padding: 20px 24px; border-left: 4px solid var(--eyebrow); border-radius: 0 8px 8px 0; background: var(--accent-soft); max-width: none; }
.project-seed .small-label { display: block; color: var(--eyebrow); margin-bottom: 10px; }
.project-seed strong { display: block; color: var(--heading); font-size: clamp(1.25rem, 1.6vw, 1.6rem); line-height: 1.35; }
.project-hero-image { margin: 0; min-width: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); }
.project-hero-image a { display: block; background: var(--surface-2); }
.project-hero-image img { display: block; width: 100%; height: auto; }
.project-hero-image figcaption { padding: 16px 20px; color: var(--text-2); font-size: .75rem; }
.project-hero-image .small-label { display: block; margin-bottom: 4px; }

.latest-journal-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 8px; }
.latest-journal-heading h2 { margin: 0; font-size: 1.4rem; }
.latest-journal-heading a { font-size: .875rem; }
.latest-journal .journal-entry { border-top: 0; padding: 0; }

.project-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; border-block: 1px solid var(--border); padding: 24px 0; margin: 32px 0; }
.project-facts div { display: grid; gap: 4px; }
.project-facts strong { color: var(--heading-section); font-weight: 650; }
.project-facts span { color: var(--text-2); font-size: .8rem; }

/* A section: its heading on the left, its text on the right. */
.about-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 40px; margin: 48px 0; }
.about-section h2 { font-size: 1.6rem; max-width: 22ch; margin: 0; }
.about-prose p { color: var(--text-2); }
.about-prose p strong { color: var(--text); }
.about-prose p:first-child { margin-top: 0; }

/* The current chapter: its newest picture beside where it stands. */
.current-chapter { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; padding: 24px; margin: 48px 0; align-items: center;
    border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.chapter-image { min-width: 0; display: block; background: var(--surface-2); border-radius: 8px; }
.chapter-image img { display: block; width: 100%; height: auto; border-radius: 8px; }
.chapter-copy h2 { margin: 0 0 16px; font-size: 1.5rem; }
.chapter-copy p:not(.eyebrow) { color: var(--text-2); font-size: .9rem; }

/* Large links to a part of the site. */
.project-paths, .progress-destinations { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.project-paths { margin: 48px 0 24px; }
.progress-destinations { margin: 28px 0 40px; }
.project-path { display: block; padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; text-decoration: none; color: var(--text); }
.project-path:hover { border-color: var(--accent); color: var(--text); }
.project-path h2 { margin: 16px 0; color: var(--heading); }
.project-path h2 span { float: right; color: var(--accent); }
.project-path p { color: var(--text-2); font-size: .9rem; margin: 0; }

/* Stage cards: a stage's newest picture, its status and what it is for. */
.stage-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 8px; }
.stage-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
    color: var(--text); text-decoration: none; background: var(--surface); }
.stage-card:hover { border-color: var(--accent); color: var(--text); }
.stage-card-picture { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.stage-card-copy { display: flex; flex-direction: column; flex: 1; padding: 20px; }
.stage-card-copy .badge-label { align-self: start; }
.stage-card-title { display: block; margin: 16px 0 12px; color: var(--heading); font-size: 1.15rem; font-weight: 700; line-height: 1.3; }
.stage-card-text { display: block; color: var(--text-2); font-size: .85rem; margin-bottom: 16px; }
.stage-action { margin-top: auto; color: var(--accent); font-size: .85rem; }

/* The gallery's picture cards. */
.media-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin: 24px 0; }
.media-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; }
.media-card:has(a:hover), .media-card:focus-within { border-color: var(--accent); }
.media-card-link { display: flex; flex-direction: column; flex: 1; color: var(--text); text-decoration: none; }
.media-card-link:hover { color: var(--text); }
.media-card-link:focus-visible { outline-offset: -4px; }
/* A frame of one shape, so a row reads evenly and lazy pictures don't move
   the page: the picture fills the frame (absolutely, so a tall picture can't
   stretch it) and is fitted inside it whole. */
.media-thumbnail { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.media-thumbnail img, .stage-card-picture img { position: absolute; inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); object-fit: contain; }
.media-card-copy { display: block; padding: 20px 20px 12px; }
.media-card-title { display: block; margin: 10px 0; color: var(--heading); font-size: 1.15rem; font-weight: 700; line-height: 1.3; }
/* The caption, cut to four lines here; the picture's page has all of it. */
.media-card-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; color: var(--text-2); font-size: .875rem; }
.media-card-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 4px 20px 20px; }
.media-card-meta time { color: var(--text-2); font-size: .75rem; }
/* The capture time at the card's bottom right: the date, then the time and its zone, each on its own line. */
.media-card-meta .capture-time { margin-left: auto; text-align: right; line-height: 1.35; }
.media-card-meta .capture-time span { display: block; white-space: nowrap; }

/* A picture's own page, and an album's pictures. */
.back-link { display: inline-block; padding-block: 12px; font-size: .875rem; }
.image-heading { margin-top: 12px; }
.image-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 24px; color: var(--text-2); font-size: .8rem; }
.image-viewer { margin: 0 0 20px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; }
.image-viewer > a { display: block; background: var(--surface-2); }
.image-viewer img { display: block; width: 100%; height: auto; max-height: 78vh; object-fit: contain; }
.image-viewer figcaption { padding: 20px 24px; color: var(--text-2); font-size: .95rem; }
.image-viewer figcaption p { margin: 0 0 8px; }
.album-picture { margin-bottom: 32px; }
.figure-title { font-size: 1.15rem; margin: 0 0 8px; }
.figure-title a { color: var(--heading); text-decoration: none; }
.figure-title a:hover { text-decoration: underline; }
.image-tools { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.image-navigation { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 24px; align-items: center;
    border-block: 1px solid var(--border); margin: 28px 0; padding: 20px 0; }
.image-step { display: flex; flex-direction: column; gap: 8px; padding: 8px; font-size: .85rem; text-decoration: none; min-width: 0; }
.image-step strong { color: var(--text); overflow-wrap: anywhere; }
.image-step:hover strong { text-decoration: underline; }
.image-step.next { text-align: right; }
.image-step.unavailable { color: var(--text-2); }
.image-position { color: var(--text-2); font-size: .8rem; }
.image-context { margin: 32px 0; max-width: 85ch; }
.image-context > p { color: var(--text-2); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; font-size: .85rem; }
.facts dt { color: var(--text-2); }
.facts dd { margin: 0; overflow-wrap: anywhere; }

/* The stage plan. */
.plan-report p, .plan-report li { max-width: 85ch; }
.plan-stage h2 { margin: 0 0 12px; color: var(--heading); }
.plan-stage p { margin: 0 0 12px; }
.plan-stage .journal-meta .small-label { color: var(--text); }
.current-callout { border: 1px solid var(--border); border-left: 3px solid var(--eyebrow); border-radius: 8px; padding: 16px 24px; background: var(--surface); margin: 24px 0; }
.current-callout h2 { margin: 0 0 8px; color: var(--heading); }
.current-callout p { color: var(--text-2); font-size: .9rem; }
.plan-stages { list-style: none; padding: 0; margin: 0; }
.plan-stages > li { margin-block: 24px; max-width: none; }  /* the 85ch line limit is for text, not the stage cards */
.future-stages { border-top: 1px solid var(--border); padding-top: 28px; margin-top: 36px; }
.future-stages h3 { color: var(--heading); margin-top: 24px; }
.area-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); gap: 16px; margin: 16px 0; }
.area-card h3 { color: var(--heading); margin: 12px 0 8px; }
.area-card p { color: var(--text-2); font-size: .9rem; }
.area-card .section-links { margin: 12px 0 0; }
section[id], article[id] { scroll-margin-top: 90px; }

@media (min-width: 1800px) { .media-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1199.98px) {
    .project-hero { grid-template-columns: 1fr; }
    .project-intro h1 { max-width: 19ch; }
    .project-hero-image { max-width: 900px; }
    .current-chapter { grid-template-columns: 1fr; }
    .stage-grid { gap: 12px; }
    .stage-card-copy { padding: 16px; }
}
@media (max-width: 767.98px) {
    .about-section { grid-template-columns: 1fr; gap: 16px; margin: 32px 0; }
    .about-section h2 { max-width: none; }
    .project-facts { grid-template-columns: 1fr; gap: 16px; }
    .project-paths, .progress-destinations, .stage-grid, .media-grid { grid-template-columns: 1fr; gap: 16px; }
    .image-navigation { gap: 12px; }
}
@media (max-width: 575.98px) {
    .project-hero { margin-top: 12px; gap: 24px; }
    .project-intro h1 { font-size: 2.1rem; }
    .current-chapter, .project-path { padding: 16px; }
    .image-viewer figcaption { padding: 16px; }
    .image-navigation { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .image-position { grid-column: 1 / -1; grid-row: 1; text-align: center; }
    .image-step { padding: 4px; }
}

/* The journal: the entries first on phones and small tablets, so they are
   near the top; on wider screens the stage cards stay above them. The source
   order is the phone order (entries, then cards), so a keyboard or screen
   reader meets the entries first everywhere. */
.journal-layout { display: flex; flex-direction: column; }
@media (min-width: 768px) {
    .journal-layout > .journal-cards { order: -1; }
}

.journal-preview { margin: 12px 0; max-width: 36rem; }
.journal-preview a { display: block; width: fit-content; max-width: 100%; }
.journal-preview img { display: block; width: auto; height: auto; max-width: min(100%, 18rem); max-height: 14rem; }
.journal-preview figcaption { margin-top: .4rem; color: var(--text-2); font-size: .875rem; }
@media (min-width: 900px) {
    .journal-illustrated-summary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: start; gap: 24px; }
    .journal-preview { margin: 0 0 12px; }
}

/* Concepts, Assets and Research: a report's contents list and its weighed
   alternatives. Cards and pictures reuse the captures' styles. */
.report-contents ul { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; padding: 0; margin: 0 0 24px; font-size: .875rem; }
.report section { margin: 0 0 28px; }
.alternatives dt { font-weight: 650; margin-top: 12px; }
.alternatives dd { margin: 4px 0 0; color: var(--text-2); }
