/* ============================================================
   Single photo post — v2 layout ("Q2" on the design canvas).
   Loaded only when cdpc_single_is_v2() (single-post-layout-v2.php).
   Full width on the menu's gutter, like the homepage: 40px desktop,
   16px phones. Breakpoint 980px matches dark-single.css's two-column cut.
============================================================ */

.sv2 {
  --sv2-gutter: 40px;
  --sv2-text: #f0eee9;
  --sv2-body: #dcd9d2;
  --sv2-dim: #8d96a2;
  --sv2-line: #161b22;
  --sv2-line2: #232a34;
  --sv2-pink: #c64191;
  --sv2-pink-hi: #e2589f;
  --sv2-serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sv2-label: 'Jost', 'Source Sans 3', system-ui, sans-serif;

  background: #07090c;
  color: var(--sv2-text);
  font-family: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  padding-bottom: 96px;
}

.sv2 a { color: inherit; text-decoration: none; border-bottom: 0; box-shadow: none; }
.sv2 a:hover { color: var(--sv2-pink-hi); }
.sv2 h1, .sv2 h2, .sv2 p, .sv2 figure { margin: 0; }
/* Astra's heading settings title-case and recolour h1/h2; these are content titles */
.sv2 h1.sv2Title, .sv2 h2.sv2SetTitle { text-transform: none; }
/* .sv2 h2 { margin: 0 } outranks single-class margins, so restate them here */
.sv2 .sv2Lbl { margin: 0 0 16px; }
.sv2 .sv2SetTitle { margin: -4px 0 28px; }
.sv2 .sv2SetTitle a { color: var(--sv2-text); }
.sv2 .sv2SetTitle a:hover { color: var(--sv2-pink-hi); }

/* ---------- Menu bar: full width, on the content's gutter (like the homepage) ---------- */
@media (min-width: 769px) {
  body.sv2-active .archiveHeader__inner {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    padding: 0 40px;
  }
}
@media (min-width: 769px) and (max-width: 980px) {
  body.sv2-active .archiveHeader__inner { padding: 0 24px; }
}

/* ---------- Labels ---------- */
.sv2Lbl {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 16px;
  font-family: var(--sv2-label);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #c9ced6;
}
.sv2Lbl::before { content: ""; flex: none; width: 26px; height: 2px; background: var(--sv2-pink); }

/* ---------- Title row ---------- */
.sv2Head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 32px;
  padding: 48px var(--sv2-gutter) 24px;
}
.sv2Title {
  max-width: 30ch;
  font-family: var(--sv2-serif);
  font-size: clamp(34px, 3.2vw, 58px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -.015em;
  color: var(--sv2-text);
}
.sv2Taken {
  padding-bottom: 8px;
  font-family: var(--sv2-label);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--sv2-dim);
}

/* ---------- Photo: full width, never taller than the screen ---------- */
.sv2Figure { padding: 0 var(--sv2-gutter); }
.sv2 .sv2Hero { display: block; width: 100%; height: auto; }
.sv2Figcap { padding-top: 10px; font-size: 14px; line-height: 1.45; color: var(--sv2-dim); }

/* Portrait / near-square photos: capped at screen height and centred; the grid
   column takes the photo's width so the caption lines up under it
   (width:0 + min-width:100% — the caption never widens the column). */
.sv2Figure--tall { display: grid; justify-content: center; }
.sv2 .sv2Figure--tall .sv2Hero {
  width: auto;
  max-width: calc(100vw - 2 * var(--sv2-gutter));
  max-height: calc(100vh - 120px);
}
.sv2Figure--tall .sv2Figcap { width: 0; min-width: 100%; }

.sv2Notes { padding: 24px var(--sv2-gutter) 0; }

/* ---------- Body: caption + sections left, sidebar right ---------- */
.sv2Body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 88px;
  align-items: start;
  padding: 56px var(--sv2-gutter) 0;
}
.sv2Main { display: flex; flex-direction: column; gap: 88px; min-width: 0; }

.sv2Caption {
  max-width: 60ch;
  font-family: var(--sv2-serif);
  font-size: 23px;
  line-height: 1.6;
  color: var(--sv2-body);
}
.sv2Caption p { margin: 0 0 .85em; }
.sv2Caption > :last-child { margin-bottom: 0; }
.sv2Caption a { color: var(--sv2-text); border-bottom: 1px solid #4a525e; }
.sv2Caption a:hover { color: var(--sv2-pink-hi); border-bottom-color: var(--sv2-pink-hi); }
.sv2Caption .spni-caption-inserted { display: inline; }

/* Phone-only pieces, hidden on desktop */
.sv2Meta, .sv2Quick, .sv2ShareMenu { display: none; }

/* ---------- More from ---------- */
.sv2SetTitle {
  margin: -6px 0 28px;
  font-family: var(--sv2-serif);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.15;
}
.sv2MoreGrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px 24px; }
.sv2Card { display: block; min-width: 0; }
.sv2Card__img { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: #0d1219; }
.sv2Card__img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.sv2Card:hover .sv2Card__img img { transform: scale(1.035); }
.sv2Card__title { display: block; padding-top: 14px; font-size: 17px; font-weight: 600; line-height: 1.3; color: var(--sv2-text); }
.sv2Card:hover .sv2Card__title { color: var(--sv2-pink-hi); }
.sv2Card__ex {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  padding-top: 6px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--sv2-dim);
}

