:root{
  --void: #14110f;
  --stone: #1d1914;
  --stone-light: #29231c;
  --stone-border: #3a3227;
  --bone: #ece4d3;
  --bone-dim: #a89d87;
  --brass: #b98d3e;
  --brass-bright: #dcae5e;
  --blood: #a3392f;
  --blood-bright: #c14a3d;
  --sage: #6f7d5e;
}

*{ margin:0; padding:0; box-sizing:border-box; }

html{ scroll-behavior: smooth; }

body{
  background: var(--void);
  background-image:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(185,141,62,0.08), transparent),
    radial-gradient(ellipse 700px 500px at 100% 10%, rgba(163,57,47,0.06), transparent);
  color: var(--bone);
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
}

a{ color: inherit; text-decoration: none; }

::selection{ background: var(--brass); color: var(--void); }

:focus-visible{
  outline: 2px solid var(--brass-bright);
  outline-offset: 3px;
}

.wrap{ max-width: 1180px; margin: 0 auto; padding: 0 32px; }

/* ---------- NAV ---------- */
nav{
  position: sticky; top:0; z-index: 50;
  background: rgba(20,17,15,0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--stone-border);
}
nav .wrap{
  display:flex; align-items:center; justify-content:space-between;
  height: 74px;
}
.nav-left{ display:flex; align-items:center; gap:20px; }
.brand{ display:flex; align-items:center; gap:12px; }
.nav-updated{
  font-family:'IBM Plex Mono', monospace; font-size: 11px; color: #6e6455;
  letter-spacing: 0.03em; padding-left: 20px; border-left: 1px solid var(--stone-border);
}
.nav-updated b{ color: var(--bone-dim); font-weight: 600; }
.brand-mark{
  width: 34px; height: 34px; flex-shrink:0;
}
.brand-text{ display:flex; flex-direction:column; line-height:1.05; }
.brand-text .b1{
  font-family:'Cinzel', serif; font-weight:700; font-size:16.5px;
  letter-spacing: 0.09em; color: var(--bone);
}
.brand-text .b2{
  font-size: 10px; letter-spacing: 0.22em; color: var(--brass);
  text-transform: uppercase; margin-top:3px; font-weight:600;
}
.nav-links{ display:flex; align-items:center; gap:36px; }
.nav-links a{
  font-size: 13.5px; color: var(--bone-dim); font-weight:500;
  letter-spacing: 0.02em; transition: color .15s ease;
}
.nav-links a:hover{ color: var(--bone); }
.nav-cta{
  border: 1px solid var(--stone-border);
  padding: 9px 18px; border-radius: 3px;
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight:600;
  letter-spacing: 0.02em; color: var(--brass-bright) !important;
  background: transparent; cursor: pointer;
  transition: all .15s ease;
}
.nav-cta:hover{ border-color: var(--brass); background: rgba(185,141,62,0.08); }

/* ---------- HERO ---------- */
header.hero{
  padding: 88px 0 64px;
  position: relative;
  border-bottom: 1px solid var(--stone-border);
}
.eyebrow{
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--blood-bright); font-weight:600;
  display:flex; align-items:center; gap:12px; margin-bottom: 22px;
}
.eyebrow::before{
  content:''; width: 26px; height:1px; background: var(--blood-bright);
}
h1.title{
  font-family:'Cinzel', serif; font-weight:700;
  font-size: clamp(40px, 6.2vw, 74px);
  line-height: 1.02; letter-spacing: 0.01em;
  color: var(--bone);
  max-width: 820px;
}
h1.title span{ color: var(--brass); }

.rule{
  display:flex; align-items:center; gap:14px;
  margin: 30px 0 26px;
  max-width: 420px;
}
.rule .line{ flex:1; height:1px; background: linear-gradient(90deg, var(--stone-border), transparent); }
.rule .diamond{
  width:7px; height:7px; background: var(--brass);
  transform: rotate(45deg); flex-shrink:0;
}

.tagline{
  font-size: 17px; color: var(--bone-dim); max-width: 520px;
  line-height: 1.6; font-weight: 400;
}

