/* The AI Wrangler — Wanted Poster design system */
:root {
  --desk: #e6dac0;
  --paper: #efe6d3;
  --ink: #241f18;
  --rust: #a64a26;
  --faint: #75664f;
  --stripe-a: #e6dcc5;
  --stripe-b: #ece3cf;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--desk);
  color: var(--ink);
  font-family: 'Archivo', sans-serif;
  font-size: 17px;
  line-height: 1.55;
}

a { color: var(--ink); text-decoration: none; cursor: pointer; }

/* ---------- Poster frame ---------- */
.poster {
  max-width: 1240px;
  margin: 28px auto;
  padding: 6px;
  border: 3px double var(--ink);
  background: var(--paper);
}
.poster-inner {
  border: 1.5px solid var(--ink);
  padding-bottom: 0;
}

/* ---------- Nav ---------- */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  border-bottom: 1.5px solid var(--ink);
}
.wordmark { font-family: 'Rye', serif; font-size: 19px; }
.navlinks {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}
.navlinks a:hover { color: var(--rust); }
.navlinks a.active {
  color: var(--rust);
  border-bottom: 2px solid var(--rust);
  padding-bottom: 3px;
}
.btn-rust {
  background: var(--rust);
  color: var(--paper);
  padding: 10px 20px;
  border: 1.5px solid var(--ink);
  transition: background 0.15s ease;
  white-space: nowrap;
}
.btn-rust:hover { background: var(--ink); color: var(--paper); }

/* ---------- Type ---------- */
.stars-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.2em;
}
.star { color: var(--rust); font-size: 18px; }
.kicker {
  font-size: 26px;
  letter-spacing: 0.5em;
  font-weight: 700;
  text-align: center;
  text-indent: 0.5em; /* optically center letterspaced text */
}
.masthead {
  font-family: 'Rye', serif;
  font-weight: 400;
  text-align: center;
  line-height: 1.08;
  margin: 0;
  overflow-wrap: anywhere;
  max-width: 100%;
}
.masthead-worn {
  color: #6e6453;
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.4' numOctaves='3'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.9 0.28'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
  mask-size: 200px 200px;
}
.found-stamp {
  position: absolute;
  right: -34px;
  bottom: 2px;
  transform: rotate(-9deg);
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 34px;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  text-transform: uppercase;
  color: var(--rust);
  border: 4px solid var(--rust);
  border-radius: 6px;
  padding: 4px 14px;
  text-shadow: -1px -1px 0 var(--paper), 1px -1px 0 var(--paper), -1px 1px 0 var(--paper), 1px 1px 0 var(--paper);
  box-shadow: 0 0 0 1px var(--paper), inset 0 0 0 1px var(--paper);
  opacity: 0.95;
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.55' numOctaves='2'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.9 0.35'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
  mask-size: 160px 160px;
  pointer-events: none;
}
.lede {
  font-family: 'Besley', serif;
  font-style: italic;
  font-size: 20px;
  line-height: 1.55;
  text-wrap: pretty;
}
.rule-title {
  text-align: center;
  font-size: 20px;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
  font-weight: 700;
}
.mono-note {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--faint);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  padding: 16px 34px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1.5px solid var(--ink);
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--rust); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }

/* ---------- Sections ---------- */
.section { border-top: 1.5px solid var(--ink); padding: 44px 80px; }
.section.tight { padding: 44px 40px; }

/* ---------- Bullets ---------- */
.bullets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 48px;
  max-width: 900px;
  margin: 0 auto;
  font-size: 17px;
}
.bullet { display: flex; gap: 12px; }

/* ---------- Placeholders ---------- */
.placeholder {
  border: 2px solid var(--ink);
  background: repeating-linear-gradient(-45deg, var(--stripe-a) 0px, var(--stripe-a) 10px, var(--stripe-b) 10px, var(--stripe-b) 20px);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}
.placeholder span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--faint);
  background: var(--paper);
  padding: 4px 10px;
  border: 1px solid var(--ink);
}

