/* On Assignment: the news pages (body.news) and the writer and manager (body.desk). */
:root {
  --bg: #f0f0f0; --panel: #ffffff; --ink: #141414; --muted: #5f5f5f; --line: #dcdad5; --rule: #141414;
  --accent: #500000; --accent-text: #500000; --accent-soft: #f3e6e6; --bar: #111111;
  --paper: #ffffff; --soft: #f6f4ef; --hover: #6d1010;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --display: "Playfair Display", "Source Serif 4", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0d0d0d; --panel: #1a1a1a; --ink: #f0eee9; --muted: #a8a6a0; --line: #34322e; --rule: #e9e6df; --accent-text: #e7a3a3; --accent-soft: #2e1616; --bar: #000000; --paper: #121212; --soft: #1b1a18; --hover: #f2c0c0; color-scheme: dark; }
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent-text); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid #c58b8b; outline-offset: 3px; }
.muted { color: var(--muted); font-size: 14px; }

/* ===== News pages ===== */
body.news { background: var(--paper); }
.news .mast, .news .paper, .news .foot, .news > .ad-inline { max-width: 1200px; margin-left: auto; margin-right: auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* Masthead: a plain title, then the section links. */
.mast { padding-top: 28px; }
.nameplate { margin: 0 0 14px; font: 700 28px/1.1 var(--sans); letter-spacing: .04em; text-transform: uppercase; }
.nameplate a { color: var(--ink); text-decoration: none; }
.sections { display: flex; justify-content: flex-start; flex-wrap: wrap; gap: 0 4px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sections a { color: var(--ink); text-decoration: none; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 12px; white-space: nowrap; }
.sections a:first-child { padding-left: 0; }
.sections a:hover { color: var(--accent-text); }
.sections a[aria-current] { color: var(--accent-text); box-shadow: inset 0 -2px 0 var(--accent); }
@media (max-width: 700px) {
  .sections { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .sections::-webkit-scrollbar { display: none; }
}

.paper { padding-top: 24px; padding-bottom: 32px; display: flex; flex-direction: column; gap: 36px; }

/* Shared labels */
.kick { display: inline-block; font: 700 12px/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); text-decoration: none; }
a.kick:hover { text-decoration: underline; }
.rail-h { margin: 0 0 10px; font: 800 13px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); padding-bottom: 8px; border-bottom: 2px solid var(--rule); }
.sec-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-top: 3px solid var(--rule); padding-top: 8px; margin-bottom: 16px; }
.sec-h h2 { margin: 0; font: 800 22px/1.15 var(--serif); }
.sec-h h2 a { color: inherit; text-decoration: none; }
.sec-h h2 small { font: 600 13px var(--sans); color: var(--muted); margin-left: 6px; }
.more { font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.more:hover { text-decoration: underline; }

/* Story cards */
.story { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.story-img { position: relative; display: block; overflow: hidden; background: var(--soft); }
.story-img img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .4s ease; }
.story:hover .story-img img { transform: scale(1.03); }
.story-text { display: flex; flex-direction: column; gap: 6px; }
.story h2, .story h3 { margin: 0; font-family: var(--serif); font-weight: 700; line-height: 1.15; }
.story h2 a, .story h3 a { color: var(--ink); text-decoration: none; }
.story h2 a:hover, .story h3 a:hover { color: var(--accent-text); }
.story h3 { font-size: 20px; }
.dek { margin: 0; font: 400 16px/1.5 var(--serif); color: var(--muted); }
.byline { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.byline a { color: var(--ink); text-decoration: none; }
.byline a:hover { color: var(--accent-text); }
.byline span { margin: 0 2px; }
.gal-tag { position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; background: rgba(0,0,0,.72); color: #fff; font: 700 11px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; padding: 6px 9px; }
/* The lead story: photo and text side by side, stacked on phones. */
.story-lead { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 28px; align-items: center; padding-bottom: 36px; border-bottom: 1px solid var(--line); }
.story-lead .story-img img { aspect-ratio: 3 / 2; }
.story-lead h2 { font-size: clamp(28px, 3.6vw, 44px); line-height: 1.08; letter-spacing: -.01em; }
.story-lead .dek { font-size: 19px; }
@media (max-width: 800px) { .story-lead { grid-template-columns: 1fr; gap: 14px; } }

.grid3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 36px 28px; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 8px; font-size: 14px; color: var(--muted); }
.pager a { font-weight: 700; text-decoration: none; }
.empty { margin: 0; padding: 22px; background: var(--soft); color: var(--muted); font: 400 17px/1.5 var(--serif); }

.sec-banner { text-align: center; padding: 4px 0 0; }
.sec-banner h1 { margin: 6px 0 0; font: 800 clamp(32px, 5vw, 48px)/1.05 var(--serif); }

/* Author pages and boxes */
.avatar { flex: 0 0 auto; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: #fff; font: 700 24px var(--serif); }
.avatar.lg { width: 140px; height: 140px; font-size: 48px; }
.author-head { display: flex; gap: 28px; align-items: flex-start; padding: 8px 0 28px; border-bottom: 3px solid var(--rule); }
.author-head h1 { margin: 6px 0 2px; font: 800 clamp(32px, 5vw, 48px)/1.05 var(--serif); }
.author-title { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.author-bio { max-width: 68ch; font: 400 18px/1.6 var(--serif); }
.author-bio p { margin: 12px 0 0; }
.author-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.author-links a { font-size: 13px; font-weight: 700; text-decoration: none; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); }
.author-links a:hover { border-color: var(--accent-text); color: var(--accent-text); }
@media (max-width: 600px) { .author-head { flex-direction: column; gap: 16px; } .avatar.lg { width: 104px; height: 104px; font-size: 36px; } }
.author-box, .details { font-family: var(--sans); }
.art-body .rail-h { margin: 0 0 12px; font: 800 13px/1.2 var(--sans); letter-spacing: .14em; }
.author-box { display: flex; gap: 18px; margin-top: 32px; padding: 20px; background: var(--soft); border-top: 3px solid var(--accent); }
.art-body .author-box h2 { margin: 2px 0; font: 700 22px/1.2 var(--serif); }
.author-box h2 a { color: var(--ink); text-decoration: none; }
.art-body .author-box .rail-h { border: 0; padding: 0; margin: 0; font-size: 11px; color: var(--muted); }
.art-body .author-box p { margin: 6px 0 0; font-size: 15px; line-height: 1.5; }
.art-body .author-box .author-title { font-size: 12px; margin-top: 2px; }
.author-box .more { display: inline-block; margin-top: 10px; }

/* ===== A story ===== */
/* Long links, hashtags and file names wrap instead of running out of the story. */
.art { overflow-wrap: anywhere; min-width: 0; }
.art-head { max-width: 860px; width: 100%; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.art-head h1 { margin: 0; font: 800 clamp(32px, 5.4vw, 58px)/1.06 var(--serif); letter-spacing: -.015em; text-transform: none; }
.art-dek { margin: 0; max-width: 46ch; font: 400 clamp(18px, 2.2vw, 22px)/1.45 var(--serif); color: var(--muted); }
.art-meta { width: 100%; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 20px; margin-top: 8px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; }
.art-by { margin: 0; font-size: 15px; }
.art-by a { color: var(--ink); text-decoration: none; }
.art-by a:hover { color: var(--accent-text); }
.art-when { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.share { display: flex; flex-wrap: wrap; gap: 6px; }
.share a, .share button { font: 700 12px/1 var(--sans); letter-spacing: .04em; color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; text-decoration: none; cursor: pointer; }
.share a:hover, .share button:hover { border-color: var(--accent-text); color: var(--accent-text); }
.art-cover { margin: 26px auto 0; max-width: 1100px; }
.art-cover img { display: block; width: 100%; height: auto; }
.art-cover figcaption, .art-body figcaption { margin-top: 8px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.art-cols { display: grid; grid-template-columns: minmax(0, 680px); justify-content: center; margin-top: 32px; }
.art-body { font: 400 19px/1.7 var(--serif); }
.art-body > p:first-child::first-letter { float: left; font: 800 4.1em/.8 var(--display); padding: 6px 10px 0 0; color: var(--accent-text); }
.art-body p { margin: 0 0 1.1em; }
.art-body h2 { margin: 1.6em 0 .5em; font: 800 26px/1.2 var(--serif); }
.art-body figure { margin: 30px 0; }
.art-body figure img { display: block; width: 100%; height: auto; }
.art-body a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.pull { margin: 32px 0; padding: 18px 0; border-top: 3px solid var(--accent); border-bottom: 1px solid var(--line); }
.pull p { margin: 0; font: italic 600 26px/1.35 var(--serif); color: var(--ink); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px; margin: 30px 0; }
.grid2 figure { margin: 0; }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; font-family: var(--sans); }
.links a { background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; padding: 10px 16px; border-radius: 999px; text-decoration: none; }
.links a:hover { background: var(--hover); color: var(--paper); }
.details { margin-top: 32px; padding: 18px 20px; background: var(--soft); font-family: var(--sans); }
.details dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 14px 20px; }
.details dt { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.details dd { margin: 0; font-size: 15px; line-height: 1.45; }
.filed { margin-top: 24px !important; font: 600 13px var(--sans); color: var(--muted); }
/* A gallery: the photos fill the page in the layout picked in the writer, and open in a full-screen viewer. */
.art-gallery .art-body { max-width: 720px; margin: 28px auto 0; }
.art-gallery .gal-intro > p:first-child::first-letter, .art-gallery .essay-text > p:first-child::first-letter { all: unset; }
.gal { margin-top: 32px; }
.gal figure { margin: 0; }
.gal figcaption { margin-top: 8px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.gal-open { display: block; width: 100%; padding: 0; border: 0; background: var(--soft); cursor: zoom-in; }
.gal-open img { display: block; width: 100%; height: auto; transition: opacity .2s; }
.gal-open:hover img { opacity: .88; }

/* Grid: even 3:2 tiles, the first photo across the top at its own shape. */
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 22px 14px; }
.gal-grid .gal-open img { aspect-ratio: 3 / 2; object-fit: cover; }
.gal-grid > .gal-ph:first-child, .gal-grid > .ad-gallery { grid-column: 1 / -1; }
.gal-grid > .gal-ph:first-child .gal-open img { aspect-ratio: auto; max-height: 82vh; object-fit: contain; }

/* Masonry: columns that keep every photo's own shape, verticals and horizontals together. */
.gal-masonry { columns: 3 300px; column-gap: 14px; }
.gal-masonry > .gal-ph { break-inside: avoid; margin-bottom: 18px; }
.gal-masonry > .gal-ph:first-child, .gal-masonry > .ad-gallery { column-span: all; }
.gal-masonry > .gal-ph:first-child .gal-open img { max-height: 82vh; object-fit: contain; }
.gal-masonry > .ad-gallery { margin-bottom: 18px; }

/* Full width: one photo after another, as big as the page allows. */
.gal-stack { max-width: 1100px; margin-left: auto; margin-right: auto; display: flex; flex-direction: column; gap: 44px; }
.gal-stack .gal-open img { max-height: 90vh; object-fit: contain; }
.gal-stack figcaption { max-width: 760px; font-size: 14px; }

/* Slideshow: one photo at a time on a dark stage, with thumbnails under it. */
.gal-slideshow { --ss-h: min(70vh, 680px, 110vw); max-width: 1100px; width: 100%; margin-left: auto; margin-right: auto; }
.ss-stage { position: relative; background: #0d0d0d; }
.ss-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.ss-track::-webkit-scrollbar { display: none; }
.ss-track:focus-visible { outline: 3px solid #c58b8b; outline-offset: -3px; }
.ss-slide { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; min-width: 0; }
.ss-slide .gal-ph { display: flex; flex-direction: column; height: 100%; }
.ss-slide .gal-open { flex: 1; display: flex; align-items: center; justify-content: center; background: #0d0d0d; }
.ss-slide .gal-open img { width: auto; max-width: 100%; height: var(--ss-h); object-fit: contain; }
.ss-slide figcaption { margin: 0; padding: 12px 16px 16px; background: var(--paper); color: var(--muted); }
.ss-prev, .ss-next { position: absolute; top: calc(var(--ss-h) / 2); transform: translateY(-50%); width: 46px; height: 46px; border: 0; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font: 32px/1 var(--sans); cursor: pointer; }
.ss-prev { left: 10px; } .ss-next { right: 10px; }
.ss-prev:hover, .ss-next:hover { background: rgba(0,0,0,.8); }
.ss-count { position: absolute; top: 10px; right: 12px; padding: 5px 9px; background: rgba(0,0,0,.6); color: #fff; font: 700 12px/1 var(--sans); letter-spacing: .06em; }
.ss-thumbs { display: flex; gap: 6px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.ss-thumb { flex: 0 0 auto; padding: 0; border: 2px solid transparent; background: none; cursor: pointer; opacity: .6; }
.ss-thumb img { display: block; width: 84px; height: 56px; object-fit: cover; }
.ss-thumb[aria-current], .ss-thumb:hover { opacity: 1; border-color: var(--accent-text); }
.gal-slideshow + .ad-gallery { margin-top: 28px; }
@media (max-width: 600px) { .ss-prev, .ss-next { width: 38px; height: 38px; font-size: 26px; } .ss-thumb img { width: 64px; height: 43px; } }

/* Photo essay: text in a reading column, each photo wide where it sits in the story. */
.gal-essay { max-width: 1100px; margin-left: auto; margin-right: auto; display: flex; flex-direction: column; gap: 36px; }
.art-gallery .essay-text { width: 100%; max-width: 680px; margin: 0 auto; }
.gal-essay .essay-text > :last-child { margin-bottom: 0; }
.gal-essay .gal-open img { max-height: 88vh; object-fit: contain; }
.gal-essay .gal-ph figcaption { max-width: 760px; }
.essay-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 14px; align-items: start; }
.gal-essay > .ad-gallery { width: 100%; max-width: 760px; margin: 0 auto; }

.viewer { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(8,8,8,.97); color: #eee; }
.viewer[open] { display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; }
.viewer::backdrop { background: rgba(0,0,0,.9); }
.viewer figure { margin: 0; height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 48px 0 16px; }
.viewer img { max-width: 100%; max-height: calc(100vh - 150px); object-fit: contain; }
.viewer figcaption { max-width: 900px; margin-top: 12px; font-size: 14px; line-height: 1.5; color: #cfcfcf; text-align: center; }
.viewer figcaption a { color: #fff; }
.viewer button { background: none; border: 0; color: #fff; font-size: 44px; line-height: 1; cursor: pointer; height: 100%; }
.viewer button:hover { color: #e7a3a3; }
.viewer .v-close { position: absolute; top: 8px; right: 14px; height: auto; font-size: 40px; z-index: 1; }
.viewer .v-count { position: absolute; top: 18px; left: 20px; font: 700 13px var(--sans); letter-spacing: .08em; color: #aaa; }
@media (max-width: 600px) { .viewer[open] { grid-template-columns: 36px 1fr 36px; } .viewer button { font-size: 32px; } }

.related { max-width: 1100px; width: 100%; margin: 0 auto; }
.related .sec-h { border-top-width: 1px; }

/* Footer */
.foot { position: relative; margin-top: 24px; padding-top: 25px; padding-bottom: 36px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 24px; font-size: 13px; color: var(--muted); }
.foot::before { content: ""; position: absolute; top: 0; left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); border-top: 3px solid var(--rule); }
.foot-name { font: 700 16px/1 var(--sans); letter-spacing: .04em; text-transform: uppercase; color: var(--ink) !important; text-decoration: none; }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.foot nav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.foot > span { flex: 1 1 100%; }
.foot > span:last-child { margin-top: -4px; }
.foot a { color: var(--accent-text); font-weight: 600; text-decoration: none; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print { .sections, .share, .related, .foot nav { display: none !important; } }

/* ===== The writer and manager ===== */
body.desk { background: var(--bg); font-size: 15px; }
.desk .wrap { max-width: 900px; margin: 0 auto; padding: 28px max(16px, env(safe-area-inset-right, 0px)) 48px max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 24px; }
.desk .wrap.narrow { max-width: 820px; }
.desk .wrap > header { background: var(--accent); color: #fff; border-radius: 12px; padding: 20px 22px; border-bottom: 4px solid var(--bar); }
.desk .wrap > header a { color: #e6e6e6; font-size: 14px; text-decoration: none; }
.desk .wrap > header h1 { margin: 6px 0 0; font-size: 30px; line-height: 1.1; text-transform: uppercase; letter-spacing: .01em; }
.desk .wrap > header p { margin: 6px 0 0; color: #e6e6e6; max-width: 60ch; }
.desk .preview { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 24px 20px; overflow: hidden; }
.desk .preview .art-cols { margin-top: 24px; }

/* Comments under a story */
.comments { width: 100%; max-width: 680px; margin: 0 auto; font-family: var(--sans); }
.c-list { list-style: none; margin: 0; padding: 0; }
.c-list li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.c-list p { margin: 0; font: 400 17px/1.55 var(--serif); }
.c-list .c-meta { margin-bottom: 4px; font: 13px/1.4 var(--sans); color: var(--muted); display: flex; gap: 10px; align-items: baseline; }
.c-meta strong { color: var(--ink); }
.c-del { margin-left: auto; font: 600 12px var(--sans); background: none; border: 0; color: var(--accent-text); cursor: pointer; }
.c-empty { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.c-form { margin-top: 18px; display: grid; gap: 12px; }
.c-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.c-form input, .c-form textarea { font: 400 16px/1.5 var(--sans); color: var(--ink); background: var(--soft); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; width: 100%; }
.c-form .c-name { max-width: 320px; }
.c-hp { position: absolute; left: -9999px; }
.c-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.c-form button { font: 700 14px var(--sans); background: var(--accent); color: #fff; border: 0; border-radius: 999px; padding: 10px 18px; cursor: pointer; }
.c-form button:disabled { opacity: .5; }
.c-msg { font-size: 14px; color: var(--muted); }
.c-note { margin: 0; font-size: 13px; color: var(--muted); }
