/* Project Radar — tokens taken from the design file (Federal Steel navy / steel blue). */
:root {
  --navy: #051C2C;
  --ink: #1C2A35;
  --muted: #55687A;
  --line: #DDE3E8;
  --bg: #F3F5F7;
  --card: #FFFFFF;
  --chip: #C6DAE7;
  --link: #4C738D;
  --hover: #F8FAFB;
  --hot: #D73B00;
  --up: #17663F;
  --up-bg: #EAF3EE;
  --down: #B42318;
  --down-bg: #F8ECEB;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Mulish, system-ui, sans-serif; background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.45; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--navy); text-decoration: underline; }
h1, .display { font-family: Abel, sans-serif; font-weight: 400; color: var(--navy); }
h1 { font-size: 40px; line-height: 1.15; margin: 6px 0 0; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }

/* top bar */
.top { background: var(--navy); color: #fff; }
.top .in { max-width: 1440px; margin: 0 auto; padding: 0 32px; height: 64px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 14px; color: #fff; }
.brand .logo { font: 700 11px/1.1 Mulish, sans-serif; letter-spacing: .08em; border: 1px dashed rgba(255,255,255,.5); padding: 4px 6px; }
.brand .name { font-family: Abel, sans-serif; font-size: 22px; }
.nav { display: flex; gap: 6px; }
.nav a { color: #fff; padding: 8px 14px; border-radius: 6px; }
.nav a.on, .nav a:hover { background: rgba(255,255,255,.12); text-decoration: none; }
.top .status { margin-left: auto; font-size: 13px; color: rgba(255,255,255,.85); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #4C738D; display: grid; place-items: center; font-weight: 700; color: #fff; }

main { max-width: 1440px; margin: 0 auto; padding: 36px 32px 64px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; }
.card h2 { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 26px 0; }
.kpi .big { font-size: 52px; font-weight: 800; color: var(--navy); line-height: 1.1; margin: 8px 0 10px; }
.kpi .big.hot { color: var(--hot); }
.delta { display: inline-block; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.delta.up { color: var(--up); background: var(--up-bg); }
.delta.down { color: var(--down); background: var(--down-bg); }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 20px; }
.filters label { color: var(--muted); display: flex; align-items: center; gap: 8px; }
select, input[type=text], input[type=password], input[type=number], textarea {
  font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; }
input[type=number] { width: 110px; }
.btn { font: inherit; font-weight: 700; display: inline-block; padding: 10px 18px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; }
.btn:hover { border-color: var(--navy); text-decoration: none; }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.ghost { color: var(--muted); }

/* layout */
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.cols3 { display: grid; grid-template-columns: 400px minmax(0, 1fr) 400px; gap: 24px; align-items: start; }
.stack { display: grid; gap: 24px; }

/* table */
.tablecard { padding: 0; overflow: hidden; }
/* Feed table: fixed column widths and wrapping text, so it always fits its card (no sideways scroll). */
table.feed { table-layout: fixed; }
table.feed th, table.feed td { overflow-wrap: anywhere; word-break: normal; vertical-align: top; }
table.feed th:first-child, table.feed td:first-child { padding-right: 6px; }
table.feed .chip { white-space: normal; }
table.feed th a.sorth { color: inherit; text-decoration: none; display: inline-flex; gap: 4px; align-items: center; }
table.feed th a.sorth:hover { color: var(--navy); }
table.feed th.sorted a.sorth { color: var(--navy); }
table.feed th .arrow { font-size: 10px; }
table.feed th.num a.sorth { justify-content: flex-end; width: 100%; }
table.feed td.due b.soon, table.feed td.due .sub.soon { color: #b45309; }
table.feed td.due b.neg { color: inherit; }
table.feed .m-label { display: none; }
.m-only, .filters .m-only { display: none; }
.filters select { max-width: 230px; }
.filters-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; flex: 1 1 100%; }
.neg { color: #b3261e; }
/* The team's own rating */
.stars { display: inline-flex; margin: 6px 0 2px; }
.stars button { all: unset; cursor: pointer; font-size: 15px; line-height: 1; padding: 1px; color: var(--line); }
.stars button.on { color: #e0a100; }
.stars:hover button { color: #e0a100; }
.stars button:hover ~ button { color: var(--line); }
.stars button:focus-visible { outline: 2px solid var(--navy); border-radius: 3px; }
.stars.big button { font-size: 24px; padding: 2px; }
table { border-collapse: collapse; width: 100%; }
th { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--hover); }
td .t { font-weight: 700; color: var(--ink); }
td .sub { font-size: 12px; color: var(--muted); }
.score { display: inline-block; min-width: 46px; text-align: center; font-weight: 800; font-size: 15px; padding: 5px 8px; border-radius: 7px; }
.score.call { background: var(--navy); color: #fff; }
.score.week { background: var(--chip); color: var(--navy); }
.score.look, .score.out { background: var(--bg); color: var(--muted); }
.score.big { font-size: 26px; padding: 6px 14px; }
.chip { display: inline-block; background: var(--chip); color: var(--navy); font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; margin: 0 4px 4px 0; white-space: nowrap; }
.bucket { font-weight: 700; font-size: 13px; }
.bucket.call { color: var(--hot); }
.bucket.week { color: var(--link); }
.bucket.look { color: var(--muted); }
.status-pill { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.empty { padding: 40px; text-align: center; color: var(--muted); }

/* side lists */
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; }
.kv .v { font-weight: 700; }
.kv .v.neg { color: var(--link); }
.bar { height: 8px; background: var(--chip); border-radius: 4px; }
.cityrow { display: grid; grid-template-columns: 1fr 40px; gap: 4px 10px; align-items: center; margin: 6px 0; }

/* detail */
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.fields .k { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fields .full { grid-column: 1 / -1; }
.tl { display: grid; grid-template-columns: 84px 1fr; gap: 0 14px; }
.tl > div { padding: 8px 0; }
.tl .hl { background: var(--chip); border-radius: 8px; padding: 8px 10px; font-weight: 700; }
.act { border-bottom: 1px solid var(--line); padding: 8px 0; }
.act:last-child { border-bottom: 0; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.pitch { white-space: pre-wrap; background: var(--hover); border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.note { background: var(--chip); border: 0; }
.flash { background: var(--up-bg); color: var(--up); padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; font-weight: 700; }
.warn { background: var(--down-bg); color: var(--down); padding: 10px 14px; border-radius: 8px; }
.attrib { font-size: 12px; color: var(--muted); margin-top: 28px; }
.pill-ok { color: var(--up); font-weight: 700; }
.pill-failed { color: var(--down); font-weight: 700; }
.pill-stale { color: var(--hot); font-weight: 700; }
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.steps .n { font-size: 12px; font-weight: 800; color: var(--link); letter-spacing: .1em; }
.steps h3 { margin: 6px 0; font-size: 16px; color: var(--navy); }
code { background: var(--bg); padding: 1px 5px; border-radius: 4px; font-size: 12px; }

@media (max-width: 1280px) {
  .cols { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) {
  .cols, .cols3 { grid-template-columns: 1fr; }
  .grid4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .top .in { padding: 0 16px; gap: 12px; height: auto; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
  .top .status { display: none; }
  main { padding: 20px 16px 48px; }
  .grid4 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .kpi .big { font-size: 36px; }
  h1 { font-size: 30px; }
  .fields { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  /* Phone: each project becomes a block instead of a 6-column row. */
  table.feed, table.feed tbody, table.feed tr, table.feed td { display: block; width: auto; }
  table.feed colgroup, table.feed thead { display: none; }
  table.feed tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  table.feed td { padding: 2px 0; border: 0; text-align: left !important; }
  table.feed .m-label { display: inline; }
  .m-only, .filters .m-only { display: inline-flex; }
  table.feed td.due .sub { display: inline; margin-left: 6px; }
}

/* Contacts: who to call */
.status-pill.known { color: #0b6b3a; }
td .sub.call { color: var(--ink); margin-top: 4px; }
.lookups { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; font-size: 14px; }
.linkbtn { all: unset; cursor: pointer; color: var(--muted); text-decoration: underline; margin-left: 6px; }
td .sub.call a { white-space: nowrap; }

.rawtable { margin-top: 8px; font-size: 12px; }
.rawtable td { padding: 4px 6px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.rawtable td:first-child { width: 38%; }
