/* ═════════════════════════════════════════════════════════════════════════
   OPPORTUNITY INTELLIGENCE - GO / NO-GO

   The list is the board's vocabulary (ws-*, op-*) with one new thing on
   every row: a meter from 0 to 100 with the two thresholds drawn on it, so
   a score reads as a position, not a number. The card in the drawer is the
   same meter, bigger, moving as you click.

   Only new selectors here, all prefixed gng-. Nothing in ws-* or op-* is
   restyled. Every colour has a light-theme pass at the bottom.
   ═════════════════════════════════════════════════════════════════════════ */

/* ── The bar above the strip ─────────────────────────────────────────── */
.gng-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
    margin-bottom: 16px;
}
.gng-bar-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.gng-bar-t b { font-size: 15px; font-weight: 800; letter-spacing: -.015em; color: var(--white); }
.gng-bar-t span { font-size: 12px; color: var(--gray-light); }
.gng-strip .ws-kpi.is-on { border-color: rgba(196,23,23,.5); box-shadow: inset 0 0 0 1px rgba(196,23,23,.35); }

/* ── The list ────────────────────────────────────────────────────────── */
.gng-list { display: flex; flex-direction: column; gap: 9px; }
.gng-list-h {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 2px 4px 4px; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--gray-light);
}
.gng-row {
    position: relative; overflow: hidden; cursor: pointer; font: inherit; text-align: left; color: inherit;
    display: flex; flex-direction: column; gap: 6px;
    padding: 13px 16px 12px; border-radius: 14px;
    border: 1px solid var(--border); border-left: 3px solid rgba(255,255,255,.14);
    background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
    transition: transform .16s var(--ease-out, ease), border-color .16s ease, background .16s ease;
}
.gng-row:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.06); }
.gng-row.is-warn { border-left-color: #e0a03b; }
.gng-row.is-bad { border-left-color: #ff6b6b; }
.gng-row.is-stop { border-left-color: var(--red); box-shadow: -6px 0 18px -10px rgba(196,23,23,.8); }
.gng-row.is-needs:not(.is-warn):not(.is-bad):not(.is-stop) { border-left-style: dashed; }
.gng-row-m { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 10.5px; color: var(--gray-light); }
.gng-agency { max-width: 34ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gng-row h4 { margin: 0; font-size: 14px; font-weight: 700; line-height: 1.35; letter-spacing: -.01em; color: var(--white); }
.gng-row-s { display: grid; grid-template-columns: auto minmax(120px, 1fr) auto auto; align-items: center; gap: 12px; margin-top: 4px; }
.gng-score { display: flex; align-items: center; gap: 8px; }
.gng-score b { font-size: 22px; font-weight: 850; letter-spacing: -.03em; line-height: 1; color: var(--white); font-variant-numeric: tabular-nums; min-width: 34px; }
.gng-row-by { font-size: 10.5px; color: var(--gray-light); white-space: nowrap; }
.gng-row .ws-card-f { margin-top: 4px; }

/* ── The meter: a score is a position between two lines ─────────────── */
.gng-meter { position: relative; height: 8px; border-radius: 100px; background: rgba(255,255,255,.08); overflow: visible; }
.gng-meter-f { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 100px; background: rgba(255,255,255,.35); transition: width .25s var(--ease-out, ease); }
.gng-meter.is-go .gng-meter-f { background: linear-gradient(90deg, rgba(47,192,125,.45), #2fc07d); }
.gng-meter.is-discuss .gng-meter-f { background: linear-gradient(90deg, rgba(224,160,59,.45), #e0a03b); }
.gng-meter.is-no_go .gng-meter-f { background: linear-gradient(90deg, rgba(255,107,107,.4), #ff6b6b); }
.gng-meter-m { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: rgba(255,255,255,.28); border-radius: 2px; }

/* ── The pills the board does not have ──────────────────────────────── */
.gng-pill.is-discuss { background: rgba(224,160,59,.16); color: #e0a03b; }
.gng-pill.is-no_go { text-decoration: none; background: rgba(255,107,107,.14); color: #ff8f8f; }

/* ── The card (drawer) ───────────────────────────────────────────────── */
.gng-gauge {
    display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center;
    margin: 18px 24px 0; padding: 16px 18px; border-radius: 16px;
    border: 1px solid var(--border); background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.012));
}
.gng-gauge::before { content: ""; position: absolute; }
.gng-gauge-n { display: flex; flex-direction: column; align-items: center; min-width: 76px; }
.gng-gauge-n b { font-size: 44px; font-weight: 850; letter-spacing: -.04em; line-height: 1; color: var(--white); font-variant-numeric: tabular-nums; }
.gng-gauge-n i { font-style: normal; font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--gray-light); margin-top: 4px; }
.gng-gauge.is-go .gng-gauge-n b { color: #2fc07d; }
.gng-gauge.is-discuss .gng-gauge-n b { color: #e0a03b; }
.gng-gauge.is-no_go .gng-gauge-n b { color: #ff8f8f; }
.gng-gauge-b { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.gng-gauge-r { display: flex; align-items: center; gap: 8px; }
.gng-gauge-b .gng-meter { height: 10px; }
.gng-gauge-s { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 10.5px; color: var(--gray-light); }
.gng-unsaved { font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #6ba6ff; }
.gng-evs { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 24px 0; }
.gng-ev { cursor: help; }
.gng-acts { padding-top: 14px; }
.gng-err { margin: 10px 24px 0; }
.gng-disagree { display: block; margin-top: 8px; }

.gng-sec { padding: 20px 24px 0; }
.gng-sec > h4 {
    display: flex; align-items: center; gap: 9px; margin: 0 0 10px;
    font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; color: var(--white);
}
.gng-sec > h4::before { content: ""; width: 14px; height: 2px; border-radius: 100px; background: var(--red); }
.gng-fine { margin: 0 0 12px; font-size: 11.5px; line-height: 1.6; color: var(--gray-light); }

.gng-crits { display: flex; flex-direction: column; gap: 8px; }
.gng-crit {
    padding: 11px 13px 10px; border-radius: 12px;
    border: 1px solid var(--border); background: rgba(255,255,255,.035);
}
.gng-crit.is-unscored { border-style: dashed; }
.gng-crit-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.gng-crit-h b { flex: 1; font-size: 13px; font-weight: 700; color: var(--white); }
.gng-w { font-family: var(--font-mono); font-size: 10px; padding: 1px 7px; border-radius: 100px; background: rgba(255,255,255,.08); color: var(--gray-light); }
.gng-scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.gng-s {
    font: inherit; font-size: 13px; font-weight: 750; cursor: pointer; padding: 8px 0; border-radius: 9px;
    border: 1px solid var(--border); background: rgba(255,255,255,.04); color: var(--gray-light);
    font-variant-numeric: tabular-nums; transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.gng-s:hover { color: var(--white); border-color: rgba(255,255,255,.25); }
.gng-s.is-under { background: rgba(255,255,255,.07); }
.gng-s.is-on { background: var(--red); border-color: var(--red); color: #fff; }
.gng-crit-ev { margin-top: 9px; }
.gng-crit-ev .ws-flag.is-ok::before { background: #2fc07d; }
.gng-crit-ev .ws-flag.is-good::before { background: #2fc07d; }
.gng-help { margin-top: 6px; font-size: 11px; line-height: 1.5; color: var(--gray-light); opacity: .8; }
.gng-note { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.gng-note > span { font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--gray-light); }
.gng-note textarea, .gng-ed textarea, .gng-ed input, .gng-ed select, .gng-ed-limits input {
    font: inherit; font-size: 12.5px; padding: 8px 11px; border-radius: 10px; resize: vertical;
    background: rgba(255,255,255,.05); border: 1px solid var(--border); color: var(--white);
}
.gng-note textarea:focus, .gng-ed textarea:focus, .gng-ed input:focus, .gng-ed select:focus, .gng-ed-limits input:focus {
    outline: none; border-color: rgba(196,23,23,.6); box-shadow: 0 0 0 3px rgba(196,23,23,.15);
}

.gng-reason { display: flex; flex-direction: column; }
.gng-reason-l {
    position: relative; padding: 8px 0 8px 15px; border-top: 1px solid var(--border);
    font-size: 12.5px; line-height: 1.55; color: var(--white);
}
.gng-reason-l:first-child { border-top: 0; }
.gng-reason-l::before { content: ""; position: absolute; left: 0; top: 14px; width: 6px; height: 6px; border-radius: 100px; background: rgba(255,255,255,.3); }
.gng-reason-l.is-good::before { background: #2fc07d; }
.gng-reason-l.is-warn::before { background: #e0a03b; }
.gng-reason-l.is-bad::before { background: var(--red); box-shadow: 0 0 0 3px rgba(196,23,23,.25); }
.gng-reason-l.is-warn, .gng-reason-l.is-none { color: var(--gray-light); }

.gng-stored-r { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--gray-light); }
.gng-stored-r b { font-size: 20px; font-weight: 850; letter-spacing: -.03em; color: var(--white); font-variant-numeric: tabular-nums; }
.gng-stored .op-notes { margin: 10px 0 0; }
.gng-hist-t { font: inherit; background: none; border: 0; padding: 0; cursor: pointer; color: inherit; font-size: inherit; font-weight: inherit; letter-spacing: inherit; text-transform: inherit; }
.gng-hist-t:hover { color: #ff8f6b; }
.gng-hist { display: flex; flex-direction: column; }
.gng-hist-r { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--border); font-size: 12px; color: var(--gray-light); }
.gng-hist-r:first-child { border-top: 0; }
.gng-hist-r b { font-size: 15px; font-weight: 800; color: var(--white); font-variant-numeric: tabular-nums; }
.gng-hist-r i { flex-basis: 100%; font-style: normal; line-height: 1.5; }
.gng-hist-r em { font-style: normal; font-family: var(--font-mono); font-size: 10.5px; }
.gng-hist-r .sr-act { margin-left: auto; }

/* ── The editor ──────────────────────────────────────────────────────── */
.gng-ed-limits { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 8px; }
.gng-ed-limits label { display: flex; flex-direction: column; gap: 4px; }
.gng-ed-limits label > span { font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--gray-light); }
.gng-ed { display: flex; flex-direction: column; gap: 8px; }
.gng-ed-row { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: rgba(255,255,255,.035); }
.gng-ed-row.is-off { opacity: .6; }
.gng-ed-top { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 8px; }
.gng-ed-on { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--gray-light); white-space: nowrap; }
.gng-ed-on input { accent-color: var(--red); }

/* ── Light theme ─────────────────────────────────────────────────────── */
html.light .gng-bar-t b, html.light .gng-row h4, html.light .gng-score b, html.light .gng-gauge-n b,
html.light .gng-crit-h b, html.light .gng-reason-l, html.light .gng-stored-r b, html.light .gng-hist-r b,
html.light .gng-sec > h4 { color: var(--black); }
html.light .gng-bar-t span, html.light .gng-list-h, html.light .gng-row-m, html.light .gng-row-by, html.light .gng-gauge-n i,
html.light .gng-gauge-s, html.light .gng-fine, html.light .gng-w, html.light .gng-help, html.light .gng-note > span,
html.light .gng-reason-l.is-warn, html.light .gng-reason-l.is-none, html.light .gng-stored-r, html.light .gng-hist-r,
html.light .gng-ed-limits label > span, html.light .gng-ed-on { color: var(--gray-mid); }
html.light .gng-strip .ws-kpi.is-on { border-color: rgba(196,23,23,.45); box-shadow: inset 0 0 0 1px rgba(196,23,23,.25); }
html.light .gng-row { background: #fafbfc; border-color: rgba(0,0,0,.09); border-left-color: rgba(0,0,0,.18); }
html.light .gng-row:hover { background: #fff; border-color: rgba(0,0,0,.2); }
html.light .gng-row.is-warn { border-left-color: #a8690f; }
html.light .gng-row.is-bad, html.light .gng-row.is-stop { border-left-color: #c41717; }
html.light .gng-meter { background: rgba(0,0,0,.08); }
html.light .gng-meter-f { background: rgba(0,0,0,.3); }
html.light .gng-meter.is-go .gng-meter-f { background: linear-gradient(90deg, rgba(15,122,75,.4), #0f7a4b); }
html.light .gng-meter.is-discuss .gng-meter-f { background: linear-gradient(90deg, rgba(168,105,15,.4), #a8690f); }
html.light .gng-meter.is-no_go .gng-meter-f { background: linear-gradient(90deg, rgba(196,23,23,.35), #c41717); }
html.light .gng-meter-m { background: rgba(0,0,0,.25); }
html.light .gng-pill.is-discuss { background: rgba(168,105,15,.12); color: #a8690f; }
html.light .gng-pill.is-no_go { background: rgba(196,23,23,.1); color: #c41717; }
html.light .gng-gauge { background: #fff; border-color: rgba(0,0,0,.1); }
html.light .gng-gauge.is-go .gng-gauge-n b { color: #0f7a4b; }
html.light .gng-gauge.is-discuss .gng-gauge-n b { color: #a8690f; }
html.light .gng-gauge.is-no_go .gng-gauge-n b { color: #c41717; }
html.light .gng-unsaved { color: #2b5fb8; }
html.light .gng-crit, html.light .gng-ed-row { background: #f6f7f9; border-color: rgba(0,0,0,.09); }
html.light .gng-w { background: rgba(0,0,0,.06); }
html.light .gng-s { background: #fff; border-color: rgba(0,0,0,.13); color: var(--gray-mid); }
html.light .gng-s:hover { color: var(--black); border-color: rgba(0,0,0,.3); }
html.light .gng-s.is-under { background: rgba(0,0,0,.05); }
html.light .gng-s.is-on { background: #c41717; border-color: #c41717; color: #fff; }
html.light .gng-crit-ev .ws-flag.is-ok::before, html.light .gng-crit-ev .ws-flag.is-good::before, html.light .gng-reason-l.is-good::before { background: #0f7a4b; }
html.light .gng-reason-l::before { background: rgba(0,0,0,.25); }
html.light .gng-reason-l.is-warn::before { background: #a8690f; }
html.light .gng-reason-l.is-bad::before { background: #c41717; box-shadow: 0 0 0 3px rgba(196,23,23,.15); }
html.light .gng-reason-l, html.light .gng-hist-r { border-top-color: rgba(0,0,0,.08); }
html.light .gng-note textarea, html.light .gng-ed textarea, html.light .gng-ed input, html.light .gng-ed select, html.light .gng-ed-limits input {
    background: #fff; border-color: rgba(0,0,0,.13); color: var(--black);
}
html.light .gng-hist-t:hover { color: #c2410c; }

@media (max-width: 620px) {
    .gng-row-s { grid-template-columns: 1fr; gap: 8px; }
    .gng-gauge { grid-template-columns: 1fr; }
    .gng-ed-limits { grid-template-columns: 1fr; }
    .gng-ed-top { grid-template-columns: 1fr 1fr; }
}
