/* places.css — public-record photo treatment.
 *
 * The codex's evidentiary stance: these are real places anyone can look up.
 * Visual treatment is brutalist-flat. 1px black border. No shadow, no rounded
 * corners. Monospace caption beneath. Mobile-first: images expand to the
 * full 760px content column.
 */

/* ─────────────── inline place figure (used in chapters) ─────────────── */
figure.place-image {
    margin: 22px 0 26px;
    padding: 0;
    border: 1px solid #000;
    background: #fff;
}
figure.place-image img {
    display: block;
    width: 100%;
    height: auto;
    border: 0;
    border-bottom: 1px solid #000;
}
figure.place-image figcaption {
    padding: 9px 12px 11px;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 12px;
    line-height: 1.5;
    color: #000;
    background: #fff;
}
figure.place-image figcaption strong {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1px;
}
figure.place-image figcaption a {
    color: #000;
    text-decoration: underline;
}
figure.place-image figcaption a:hover { background: #fffacd; }
figure.place-image .pi-coords {
    font-size: 11px;
    color: #333;
    margin-left: 6px;
}
figure.place-image .pi-tag {
    display: inline-block;
    padding: 0 5px;
    margin-left: 6px;
    border: 1px solid #000;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    background: #fff;
    color: #000;
    vertical-align: 1px;
}
figure.place-image .pi-credit {
    display: block;
    margin-top: 3px;
    font-size: 10.5px;
    color: #555;
    letter-spacing: 0.2px;
}

/* ─────────────── places index — grouped sections ─────────────── */
.places-group {
    margin-top: 28px;
    padding-top: 14px;
    border-top: 2px solid #000;
}
.places-group:first-of-type { margin-top: 22px; }
.places-group-label {
    font-family: ui-monospace, Menlo, monospace;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 0 0 4px;
    color: #000;
}
.places-group-blurb {
    font-size: 13.5px;
    color: #333;
    line-height: 1.55;
    margin: 0 0 12px;
    max-width: 720px;
}

/* ─────────────── places index grid ─────────────── */
.places-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 0;
    border-top: 1px solid #000;
    border-left: 1px solid #000;
    margin-top: 18px;
}
.place-card {
    border-right: 1px solid #000;
    border-bottom: 1px solid #000;
    background: #fff;
    color: #000;
    text-decoration: none;
    display: block;
    overflow: hidden;
}
.place-card:hover { background: #fffacd; }
.place-card .pc-img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid #000;
}
.place-card .pc-body { padding: 10px 12px 12px; }
.place-card .pc-name {
    font-family: ui-monospace, Menlo, monospace;
    font-size: 13.5px;
    font-weight: 700;
    margin-bottom: 2px;
    color: #000;
}
.place-card .pc-region {
    font-family: ui-monospace, Menlo, monospace;
    font-size: 10.5px;
    color: #555;
    line-height: 1.4;
    margin-bottom: 6px;
}
.place-card .pc-refs {
    font-family: ui-monospace, Menlo, monospace;
    font-size: 10.5px;
    color: #333;
    line-height: 1.4;
}
.place-card .pc-refs em {
    font-style: normal;
    color: #555;
}

/* ─────────────── places single view ─────────────── */
.place-hero {
    padding-bottom: 14px;
    border-bottom: 2px solid #000;
    margin-bottom: 22px;
}
.place-coords {
    font-family: ui-monospace, Menlo, monospace;
    font-size: 12px;
    color: #333;
    margin-top: 4px;
}
.place-region {
    font-size: 14.5px;
    margin-top: 4px;
    line-height: 1.5;
}

.place-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: 8px;
}
.place-gallery figure {
    margin: 0;
    border: 1px solid #000;
    background: #fff;
}
.place-gallery figure img {
    display: block;
    width: 100%;
    height: auto;
    border-bottom: 1px solid #000;
}
.place-gallery figcaption {
    padding: 9px 12px 11px;
    font-family: ui-monospace, Menlo, monospace;
    font-size: 12px;
    line-height: 1.5;
    color: #000;
}
.place-gallery .pg-credit {
    display: block;
    margin-top: 3px;
    font-size: 10.5px;
    color: #555;
}
.place-gallery .pg-credit a {
    color: #555;
    text-decoration: underline;
}

.place-public-record {
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px solid #000;
    background: #fafafa;
}
.place-public-record h3 {
    font-family: ui-monospace, Menlo, monospace;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin: 0 0 8px;
}
.place-public-record p {
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 10px;
}
.place-public-record p:last-child { margin-bottom: 0; }

.place-references {
    margin-top: 18px;
}
.place-references h3 {
    font-family: ui-monospace, Menlo, monospace;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 8px;
    padding-top: 10px;
    border-top: 1px solid #000;
}
.place-references ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.place-references li {
    padding: 8px 0 8px 18px;
    position: relative;
    border-bottom: 1px dashed #000;
    font-size: 14px;
    line-height: 1.5;
}
.place-references li::before {
    content: "→";
    position: absolute;
    left: 0;
    font-family: ui-monospace, Menlo, monospace;
}
.place-references li a { color: #000; }
.place-references .pr-blurb {
    display: block;
    font-size: 12.5px;
    color: #555;
    margin-top: 2px;
}

/* mobile — single column, slightly smaller gallery gap */
@media (max-width: 640px) {
    .places-grid { grid-template-columns: 1fr; border-left: 0; }
    .place-card { border-right: 0; }
    .place-gallery { gap: 14px; }
    figure.place-image { margin: 18px 0 22px; }
}

/* ─────────────── Embedded map ───────────────
 * OpenStreetMap iframe + a "view on OSM" backlink under it. Sits between
 * the provenance chip and the "what's documented" prose so the reader
 * gets geography before they get text. Brutalist border, no shadows.
 */
.place-map {
    margin: 18px 0 22px;
}
.place-map-frame {
    border: 1px solid #000;
    background: #fff;
    line-height: 0;
}
.place-map-frame iframe {
    display: block;
    width: 100%;
    height: 320px;
    border: 0;
}
.place-map-credit {
    margin: 6px 0 0;
    font-family: ui-monospace, Menlo, monospace;
    font-size: 11px;
    color: #555;
    letter-spacing: 0.3px;
}
.place-map-credit a {
    color: #000;
    text-decoration: underline;
}
.place-map-credit a:hover { background: #fffacd; }