/* ---------- CONTROLS ---------- */
.controls{
  padding: 0 0 20px;
  display:flex; align-items:center; justify-content:space-between;
  gap: 20px; flex-wrap: wrap;
}
.chips{ display:flex; gap:8px; flex-wrap:wrap; }
.chip{
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em;
  padding: 8px 15px; border-radius: 20px;
  border: 1px solid var(--stone-border); color: var(--bone-dim);
  background: transparent; cursor:pointer;
  transition: all .15s ease;
}
.chip:hover{ border-color: var(--brass); color: var(--bone); }
.chip.active{
  background: var(--brass); border-color: var(--brass); color: var(--void);
}
.search-sort{ display:flex; gap:10px; }
.search-box{
  position:relative;
}
.search-box input{
  background: var(--stone); border: 1px solid var(--stone-border);
  border-radius: 3px; padding: 9px 14px 9px 34px;
  color: var(--bone); font-size: 13.5px; width: 210px;
  font-family:'Inter',sans-serif;
}
.search-box input::placeholder{ color: #6e6455; }
.search-box input:focus{ border-color: var(--brass); outline:none; }
.search-box svg{
  position:absolute; left:11px; top:50%; transform:translateY(-50%);
  width:14px; height:14px; stroke: var(--bone-dim);
}
select#sort{
  background: var(--stone); border: 1px solid var(--stone-border);
  color: var(--bone); font-size: 13px; font-family:'Inter',sans-serif;
  padding: 9px 12px; border-radius: 3px; cursor:pointer;
}

.count-line{
  font-size: 12.5px; color: var(--bone-dim); padding-bottom: 14px;
  font-family:'IBM Plex Mono', monospace;
}
.count-line b{ color: var(--brass-bright); font-weight:600; }

/* ---------- BOUNTY LIST ---------- */
.board{ padding-bottom: 90px; }

.row{
  display:grid;
  grid-template-columns: 48px 1.4fr 1.5fr 1fr 0.8fr 1fr auto;
  align-items:center;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid var(--stone-border);
  border-radius: 4px;
  background: var(--stone);
  margin-bottom: 10px;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
  opacity: 0;
  animation: rise .5s ease forwards;
}
.row:hover{
  transform: translateX(3px);
  border-color: var(--brass);
  background: var(--stone-light);
}
@keyframes rise{
  from{ opacity:0; transform: translateY(8px); }
  to{ opacity:1; transform: translateY(0); }
}

