/* Pip Academy projects.
 *
 * This loads after pip-learn.css and deliberately borrows its geometry: the
 * numbered-step grid is the same 40px + content grid the lesson sections use,
 * and the asides are the lesson asides with a different class name, so a reader
 * moving between a lesson and a project does not feel like they changed site.
 *
 * What is new here is the code block, which the lessons never needed. */

/* --- gallery --------------------------------------------------------------- */

/* The difficulty groups are rendered as tracks and the cards sit in the track
   grid, so the dividers, the container width and the column behaviour all come
   from pip-learn.css. Only two things are left: the guide card, which the
   course has no equivalent for, and the card face, which carries a stack of
   chips a lesson card never needed.

   The guides section takes the same padding formula .learn-tracks uses rather
   than a max-width of its own, because two containers of different widths on
   one page is exactly what made this look like a different site. */

.projects-guides { padding: 10px max(24px, calc((100vw - 1240px) / 2)) 0; }

.project-guide-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 26px;
    border: 1px solid #b8dbe3;
    border-radius: 20px;
    background: var(--blue);
    text-decoration: none;
    color: inherit;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.project-guide-card:hover {
    border-color: #5ea8b8;
    box-shadow: 0 16px 34px rgba(37, 33, 30, .09);
    transform: translateY(-2px);
}

.project-guide-copy h3 { margin: 0 0 6px; font-size: 19px; font-weight: 660; letter-spacing: -.03em; }
.project-guide-copy p { margin: 0; color: #34302c; font-size: 15px; line-height: 1.55; }
.project-guide-meta { flex: 0 0 auto; color: #35707c; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

/* The card face. Same geometry as .learn-module-card -- padding, radius, the
   translucent white, the orange hover -- so a project card and a lesson card
   are the same object with different contents. */
.project-card {
    height: 100%;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, .78);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.project-card:hover {
    border-color: rgba(240, 84, 63, .4);
    box-shadow: 0 16px 34px rgba(37, 33, 30, .09);
    transform: translateY(-2px);
}

.project-card.is-finished { border-color: rgba(24, 117, 79, .35); background: rgba(240, 250, 245, .82); }
.project-card.is-started { border-color: rgba(37, 33, 30, .2); }

.project-card-link {
    display: block;
    height: 100%;
    padding: 20px 20px 18px;
    text-decoration: none;
    color: inherit;
}

.project-card-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.project-card-head h3 { margin: 0; font-size: 17px; font-weight: 660; letter-spacing: -.03em; line-height: 1.25; }

.project-card-state {
    flex: 0 0 auto;
    color: var(--green);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.project-card-summary { margin: 8px 0 14px; color: #5c554d; font-size: 14.5px; line-height: 1.55; }

.project-card-stack,
.project-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
}

.project-card-stack li,
.project-stack li {
    padding: 2px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--cream);
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 600;
}

.project-stack { margin: 18px 0 0; }
.project-stack li { padding: 3px 10px; font-size: 12.5px; }

/* The same small-caps meta line the lesson cards use. */
.project-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.project-card-meta .project-card-minutes { color: var(--ink); }

/* --- one project ----------------------------------------------------------- */

/* The crumbs, the head, the boxed intro, the numbered sections, the asides, the
   sources and the foot are all pip-learn.css's own classes, so there is nothing
   to restyle. What is left below is the three things a lesson never needed. */

.project-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.project-stack li {
    padding: 3px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--cream);
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 600;
}

.project-prereq-lessons { margin: 14px 0 0 !important; color: var(--muted); font-size: 15px !important; line-height: 1.6 !important; }

/* Ticking a step. Hidden until the script reveals it, so a reader with no
   JavaScript is never shown a control that would do nothing. */
.project-step-done {
    margin-top: 10px;
    padding: 7px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: border-color .16s ease, color .16s ease;
}

.project-step-done:hover { border-color: var(--green); color: var(--green); }
.module-section.is-read .project-step-done { border-color: var(--green); color: var(--green); }

/* --- code ------------------------------------------------------------------ */

.project-code { margin: 20px 0; border: 1px solid #2b2724; border-radius: 14px; overflow: hidden; }

.project-code-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 14px;
    background: #2b2724;
    color: #cfc7bd;
    font-size: 12.5px;
}

.project-code-file { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; }

.project-code-copy {
    padding: 4px 12px;
    border: 1px solid #4a433d;
    border-radius: 999px;
    background: transparent;
    color: #cfc7bd;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
    transition: border-color .16s ease, color .16s ease;
}

.project-code-copy:hover { border-color: #8d8378; color: #fff; }

.project-code-block,
.project-agent-block,
.project-verify-command {
    margin: 0;
    padding: 18px 20px;
    overflow-x: auto;
    background: var(--night);
    color: #e8e2d9;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13.5px;
    line-height: 1.7;
    tab-size: 4;
}

.project-code-block code,
.project-agent-block code,
.project-verify-command code { font: inherit; color: inherit; background: none; }

/* --- how you know it worked ------------------------------------------------ */

/* Built like a module aside, in the green the course already uses for a thing
   that has gone right, so it reads as a sibling of the asides above it rather
   than as a fourth kind of box. */
.project-verify {
    margin: 18px 0 0;
    padding: 16px 20px;
    border-left: 3px solid var(--green);
    border-radius: 0 14px 14px 0;
    background: #eef7f2;
}

.project-verify-label {
    margin: 0 0 8px !important;
    color: var(--green);
    font-size: 11.5px !important;
    font-weight: 780;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.project-verify p { margin: 0 !important; font-size: 15.5px !important; line-height: 1.6 !important; }
.project-verify-command { margin: 0 0 10px !important; border-radius: 10px; font-size: 12.5px; padding: 12px 14px; }

/* --- the agent half -------------------------------------------------------- */

/* Sits in the module-check box, so it lands where a lesson's closing check
   lands. Only the inside differs. */
.project-agent { margin: 22px 0 0; }
.project-agent h3 { margin: 0 0 10px; font-size: 18px; }
.project-agent-block { border-radius: 14px; white-space: pre-wrap; }

.project-agent-review { margin: 28px 0 0; }
.project-agent-review h3 { margin: 0 0 8px; font-size: 18px; }
.project-agent-review p { margin: 0 0 14px; color: #34302c; font-size: 17px; line-height: 1.65; }

@media (max-width: 640px) {
    .project-code-block, .project-agent-block { font-size: 12.5px; padding: 14px 16px; }
    .project-guide-card { flex-direction: column; align-items: flex-start; gap: 10px; }
}