/* ---------- Notice cards (services) ---------- */
.notice {
  border: 2px solid var(--ink);
  background: var(--paper);
  padding: 36px 40px;
}
.notice .no {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--rust);
}
.notice h2 {
  font-family: 'Rye', serif;
  font-weight: 400;
  font-size: clamp(22px, 3.5vw, 32px);
  line-height: 1.15;
  margin: 14px 0 12px;
  overflow-wrap: break-word;
}
.notice .quote {
  font-family: 'Besley', serif;
  font-style: italic;
  font-size: 18px;
  color: var(--faint);
  margin: 0 0 22px;
  text-wrap: pretty;
}
.notice.featured { border-width: 3px; background: #f6efdf; }
.notice.featured h2 { color: var(--rust); }
.notice.featured .quote { font-size: 20px; color: var(--ink); max-width: 760px; }
.bounty-title {
  font-size: 13px;
  letter-spacing: 0.3em;
  font-weight: 700;
  margin-bottom: 12px;
}
.bounty {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
  font-size: 16px;
}
.bounty li { display: flex; gap: 10px; }
.bounty li::before { content: "★"; color: var(--rust); flex: none; }
.smallprint {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px dashed var(--faint);
  overflow-wrap: break-word;
}

/* ---------- Ledger rows (work page models) ---------- */
.ledger { border: 2px solid var(--ink); }
.ledger-row {
  display: grid;
  grid-template-columns: 56px 1.2fr 1fr auto;
  gap: 20px;
  align-items: baseline;
  padding: 16px 24px;
  border-bottom: 1px solid var(--ink);
}
.ledger-row:last-child { border-bottom: none; }
.ledger-row:hover { background: var(--stripe-b); }
.ledger-row .idx { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--rust); }
.ledger-row .name { font-weight: 700; font-size: 17px; }
.ledger-row .meta { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--faint); }
.first-tag {
  display: inline-block;
  vertical-align: 2px;
  margin-left: 8px;
  background: var(--rust);
  color: var(--paper);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
}
.ledger-row .link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  border-bottom: 1.5px solid var(--rust);
  color: var(--ink);
}
.ledger-row .link:hover { color: var(--rust); }

/* ---------- Forms ---------- */
.field { display: grid; gap: 7px; }
.field label {
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 700;
}
.field input, .field textarea, .field select {
  font-family: 'Besley', serif;
  font-size: 17px;
  padding: 13px 14px;
  border: 1.5px solid var(--ink);
  background: #f6efdf;
  color: var(--ink);
  width: 100%;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 2px solid var(--rust);
  outline-offset: -1px;
}

/* ---------- Exhibit C: spotlight reel strip ---------- */
.reel-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  padding: 6px 0;
}
.reel-frame {
  margin: 0;
  padding: 10px 10px 8px;
  border: 1.5px solid var(--ink);
  background: #f6efdf;
  transform: rotate(-0.7deg);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.reel-frame:nth-child(even) { transform: rotate(0.7deg); }
.reel-frame.live {
  transform: rotate(0deg) scale(1.04);
  box-shadow: 5px 6px 0 rgba(36, 31, 24, 0.14);
  position: relative;
  z-index: 1;
}
.reel-screen {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 2px solid var(--ink);
  overflow: hidden;
  background: repeating-linear-gradient(-45deg, var(--stripe-a) 0px, var(--stripe-a) 10px, var(--stripe-b) 10px, var(--stripe-b) 20px);
}
.reel-screen video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: sepia(0.3) contrast(0.92);
  opacity: 0.7;
  transition: filter 0.3s ease, opacity 0.3s ease;
}
.reel-frame.live .reel-screen video { filter: none; opacity: 1; }
.reel-frame.empty .reel-screen video { display: none; }
.reel-empty {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
}
.reel-frame.empty .reel-empty { display: flex; }
.reel-empty span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--faint);
  background: var(--paper);
  padding: 4px 10px;
  border: 1px solid var(--ink);
}
.reel-cap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  min-height: 20px;
}
.reel-tag {
  display: none;
  background: var(--rust);
  color: var(--paper);
  padding: 2px 7px;
  font-size: 10px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.reel-frame.live .reel-tag { display: inline-block; }

/* ---------- Wrangling Diary ---------- */
.diary-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.diary-card {
  border: 2px solid var(--ink);
  background: var(--paper);
  padding: 30px 32px;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.diary-card:hover {
  transform: translateY(-3px);
  box-shadow: 5px 6px 0 rgba(36, 31, 24, 0.14);
  background: #f6efdf;
}
.diary-card-date { color: var(--rust); margin-bottom: 12px; }
.diary-card h2 {
  font-family: 'Rye', serif;
  font-weight: 400;
  font-size: 26px;
  line-height: 1.18;
  margin: 0 0 12px;
  color: var(--ink);
}
.diary-card-excerpt {
  font-family: 'Besley', serif;
  font-size: 17px;
  line-height: 1.5;
  color: var(--faint);
  margin: 0 0 16px;
  text-wrap: pretty;
}
.diary-card-tags { margin-bottom: 16px; }
.diary-card-more {
  margin-top: auto;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rust);
}
.diary-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 0;
  border: 2px dashed var(--faint);
}