/* Faction seal (replaces the old letter seal) */
.seal{
  width: 42px; height:42px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  font-family:'Cinzel', serif; font-weight:700; font-size:13px; letter-spacing:0.02em;
  box-shadow: inset 0 2px 3px rgba(255,255,255,0.22), inset 0 -3px 5px rgba(0,0,0,0.4);
}
.seal.AD{ background: radial-gradient(circle at 35% 30%, #f0d67e, #b8901f); color:#2b2207; }
.seal.EP{ background: radial-gradient(circle at 35% 30%, #d5675a, #8f231a); color:#fbeae7; }
.seal.DC{ background: radial-gradient(circle at 35% 30%, #6f9fd6, #2b5490); color:#eef4fb; }

.who .name{ font-weight:600; font-size:15px; color: var(--bone); }

.crime{ font-size: 13px; color: var(--bone-dim); line-height:1.4; }
.region{ font-size: 13px; color: var(--bone-dim); }
.region .r-label{ display:block; font-size:10px; letter-spacing:0.08em; color:#6e6455; text-transform:uppercase; margin-bottom:3px; }
.duration{ font-size: 13px; color: var(--bone-dim); }
.duration .d-label{ display:block; font-size:10px; letter-spacing:0.08em; color:#6e6455; text-transform:uppercase; margin-bottom:3px; }

.bounty{ text-align:right; }
.bounty .amt{
  font-family:'IBM Plex Mono', monospace; font-weight:600; font-size: 17px;
  color: var(--brass-bright);
}
.bounty.legendary .amt{ color: var(--blood-bright); }
.bounty .g{ font-size: 12px; color: var(--bone-dim); font-weight:500; }
.bounty .items{ font-size: 12px; color: var(--brass); font-weight:500; margin-top:2px; }
.bounty .by{ font-size: 11px; color: #6e6455; margin-top:4px; }

.view-btn{
  font-size: 12px; font-weight:600; color: var(--bone-dim);
  border: 1px solid var(--stone-border); padding: 8px 14px; border-radius:3px;
  white-space:nowrap; background: transparent; cursor: pointer;
}
.row:hover .view-btn{ color: var(--brass-bright); border-color: var(--brass); }

.empty-state{
  display:none; text-align:center; padding: 70px 20px; color: var(--bone-dim);
  border: 1px dashed var(--stone-border); border-radius: 4px;
}
.empty-state.show{ display:block; }
.empty-state .et{ font-family:'Cinzel', serif; font-size: 20px; color: var(--bone); margin-bottom:8px; }

/* ---------- CONTRACTS I'M FOLLOWING ---------- */
.following{ padding-top: 40px; }
.following-head{ margin-bottom: 22px; }
.following-sub{
  font-size: 13.5px; color: var(--bone-dim); margin-top: 8px; max-width: 60ch;
}
/* brass accent so the curated list reads as distinct from the open board */
.following .row{ border-left: 3px solid var(--brass); }
.follow-empty{
  display:none; color: var(--bone-dim); font-size: 13px;
  font-family:'IBM Plex Mono', monospace;
  border: 1px dashed var(--stone-border); border-radius: 4px; padding: 24px; text-align:center;
}
.follow-empty.show{ display:block; }
.follow-toggle{
  display:flex; align-items:center; justify-content:center; gap: 9px;
  width: 100%; margin-top: 4px; padding: 12px;
  background: var(--stone); border: 1px solid var(--stone-border); border-radius: 4px;
  color: var(--bone-dim); font-family:'Inter',sans-serif; font-size: 13px; font-weight: 600;
  letter-spacing: 0.02em; cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.follow-toggle:hover{ border-color: var(--brass); color: var(--brass-bright); background: var(--stone-light); }
.follow-toggle .ft-icon{
  font-size: 17px; line-height: 1; font-family:'IBM Plex Mono', monospace; color: var(--brass);
}
.follow-toggle:hover .ft-icon{ color: var(--brass-bright); }
.board-head{ padding-top: 48px; margin-bottom: 0; }
.board-head .rule{ margin-top: 12px; }

/* ---------- HOW TO USE ---------- */
.howto{
  border-top: 1px solid var(--stone-border);
  padding: 64px 0 20px;
}
.section-head{ margin-bottom: 34px; }
.section-head h2{
  font-family:'Cinzel', serif; font-weight:700; font-size: 30px;
  color: var(--bone); letter-spacing: 0.02em;
}
.section-head .rule{ margin: 18px 0 0; }

.howto-grid{
  display:grid; grid-template-columns: 1.35fr 1fr; gap: 22px;
  align-items: start;
}
.howto-card{
  background: var(--stone);
  border: 1px solid var(--stone-border);
  border-radius: 6px;
  padding: 28px 30px;
}
.ht-role{
  font-family:'Cinzel', serif; font-weight:700; font-size: 18px;
  color: var(--brass-bright); letter-spacing: 0.03em; margin-bottom: 18px;
}
.howto-card p{ font-size: 14.5px; color: var(--bone-dim); line-height: 1.65; }
.ht-sub{ margin-top: 16px; color: var(--bone) !important; font-weight: 600; }
.tag{
  font-family:'IBM Plex Mono', monospace; font-size: 12.5px;
  color: var(--brass-bright); background: rgba(185,141,62,0.10);
  border: 1px solid var(--stone-border); border-radius: 3px;
  padding: 1px 6px; white-space: nowrap;
}
.ht-fields{ list-style: none; margin: 12px 0 4px; }
.ht-fields li{
  font-size: 13.5px; color: var(--bone-dim); line-height: 1.55;
  padding: 8px 0; border-bottom: 1px solid var(--stone-border);
}
.ht-fields li:last-child{ border-bottom: none; }
.ht-fields b{ color: var(--bone); font-weight: 600; }
.ht-flow{
  list-style: none; counter-reset: step; margin-top: 20px;
  display: flex; flex-direction: column; gap: 12px;
}
.ht-flow li{
  position: relative; counter-increment: step;
  padding-left: 34px; font-size: 13.5px; color: var(--bone-dim); line-height: 1.55;
}
.ht-flow li::before{
  content: counter(step);
  position: absolute; left: 0; top: -1px;
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family:'IBM Plex Mono', monospace; font-size: 11px; font-weight: 600;
  color: var(--brass-bright); border: 1px solid var(--stone-border);
  background: var(--void);
}

/* ---------- FOOTER ---------- */
footer{
  border-top: 1px solid var(--stone-border);
  padding: 40px 0 50px;
  margin-top: 48px;
}
.f-main{
  display:flex; justify-content:space-between; align-items:flex-start; flex-wrap:wrap; gap: 24px;
}
.f-brand{ font-family:'Cinzel', serif; font-weight:600; font-size:15px; color:var(--bone-dim); }
.f-note{ font-size: 12.5px; color: #6e6455; margin-top: 8px; max-width: 380px; line-height:1.6; }

/* ---------- MODAL ---------- */
.modal-overlay{
  position: fixed; inset: 0;
  background: rgba(8,6,5,0.78);
  backdrop-filter: blur(3px);
  display: none; align-items: flex-start; justify-content: center;
  z-index: 100; padding: 48px 20px; overflow-y: auto;
}
.modal-overlay.open{ display: flex; }
.modal{
  position: relative;
  background: var(--stone);
  border: 1px solid var(--stone-border);
  border-radius: 6px;
  width: 100%; max-width: 560px;
  padding: 30px 32px 32px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.65);
  animation: modal-in .2s ease;
}
@keyframes modal-in{ from{ opacity:0; transform: translateY(12px); } to{ opacity:1; transform: translateY(0); } }
.modal-close{
  position: absolute; top: 12px; right: 15px;
  background: transparent; border: none; color: var(--bone-dim);
  font-size: 28px; line-height: 1; cursor: pointer; padding: 4px 8px;
}
.modal-close:hover{ color: var(--bone); }
.m-head{ display:flex; align-items:center; gap:14px; margin-bottom: 24px; padding-right: 28px; }
.m-name{ font-family:'Cinzel', serif; font-size: 22px; font-weight:700; color: var(--bone); line-height:1.1; }
.m-faction{ font-size: 12px; color: var(--bone-dim); margin-top:4px; letter-spacing:0.04em; }
.m-grid{ display:grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; margin-bottom: 22px; }
.m-field.wide{ grid-column: span 2; }
.m-label{ font-size: 10.5px; letter-spacing:0.09em; text-transform:uppercase; color:#6e6455; font-weight:600; margin-bottom:5px; }
.m-value{ font-size: 14px; color: var(--bone); line-height:1.5; }
.m-value.reward{ font-family:'IBM Plex Mono', monospace; color: var(--brass-bright); font-size: 15px; }
.m-value.reward.legendary{ color: var(--blood-bright); }
.m-notes{ border-top: 1px solid var(--stone-border); padding-top: 18px; }
.m-notes .m-label{ margin-bottom: 8px; }
.m-notes p{ font-size: 14px; color: var(--bone-dim); line-height: 1.65; white-space: pre-wrap; }

/* Discord modal (small) */
.modal.modal-sm{ max-width: 400px; text-align: center; padding: 34px 32px 32px; }
.d-title{
  font-family:'Cinzel', serif; font-size: 22px; font-weight:700;
  color: var(--brass-bright); letter-spacing: 0.03em; margin-bottom: 14px;
}
.d-body p{ font-size: 14.5px; color: var(--bone-dim); line-height: 1.6; }
.d-handle{
  margin-top: 18px;
  font-family:'IBM Plex Mono', monospace; font-size: 16px; font-weight: 600;
  color: var(--bone);
  background: rgba(185,141,62,0.10); border: 1px solid var(--brass);
  border-radius: 4px; padding: 12px 16px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 940px){
  .row{
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "seal seal"
      "who who"
      "crime crime"
      "region duration"
      "bounty bounty"
      "view view";
    row-gap: 12px;
  }
  .seal{ grid-area: seal; }
  .who{ grid-area: who; }
  .crime{ grid-area: crime; }
  .region{ grid-area: region; }
  .duration{ grid-area: duration; }
  .bounty{ grid-area: bounty; text-align:left; }
  .view-btn{ grid-area: view; text-align:center; }
}
@media (max-width: 860px){
  .howto-grid{ grid-template-columns: 1fr; }
}
@media (max-width: 700px){
  .nav-links{ gap: 20px; }
  .nav-links a:not(.nav-cta){ display:none; }
  .nav-updated{ display:none; }
  .wrap{ padding: 0 20px; }
}
@media (max-width: 560px){
  .search-box input{ width: 140px; }
  .m-grid{ grid-template-columns: 1fr; }
  .m-field.wide{ grid-column: span 1; }
}

@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important; scroll-behavior:auto !important; }
  .row{ opacity: 1 !important; }
}