/* ---------- Nearby photos beside the map ---------- */
.sv2NearGrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
.sv2Near--mapOnly .sv2NearGrid { grid-template-columns: minmax(0, 1fr); }

.sv2Nearby .nearby-photos { margin: 0; }
.sv2Nearby .np-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 16px; margin: 0; padding: 0; list-style: none; }
.sv2Nearby .np-item { margin: 0; padding: 0; background: none; border: 0 !important; box-shadow: none !important; }
.sv2Nearby .np-link { position: relative; display: block !important; border: 0 !important; border-radius: 0 !important; background: none !important; transform: none !important; text-decoration: none; }
.sv2Nearby .np-thumb { aspect-ratio: 4 / 3; overflow: hidden; background: #0d1219; }
.sv2Nearby .np-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.sv2Nearby .np-link:hover .np-thumb img { transform: scale(1.035); }
.sv2Nearby .np-meta { display: block !important; padding: 0 !important; background: none !important; }
.sv2Nearby .np-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  padding-top: 9px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--sv2-text);
}
.sv2Nearby .np-link:hover .np-title { color: var(--sv2-pink-hi); }
.sv2Nearby .np-distance {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(7, 9, 12, .82);
  font-family: var(--sv2-label);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sv2-text);
}

.sv2MapPlace {
  min-height: 1.3em;
  margin-bottom: 12px;
  font-family: var(--sv2-label);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--sv2-dim);
}
.sv2MapPlace a, .sv2Meta a { color: #c9ced6; border-bottom: 1px solid #3a424e; }
.sv2MapCol { display: flex; flex-direction: column; min-width: 0; }
.sv2 .sv2Map { flex: 1 1 auto; min-height: 360px; width: 100%; background: #10151d; }
.sv2Near--mapOnly .sv2Map { flex: none; height: 420px; }
.sv2MapLinks { margin-top: 10px; font-size: 14px; color: var(--sv2-dim); }
.sv2MapLinks a { color: var(--sv2-dim); }
.sv2MapLinks a:hover { color: var(--sv2-text); }

/* ---------- Sidebar ---------- */
.sv2Aside { display: flex; flex-direction: column; padding-top: 8px; }
@media (min-height: 820px) {
  .sv2Aside { position: sticky; top: 24px; }
}
.sv2Side { padding: 28px 0; border-top: 1px solid var(--sv2-line); }
.sv2Side:first-child { padding-top: 0; border-top: 0; }

.sv2Sets { display: flex; flex-direction: column; gap: 18px; }
.sv2Set { display: grid; grid-template-columns: 88px 1fr; gap: 16px; align-items: center; }
.sv2Set__img { display: block; width: 88px; height: 88px; overflow: hidden; background: #0d1219; }
.sv2Set__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sv2Set__title { display: block; font-weight: 600; line-height: 1.3; color: var(--sv2-text); }
.sv2Set:hover .sv2Set__title { color: var(--sv2-pink-hi); }
.sv2Set__sub { display: block; padding-top: 3px; font-size: 13px; line-height: 1.45; color: var(--sv2-dim); }
.sv2Set__meta {
  display: block;
  padding-top: 5px;
  font-family: var(--sv2-label);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--sv2-dim);
}

.sv2Acts { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.sv2Acts--col { flex-direction: column; gap: 2px; }
.sv2 .sv2Act {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 15px;
  color: #9aa3ae;
  cursor: pointer;
}
.sv2 .sv2Act:hover { color: var(--sv2-text); }

.sv2TagList { display: flex; flex-wrap: wrap; gap: 8px; }
.sv2 .sv2Tag {
  display: inline-block;
  padding: 5px 11px;
  border: 1px solid var(--sv2-line2);
  border-radius: 999px;
  font-size: 13px;
  line-height: 1.3;
  color: #c9ced6;
}
.sv2 .sv2Tag:hover { border-color: var(--sv2-pink); color: #fff; }

.sv2Yarpp { font-size: 15px; }

/* SPNI box notes — same look as the v1 layout */
.sv2 .spni-notes-wrapper {
  margin: 0;
  padding: 1rem 1.2rem 1.05rem;
  background: #f6f6f6;
  border-left: 4px solid var(--ast-global-color-0);
  border-radius: 4px;
  font-size: .92rem;
  line-height: 1.5;
  color: rgba(0, 0, 0, .85);
}
.sv2 .spni-notes-wrapper::before {
  content: "NOTE";
  display: block;
  margin-bottom: .4rem;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, .55);
}
.sv2 .spni-note { margin: .25rem 0; }
.sv2 .spni-notes-wrapper a { color: var(--ast-global-color-1); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Very wide screens: sidebar grows a little, More From in one row ---------- */
@media (min-width: 1700px) {
  .sv2Body { grid-template-columns: minmax(0, 1fr) clamp(340px, 20vw, 440px); }
}
@media (min-width: 2100px) {
  .sv2MoreGrid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 44px 20px; }
}

/* ---------- Narrower desktops ---------- */
@media (max-width: 1200px) {
  .sv2Body { grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; }
}

/* ============================================================
   Tablet + phone: one column, no boxes, sections in reading order:
   caption → part of → more from (swipe) → nearby + map → tags.
============================================================ */
@media (max-width: 980px) {
  .sv2 { --sv2-gutter: 24px; padding-bottom: 64px; }

  /* stretch, not start: the swipe row's % card widths need a definite width */
  .sv2Body { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding-top: 24px; }
  .sv2Main, .sv2Aside { display: contents; }
  .sv2Intro { order: 1; }
  .sv2PartOf { order: 2; }
  .sv2More, .sv2Yarpp { order: 3; }
  .sv2Near { order: 4; }
  .sv2Tags { order: 5; }
  .sv2Get, .sv2Share { display: none; }

  .sv2Sec, .sv2Side,
  .sv2Side:first-child {
    margin-top: 40px;
    padding: 40px 0 0;
    border-top: 1px solid var(--sv2-line);
  }

  /* Section labels match the live phone page: pink rule above, pink text */
  .sv2Lbl { flex-direction: column; align-items: flex-start; gap: 10px; font-size: 12px; letter-spacing: .16em; color: var(--sv2-pink-hi); }
  .sv2Lbl::before { width: 56px; }

  .sv2Head { padding-top: 24px; padding-bottom: 18px; flex-direction: column; align-items: flex-start; }
  .sv2Head::before { content: ""; width: 56px; height: 2px; background: var(--sv2-pink); }
  .sv2Taken { display: none; }

  .sv2Caption { font-size: 20px; }

  .sv2Meta {
    display: block;
    margin-top: 16px;
    font-family: var(--sv2-label);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.7;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--sv2-dim);
  }
  .sv2Meta .sv2Place:not(:empty)::before { content: " · "; }

  .sv2Quick {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding: 4px 0;
    border-top: 1px solid var(--sv2-line);
    border-bottom: 1px solid var(--sv2-line);
  }
  .sv2ShareMenu:not([hidden]) { display: flex; gap: 20px; padding: 6px 0; border-bottom: 1px solid var(--sv2-line); }

  /* More from: swipe row */
  .sv2 .sv2SetTitle { margin: 0 0 6px; font-size: 24px; line-height: 1.2; }
  .sv2More { margin-left: calc(var(--sv2-gutter) * -1); margin-right: calc(var(--sv2-gutter) * -1); }
  .sv2More > .sv2Lbl, .sv2More > .sv2SetTitle { padding-left: var(--sv2-gutter); padding-right: var(--sv2-gutter); }
  .sv2More { padding-top: 40px; }
  .sv2MoreGrid {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    padding: 0 var(--sv2-gutter) 4px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-left: var(--sv2-gutter);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .sv2MoreGrid::-webkit-scrollbar { display: none; }
  .sv2MoreGrid::after { content: ""; flex: 0 0 1px; }
  .sv2Card { flex: 0 0 42%; scroll-snap-align: start; }
  .sv2Card__title { padding-top: 10px; font-size: 16px; }

  .sv2NearGrid { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .sv2Nearby .np-grid { gap: 18px 10px; }
  .sv2Nearby .np-thumb { aspect-ratio: 4 / 3; }
  .sv2 .sv2Map, .sv2Near--mapOnly .sv2Map { flex: none; height: 260px; min-height: 0; }
}

@media (max-width: 600px) {
  .sv2 { --sv2-gutter: 16px; }
  .sv2Figure, .sv2Figure--tall { display: block; padding: 0; }
  .sv2 .sv2Hero, .sv2 .sv2Figure--tall .sv2Hero { width: 100%; max-width: 100%; max-height: none; }
  .sv2Figure--tall .sv2Figcap { width: auto; }
  .sv2Figcap { padding: 8px var(--sv2-gutter) 0; font-size: 13px; }
  .sv2Title { font-size: 30px; line-height: 1.08; }
  .sv2Caption { font-size: 19px; }
  .sv2Card { flex-basis: 78%; }
  .sv2 .sv2Map, .sv2Near--mapOnly .sv2Map { height: 210px; }
  .sv2Set { grid-template-columns: 72px 1fr; gap: 14px; }
  .sv2Set__img { width: 72px; height: 72px; }
}
