/* Shared styles for the On Assignment blog: the post list, each post, and the writer. */
:root {
  --bg: #f0f0f0; --panel: #ffffff; --ink: #111111; --muted: #5c5c5c; --line: #d4d4d4;
  --accent: #500000; --accent-text: #500000; --accent-soft: #f3e6e6; --bar: #111111;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0d0d0d; --panel: #1a1a1a; --ink: #f2f2f2; --muted: #a6a6a6; --line: #333333; --accent-text: #e09a9a; --accent-soft: #2e1616; --bar: #000000; color-scheme: dark; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; }
.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; }
.wrap.narrow { max-width: 780px; }
header { background: var(--accent); color: #fff; border-radius: 6px; padding: 20px 22px; border-bottom: 4px solid var(--bar); }
header a { color: #e6e6e6; font-size: 14px; text-decoration: none; }
header h1 { margin: 6px 0 0; font-size: 30px; line-height: 1.1; text-transform: uppercase; letter-spacing: .01em; }
header p { margin: 6px 0 0; color: #e6e6e6; max-width: 56ch; }
a { color: var(--accent-text); }
.muted { color: var(--muted); font-size: 14px; }

/* Post list */
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; color: inherit; text-decoration: none; }
.card:hover { border-color: var(--accent-text); }
.card img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--line); }
.card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.card h2 { margin: 0; font-size: 18px; line-height: 1.25; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }
.meta { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-text); }
.empty { background: var(--panel); border: 1px dashed var(--line); border-radius: 6px; padding: 22px; color: var(--muted); }

/* A post */
article { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 20px 22px 24px; }
article .lede { font-size: 17px; }
article h2 { margin: 26px 0 6px; font-size: 19px; }
figure { margin: 20px 0; }
figure img { display: block; width: 100%; height: auto; border-radius: 4px; }
figcaption { margin-top: 6px; font-size: 13px; color: var(--muted); }
.cover { margin: 10px 0 18px; }
.back { font-weight: 600; text-decoration: none; }

footer { padding-top: 14px; border-top: 2px solid var(--ink); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; font-size: 13px; color: var(--muted); }
footer a { color: var(--accent-text); font-weight: 600; text-decoration: none; }

/* Post extras: kicker, side-by-side photos, link buttons, assignment details, bottom links */
header .kicker { display: block; margin-top: 10px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #e6c2c2; }
header .kicker + h1 { margin-top: 2px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; margin: 20px 0; }
.grid2 figure { margin: 0; }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.links a { background: var(--accent); color: #fff; font-weight: 600; font-size: 14px; padding: 8px 14px; border-radius: 4px; text-decoration: none; }
.details { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); }
.details dl { margin: 10px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 14px 20px; }
.details dt { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.details dd { margin: 0; font-size: 14px; }
.post-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 20px; }
.post-nav a { font-weight: 600; text-decoration: none; }
