/* UK Militia Forces theme: near-black panels, wide display headings,
   blue primary actions, category colours (red/green/orange/purple/blue). */
:root {
  color-scheme: dark;
  --bg: #121212;
  --header: #0a0a0a;
  --card: #1a1a1a;
  --inset: #141414;
  --border: #2c2c2c;
  --text: #f2f2f2;
  --muted: #a3a3a3;
  --blue: #3d9df2;
  --blue-hover: #5aaef7;
  --red: #e5484d;
  --green: #2fb344;
  --orange: #f59f00;
  --purple: #9d3df0;
  --display: "Audiowide", "Arial Black", system-ui, sans-serif;
  --brand: "Michroma", "Arial", system-ui, sans-serif;
  --body: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  /* aliases used by the feature pages */
  --accent: var(--orange);
  --accent2: var(--blue);
  --ok: var(--green);
  --bad: var(--red);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--body);
}
a { color: var(--blue); }
code { background: var(--inset); border: 1px solid var(--border); padding: 1px 6px; border-radius: 4px; font-size: .9em; }
em { color: var(--text); }
.muted, .muted a { color: var(--muted); }
.small { font-size: .85rem; }
.ok { color: var(--green); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- site header */
.site-header { background: var(--header); border-bottom: 1px solid #1f1f1f; position: sticky; top: 0; z-index: 10; }
.site-bar {
  max-width: 1240px; margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); white-space: nowrap; }
.brand-logo { width: 40px; height: 40px; }
.title-logo { display: inline-flex; align-items: center; gap: 14px; }
.title-logo img { width: 64px; height: 64px; }
.brand-uk { font-family: var(--display); color: var(--blue); font-size: 1.5rem; letter-spacing: .06em; }
.brand-name { font-family: var(--brand); font-size: 1.05rem; letter-spacing: .14em; }
.mainnav { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.mainnav a {
  color: #d6d6d6; text-decoration: none; font-weight: 500; padding: 8px 10px;
  border-bottom: 2px solid transparent;
}
.mainnav a:hover, .mainnav a:focus-visible { color: #fff; outline: none; }
.mainnav a.on { color: #fff; font-weight: 700; border-bottom-color: var(--blue); }
.account { display: flex; align-items: center; gap: 10px; }
.account form { margin: 0; }
.account-portrait { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--blue); }
.account-name { display: flex; flex-direction: column; line-height: 1.2; font-size: .9rem; }
.account-name span { color: var(--muted); font-size: .75rem; }

/* ---- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--blue); color: #fff; text-decoration: none; border: 1px solid var(--blue);
  padding: 9px 18px; border-radius: 4px; font: 700 .95rem var(--body); cursor: pointer; white-space: nowrap;
}
.btn:hover, .btn:focus-visible { background: var(--blue-hover); border-color: var(--blue-hover); outline: none; }
.btn img { height: 18px; }
.btn-orange { background: var(--orange); border-color: var(--orange); color: #111; }
.btn-orange:hover, .btn-orange:focus-visible { background: #ffb224; border-color: #ffb224; }
.btn-ghost { background: transparent; color: var(--text); border-color: #444; padding: 7px 14px; font-weight: 500; }
.btn-ghost:hover, .btn-ghost:focus-visible { background: #222; border-color: var(--blue); }
.btn-danger { background: transparent; color: var(--red); border-color: rgba(229, 72, 77, .5); padding: 6px 12px; font-weight: 500; }
.btn-danger:hover, .btn-danger:focus-visible { background: rgba(229, 72, 77, .12); border-color: var(--red); }

/* ---- page layout */
main { max-width: 960px; margin: 0 auto; padding: 40px 24px 72px; }
main.wide { max-width: 1240px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: .02em; text-wrap: balance; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0; line-height: 1.2; }
h2 { font-size: 1.25rem; margin: 0 0 10px; }
.hero { text-align: center; margin-bottom: 28px; }
.hero .sub { max-width: 60ch; margin: 12px auto 0; }
main > header { margin-bottom: 8px; }
.sub { color: #cfcfcf; margin: 8px 0 0; }
.sub strong { color: #fff; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 22px 24px; margin: 20px 0; }
.notice { background: rgba(61, 157, 242, .1); border: 1px solid var(--blue); padding: 10px 14px; border-radius: 6px; margin: 16px 0; }
.notice.warn { border-color: var(--orange); background: rgba(245, 159, 0, .1); }

/* category cards, like the corp site's leaderboard tiles */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin: 28px 0; }
.steps .card { margin: 0; position: relative; display: flex; flex-direction: column; padding-top: 30px; }
.steps .card p { color: #cfcfcf; flex: 1; }
.steps .card .btn { align-self: flex-start; }
.tag {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  font: 700 .7rem var(--body); letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 12px; border-radius: 4px; color: #fff; white-space: nowrap;
}
.tone-blue { border: 2px solid var(--blue); background: linear-gradient(180deg, rgba(61, 157, 242, .10), var(--card) 60%); }
.tone-blue .tag { background: var(--blue); }
.tone-green { border: 2px solid var(--green); background: linear-gradient(180deg, rgba(47, 179, 68, .10), var(--card) 60%); }
.tone-green .tag { background: var(--green); }
.tone-orange { border: 2px solid var(--orange); background: linear-gradient(180deg, rgba(245, 159, 0, .10), var(--card) 60%); }
.tone-orange .tag { background: var(--orange); color: #111; }

/* ---- characters */
.chars { list-style: none; padding: 0; margin: 0 0 12px; }
.chars li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.chars li:last-child { border-bottom: 0; }
.chars form { margin: 0; }
.portrait { width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--border); }
.who { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.who span { color: var(--muted); font-size: .9rem; }
.badge { align-self: flex-start; margin-top: 4px; font-size: .75rem !important; color: var(--green) !important;
  border: 1px solid var(--green); border-radius: 4px; padding: 0 8px; }
.badge.bad { color: var(--red) !important; border-color: var(--red); }

/* ---- moon calendar */
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.cal-head h2 { margin: 0; min-width: 12ch; text-align: center; }
.nav-btn { background: var(--inset); color: var(--text); border: 1px solid var(--border); border-radius: 4px;
  padding: 4px 12px; font: inherit; font-size: 1.1rem; cursor: pointer; }
.nav-btn:hover, .nav-btn:focus-visible { border-color: var(--blue); outline: none; }
.today-btn { font-size: .85rem; margin-left: auto; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.dow { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; padding: 0 6px 4px; }
.day { min-height: 96px; background: var(--inset); border: 1px solid var(--border); border-radius: 6px; padding: 4px 6px; min-width: 0; }
.day.other { opacity: .4; }
.day.today { border-color: var(--blue); }
.day.today .num { color: var(--blue); font-weight: 700; }
.num { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.day ul { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 3px; }
.chip { font-size: .72rem; line-height: 1.3; padding: 2px 5px; border-radius: 4px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chip.arrival { background: rgba(157, 61, 240, .22); border-left: 3px solid var(--purple); }
.chip.decay { background: rgba(245, 159, 0, .15); border-left: 3px solid var(--orange); }
.legend { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 0; font-size: .85rem; }
.dot { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.dot.arrival { background: var(--purple); }
.dot.decay { background: var(--orange); margin-left: 10px; }

.pulls { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.pull { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 18rem); gap: 16px; padding: 14px;
  border: 1px solid var(--border); border-left: 4px solid var(--purple); border-radius: 8px; background: var(--inset); }
.pull.ready { border-left-color: var(--green); }
.pull.fractured { border-left-color: var(--muted); opacity: .7; }
.pull-main { min-width: 0; }
.pull-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.state { font-size: .72rem; border-radius: 4px; padding: 1px 8px; border: 1px solid; }
.state.upcoming { color: #c08bf5; border-color: var(--purple); }
.state.ready { color: var(--green); border-color: var(--green); }
.state.fractured { color: var(--muted); border-color: var(--muted); }
.ores { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 2px; max-width: 22rem; font-size: .9rem; }
.ores li { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.times { margin: 0; display: grid; gap: 6px; }
.times dt { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
.times dd { margin: 0 0 4px; display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }

/* ---- structures / fuel */
.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 24px 0; }
.stat { border: 2px solid var(--border); border-radius: 8px; padding: 10px 14px; display: flex; flex-direction: column; background: var(--card); }
.stat b { font: 400 1.7rem var(--display); line-height: 1.3; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .85rem; }
.stat.out, .stat.critical { border-color: var(--red); background: linear-gradient(180deg, rgba(229, 72, 77, .12), var(--card)); }
.stat.low { border-color: #f76b15; background: linear-gradient(180deg, rgba(247, 107, 21, .12), var(--card)); }
.stat.warn { border-color: var(--orange); background: linear-gradient(180deg, rgba(245, 159, 0, .12), var(--card)); }
.stat.good { border-color: var(--green); background: linear-gradient(180deg, rgba(47, 179, 68, .12), var(--card)); }
.stat.out b, .stat.critical b { color: var(--red); }
.stat.low b { color: #f76b15; }
.stat.warn b { color: var(--orange); }
.stat.good b { color: var(--green); }
.stat.zero { opacity: .5; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.list-head h2 { margin: 0; }
.filter input { background: var(--inset); color: var(--text); border: 1px solid var(--border); border-radius: 4px;
  padding: 7px 10px; font: inherit; min-width: 0; width: 16rem; max-width: 100%; }
.filter input:focus-visible { outline: none; border-color: var(--blue); }
.structs { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.struct { display: grid; grid-template-columns: 40px minmax(0, 1fr) minmax(0, 17rem); gap: 14px; align-items: center;
  padding: 12px 14px; border: 1px solid var(--border); border-left: 4px solid var(--green); border-radius: 8px; background: var(--inset); }
.struct.warn { border-left-color: var(--orange); }
.struct.low { border-left-color: #f76b15; }
.struct.critical, .struct.out { border-left-color: var(--red); }
.type-icon { width: 40px; height: 40px; border-radius: 4px; }
.struct-main { min-width: 0; }
.fuel { display: flex; flex-direction: column; gap: 2px; font-variant-numeric: tabular-nums; min-width: 0; }
.bar { height: 6px; background: var(--border); border-radius: 999px; overflow: hidden; margin-top: 6px; }
.bar span { display: block; height: 100%; background: var(--green); border-radius: 999px; }
.struct.warn .bar span { background: var(--orange); }
.struct.low .bar span { background: #f76b15; }
.struct.critical .bar span, .struct.out .bar span { background: var(--red); }
.fuel-pill { font-size: .72rem; border-radius: 4px; padding: 1px 8px; border: 1px solid; color: var(--green); }
.fuel-pill.warn { color: var(--orange); }
.fuel-pill.low { color: #f76b15; }
.fuel-pill.critical, .fuel-pill.out { color: var(--red); }

/* ---- small screens */
@media (max-width: 860px) {
  .site-bar { gap: 10px 16px; padding: 10px 16px; }
  .mainnav { order: 3; width: 100%; margin-left: 0; overflow-x: auto; flex-wrap: nowrap; }
  .account { margin-left: auto; }
  .account-name { display: none; }
  main { padding: 28px 16px 56px; }
}
@media (max-width: 700px) {
  .day { min-height: 52px; padding: 3px; }
  .chip { font-size: 0; padding: 0; height: 6px; border-left-width: 0; }
  .chip b { display: none; }
  .chip.arrival { background: var(--purple); }
  .chip.decay { background: var(--orange); }
  .pull { grid-template-columns: 1fr; }
  .struct { grid-template-columns: 40px minmax(0, 1fr); }
  .fuel { grid-column: 1 / -1; }
  .filter, .filter input { width: 100%; }
  .brand-name { font-size: .85rem; letter-spacing: .08em; }
  .chars li { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: no-preference) {
  .btn, .mainnav a, .nav-btn { transition: background-color .15s, border-color .15s, color .15s; }
}

/* ---- recruitment */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.count { font: 500 .85rem var(--body); color: var(--muted); background: var(--inset); border: 1px solid var(--border);
  border-radius: 4px; padding: 1px 8px; margin-left: 6px; vertical-align: middle; }
.tickets { list-style: none; padding: 0; margin: 0; }
.tickets li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.tickets li:last-child { border-bottom: 0; }
.tickets .portrait { width: 40px; height: 40px; }
.table-wrap { overflow-x: auto; }
table.archive { width: 100%; border-collapse: collapse; font-size: .92rem; }
.archive th { text-align: left; color: var(--muted); font-weight: 500; font-size: .75rem; text-transform: uppercase;
  letter-spacing: .08em; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.archive td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.archive tr:hover td { background: var(--inset); }
.archive td a { color: var(--text); text-decoration: none; font-weight: 500; }
.archive td a:hover { color: var(--blue); }
.archive .reason { color: #cfcfcf; max-width: 28rem; }
.num-col { text-align: right; font-variant-numeric: tabular-nums; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; }

.settings .field { display: flex; flex-direction: column; gap: 6px; margin: 16px 0; }
.settings label { font-weight: 500; }
.settings input:not([type=checkbox]), .settings select, .settings textarea {
  background: var(--inset); color: var(--text); border: 1px solid var(--border); border-radius: 4px;
  padding: 9px 10px; font: inherit; width: 100%; max-width: 40rem; }
.settings textarea { resize: vertical; }
.settings input:focus-visible, .settings select:focus-visible, .settings textarea:focus-visible { outline: none; border-color: var(--blue); }
.hint { color: var(--muted); font-size: .85rem; margin: 0; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 400 !important; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--blue); }
.roles-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-bottom: 16px; }
.roles-grid fieldset { border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; margin: 0; min-width: 0; }
.roles-grid legend { font-family: var(--display); padding: 0 6px; }
.role-list { display: grid; gap: 4px; max-height: 18rem; overflow-y: auto; margin-top: 10px; }
.role-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }

.ticket-meta dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px 20px; margin: 0; }
.ticket-meta dt, .answers dt { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
.ticket-meta dd { margin: 2px 0 0; }
.ticket-meta .wide-item { grid-column: 1 / -1; }
.ticket-meta h3 { font-size: 1rem; margin: 20px 0 8px; }
.char-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.ticket-meta dl.answers { display: block; margin: 0; }
.answers dt { margin-top: 10px; }
.answers dd { margin: 2px 0 0; white-space: pre-line; }

.messages { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.msg { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; padding: 8px 6px; border-radius: 6px; }
.msg:hover { background: var(--inset); }
.msg .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--border); }
.msg .meta { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.msg .meta time { color: var(--muted); font-size: .75rem; }
.msg.applicant .meta strong { color: var(--orange); }
.bot-tag, .applicant-tag { font-size: .65rem; font-weight: 700; padding: 0 5px; border-radius: 3px; letter-spacing: .04em; }
.bot-tag { background: #5865f2; color: #fff; }
.applicant-tag { border: 1px solid var(--orange); color: var(--orange); }
.msg .content { overflow-wrap: anywhere; }
.msg .content pre { background: var(--inset); border: 1px solid var(--border); padding: 8px; border-radius: 4px; overflow-x: auto; }
.embed-card { margin-top: 6px; border-left: 4px solid var(--c, var(--border)); background: var(--inset); border-radius: 4px;
  padding: 8px 12px; max-width: 34rem; font-size: .9rem; display: grid; gap: 4px; }
.embed-field b { display: block; font-size: .8rem; }
.attachment-img { display: block; max-width: min(100%, 400px); max-height: 320px; border-radius: 6px; margin-top: 6px; border: 1px solid var(--border); }
.attachment { display: inline-block; margin-top: 6px; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 20px; }
.settings input[type=color] { width: 64px; height: 38px; padding: 2px; cursor: pointer; }
.settings input[type=file] { padding: 6px; }
.image-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin: 8px 0 12px; }
.image-choices fieldset { border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; margin: 0; min-width: 0;
  display: flex; flex-direction: column; gap: 8px; }
.image-choices legend { font-family: var(--display); padding: 0 6px; }
.check input[type=radio] { width: 16px; height: 16px; accent-color: var(--blue); }
.preview { min-height: 64px; display: flex; align-items: center; justify-content: flex-start; background: var(--inset);
  border: 1px dashed var(--border); border-radius: 6px; padding: 8px; }
.preview img { max-height: 120px; max-width: 100%; }
.buttons-setup { border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; margin: 16px 0; min-width: 0; }
.buttons-setup legend { font-family: var(--display); padding: 0 6px; }
.button-row { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; align-items: start; }
.button-row .field { margin: 10px 0; }
.button-num { margin-top: 12px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--blue); color: #fff; font-weight: 700; font-size: .85rem; }
.btn-discord { background: #5865f2; border-color: #5865f2; }
.btn-discord:hover, .btn-discord:focus-visible { background: #6d78f5; border-color: #6d78f5; }
.account-portrait.discord { border-color: #5865f2; }
.account { flex-wrap: wrap; justify-content: flex-end; }
.btn-small { padding: 6px 12px; font-size: .85rem; }
.members-only { position: relative; padding-top: 30px; margin-top: 28px; }
.members-only ul { margin: 0 0 12px; padding-left: 20px; }

/* ---- killboard */
.segmented { display: inline-flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.segmented a { padding: 6px 12px; color: var(--muted); text-decoration: none; font-size: .9rem; border-left: 1px solid var(--border); }
.segmented a:first-child { border-left: 0; }
.segmented a:hover, .segmented a:focus-visible { color: var(--text); background: var(--inset); outline: none; }
.segmented a.on { background: var(--blue); color: #fff; }
.kb-summary .stat b { font-size: 1.5rem; }
.kb-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.kb-layout .card { margin: 0; }
.kills { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.kill { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px;
  background: var(--inset); border: 1px solid var(--border); border-left: 4px solid var(--green); border-radius: 8px; }
.kill.loss { border-left-color: var(--red); }
.kill .ship { width: 40px; height: 40px; border-radius: 4px; }
.kill-main { display: flex; flex-direction: column; min-width: 0; line-height: 1.4; }
.kill-title { color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kill-title:hover { color: var(--blue); }
.kill .ours { color: #9fd8a7; overflow-wrap: anywhere; }
.kill-side { display: flex; flex-direction: column; align-items: flex-end; text-align: right; font-variant-numeric: tabular-nums; }
.kill .value { color: var(--green); }
.kill.loss .value { color: var(--red); }
.sec { font-weight: 700; font-variant-numeric: tabular-nums; }
.top-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; counter-reset: top; }
.top-list li { display: grid; grid-template-columns: 20px 36px minmax(0, 1fr) auto; gap: 10px; align-items: center; counter-increment: top; }
.top-list li::before { content: counter(top); color: var(--muted); font-variant-numeric: tabular-nums; }
.top-list .portrait { width: 36px; height: 36px; }
.top-list a { color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-list a:hover { color: var(--blue); }
.top-count { font: 400 1.1rem var(--display); }

/* ---- incursions */
.incursions { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.incursion { margin: 0; border-top: 3px solid var(--green); display: flex; flex-direction: column; gap: 12px; }
.incursion.mobilizing { border-top-color: var(--orange); }
.incursion.withdrawing { border-top-color: var(--red); }
.inc-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.inc-head h2 { margin: 0; }
.inc-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pill { font-size: .72rem; border: 1px solid; border-radius: 4px; padding: 1px 8px; white-space: nowrap; }
.pill.watched { color: var(--blue); }
.pill.state { color: var(--green); }
.pill.state.mobilizing { color: var(--orange); }
.pill.state.withdrawing { color: var(--red); }
.inc-row { display: flex; justify-content: space-between; font-size: .9rem; }
.inc-influence .bar span { background: var(--purple); }
.inc-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin: 0; }
.inc-facts dt { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.inc-facts dd { margin: 0; }
.boss { color: var(--red); }
.systems { margin: 0; font-size: .9rem; }

@media (max-width: 860px) {
  .kb-layout { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .kill { grid-template-columns: 40px minmax(0, 1fr); }
  .kill-side { grid-column: 2; flex-direction: row; gap: 10px; align-items: baseline; flex-wrap: wrap; }
}
