/* ============================================================
   Crit - shared styles for every page
   The base follows blaisecary.com (sidebar, big name, thin menu, grey
   cards, pill buttons); the "Colour" design at the bottom restyles it.
   ============================================================ */

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* ---------- Colours and sizes (change these to restyle the whole site) ---------- */
:root {
  --bg: #fff;
  --text: #000;
  --muted: #666;
  --line: #ddd;
  --card: #f2f2f2;
  --dark: #0f0f0f;
  --accent: #3ddc84;          /* the green dot: "open for critique" */
  --margin: 24px;
  --gap: 24px;
  --radius: 5px;
  --sidebar-width: max(22vw, 300px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
main, .site-footer { animation: fade-in 0.5s ease-in-out both; }
@media (prefers-reduced-motion: reduce) { main, .site-footer { animation: none; } html { scroll-behavior: auto; } }

/* Small spaced-out uppercase labels, used everywhere */
.eyebrow {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Sidebar (left column on desktop, top bar on phones) ---------- */
.sidebar {
  --bg: var(--dark);
  --text: #fff;
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  padding: var(--margin) var(--margin) 32px;   /* the logo sits as far from the top as from the left */
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: var(--bg);
  color: var(--text);
  border-radius: 0 8px 8px 0;
  z-index: 10;
}
.sidebar :focus-visible { outline-color: #fff; }
.logo {
  display: inline-block;
  margin-left: -0.05em;
  font-size: clamp(64px, 7vw, 112px);
  font-weight: 700;
  line-height: 0.95;
  text-decoration: none;
  text-transform: uppercase;
}
.logo:hover { opacity: 0.6; }
.tagline { margin: 16px 0 0; max-width: 22em; font-size: 15px; line-height: 22px; color: rgba(255, 255, 255, 0.75); }
.status { display: flex; align-items: baseline; gap: 8px; margin: 14px 0 0; font-size: 14px; font-weight: 600; }
.status::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); transform: translateY(-1px); }
.menu-button { display: none; }
.nav { margin-top: 44px; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav a {
  display: inline-block;
  padding: 4px 0;
  font-size: 28px;
  font-weight: 100;
  line-height: 44px;
  text-decoration: none;
  text-transform: uppercase;
}
.nav a:hover { opacity: 0.6; }
.nav a[aria-current="page"] { font-weight: 600; }
.sidebar .cta {
  margin-top: auto;
  padding-top: 40px;
}
.sidebar .button { border-color: #fff; }
.sidebar .button:hover { background: #fff; color: #000; }

/* ---------- Main area ---------- */
main {
  margin-left: var(--sidebar-width);
  padding: 0 var(--margin);   /* 24px each side, as on blaisecary.com */
  min-height: 100vh;
  overflow-x: clip;
}
.site-footer {
  margin-left: var(--sidebar-width);
  padding: 80px var(--margin) 40px;
  font-size: 16px;
  font-weight: 500;
  text-align: right;
}
.site-footer .note { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; font-weight: 400; }


/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1.5px solid var(--text);
  border-radius: 999px;
  background: none;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.button:hover, .button.solid { background: var(--text); color: var(--bg); }
.button.solid:hover { opacity: 0.8; }
.button[disabled] { opacity: 0.4; cursor: not-allowed; }

/* ---------- Page headers: a big, light statement (like the portfolio's project leads) ---------- */
.intro { max-width: 1000px; padding: 64px 0 0; }
.intro h1 {
  margin: 0;
  font-size: clamp(36px, 4.2vw, 60px);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -0.01em;
}
.intro h1 strong { font-weight: 600; }
.intro p.lede { max-width: 720px; margin: 24px 0 0; font-size: 20px; line-height: 30px; }

/* ---------- Feed: filters + cards ---------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1.5px solid var(--text);
}
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button, .sort button {
  padding: 8px 16px;
  border: 1.5px solid var(--text);
  border-radius: 999px;
  background: none;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.filters button:hover, .sort button:hover { background: #eee; }
.filters button[aria-pressed="true"], .sort button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.sort { display: flex; align-items: center; gap: 8px; }
.sort .eyebrow { margin: 0 4px 0 0; }

/* Feed page: a short intro so the work fills the screen */
[data-page="feed"] .intro { max-width: none; padding-top: 32px; }
[data-page="feed"] .intro h1 { max-width: 22em; font-size: clamp(28px, 2.6vw, 40px); }
[data-page="feed"] .intro p.lede { margin-top: 12px; font-size: 17px; line-height: 25px; }
[data-page="feed"] .toolbar { margin-top: 28px; padding-top: 16px; }

/* Tiles in a masonry grid, like Pinterest or Cosmos: as many columns as fit, each tile as tall
   as its image's own shape. app.js measures each tile and sets how many 4px rows it spans,
   so tiles pack tightly and still read left to right. */
.feed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  grid-auto-rows: 4px;
  column-gap: 16px;
  margin-top: 20px;
}
.card { display: block; align-self: start; text-decoration: none; }
.card .cover {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
}
.card .cover img { width: 100%; height: auto; transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1); }
/* Black outline on hover, the same weight as the portfolio's image hover */
.card .cover::after { content: ""; position: absolute; inset: 0; border: 3px solid transparent; border-radius: inherit; transition: border-color 0.2s; }
@media (hover: hover) {
  .card:hover .cover::after { border-color: var(--text); }
  .card:hover .cover img { transform: scale(1.03); }
}
.card .count {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(15, 15, 15, 0.85);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.card .count.needs { background: var(--accent); color: #000; }
.card .pics { position: absolute; right: 12px; bottom: 12px; padding: 5px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.9); font-size: 12px; font-weight: 600; }
.card .desc { display: -webkit-box; margin: 2px 0 0; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 14px; line-height: 20px; }
.card .by { margin-top: 6px; }
.card h2 { margin: 10px 0 0; font-size: 22px; font-weight: 700; line-height: 1.15; text-transform: uppercase; }
.card .meta { margin: 0; font-size: 12px; line-height: 1.5; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.empty { grid-column: 1 / -1; grid-row: span 40; padding: 64px 0; color: var(--muted); font-size: 18px; }

/* ---------- Post page ---------- */
.post-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; padding-top: 64px; }
.post-head h1 { margin: 0; font-size: clamp(40px, 5vw, 72px); font-weight: 700; line-height: 1; text-transform: uppercase; }
.post-head .desc { margin: 14px 0 0; max-width: 34em; font-size: 22px; font-weight: 300; line-height: 31px; }
.post-head .sub { margin: 14px 0 0; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; }
/* "See it on blaisecary.com/noir": the page the work came from */
.source-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 6px 12px;
  border: 1.5px solid var(--text);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}
.source-link:hover, .source-link:focus-visible { background: var(--text); color: var(--bg); }
.gallery figure { position: relative; }
.gallery figcaption { position: absolute; left: 10px; bottom: 10px; }
.gallery figcaption a { display: inline-block; padding: 4px 10px; border-radius: 10px; background: rgba(17, 17, 17, 0.85); color: #fff; font-size: 12px; font-weight: 500; text-decoration: none; }
.gallery figcaption a:hover { background: #111; }
.back { display: inline-block; margin-bottom: 20px; font-size: 14px; text-decoration: none; color: var(--muted); }
.back:hover { color: var(--text); }

/* Images keep their own shape: the cover on its own, then the rest in one row at a shared
   height (each one's width follows its shape, so nothing is cropped). Click any to see it full screen. */
.gallery { display: flex; flex-direction: column; gap: 12px; margin-top: 32px; }
.gallery figure { margin: 0; min-width: 0; border-radius: var(--radius); overflow: hidden; background: var(--card); }
.gallery img { display: block; width: 100%; height: auto; cursor: zoom-in; }
.gallery .lead { align-self: center; max-width: 100%; }
.gallery .lead img:not([style]) { width: auto; max-width: 100%; max-height: 85vh; }
.gallery .rest { display: flex; gap: 12px; }
.gallery .rest figure { flex: var(--r, 1) 1 0; }
@media (hover: hover) {
  .gallery figure { position: relative; }
  .gallery figure::after { content: ""; position: absolute; inset: 0; border: 3px solid transparent; border-radius: inherit; pointer-events: none; transition: border-color 0.2s; }
  .gallery figure:hover::after { border-color: var(--text); }
}

/* Facts strip, like the portfolio's "at a glance" */
.glance {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
  margin: 32px 0 0;
  padding: 22px 0;
  border-top: 1.5px solid var(--text);
  border-bottom: 1px solid var(--line);
}
.glance dt { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.glance dd { margin: 6px 0 0; font-size: 18px; line-height: 26px; }

.brief { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); margin-top: 64px; }
.brief .statement { grid-column: 1 / span 7; }
.brief .statement p { margin: 0; font-size: 28px; font-weight: 300; line-height: 38px; }
.brief .asks { grid-column: 8 / span 5; padding: 32px; border-radius: var(--radius); background: var(--dark); color: #fff; }
.brief .asks .eyebrow { color: #9a9a9a; }
.brief .asks ol { margin: 0; padding: 0; list-style: none; counter-reset: q; }
.brief .asks li { counter-increment: q; display: grid; grid-template-columns: 36px 1fr; padding: 14px 0; border-top: 1px solid rgba(255, 255, 255, 0.18); font-size: 18px; line-height: 26px; }
.brief .asks li::before { content: counter(q, decimal-leading-zero); font-weight: 200; color: #9a9a9a; }

/* Section heading with a rule, like the portfolio's chapters */
.chapter {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  gap: 20px;
  margin-top: 120px;
  padding-bottom: 14px;
  border-bottom: 1.5px solid var(--text);
}
.chapter .n { font-size: 88px; font-weight: 200; line-height: 0.8; }
.chapter h2 { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; }
.chapter p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }

.mine.example { background: var(--card); color: var(--muted); }

/* Preview banner at the top of every page while Crit is a prototype */
.preview-banner { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; margin: var(--margin) 0 0; padding: 12px 16px; border-radius: 10px; background: var(--sun); color: #111; font-size: 14px; line-height: 20px; }
.preview-banner strong { font-weight: 700; }

/* Private feedback: the lock note, the "sent to the designer" box, and the prototype view switch */
.private-note { display: inline-flex; align-items: center; gap: 6px; }
.private-note svg, .locked svg { flex: none; width: 14px; height: 14px; fill: currentColor; }
.locked { display: flex; gap: 16px; align-items: flex-start; margin-top: 24px; padding: 24px 28px; border-radius: var(--radius); background: var(--card); }
.locked svg { width: 22px; height: 22px; margin-top: 2px; }
.locked strong { font-size: 18px; }
.locked p { margin: 6px 0 0; max-width: 46em; color: var(--muted); font-size: 15px; line-height: 22px; }
.only-you { padding: 5px 10px; border-radius: 10px; background: var(--card); color: var(--muted); font-size: 13px; }
.view-as { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; padding: 10px 12px; border: 1.5px dashed #bbb; border-radius: var(--radius); font-size: 13px; }
.view-as span { margin-right: 4px; color: var(--muted); }
.view-as button { padding: 6px 12px; border: 1.5px solid var(--text); border-radius: 10px; background: none; font-size: 13px; cursor: pointer; }
.view-as button[aria-pressed="true"] { background: var(--text); color: var(--bg); }

/* One critique: who wrote it, then the three parts side by side */
.crit { padding: 32px 0; border-bottom: 1px solid var(--line); }
.crit header { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.crit .who { font-size: 18px; font-weight: 700; }
.crit .role { margin: 4px 0 0; font-size: 15px; line-height: 22px; }
.crit .role i { margin: 0 8px; font-style: normal; color: #bbb; }
.crit .role span { font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.crit .parts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.crit .part { padding: 22px 24px; border-radius: var(--radius); background: var(--card); }
.crit .part p { margin: 0; font-size: 17px; line-height: 26px; }
.crit .part.push { background: var(--dark); color: #fff; }
.crit .part.push .eyebrow { color: #9a9a9a; }
.crit .answers { margin: 0 0 14px; font-size: 14px; color: var(--muted); }
.helpful {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1.5px solid var(--text);
  border-radius: 999px;
  background: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.helpful[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.mine { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: #000; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; vertical-align: middle; }

/* ---------- Forms ---------- */
.form { max-width: 1000px; margin-top: 40px; }
.form .grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px var(--gap); }
.field { grid-column: span 12; display: flex; flex-direction: column; gap: 8px; }
.field.half { grid-column: span 6; }
.field.third { grid-column: span 4; }
.field label, .field legend { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.field .hint { margin: 0; color: var(--muted); font-size: 14px; line-height: 20px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid #cfcfcf;
  border-radius: var(--radius);
  background: #fff;
  font-size: 16px;
  line-height: 24px;
  transition: border-color 0.2s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--text); }
.field textarea { min-height: 120px; resize: vertical; }
.field .count-left { align-self: flex-end; color: var(--muted); font-size: 12px; }
fieldset.field { margin: 0; padding: 0; border: 0; }
.field[hidden] { display: none; }
.field .optional { color: var(--muted); font-weight: 400; }
/* Bot trap: off-screen, so people never see it */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.check { flex-direction: row; align-items: flex-start; gap: 10px; font-size: 15px; line-height: 22px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: #111; flex: none; }
/* Join / sign in */
.auth.narrow .form, .auth.narrow .intro { max-width: 560px; }
/* Signed-out prompt in place of the feedback form */
.give .signin-prompt { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
/* Account: critiques you've given */
.given { margin: 24px 0 0; padding: 0; list-style: none; }
.given li { border-bottom: 1px solid var(--line); }
.given a { display: block; padding: 18px 0; text-decoration: none; }
.given a:hover strong { text-decoration: underline; }
.given span { color: var(--muted); font-size: 14px; }
.given p { margin: 6px 0 0; max-width: 60em; font-size: 16px; line-height: 24px; }

/* Picking images: a big drop area and the chosen pictures underneath */
.drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 220px;
  padding: 32px;
  border: 1.5px dashed #9a9a9a;
  border-radius: var(--radius);
  background: #fafafa;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}
.drop:hover, .drop.over { border-color: var(--text); background: var(--card); }
.drop strong { font-size: 22px; font-weight: 600; }
.drop span { color: var(--muted); font-size: 14px; }
.drop svg { width: 40px; height: 40px; }
/* Chosen pictures, each at the shape it will be shown in */
.previews { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; gap: 12px; }
.previews:empty { display: none; }
.previews figure { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--card); }
.previews img { width: 100%; height: auto; }
.previews .matched { top: auto; bottom: 8px; background: var(--accent); color: #000; }

/* The website prompt on the share form */
.site-prompt { padding: 24px; border-radius: var(--radius); background: var(--card); }
.site-prompt .row { display: flex; gap: 8px; }
.site-prompt .row input { flex: 1; }
.site-status { margin: 0; font-size: 14px; line-height: 20px; }
.site-status:empty { display: none; }
.site-status.ok { color: #1f7a45; }
.previews figcaption { position: absolute; left: 8px; top: 8px; padding: 3px 8px; border-radius: 999px; background: rgba(15, 15, 15, 0.85); color: #fff; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.previews button { position: absolute; right: 8px; top: 8px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: #fff; font-size: 18px; line-height: 1; cursor: pointer; }

/* Pill choices (stage, what you're answering) */
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices label { position: relative; cursor: pointer; }
.field .choices input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; padding: 0; opacity: 0; pointer-events: none; }
.choices span {
  display: inline-block;
  padding: 9px 16px;
  border: 1.5px solid var(--text);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  transition: background-color 0.2s, color 0.2s;
}
.choices input:checked + span { background: var(--text); color: var(--bg); }
.choices input:focus-visible + span { outline: 2px solid var(--text); outline-offset: 2px; }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 32px; padding-top: 24px; border-top: 1.5px solid var(--text); }
.form-actions .hint { color: var(--muted); font-size: 14px; }
.error { color: #c0392b; font-size: 14px; }

/* Give-feedback box on a post */
.give { margin-top: 48px; padding: 40px; border-radius: var(--radius); background: #f4f3f1; }
.give h3 { margin: 0 0 6px; font-size: 26px; font-weight: 600; }
.give > p { margin: 0 0 8px; color: var(--muted); font-size: 16px; }
.give .form { margin-top: 24px; max-width: none; }
.give .field textarea { min-height: 110px; }

/* ---------- Guidelines page ---------- */
.principles { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 40px var(--gap); margin-top: 48px; padding: 0; list-style: none; }
.principles li { grid-column: span 6; padding-top: 16px; border-top: 1.5px solid var(--text); }
.principles .n { display: block; font-size: 64px; font-weight: 200; line-height: 1; }
.principles h3 { margin: 16px 0 8px; font-size: 22px; font-weight: 700; text-transform: uppercase; }
.principles p { margin: 0; max-width: 34em; font-size: 18px; line-height: 27px; }
.versus { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); margin-top: 32px; }
.versus > div { padding: 36px; border-radius: var(--radius); }
.versus .weak { background: var(--card); }
.versus .strong { background: var(--dark); color: #fff; }
.versus .eyebrow { color: inherit; opacity: 0.7; }
.versus blockquote { margin: 0; font-size: 22px; font-weight: 300; line-height: 32px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 32px; }
.steps > div { padding: 28px; border-radius: var(--radius); background: var(--card); }
.steps b { display: block; margin-bottom: 10px; font-size: 40px; font-weight: 200; line-height: 1; }
.steps h3 { margin: 0 0 8px; font-size: 18px; font-weight: 700; text-transform: uppercase; }
.steps p { margin: 0; font-size: 16px; line-height: 24px; }

/* ---------- Full-screen image viewer ---------- */
.lightbox { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 40px; background: rgba(10, 10, 10, 0.94); cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--radius); }
.lightbox button { position: absolute; top: 20px; right: 24px; border: 0; background: none; color: #fff; font-size: 34px; line-height: 1; cursor: pointer; }

/* Little message after an action */
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 60; padding: 12px 20px; border-radius: 999px; background: var(--dark); color: #fff; font-size: 14px; transform: translate(-50%, 20px); opacity: 0; transition: opacity 0.25s, transform 0.25s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Narrower windows ---------- */
@media (max-width: 1100px) {
  .brief .statement, .brief .asks { grid-column: 1 / -1; }
  .crit .parts { grid-template-columns: 1fr; }
  .glance { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Phones: the sidebar becomes a top bar with a menu button ---------- */
@media (max-width: 900px) {
  :root { --margin: 16px; }
  .sidebar {
    position: sticky;
    inset: auto;
    top: 0;
    width: auto;
    padding: 12px;   /* equal top and left space around the logo */
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    overflow: visible;
    border-radius: 0 0 8px 8px;
  }
  .logo { font-size: 36px; }
  .tagline, .status { display: none; }
  .menu-button { display: block; width: 40px; height: 40px; padding: 6px; border: 0; background: none; color: #fff; cursor: pointer; }
  .nav, .sidebar .cta { display: none; width: 100%; margin: 0; padding: 0; }
  .sidebar.open .nav { display: block; margin-top: 12px; }
  .sidebar.open .cta { display: block; padding: 12px 0 8px; }
  main, .site-footer { margin-left: 0; padding-left: var(--margin); padding-right: var(--margin); }
  .intro, .post-head { padding-top: 36px; }
  .intro p.lede { font-size: 18px; line-height: 27px; }
  .feed { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 10px; }   /* two columns on phones, like Pinterest */
  .card h2 { font-size: 15px; }
  .card .desc { font-size: 13px; line-height: 18px; }
  .card .pics { display: none; }
  .gallery .rest { flex-direction: column; }
  .gallery .rest figure { flex: none; }
  .glance { grid-template-columns: 1fr 1fr; }
  .brief .statement p { font-size: 22px; line-height: 31px; }
  .brief .asks, .give { padding: 24px; }
  .chapter { margin-top: 80px; }
  .chapter .n { font-size: 56px; }
  .field.half, .field.third { grid-column: span 12; }
  .previews { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .principles li { grid-column: 1 / -1; }
  .versus, .steps { grid-template-columns: 1fr; }
  .toolbar { align-items: flex-start; flex-direction: column; }
}

/* ============================================================
   COLOUR: the chosen design (option 3). A coloured sidebar tile,
   highlight marks, sentence case instead of ALL CAPS, layered over the
   portfolio-style base above. Every colour is a setting here, so a whole
   colorway can be swapped by changing these few lines.
   ============================================================ */
:root {
  --coral: #ff6b4a;
  --hover-orange: #ff9a3c;   /* brighter orange for text in the black hover boxes */
  --sun: #ffd23f;
  --dark: #1e2a4a;
  --card: #f5f3ef;
  --accent: var(--mark);
  --radius: 14px;

  /* COBALT colorway: electric blue menu, lime highlights */
  --side-bg: #2347ff;               /* the menu tile */
  --side-fg: #fff;                  /* text on the menu tile (the logo tile swaps these two) */
  --nav-hover: #2347ff;             /* text in a menu link's hover box (the box is --side-fg) */
  --tile-hover-bg: #2347ff;         /* a project tile on hover */
  --tile-hover-fg: #fff;
  --pop: #4d6bff;                   /* chosen filters, main buttons, big numbers */
  --pop-fg: #fff;
  --mark: #c8ff3c;                  /* highlighter behind key words, "Needs first crit", the preview banner */
  --mark-fg: #111;
  --soft: #161c33;                  /* the give-feedback box */
}
.avatar { display: none; }   /* initials in a circle: built into cards and critiques, not shown in this design */

/* Sentence case instead of ALL CAPS */
:is(.nav a, .card h2, .post-head h1, .chapter h2, .principles h3, .steps h3, .glance dt, .card .meta, .crit .role span, .post-head .sub, .field label, .field legend) {
  text-transform: none;
  letter-spacing: 0;
}
.eyebrow { text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 600; }
.crit .role span, .post-head .sub { font-size: 14px; }
.card .meta { font-size: 12px; line-height: 17px; }
.glance dt { font-size: 14px; font-weight: 500; }
.field label, .field legend { font-size: 15px; }
.card h2 { font-size: 18px; line-height: 1.2; }

/* The menu: a floating tile, rounded on every corner, with the page margin on all sides
   (the content moves over to keep the same gap beside it) */
.sidebar { --bg: var(--side-bg); --text: var(--side-fg); }
@media (min-width: 901px) {
  .sidebar { inset: var(--margin) auto var(--margin) var(--margin); border-radius: var(--radius); }
  main, .site-footer { margin-left: calc(var(--sidebar-width) + var(--margin)); }
}
@media (max-width: 900px) {
  .sidebar { top: 12px; margin: 12px 12px 0; border-radius: var(--radius); }
}
.sidebar :focus-visible { outline-color: var(--text); }
.menu-button { color: var(--text); }
.tagline { color: var(--text); opacity: 0.75; }
.status::before { background: var(--text); }
/* The name in its own tile, colours swapped */
.logo {
  align-self: flex-start;
  margin-left: 0;
  padding: 0.1em 0.24em 0.14em 0.2em;
  border-radius: var(--radius);
  background: var(--text);
  color: var(--bg);
  text-transform: none;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.logo:hover { opacity: 0.85; }
.nav a { font-weight: 500; font-size: 26px; }
/* Menu links: a box with the colours swapped appears on hover.
   The side padding is pulled back with a negative margin so the words stay lined up. */
.nav a {
  margin-left: -0.4em;
  padding: 0 0.4em;
  border-radius: 10px;
  transition: background-color 0.15s, color 0.15s;
}
.nav a:hover, .nav a:focus-visible { background: var(--text); color: var(--nav-hover); opacity: 1; }
/* "+ Share your work": boxy, like the menu links' hover box, in the swapped colours */
.sidebar .button { border-color: var(--text); background: var(--text); color: var(--bg); border-radius: 10px; transition: background-color 0.15s, color 0.15s; }
.sidebar .button:hover, .sidebar .button:focus-visible { background: transparent; color: var(--text); border-color: var(--text); }

/* Accents */
.intro h1 strong { background: var(--mark); color: var(--mark-fg); padding: 0 0.15em; border-radius: 6px; font-weight: 700; }
.filters button[aria-pressed="true"], .sort button[aria-pressed="true"] { background: var(--pop); border-color: var(--pop); color: var(--pop-fg); }
.filters button, .sort button { border-radius: 10px; }   /* boxy, like the menu */
.button.solid { background: var(--pop); border-color: var(--pop); color: var(--pop-fg); }
.card .count.needs { background: var(--mark); color: var(--mark-fg); }
.preview-banner { background: var(--mark); color: var(--mark-fg); }
/* Project tiles invert on hover, like the menu links.
   The padding is always there (and pulled back with a negative margin) so nothing shifts. */
.card {
  margin: -8px;
  padding: 8px 8px 12px;
  border-radius: calc(var(--radius) + 4px);
  transition: background-color 0.15s, color 0.15s;
}
.feed { column-gap: 32px; }
.card:hover, .card:focus-visible { background: var(--tile-hover-bg); color: var(--tile-hover-fg); outline: none; }
.card:hover .meta, .card:focus-visible .meta { color: var(--tile-hover-fg); opacity: 0.8; }
.card .cover::after { display: none; }   /* the inverted tile replaces the old outline */
@media (hover: hover) { .card:hover .cover img { transform: none; } }
.chapter .n, .principles .n, .steps b { color: var(--pop); font-weight: 300; }
.chapter { border-bottom-color: var(--pop); }
.give { background: var(--soft); }
.helpful[aria-pressed="true"] { background: var(--mark); border-color: #111; color: var(--mark-fg); }
.field input, .field select, .field textarea { border-radius: 12px; }

/* ============================================================
   OFF-BLACK BACKGROUND: the page is dark, text is light. Anything that
   used to rely on a white page (forms, boxes, hovers) is adjusted here.
   ============================================================ */
:root {
  color-scheme: dark;               /* native controls (dropdowns, scrollbars) match */
  --bg: #141414;                    /* off-black page */
  --text: #f2efe9;                  /* warm off-white text */
  --muted: #a39e97;
  --line: #2e2e2e;
  --card: #1f1f1f;                  /* grey boxes become a step lighter than the page */
  --dark: #2a2a2a;                  /* the "black" highlight boxes become a lighter charcoal */
}
.field input, .field select, .field textarea { background: var(--card); border-color: #3a3a3a; color: var(--text); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--text); }
.field input::placeholder, .field textarea::placeholder { color: #77726c; }
.drop { background: var(--card); border-color: #555; }
.drop:hover, .drop.over { background: #262626; border-color: var(--text); }
.filters button:hover, .sort button:hover { background: #262626; }
.previews button { color: #111; }
.check input { accent-color: var(--pop); }
.error { color: #ff8a7a; }
.site-status.ok { color: #6fd99a; }
.view-as { border-color: #444; }
.helpful[aria-pressed="true"] { border-color: var(--mark); }
.card .pics { color: #111; }   /* the white "4 images" label keeps dark text on the dark page */

/* ---------- Comment section: replies under each critique ---------- */
.replies { margin: 16px 0 0 26px; padding-left: 20px; border-left: 2px solid var(--line); }
.reply { padding: 14px 0; }
.reply + .reply { border-top: 1px solid var(--line); }
.reply .person { gap: 10px; }
.reply .who { font-size: 16px; }
.reply p { margin: 8px 0 0; max-width: 46em; font-size: 16px; line-height: 24px; }
.reply .role { margin-top: 2px; }
.reply-toggle { display: inline-block; margin-top: 8px; padding: 6px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: none; color: var(--text); font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; }
.reply-toggle:hover, .reply-toggle:focus-visible { background: var(--text); color: var(--bg); border-color: var(--text); }
.reply-form { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.reply-form textarea { min-height: 84px; padding: 12px 14px; border: 1.5px solid #3a3a3a; border-radius: 12px; background: var(--card); color: var(--text); font-size: 16px; line-height: 24px; resize: vertical; }
.reply-form textarea:focus { outline: none; border-color: var(--text); }
.reply-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.reply-actions .button { padding: 9px 18px; border-radius: 10px; font-size: 14px; }
.mine.designer { background: var(--pop); color: var(--pop-fg); }
.helpful[disabled] { opacity: 0.45; cursor: default; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.reply-form[hidden], .reply-toggle[hidden] { display: none; }

/* ---------- Feedback summary page: scannable board, copy buttons, print ---------- */
.fb-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 28px; }
.fb-tools .button { border-radius: 10px; }
.fb-tools .hint { color: var(--muted); font-size: 14px; }
.fb-questions { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; padding: 0; list-style: none; }
.fb-questions li { display: flex; gap: 8px; align-items: baseline; padding: 8px 14px; border-radius: 10px; background: var(--card); font-size: 15px; line-height: 22px; }
.fb-questions b { color: var(--pop); }
.fb-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 28px; align-items: start; }
.fb-col { padding: 16px; border-radius: var(--radius); background: var(--card); }
.fb-col header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.fb-col h2 { margin: 0; font-size: 18px; font-weight: 700; }
.fb-col h2 span { margin-left: 6px; color: var(--muted); font-weight: 400; }
.fb-copy { padding: 5px 12px; border: 1.5px solid var(--text); border-radius: 10px; background: none; color: var(--text); font-size: 13px; font-weight: 500; cursor: pointer; }
.fb-copy:hover, .fb-copy:focus-visible { background: var(--text); color: var(--bg); }
.note { padding: 14px 16px; border-left: 4px solid var(--pop); border-radius: 10px; background: var(--bg); }
.note + .note { margin-top: 10px; }
.note p { margin: 0; font-size: 16px; line-height: 24px; }
.note footer { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-top: 10px; color: var(--muted); font-size: 13px; }
.note footer i { padding: 2px 8px; border-radius: 8px; background: var(--card); color: var(--text); font-style: normal; font-size: 12px; }
.fb-works .note { border-left-color: var(--mark); }
.fb-qback .note { border-left-color: #9a9a9a; }
.fb-replies { grid-column: 1 / -1; }
.fb-replies .note { border-left-color: var(--muted); }
@media (max-width: 1100px) { .fb-board { grid-template-columns: 1fr; } }
@media print {
  .sidebar, .site-footer, .preview-banner, .fb-tools, .fb-copy, .back, .toast { display: none !important; }
  :root { --bg: #fff; --text: #000; --card: #f2f2f2; --muted: #555; }
  main { margin: 0 !important; padding: 0 !important; }
  .fb-board { grid-template-columns: 1fr; }
  .note { break-inside: avoid; }
}
/* "Feedback summary" link beside the Critiques heading */
.chapter { grid-template-columns: auto 1fr auto; }
.fb-link { align-self: end; padding: 8px 14px; border: 1.5px solid var(--text); border-radius: 10px; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.fb-link span { font-weight: 400; color: var(--muted); }
.fb-link:hover, .fb-link:focus-visible { background: var(--text); color: var(--bg); }
.fb-link:hover span, .fb-link:focus-visible span { color: inherit; }
@media (max-width: 700px) { .chapter { grid-template-columns: auto 1fr; } .fb-link { grid-column: 1 / -1; justify-self: start; } }

/* ---------- Moderation: item actions, report dialog, under-review notes ---------- */
.item-actions { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; }
.link-btn { padding: 0; border: 0; background: none; color: var(--muted); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn:hover, .link-btn:focus-visible { color: var(--text); }
.link-btn.danger:hover, .link-btn.danger:focus-visible { color: #ff8a7a; }
.crit-side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.crit-side .item-actions { margin-top: 6px; }
.reply .item-actions { margin-top: 6px; }
.mine.review { background: #4a3a12; color: #ffd98a; }
.under-review { margin: 16px 0 0; padding: 12px 16px; border-radius: 10px; background: #4a3a12; color: #ffd98a; font-size: 14px; }
.report-dialog { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--text); }
.report-dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
.report-dialog h3 { margin: 0 0 6px; font-size: 22px; }
.report-dialog .hint { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.report-dialog .form-actions { margin-top: 20px; }
.report-dialog .choices { margin-top: 4px; }
.edit-dialog { width: min(760px, calc(100vw - 32px)); }
.edit-dialog .grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.edit-dialog fieldset input + input { margin-top: 8px; }
.lang-warn { margin: 6px 0 0; color: #ff8a7a; font-size: 14px; }
.badge { display: inline-block; min-width: 1.5em; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: var(--mark); color: var(--mark-fg); font-size: 0.6em; font-weight: 700; line-height: 1.6; text-align: center; vertical-align: middle; }

/* The moderation page */
.mod-item { display: flex; gap: 20px; margin-top: 16px; padding: 20px; border-radius: var(--radius); background: var(--card); }
.mod-item > img { flex: none; width: 140px; height: 105px; border-radius: 10px; object-fit: cover; }
.mod-body { min-width: 0; flex: 1; }
.mod-body h3 { margin: 0; font-size: 20px; }
.mod-body h3 a { text-decoration: none; }
.mod-body h3 a:hover { text-decoration: underline; }
.mod-text { margin: 8px 0 0; max-width: 60em; color: var(--text); font-size: 15px; line-height: 22px; }
.mod-body .chips { justify-content: flex-start; margin-top: 12px; }
.mod-body .chips span { background: transparent; border-color: var(--line); color: var(--text); }
.mod-notes { margin: 10px 0 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.mod-body .form-actions { margin-top: 14px; padding-top: 14px; border-top-color: var(--line); }
.danger-btn { border-color: #ff8a7a; color: #ff8a7a; }
.danger-btn:hover { background: #ff8a7a; color: #111; }
.flags { margin: 16px 0 0; padding: 0; list-style: none; }
.flags li { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.flags li.new { background: var(--soft); border-radius: 10px; }
.flag-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.flag-top span:not(.mine) { color: var(--muted); font-size: 13px; }
.flag-who { margin: 4px 0 0; font-size: 14px; }
@media (max-width: 700px) { .mod-item { flex-direction: column; } .mod-item > img { width: 100%; height: auto; aspect-ratio: 4 / 3; } }

/* ---------- In progress / Complete: a big, eye-catching switch ---------- */
.status-switch { display: inline-flex; margin-top: 20px; padding: 6px; border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 2px var(--line); }
.status-switch button { display: inline-flex; align-items: center; gap: 10px; padding: 16px 28px; border: 0; border-radius: 13px; background: transparent; color: var(--muted); font-size: 22px; font-weight: 700; letter-spacing: -0.01em; cursor: pointer; transition: background-color 0.2s, color 0.2s, transform 0.2s; }
.status-switch button:hover { color: var(--text); }
.status-switch button span { font-size: 0.8em; }
.status-switch button[data-status="in_progress"][aria-pressed="true"] { background: var(--mark); color: var(--mark-fg); }
.status-switch button[data-status="complete"][aria-pressed="true"] { background: var(--pop); color: var(--pop-fg); }
.status-switch button[aria-pressed="true"] { transform: scale(1.02); }
.status-pill { display: inline-flex; align-items: center; gap: 10px; margin: 20px 0 0; padding: 14px 26px; border-radius: 16px; font-size: 22px; font-weight: 700; }
.status-pill.is-progress { background: var(--mark); color: var(--mark-fg); }
.status-pill.is-complete { background: var(--pop); color: var(--pop-fg); }
.status-pill span { font-size: 0.8em; }
.card .status-badge { position: absolute; left: 12px; top: 12px; padding: 6px 12px; border-radius: 10px; background: var(--pop); color: var(--pop-fg); font-size: 13px; font-weight: 700; }
@media (max-width: 600px) {
  .status-switch { display: flex; }
  .status-switch button { flex: 1; justify-content: center; padding: 14px 12px; font-size: 18px; }
  .status-pill { font-size: 18px; padding: 12px 20px; }
}

/* Status filter on the home page (same big switch as on posts) and the choice on the share form */
.status-filter { margin-top: 32px; }
.status-filter button[aria-pressed="true"] { transform: scale(1.02); }
.status-filter button[data-status-filter="all"][aria-pressed="true"] { background: var(--text); color: var(--bg); }
.status-filter button[data-status-filter="in_progress"][aria-pressed="true"] { background: var(--mark); color: var(--mark-fg); }
.status-filter button[data-status-filter="complete"][aria-pressed="true"] { background: var(--pop); color: var(--pop-fg); }
.status-filter + .toolbar { margin-top: 20px; }
.share-status { margin-top: 4px; align-self: flex-start; }
@media (max-width: 600px) { .status-filter button { font-size: 16px; padding: 14px 8px; } }

/* ---------- Contact tile on each project page ---------- */
.contact-tile { display: grid; grid-template-columns: minmax(200px, 1fr) 3fr; gap: 24px; align-items: center; margin-top: 64px; padding: 28px; border-radius: var(--radius); background: var(--card); box-shadow: inset 0 0 0 2px var(--pop); }
.contact-head h3 { margin: 0; font-size: 28px; font-weight: 700; line-height: 1.1; }
.contact-where { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.contact-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.contact-links a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--bg); text-decoration: none; transition: background-color 0.15s, color 0.15s; }
.contact-links a:hover, .contact-links a:focus-visible { background: var(--pop); color: var(--pop-fg); }
.contact-links svg { flex: none; width: 22px; height: 22px; fill: currentColor; }
.contact-links span { display: flex; flex-direction: column; min-width: 0; }
.contact-links b { font-size: 15px; }
.contact-links i { overflow: hidden; color: var(--muted); font-size: 13px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.contact-links a:hover i, .contact-links a:focus-visible i { color: inherit; opacity: 0.85; }
.contact-none { margin: 0; color: var(--muted); font-size: 15px; }
@media (max-width: 800px) { .contact-tile { grid-template-columns: 1fr; } }
.share-contact .grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px var(--gap); margin-top: 8px; }

/* ============================================================
   HOME PAGE LAYOUT OPTIONS (compared on the local preview; the live site uses masonry)
   ============================================================ */
/* 2. Editorial list: one big row per project, image left, large text right */
[data-layout="list"] .feed { display: flex; flex-direction: column; gap: 24px; }
[data-layout="list"] .card { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); grid-template-rows: auto auto auto 1fr; column-gap: 32px; margin: 0; padding: 14px; }
[data-layout="list"] .card .cover { grid-row: 1 / span 4; }
[data-layout="list"] .card .cover img { aspect-ratio: 16 / 10 !important; height: auto; object-fit: cover; }
[data-layout="list"] .card h2 { margin-top: 18px; font-size: clamp(32px, 3vw, 52px); line-height: 1; }
[data-layout="list"] .card .desc { display: block; margin-top: 14px; font-size: 20px; line-height: 29px; -webkit-line-clamp: unset; }
[data-layout="list"] .card .by { margin-top: 18px; }
[data-layout="list"] .card .meta { font-size: 14px; }

/* 3. Feature + grid: the first project large, then an even three-column grid */
[data-layout="feature"] .feed { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: auto; gap: 36px 28px; }
[data-layout="feature"] .card .cover img { aspect-ratio: 4 / 3 !important; height: auto; object-fit: cover; }
[data-layout="feature"] .card:first-child { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: 32px; }
[data-layout="feature"] .card:first-child .cover { grid-row: 1 / span 3; }
[data-layout="feature"] .card:first-child .cover img { aspect-ratio: 16 / 10 !important; }
[data-layout="feature"] .card:first-child h2 { margin-top: 18px; font-size: clamp(36px, 3.4vw, 60px); line-height: 1; }
[data-layout="feature"] .card:first-child .desc { display: block; font-size: 20px; line-height: 29px; margin-top: 14px; -webkit-line-clamp: unset; }

/* 4. Shelves: rows by status, each scrolling sideways */
[data-layout="shelves"] .feed { display: block; }
.shelf { margin-top: 36px; }
.shelf:first-child { margin-top: 8px; }
.shelf h2 { margin: 0 0 14px; font-size: 26px; font-weight: 700; }
.shelf h2 span { margin-left: 6px; color: var(--muted); font-weight: 400; }
.shelf-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 23%); gap: 24px; overflow-x: auto; padding: 8px 8px 16px; margin: 0 -8px; scroll-snap-type: x mandatory; }
.shelf-row .card { scroll-snap-align: start; }
.shelf-row .card .cover img { aspect-ratio: 4 / 5 !important; height: auto; object-fit: cover; }

@media (max-width: 900px) {
  [data-layout="list"] .card, [data-layout="feature"] .card:first-child { grid-template-columns: 1fr; }
  [data-layout="list"] .card .cover, [data-layout="feature"] .card:first-child .cover { grid-row: auto; }
  [data-layout="feature"] .feed { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shelf-row { grid-auto-columns: 70%; }
}



/* ---------- Editorial list variations (2b, 2c, 2d) and the facts / thumbnail strip they use ---------- */
.card-facts, .card-thumbs { display: none; }
[data-layout^="list"] .card-facts { display: block; margin: 8px 0 0; color: var(--muted); font-size: 14px; }
[data-layout^="list"] .card-facts i { margin: 0 6px; font-style: normal; opacity: 0.5; }
[data-layout^="list"] .card:hover .card-facts { color: inherit; opacity: 0.85; }

/* 2b Compact rows: smaller images, tighter rows, 3-4 projects on screen */
[data-layout="list-compact"] .feed { display: flex; flex-direction: column; gap: 10px; }
[data-layout="list-compact"] .card { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); column-gap: 28px; align-content: start; margin: 0; padding: 10px; }
[data-layout="list-compact"] .card > :not(.cover) { grid-column: 2; }
[data-layout="list-compact"] .card .cover { grid-column: 1; grid-row: 1 / span 6; }
[data-layout="list-compact"] .card .cover img { aspect-ratio: 16 / 9 !important; height: auto; object-fit: cover; }
[data-layout="list-compact"] .card h2 { margin-top: 6px; font-size: clamp(26px, 2.2vw, 36px); line-height: 1.05; }
[data-layout="list-compact"] .card .desc { display: block; margin-top: 10px; font-size: 17px; line-height: 25px; -webkit-line-clamp: unset; }
[data-layout="list-compact"] .card .by { margin-top: 10px; }

/* 2c Two-up: two big projects per row, large text underneath */
[data-layout="list-two"] .feed { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: auto; gap: 40px 32px; }
[data-layout="list-two"] .card .cover img { aspect-ratio: 16 / 10 !important; height: auto; object-fit: cover; }
[data-layout="list-two"] .card h2 { margin-top: 14px; font-size: clamp(28px, 2.4vw, 40px); line-height: 1.05; }
[data-layout="list-two"] .card .desc { display: block; margin-top: 10px; font-size: 18px; line-height: 27px; -webkit-line-clamp: unset; }
[data-layout="list-two"] .card .by { margin-top: 12px; }

/* 2d Rows + thumbnails: shorter rows, with a strip of the project's other images */
[data-layout="list-thumbs"] .feed { display: flex; flex-direction: column; gap: 16px; }
[data-layout="list-thumbs"] .card { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr); column-gap: 28px; align-content: start; margin: 0; padding: 12px; }
[data-layout="list-thumbs"] .card > :not(.cover) { grid-column: 2; }
[data-layout="list-thumbs"] .card .cover { grid-column: 1; grid-row: 1 / span 6; }
[data-layout="list-thumbs"] .card .cover img { aspect-ratio: 16 / 9 !important; height: auto; object-fit: cover; }
[data-layout="list-thumbs"] .card h2 { margin-top: 6px; font-size: clamp(28px, 2.4vw, 42px); line-height: 1.05; }
[data-layout="list-thumbs"] .card .desc { margin-top: 10px; font-size: 17px; line-height: 25px; }
[data-layout="list-thumbs"] .card-thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
[data-layout="list-thumbs"] .card-thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
[data-layout="list-thumbs"] .card .by { margin-top: 12px; }

@media (max-width: 900px) {
  [data-layout="list-compact"] .card, [data-layout="list-thumbs"] .card { grid-template-columns: 1fr; }
  [data-layout="list-compact"] .card > *, [data-layout="list-thumbs"] .card > * { grid-column: 1 !important; grid-row: auto !important; }
  [data-layout="list-two"] .feed { grid-template-columns: 1fr; }
}