/* Single post */
.post { max-width: 760px; margin: 0 auto; padding: 8px 0 8px; }
.post-head { text-align: center; padding: 40px 0 24px; }
.post-back { display: inline-block; margin-bottom: 22px; border-bottom: 1px solid var(--faint); }
.post-back:hover { color: var(--rust); border-bottom-color: var(--rust); }
.post-date { color: var(--rust); margin-bottom: 14px; }
.post-title {
  font-family: 'Rye', serif;
  font-weight: 400;
  font-size: 46px;
  line-height: 1.12;
  margin: 0 0 16px;
}
.post-tags { color: var(--faint); }
.post-cover { margin: 12px 0 32px; }
.post-cover img { width: 100%; display: block; border: 2px solid var(--ink); }
.post-body { font-size: 19px; line-height: 1.65; }
.post-body h2 { font-family: 'Besley', serif; font-weight: 900; font-size: 28px; margin: 36px 0 12px; }
.post-body h3 { font-family: 'Besley', serif; font-weight: 700; font-size: 22px; margin: 28px 0 10px; }
.post-body p { margin: 0 0 18px; text-wrap: pretty; }
.post-body a { color: var(--rust); border-bottom: 1.5px solid var(--rust); }
.post-body ul { padding-left: 22px; margin: 0 0 18px; }
.post-body li { margin-bottom: 8px; }
.post-body blockquote {
  margin: 0 0 18px;
  padding: 4px 22px;
  border-left: 3px solid var(--rust);
  font-family: 'Besley', serif;
  font-style: italic;
  color: var(--faint);
}
.post-body img { max-width: 100%; border: 2px solid var(--ink); margin: 8px 0 20px; }
.post-body pre {
  background: #1c1813;
  color: #ece3cf;
  padding: 18px 20px;
  overflow-x: auto;
  border: 2px solid var(--ink);
  margin: 0 0 20px;
}
.post-body code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.86em;
}
.post-body p code, .post-body li code {
  background: var(--stripe-b);
  padding: 1px 6px;
  border: 1px solid var(--line, var(--faint));
}
.post-foot {
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1.5px solid var(--ink);
  text-align: center;
}

