/* ---------- Code page (code-specific) ----------
   Shared structure lives in collection.css - including the detail header
   (.collection-detail-*), sidebar links (.collection-link*) and the cardless
   .code-body padding. This holds repo-card internals and the landscape
   screenshot placeholder. */

/* Landscape repo screenshot. The rounding/clip + img fill are the shared
   media-surface rules (collection.css); the border is code-specific - the grid
   shots hold their edge even against a near-bg screenshot. Until an image
   lands, .is-empty paints the flat surface and the aspect ratio holds the
   space. */
.code-shot {
    aspect-ratio: 16 / 10;
    border: 1px solid var(--border);
}

/* Repo line: github mark + owner/name. Wraps rather than overflowing - long,
   unbreakable repo names (e.g. TOPasswordViewController) otherwise push past the
   card on a phone and make the page look lopsided. */
.code-repo {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 1.05em;
    font-weight: 700;
    color: var(--heading);
}

/* Inline octocat (fill=currentColor) - follows the repo line's text colour in
   both themes, so no per-scheme swap is needed. */
.code-gh-mark {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

/* owner/ + name as one flex item, so they sit flush against the slash. */
.code-path {
    min-width: 0;
    overflow-wrap: anywhere;
}

.code-owner {
    color: var(--text-secondary);
    font-weight: 400;
}

.code-name {
    color: var(--heading);
}

.code-tagline {
    font-size: 0.95em;
    color: var(--text-secondary);
    margin: 0.6em 0 0.9em;
    line-height: 1.45;
}

/* Stat row: language dot + label + stars. */
.code-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.85em;
    color: var(--text-secondary);
}

.code-lang {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.code-lang-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    corner-shape: round;
    display: inline-block;
}

/* ----- Detail page ----- */

/* Inside the detail wrapper the shared rules (collection.css) flatten the
   rounding and set the 16:9 detail ratio; the border is code-specific, so
   it's reset here. */
.collection-detail-shot .code-shot {
    border: none;
}
