/* The networking tracker (assets/yfj-network.js), the section #network on the account
   page. Rows reuse the document list's .cvl / .cvr look (yfj-docs.css). */
.nw-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 14px; }
.nw-tile { text-align: left; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; background: #fff; display: flex; flex-direction: column; gap: 2px; }
.nw-tile b { font-size: 26px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.nw-tile span { font-size: 13px; color: var(--slate); }
.nw-tile:hover { border-color: var(--slate); }
.nw-tile.hot { border-color: var(--green); background: var(--tint); }
.nw-tile.hot b { color: var(--forest); }
.nw-hint { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14px; padding: 10px 14px; border-radius: 12px; background: var(--mist); margin: 0 0 14px; }
.nw-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }
.nw-bar .seg { display: inline-flex; background: var(--mist); border-radius: 999px; padding: 3px; }
.nw-bar .seg button { padding: 7px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--slate); }
.nw-bar .seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(11,11,12,.12); }
.nw-bar .nw-q { flex: 1; min-width: 180px; height: 38px; font-size: 14.5px; }
.nw-bar .nw-stage { width: 170px; height: 38px; font-size: 14.5px; }
.nw-row .t a { color: inherit; }
.nw-row .t a:hover { text-decoration: underline; }
.nw-row .a { align-items: center; }
.nw-row .nw-st { height: 34px; font-size: 13.5px; padding: 0 30px 0 10px; width: auto; }
.nw-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.nw-tag { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--mist); color: var(--slate); }
.nw-tag.hot { background: var(--tint); color: var(--forest); }
.nw-tag.warn { background: #fff4e5; color: #8a5300; }
.nw-row.open { background: #fcfcfd; }
.nw-note { font-size: 13px; color: var(--ink); background: #fffbea; border-left: 3px solid #f2d36b; padding: 4px 8px; border-radius: 4px; margin-top: 6px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nw-detail { flex-basis: 100%; border-top: 1px dashed var(--line); padding-top: 14px; margin-top: 4px; }
.nw-detail label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.nw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.nw-grid3 { display: grid; grid-template-columns: 170px 1fr 190px; gap: 8px; margin-top: 6px; }
.nw-notes { margin-top: 10px; }
.nw-notes textarea { min-height: 64px; font: inherit; font-size: 14.5px; padding: 10px 12px; }
.nw-log { margin-top: 16px; }
.nw-chats { margin-top: 14px; }
.nw-chat { display: grid; grid-template-columns: 110px 1fr; gap: 10px; font-size: 14px; padding: 6px 0; border-top: 1px solid var(--line); }
.nw-chat span:first-child { color: var(--slate); }
.nw-src { margin-top: 12px; font-size: 13px; color: var(--slate); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nw-none { padding: 22px 18px; color: var(--slate); font-size: 14px; }
.nw-more { display: flex; justify-content: center; margin: 12px 0 0; }
.nw-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.nw-foot .sp { flex: 1; }
.nw-panel { position: relative; margin-top: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; background: #fff; }
.nw-panel .pfh { margin-bottom: 4px; }
.nw-panel .help { margin: 0 0 12px; }
.nw-x { position: absolute; top: 10px; right: 12px; width: 30px; height: 30px; border-radius: 8px; font-size: 20px; color: var(--slate); }
.nw-x:hover { background: var(--mist); color: var(--ink); }
.nw-cal { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.nw-feed { font-size: 12.5px; height: 36px; }
.nw-empty .opt span { font-size: 13.5px; }
@media (max-width: 760px) {
  .nw-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nw-grid, .nw-grid3 { grid-template-columns: 1fr; }
  .nw-bar .nw-stage { width: 100%; }
}

/* ---- the pipeline: the Overview board's look, one column per stage ---- */
.nw-view { margin-right: 4px; }
.nw-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(190px, 1fr); gap: 10px; overflow-x: auto; overscroll-behavior-x: contain; padding: 2px 2px 16px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.nw-col { display: flex; flex-direction: column; min-width: 0; background: var(--mist); border: 1px solid transparent; border-radius: 14px; scroll-snap-align: start; transition: border-color .16s, background .16s; }
.nw-col.over { border-color: var(--green); background: var(--tint); }
.nw-col-h { display: flex; align-items: center; gap: 8px; padding: 12px 12px 8px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--slate); min-width: 0; }
.nw-col-h .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.nw-col-h .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nw-col-h .n { margin-left: auto; font-variant-numeric: tabular-nums; background: #fff; border-radius: 999px; padding: 3px 8px; line-height: 1.3; letter-spacing: 0; flex: none; }
.nw-col.over .nw-col-h { color: var(--forest); }
.nw-col-b { display: flex; flex-direction: column; gap: 8px; padding: 0 8px 8px; min-height: 140px; flex: 1; }
.nw-col .slot { height: 0; opacity: 0; box-sizing: border-box; border: 1.5px dashed var(--green); border-radius: 12px; background: rgba(255,255,255,.55); margin-bottom: -8px; transition: height .16s, opacity .16s, margin .16s; }
.nw-col.over .slot { height: 54px; opacity: 1; margin-bottom: 0; }
.nw-col .empty { color: #9aa0a8; font-size: 12.5px; text-align: center; padding: 20px 8px; border: 1px dashed var(--line); border-radius: 12px; }
.nw-col.over .empty { display: none; }
.nw-card { display: flex; flex-direction: column; gap: 3px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px; cursor: grab; user-select: none; -webkit-user-select: none; transition: box-shadow .16s, border-color .16s, opacity .16s; }
.nw-card:hover { border-color: #cfd3d8; box-shadow: 0 4px 14px rgba(11,11,12,.06); }
.nw-card:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.nw-card.dragging { opacity: .35; border-style: dashed; box-shadow: none; }
.nw-card.landed { animation: nwland .6s; }
@keyframes nwland { 0% { box-shadow: 0 0 0 0 rgba(13,145,99,.4); border-color: var(--green); } 100% { box-shadow: 0 0 0 10px rgba(13,145,99,0); } }
.nw-card b { font-size: 14px; font-weight: 600; }
.nw-card .co { font-size: 12.5px; color: var(--slate); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nw-card .nw-tags { margin-top: 2px; }
.nw-card .nw-note { margin-top: 4px; font-size: 12px; }
.nw-colmore { align-self: center; font-size: 12.5px; }

/* ---- import: the drop zone ---- */
.nw-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 30px 20px; border: 2px dashed #cfd6dc; border-radius: 16px; background: #fafbfc; cursor: pointer; transition: border-color .15s, background .15s; }
.nw-drop:hover, .nw-drop:focus-visible { border-color: var(--green); outline: none; }
.nw-drop.over { border-color: var(--green); background: var(--tint); }
.nw-drop.busy { cursor: default; border-style: solid; border-color: var(--green); background: #f3fcf8; }
.nw-drop.bad { border-color: #e7b3ad; background: #fff7f6; }
.nw-drop .ic { width: 44px; height: 44px; border-radius: 12px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; color: var(--forest); margin-bottom: 4px; }
.nw-drop .ic svg { width: 22px; height: 22px; }
.nw-drop b { font-size: 16px; }
.nw-drop .or { font-size: 14px; color: var(--slate); }
.nw-drop .or u { color: var(--forest); text-decoration-color: rgba(10,107,72,.4); text-underline-offset: 3px; }
.nw-drop small { font-size: 12.5px; color: #8a8f96; }
.nw-bar-p { width: min(320px, 90%); height: 6px; border-radius: 999px; background: #dfe9e4; overflow: hidden; margin-top: 6px; }
.nw-bar-p i { display: block; height: 100%; width: 0; background: var(--green); border-radius: 999px; transition: width .3s; }
#networkRoot.nw-filedrop { outline: 2px dashed var(--green); outline-offset: 6px; border-radius: 12px; }
.nw-empty h3 { font-size: 18px; font-weight: 600; margin: 0 0 4px; }
.nw-empty > .help { margin: 0 0 14px; max-width: 640px; }
.nw-empty-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.nw-empty-foot details { flex: 1; min-width: 240px; font-size: 14px; }
.nw-empty-foot summary { cursor: pointer; color: var(--forest); font-weight: 600; }
.nw-empty-foot details p { color: var(--slate); margin: 8px 0 0; }
.nw-rm { width: 30px; height: 30px; border-radius: 8px; font-size: 18px; line-height: 1; color: #9aa0a8; flex: none; }
.nw-rm:hover { background: #fdecea; color: var(--danger, #b42318); }
.nw-pick { border: 2px solid var(--green); border-radius: 16px; padding: 18px 20px; background: #f3fcf8; }
.nw-pick > b { font-size: 15.5px; display: block; margin-bottom: 10px; }
.nw-opts { display: grid; gap: 6px; }
.nw-opt { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; font-size: 14.5px; }
.nw-opt:has(input:checked) { border-color: var(--green); box-shadow: 0 0 0 3px var(--tint); }
.nw-opt input { accent-color: var(--green); }
.nw-opt span { flex: 1; }
.nw-opt em { font-style: normal; font-variant-numeric: tabular-nums; color: var(--slate); font-size: 13.5px; }
.nw-words { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 600; margin-top: 12px; }
.nw-words .input { height: 40px; font-weight: 400; }
.nw-pick .savebar { border-top: 0; padding-top: 12px; }
.nw-pick .help { margin: 6px 0 0; font-size: 12.5px; }

/* ---- the list as a table: a column per fact, sortable headers ---- */
.nw-table { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.nw-tr { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.2fr) 132px minmax(0, 1.3fr) 92px 92px 128px; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); }
.nw-tr:first-child { border-top: 0; }
.nw-th { background: #fafbfc; padding-top: 8px; padding-bottom: 8px; position: sticky; top: var(--header-h, 64px); z-index: 2; }
.nw-sort { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--slate); text-align: left; padding: 4px 0; }
.nw-sort:hover { color: var(--ink); }
.nw-sort.on { color: var(--forest); }
.nw-td { min-width: 0; font-size: 14px; }
.nw-who { display: flex; flex-direction: column; gap: 2px; }
.nw-who b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nw-who b a { color: inherit; }
.nw-who b a:hover { text-decoration: underline; }
.nw-who > span:not(.nw-note) { font-size: 12.5px; color: var(--slate); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nw-who .nw-note { margin-top: 3px; }
.nw-firm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nw-tr .nw-st { width: 100%; height: 32px; font-size: 13px; padding: 0 26px 0 8px; }
.nw-status { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 8px; }
.nw-status .btn.link { font-size: 12.5px; padding: 0; height: auto; }
.nw-date { font-size: 13px; color: var(--slate); font-variant-numeric: tabular-nums; }
.nw-acts { display: flex; justify-content: flex-end; gap: 2px; }
.nw-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--slate); flex: none; }
.nw-ic:hover { background: var(--mist); color: var(--ink); }
.nw-ic[data-act="ask"] { color: var(--green); }
.nw-ic[data-act="ask"]:hover { background: var(--tint); color: var(--forest); }
.nw-ic svg { width: 15px; height: 15px; }
.nw-ic.nw-rm { font-size: 18px; }
.nw-tr.open { background: #fcfcfd; }
.nw-tr .nw-detail { grid-column: 1 / -1; }
.nw-table .nw-none { padding: 22px 18px; }
.nw-ask { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--forest); }
.nw-ask svg { width: 14px; height: 14px; color: var(--green); }
@media (max-width: 900px) {
  .nw-th { display: none; }
  .nw-tr { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who acts" "firm firm" "stage status"; row-gap: 6px; }
  .nw-who { grid-area: who; } .nw-firm { grid-area: firm; font-size: 13px; color: var(--slate); }
  .nw-tr > .nw-td:nth-child(3) { grid-area: stage; } .nw-status { grid-area: status; } .nw-acts { grid-area: acts; }
  .nw-date { display: none; }
}

/* ---- the "who should we add" pop-up ---- */
html.nw-modal-open { overflow: hidden; }
.nw-modal { position: fixed; inset: 0; z-index: 120; background: rgba(11,11,12,.42); display: grid; place-items: center; padding: 16px; animation: nwfade .15s; }
@keyframes nwfade { from { opacity: 0; } to { opacity: 1; } }
.nw-dialog { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: #fff; border-radius: 18px; padding: 22px 22px 18px; box-shadow: 0 30px 80px rgba(11,11,12,.3); }
.nw-dialog h3 { font-size: 20px; font-weight: 600; margin: 0 0 4px; }
.nw-dialog > .help { margin: 0 0 14px; }
.nw-dialog .nw-keep { margin: 10px 0 0; font-size: 12.5px; }
.nw-dfoot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }

/* ---- actions at the top, and full screen ---- */
.nw-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 16px; }
.nw-top .sp { flex: 1; }
.nw-top .btn svg { width: 14px; height: 14px; }
.nw-top .btn[data-go="full"] { display: inline-flex; align-items: center; gap: 6px; }
.nw-top .nw-ask { margin-left: 0; }
.nw-top + .nw-panel { margin: -4px 0 16px; }
html.nw-full-open { overflow: hidden; }
#networkRoot.nw-full { position: fixed; top: var(--header-h, 64px); left: 0; right: 0; bottom: 0; z-index: 60; background: #fff; overflow: auto; padding: 18px max(20px, calc((100% - 1480px) / 2)) 120px; }
.nw-full .nw-th { top: 0; }
.nw-full .nw-tr { grid-template-columns: minmax(0, 1.8fr) minmax(0, 1.3fr) 150px minmax(0, 1.3fr) 110px 110px 132px; }
.nw-full .nw-board { grid-auto-columns: minmax(210px, 1fr); }