/* Admin desk */
.admin-ledger .admin-row {
  grid-template-columns: 150px 1fr 90px auto;
}
.admin-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: flex-end;
}
.admin-actions form { margin: 0; }
button.link {
  background: none;
  border: none;
  padding: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 1.5px solid var(--rust);
  color: var(--ink);
}
button.link:hover, .link-danger:hover { color: var(--rust); }
.link-danger { color: var(--rust); }
.status-live { color: #2f7d4f; }
.status-draft { color: var(--faint); }

/* ---------- Responsive utility classes ---------- */
.header-hero { text-align: center; padding: clamp(32px, 6vw, 64px) clamp(16px, 7vw, 80px) clamp(28px, 5vw, 52px); }
.header-page { text-align: center; padding: clamp(32px, 5vw, 56px) clamp(16px, 7vw, 80px) clamp(28px, 5vw, 48px); }
.masthead-xl { font-size: clamp(48px, 10vw, 130px); letter-spacing: 0.08em; text-indent: 0.08em; margin: 28px 0 10px; }
.masthead-lg { font-size: clamp(30px, 5vw, 60px); margin-top: 24px; }
.masthead-md { font-size: clamp(26px, 4vw, 46px); margin-top: 18px; max-width: 100%; overflow-wrap: anywhere; }
.evidence-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }
.pipeline-figure { display: inline-block; margin: 0; padding: 14px 14px 10px; border: 1.5px solid var(--ink); background: #f6efdf; transform: rotate(-1.4deg); box-shadow: 5px 6px 0 rgba(36,31,24,0.14); }
.hero-sub { font-size: clamp(18px, 2.5vw, 30px); font-weight: 600; letter-spacing: 0.02em; margin-bottom: 24px; }
.about-bio { display: grid; grid-template-columns: 360px 1fr; gap: 48px; align-items: start; }
.contact-layout { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 22px; align-items: start; }
.cta-row { display: flex; justify-content: center; gap: 14px; margin-top: 36px; flex-wrap: wrap; }
.cta-row .btn { text-align: center; }

/* ---------- Tablet ---------- */
@media (max-width: 860px) {
  .poster-inner { border: 1px solid var(--ink); }
  .section { padding: 36px 28px; }
  .section.tight { padding: 36px 28px; }
  .bullets { grid-template-columns: 1fr; max-width: 100%; }
  .reel-strip { grid-template-columns: repeat(2, 1fr); }
  .evidence-grid { grid-template-columns: 1fr; }
  .about-bio { grid-template-columns: 1fr; gap: 32px; }
  .contact-layout { grid-template-columns: 1fr; }
  .ledger-row { grid-template-columns: 40px 1fr auto; gap: 12px; padding: 14px 20px; }
  .ledger-row .meta { display: none; }
  .bar { padding: 16px 28px; }
  .post-title { font-size: clamp(28px, 5vw, 34px); }
  .diary-list { grid-template-columns: 1fr; }
  .pipeline-figure { transform: none; max-width: 100%; }
  .pipeline-figure image-slot { width: 100% !important; height: auto !important; }
}

/* ---------- Phone ---------- */
@media (max-width: 540px) {
  .poster { margin: 0; border: none; }
  .poster-inner { border: none; }
  .section { padding: 28px 16px; }
  .section.tight { padding: 28px 16px; }
  .reel-strip { grid-template-columns: 1fr; }
  .ledger-row { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; }
  .ledger-row .idx { font-size: 11px; }
  .ledger-row .meta { display: block; font-size: 11px; }
  .ledger-row .name { font-size: 15px; }
  .ledger-row .link { align-self: flex-start; margin-top: 4px; }
  .bar { flex-direction: column; gap: 10px; align-items: center; text-align: center; }
  .navlinks { flex-wrap: wrap; gap: 12px; font-size: 12px; justify-content: center; }
  .navlinks .btn-rust { width: 100%; text-align: center; margin-top: 4px; }
  .cta-row { flex-direction: column; align-items: stretch; }
  .cta-row .btn { text-align: center; }
  .footer { flex-direction: column; align-items: flex-start; gap: 12px; text-align: left; padding: 18px 16px; }
  .footer .links { flex-direction: column; gap: 8px; }
  .post { max-width: 100%; padding: 8px 16px; }
  .post-title { font-size: clamp(24px, 6vw, 28px); }
  .post-body { font-size: 16px; }
  .notice { padding: 24px 20px; }
  .notice h2 { font-size: clamp(20px, 5vw, 24px); }
  .found-stamp { right: -6px; bottom: -2px; font-size: clamp(16px, 4vw, 22px); padding: 2px 8px; border-width: 2px; }
  .btn, .btn-rust { padding: 14px 24px; font-size: 14px; white-space: normal; }
  .pipeline-figure { transform: none; padding: 8px 8px 6px; }
  .pipeline-figure image-slot { width: 100% !important; height: auto !important; min-height: 200px; }
  .about-bio img { max-width: 280px; margin: 0 auto; display: block; }
  .stars-line { font-size: 10px; gap: 5px; letter-spacing: 0.05em; }
  .stars-line .star { font-size: 14px; }
  .notice [style*="grid-template-columns"] { grid-template-columns: 1fr !important; gap: 16px !important; }
  .notice .no { letter-spacing: 0.1em; font-size: 11px; overflow-wrap: break-word; }
  .notice { overflow-wrap: break-word; }
  .notice .first-tag { font-size: 10px; margin-left: 4px; }
  .wordmark { font-size: 24px; }
  .section[style*="1fr 1fr"] { grid-template-columns: 1fr !important; }
  img, video, image-slot { max-width: 100%; height: auto; }
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1.5px solid var(--ink);
  padding: 22px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer .links { display: flex; gap: 22px; }
.footer a { border-bottom: 1px solid var(--faint); }
.footer a:hover { color: var(--rust); border-bottom-color: var(--rust); }
