/* ===================================================================
   PearGRN — shared design system for the Network Tools pages
   (Network Creation / Network Comparison)
   =================================================================== */

:root {
    --nt-ink: #23303d;
    --nt-body: #4a5762;
    --nt-muted: #6b7a8c;
    --nt-line: #e4e9ef;
    --nt-soft: #f7f9fb;
    --nt-accent: #2E6F9E;
    --nt-accent-soft: #eef5fa;
    --nt-green: #2f7a4e;
    --nt-green-soft: #eef7f1;
    --nt-amber: #b4652a;
    --nt-amber-soft: #fdf1e8;
    --nt-purple: #6b4ec2;
    --nt-purple-soft: #f1eefb;
}

body.my-body { background: var(--nt-soft); }

.nt-page { max-width: 1060px; padding: 34px 16px 56px; }
.nt-page-wide { max-width: 1340px; padding: 26px 16px 56px; }

/* ---------------- page heading ---------------- */
.nt-eyebrow {
    font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
    font-weight: 700; color: var(--nt-green); margin-bottom: 8px;
}
.nt-title {
    font-size: 2rem; font-weight: 800; letter-spacing: -.02em;
    color: var(--nt-ink); margin: 0; line-height: 1.15;
}
.nt-title .thin { font-weight: 500; color: var(--nt-muted); }
.nt-lede {
    font-size: .92rem; color: var(--nt-muted); line-height: 1.7;
    margin: 10px 0 24px;
}

/* ---------------- cards ---------------- */
.nt-card {
    background: #fff;
    border: 1px solid var(--nt-line);
    border-radius: 14px;
    padding: 22px 24px 20px;
    box-shadow: 0 1px 3px rgba(30, 45, 60, .05);
    margin-bottom: 20px;
}
.nt-card-head {
    display: flex; align-items: center; gap: 12px;
    flex-wrap: wrap; margin-bottom: 16px;
}
.nt-card-title {
    font-size: 1.05rem; font-weight: 700; color: var(--nt-ink);
    margin: 0; letter-spacing: -.01em;
}
.nt-card-sub { font-size: .82rem; color: var(--nt-muted); }
.nt-spacer { flex: 1 1 auto; }

/* ---------------- form controls ---------------- */
.nt-label {
    display: block;
    font-size: .72rem; font-weight: 700; letter-spacing: .12em;
    text-transform: uppercase; color: var(--nt-muted);
    margin-bottom: 8px;
}
.nt-label .hint {
    font-weight: 500; letter-spacing: 0; text-transform: none;
    color: #98a4b0; font-size: .74rem; margin-left: 6px;
}

.nt-select,
.nt-textarea {
    width: 100%;
    border: 1px solid var(--nt-line);
    border-radius: 10px;
    padding: 10px 13px;
    font-size: .88rem;
    color: var(--nt-ink);
    background: #fcfdfe;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.nt-textarea {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .84rem; line-height: 1.7;
    min-height: 132px; resize: vertical;
}
.nt-textarea.short { min-height: 84px; }
.nt-select:focus,
.nt-textarea:focus {
    outline: none;
    border-color: #a9c9e0; background: #fff;
    box-shadow: 0 0 0 3px rgba(46, 111, 158, .12);
}
.nt-textarea::placeholder { color: #a9b4c0; }

/* single-line ID field (TF Regulation & friends) */
.nt-input {
    width: 100%;
    border: 1px solid var(--nt-line);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: .95rem;
    color: var(--nt-ink);
    background: #fcfdfe;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.nt-input:focus {
    outline: none;
    border-color: #a9c9e0; background: #fff;
    box-shadow: 0 0 0 3px rgba(46, 111, 158, .12);
}
.nt-input::placeholder { color: #a9b4c0; }

/* the ID currently being queried, shown inside headings */
.nt-q {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .84rem; font-weight: 700; color: var(--nt-accent);
    background: var(--nt-accent-soft); border: 1px solid #cfe2f0;
    border-radius: 7px; padding: 1px 8px;
}

/* amber notice strip (truncated result sets etc.) */
.nt-note {
    font-size: .78rem; line-height: 1.65; color: var(--nt-amber);
    background: var(--nt-amber-soft); border: 1px solid #f2d9c4;
    border-radius: 10px; padding: 9px 13px; margin-bottom: 14px;
}
.nt-note .btn-link {
    color: var(--nt-amber); font-weight: 700; font-size: .78rem;
    text-decoration: underline; padding: 0; vertical-align: baseline;
}
.nt-inline-form { display: inline; }

.nt-row { display: grid; gap: 18px; }
.nt-row.two { grid-template-columns: 1fr 1fr; }
.nt-row.main { grid-template-columns: 1fr 300px; }
@media (max-width: 860px) {
    .nt-row.two, .nt-row.main { grid-template-columns: 1fr; }
}

.nt-hint { font-size: .78rem; color: #93a0ad; margin-top: 8px; line-height: 1.6; }

/* group accent (comparison) */
.nt-group { border-top: 3px solid var(--nt-line); padding-top: 14px; }
.nt-group.g1 { border-top-color: #7fb2d6; }
.nt-group.g2 { border-top-color: #e0b184; }
.nt-group .dot {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%;
    margin-right: 7px; vertical-align: middle;
}
.nt-group.g1 .dot { background: #7fb2d6; }
.nt-group.g2 .dot { background: #e0b184; }

/* ---------------- buttons ---------------- */
.nt-actions {
    display: flex; align-items: center; gap: 10px;
    flex-wrap: wrap; margin-top: 20px;
}
.nt-actions .spacer { flex: 1 1 auto; }
.nt-actions .btn {
    border-radius: 10px; font-weight: 600; font-size: .9rem;
    padding: 9px 20px;
}
.nt-actions .btn-success { padding: 9px 26px; }
.nt-actions .btn-outline-secondary,
.nt-actions .btn-outline-success { border-color: var(--nt-line); color: var(--nt-body); }
.nt-actions .btn-outline-success { color: var(--nt-green); border-color: #cfe7d8; }
.nt-actions .btn-outline-success:hover { background: var(--nt-green-soft); color: var(--nt-green); border-color: #b8dcc6; }

/* ---------------- example chips ---------------- */
.nt-examples {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--nt-line);
}
.nt-examples .lead-in {
    font-size: .72rem; font-weight: 700; letter-spacing: .12em;
    text-transform: uppercase; color: var(--nt-muted); margin-right: 4px;
}
.nt-chip {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .78rem; padding: 4px 11px; border-radius: 999px;
    border: 1px solid var(--nt-line); background: #fff; color: var(--nt-body);
    cursor: pointer; transition: all .16s ease;
}
.nt-chip:hover { border-color: #c3d6e5; background: var(--nt-accent-soft); color: var(--nt-accent); }
.nt-chip .cnt { margin-left: 6px; font-size: .7rem; color: #98a4b0; }
.nt-chip:hover .cnt { color: inherit; opacity: .75; }
.nt-chip.lnc:hover  { border-color: #ded4f5; background: var(--nt-purple-soft); color: var(--nt-purple); }
.nt-chip.circ:hover { border-color: #f2d9c4; background: var(--nt-amber-soft); color: var(--nt-amber); }
.nt-chip.mi:hover   { border-color: #cfe7d8; background: var(--nt-green-soft); color: var(--nt-green); }
.nt-fill {
    font-size: .78rem; padding: 4px 11px; border-radius: 999px;
    border: 1px dashed #c3d6e5; background: #fff; color: var(--nt-accent);
    cursor: pointer; transition: all .16s ease;
}
.nt-fill:hover { background: var(--nt-accent-soft); border-style: solid; }

/* live counter pills */
.nt-count { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; min-height: 22px; }
.nt-count .tot { font-size: .78rem; color: var(--nt-muted); margin-right: 2px; }
.nt-pill {
    font-size: .72rem; font-weight: 600; padding: 2px 9px;
    border-radius: 999px; border: 1px solid transparent;
    /* The margin reset is load-bearing, not tidiness. Bootstrap ships an
       `.alert` rule of its own (`margin-bottom: var(--bs-alert-margin-bottom)`,
       i.e. 1rem), and `.nt-pill.alert` is matched by it. Padding and
       border-radius survive that collision because `.nt-pill` declares both
       and nettools.css loads after bootstrap.min.css — but margin had no
       competitor, so the pill's margin box came out 16px taller than the
       others. `align-items: center` then centred the remaining pills inside
       that taller line box while the alert pill sat at the top, which is the
       8px vertical stagger you could see in the counter strip. Stating the
       reset here fixes every variant at once, including any name a future
       framework happens to share. */
    margin: 0;
}
.nt-pill.gene { background: #eef5fa; color: #2E6F9E; border-color: #cfe2f0; }
.nt-pill.lnc  { background: #f1eefb; color: #6b4ec2; border-color: #ded4f5; }
.nt-pill.circ { background: #fdf1e8; color: #b4652a; border-color: #f2d9c4; }
.nt-pill.mi   { background: #eef7f1; color: #2f7a4e; border-color: #cfe7d8; }
.nt-pill.alert { background: #fdecec; color: #a83232; border-color: #f2b8b8; }

/* ---------------- stat strip ---------------- */
.nt-stats {
    display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px;
}
.nt-stat {
    background: #fff; border: 1px solid var(--nt-line);
    border-radius: 12px; padding: 12px 18px; min-width: 132px;
    box-shadow: 0 1px 3px rgba(30, 45, 60, .04);
}
.nt-stat .k {
    font-size: .68rem; font-weight: 700; letter-spacing: .12em;
    text-transform: uppercase; color: var(--nt-muted); margin-bottom: 4px;
}
.nt-stat .v {
    font-size: 1.32rem; font-weight: 800; color: var(--nt-ink);
    line-height: 1.1; letter-spacing: -.02em;
}
.nt-stat .v .unit { font-size: .78rem; font-weight: 600; color: var(--nt-muted); margin-left: 3px; }
.nt-stat.is-accent { border-color: #cfe2f0; background: linear-gradient(180deg, #fff, var(--nt-accent-soft)); }
.nt-stat.is-green  { border-color: #cfe7d8; background: linear-gradient(180deg, #fff, var(--nt-green-soft)); }
.nt-stat.is-amber  { border-color: #f2d9c4; background: linear-gradient(180deg, #fff, var(--nt-amber-soft)); }

/* ---------------- network canvas ---------------- */
.nt-canvas-wrap {
    position: relative;
    border: 1px solid var(--nt-line);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}
#cy { width: 100%; height: 520px; display: block; }
@media (max-width: 768px) { #cy { height: 360px; } }

/* ---------------- graph toolbar & canvas overlays ---------------- */
.nt-graph-tools {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    margin: 0 0 12px; font-size: .78rem; color: var(--nt-muted);
}
.nt-tool { display: inline-flex; align-items: center; gap: 8px; margin: 0; cursor: pointer; }
.nt-tool > span {
    font-size: .68rem; font-weight: 700; letter-spacing: .1em;
    text-transform: uppercase; color: var(--nt-muted);
}
.nt-select.nt-select-sm {
    width: auto; padding: 6px 30px 6px 11px;
    font-size: .8rem; border-radius: 8px;
}
.nt-tool-check { font-size: .78rem; color: var(--nt-body); }
.nt-tool-check input { margin: 0; cursor: pointer; accent-color: var(--nt-green); }
.nt-label-status {
    font-size: .72rem; color: var(--nt-muted); letter-spacing: .01em;
    line-height: 1.2;
}
.nt-label-status:empty { display: none; }
.nt-graph-hint { margin-left: auto; font-size: .74rem; color: var(--nt-muted); }
@media (max-width: 900px) { .nt-graph-hint { display: none; } }

.nt-canvas-loading {
    position: absolute; inset: 0; z-index: 6;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .78);
    font-size: .82rem; color: var(--nt-body); letter-spacing: .02em;
}
.nt-cy-tip {
    position: absolute; left: 0; top: 0; z-index: 7;
    pointer-events: none; opacity: 0; transition: opacity .12s ease;
    background: rgba(28, 38, 48, .92); color: #fff;
    font-size: .72rem; line-height: 1.35; padding: 5px 9px;
    border-radius: 6px; white-space: nowrap;
}

.nt-legend {
    position: absolute; top: 12px; right: 12px;
    background: rgba(255, 255, 255, .94);
    border: 1px solid var(--nt-line); border-radius: 10px;
    padding: 10px 14px; font-size: .78rem; color: var(--nt-body);
    box-shadow: 0 4px 14px rgba(30, 45, 60, .08);
    line-height: 1.9;
}
.nt-legend span.sw {
    display: inline-block; width: 11px; height: 11px; border-radius: 3px;
    margin-right: 7px; vertical-align: middle;
}

/* ---------------- tables ---------------- */
.nt-table-wrap { overflow-x: auto; }

table.nt-table {
    width: 100%; border-collapse: separate; border-spacing: 0;
    font-size: .82rem; color: var(--nt-body);
}
table.nt-table thead th {
    background: #f4f7f9;
    font-size: .68rem; font-weight: 700; letter-spacing: .1em;
    text-transform: uppercase; color: var(--nt-muted);
    padding: 11px 12px; border-bottom: 1px solid var(--nt-line);
    white-space: nowrap; position: sticky; top: 0; z-index: 2;
}
table.nt-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #eef1f4;
    vertical-align: top;
}
/* background-color, not the `background` shorthand: the shorthand resets
   background-image/-size/-position, which would wipe out the score bar on
   whichever row the pointer happens to be over. */
table.nt-table tbody tr:hover td { background-color: #fafcfd; }
table.nt-table tbody tr:last-child td { border-bottom: 0; }

/* ID links, coloured by molecule type */
.nt-id {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .8rem; font-weight: 600; color: var(--nt-accent);
    text-decoration: none; white-space: nowrap;
}
.nt-id:hover { text-decoration: underline; }
.nt-id.lnc  { color: var(--nt-purple); }
.nt-id.circ { color: var(--nt-amber); }
.nt-id.mi   { color: var(--nt-green); }
.nt-id.edge { font-weight: 500; color: #96a2ae; }
.nt-id.edge:hover { color: var(--nt-accent); }

.nt-w {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .8rem; color: var(--nt-ink); font-weight: 600;
}
.nt-tag {
    display: inline-block; font-size: .7rem; font-weight: 600;
    padding: 2px 9px; border-radius: 999px;
    background: var(--nt-accent-soft); color: var(--nt-accent);
    border: 1px solid #cfe2f0; white-space: nowrap;
}

.nt-truncate {
    max-width: 200px; white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; cursor: pointer;
}
.nt-truncate.expanded { white-space: normal; word-break: break-word; }

/* ---------------- DataTables polish ---------------- */
.dataTables_wrapper { font-size: .82rem; }
.dataTables_wrapper .dataTables_filter { margin-bottom: 10px; }
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid var(--nt-line); border-radius: 8px;
    padding: 5px 10px; margin-left: 6px; outline: none;
}
.dataTables_wrapper .dataTables_filter input:focus {
    border-color: #a9c9e0; box-shadow: 0 0 0 3px rgba(46, 111, 158, .12);
}
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate { padding-top: 12px; }
.dataTables_wrapper .pagination .page-link {
    border: 1px solid var(--nt-line); color: var(--nt-body);
    border-radius: 8px; margin: 0 2px; font-size: .8rem;
}
.dataTables_wrapper .pagination .page-item.active .page-link {
    background: var(--nt-green); border-color: var(--nt-green); color: #fff;
}
table.dataTable thead th { position: relative; }
table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc { background-image: none !important; }
table.dataTable thead .sorting::after,
table.dataTable thead .sorting_asc::after,
table.dataTable thead .sorting_desc::after {
    content: ""; position: absolute; right: 10px; top: 50%;
    width: 12px; height: 12px; margin-top: -6px;
    background-repeat: no-repeat; background-position: center;
    background-size: 12px 12px; opacity: .35;
}
table.dataTable thead .sorting::after {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236b7a8c'><path d='M8 11.5 3.5 6h9z'/></svg>");
}
table.dataTable thead .sorting_asc::after {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%232f7a4e'><path d='M8 4.5 12.5 10h-9z'/></svg>");
    opacity: .9;
}
table.dataTable thead .sorting_desc::after {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%232f7a4e'><path d='M8 11.5 3.5 6h9z'/></svg>");
    opacity: .9;
}

/* empty state */
.nt-empty {
    text-align: center; padding: 46px 20px; color: var(--nt-muted);
    font-size: .9rem;
}
.nt-empty .big { font-size: 1.6rem; margin-bottom: 8px; }

/* ---------------- segmented radio group ----------------
   A radio set that reads as connected buttons, for choices that are mutually
   exclusive and where the label alone should carry the meaning.  The native
   radio stays in the DOM (hidden visually, not with display:none) so the form
   still submits without JS and the group stays keyboard-navigable.  Colouring
   goes through the adjacent-sibling selector instead of :has(), so no browser
   support surprises. */
.nt-seg { display: flex; flex-wrap: wrap; gap: 9px;
    /* `col` on this element is our own modifier name (see `.nt-seg.col` below),
       but Bootstrap owns `.col` too and gives it `flex: 1 0 0%`. Measured in the
       browser: the picker really does compute `flex: 1 0 0%` today, and it is
       only inert because its parent is a plain <form>. One flex wrapper away
       from the picker collapsing to a zero-basis flex item. Restating the
       initial value here is what keeps the framework class harmless; TraitConnect's
       picker uses the same pair of classes and is fixed by the same line. Renaming
       `col` would be tidier but would mean editing a second live page for no
       behavioural gain. */
    flex: 0 1 auto; }
.nt-seg > label { position: relative; margin: 0; cursor: pointer; display: block; }
.nt-seg > label input {
    position: absolute; opacity: 0; pointer-events: none;
    width: 1px; height: 1px; margin: 0;
}
.nt-seg > label .box {
    display: block; border: 1px solid var(--nt-line); border-radius: 10px;
    background: #fff; padding: 10px 15px;
    transition: border-color .14s ease, background .14s ease, box-shadow .14s ease;
}
.nt-seg > label .box .t {
    display: block; font-size: .82rem; font-weight: 700; color: var(--nt-body);
    transition: color .14s ease;
}
.nt-seg > label .box .sub {
    display: block; font-size: .72rem; color: #93a0ad; margin-top: 3px;
    line-height: 1.45;
}
.nt-seg > label:hover .box { border-color: #c3d6e5; background: var(--nt-accent-soft); }
.nt-seg > label input:checked + .box {
    border-color: #b8dcc6; background: var(--nt-green-soft);
    box-shadow: 0 0 0 1px #b8dcc6 inset;
}
.nt-seg > label input:checked + .box .t { color: var(--nt-green); }
.nt-seg > label input:checked + .box .sub { color: #5b8a6c; }
.nt-seg > label input:focus-visible + .box {
    box-shadow: 0 0 0 3px rgba(46, 111, 158, .18);
}
.nt-seg > label input:disabled + .box {
    opacity: .5; background: var(--nt-soft); cursor: not-allowed;
}
.nt-seg.col > label { flex: 1 1 200px; }

/* ---------------- score bar ----------------
   A number with a quiet bar painted behind it.  The bar width comes from the
   --v custom property, which the page's rowCallback sets on each row (it cannot
   be written into the template: DataTables rebuilds rows from the JS data and
   drops inline styles).  Sizing a solid gradient through background-size means
   the cell text stays a bare number, so DataTables numeric sorting keeps
   working on its own. */
td.nt-score {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .78rem; color: var(--nt-body); text-align: right;
    background-image: linear-gradient(90deg, #dbe7f0, #dbe7f0);
    background-repeat: no-repeat;
    background-position: left 6px center;
    background-size: var(--v, 0%) 100%;
    background-clip: padding-box;
}
td.nt-score.is-best { color: var(--nt-green); font-weight: 700; }
table.nt-table thead th.nt-num { text-align: right; }

/* the "dimmed" copy of a value, used for out-of-range or fallback display */
.nt-dim { color: #a9b4c0; }

/* ---------------- ML Predictor: job status, logs, readiness ---------------- */

/* red variant of the note strip, for blocked or failed submissions */
.nt-note-alert { color: #a83232; background: #fdecec; border-color: #f2b8b8; }

.nt-statusbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
    margin-bottom: 14px;
}
.nt-statusbar .spacer { flex: 1 1 auto; }
.nt-status {
    font-size: .72rem; font-weight: 700; letter-spacing: .1em;
    text-transform: uppercase; padding: 3px 11px; border-radius: 999px;
    border: 1px solid transparent;
}
.nt-status.is-queued  { background: #f1f4f7; color: var(--nt-muted); border-color: var(--nt-line); }
.nt-status.is-running { background: var(--nt-accent-soft); color: var(--nt-accent); border-color: #cfe2f0; }
.nt-status.is-done    { background: var(--nt-green-soft); color: var(--nt-green); border-color: #cfe7d8; }
.nt-status.is-failed  { background: #fdecec; color: #a83232; border-color: #f2b8b8; }
/* A plain dot, not an animated one: this project has already lost a day to a
   CSS animation that stopped Chrome painting its element after it finished, so
   nothing load-bearing here animates. */
.nt-status.is-running::after {
    content: ''; display: inline-block; width: 6px; height: 6px;
    border-radius: 50%; background: var(--nt-accent);
    margin-left: 7px; vertical-align: middle;
}

/* file paths and gene-ID lists, kept monospace so they stay scannable */
.nt-path {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .74rem; color: var(--nt-body); word-break: break-all;
}
.nt-path.nt-dim { color: var(--nt-muted); }
.nt-path-list { margin: 8px 0 0; padding-left: 18px; }
.nt-path-list li { margin-bottom: 4px; }

/* readiness checklist */
.nt-health { display: flex; flex-direction: column; }
.nt-health-row {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 9px;
    padding: 6px 0; border-bottom: 1px dashed var(--nt-line);
}
.nt-health-row:last-child { border-bottom: 0; }

/* raw pipeline output; the training scripts emit \r-rewritten progress bars */
.nt-log {
    margin: 0; max-height: 330px; overflow: auto;
    background: #fbfcfd; border: 1px solid var(--nt-line); border-radius: 10px;
    padding: 12px 14px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .74rem; line-height: 1.6; color: var(--nt-body);
    white-space: pre-wrap; word-break: break-word;
}
.nt-log:empty { display: none; }

/* round counter for the ML predictor's 20-round training loop. Width is set from
   JS, never transitioned — see the note on .nt-status.is-running::after. */
.nt-prog {
    height: 9px; border-radius: 99px; overflow: hidden;
    background: var(--nt-soft); border: 1px solid var(--nt-line);
}
.nt-prog-bar { height: 100%; width: 0; background: var(--nt-accent); }


/* ===================================================================
   Site pages (pg-*) — the homepage, Links, Contact Us and Node Search.
   These four pages used to carry private inline stylesheets and borrow
   nothing from the system; they now sit on the same tokens as the rest
   of the site. The whole section is additive: nothing above is
   redefined, and every selector carries the pg- prefix, so no toolkit
   page can feel a byte of it. The one deliberate exception is scoped —
   the DataTables chrome is restyled under .pg-tbl-card only, because a
   bare `.dataTables_wrapper` rule here would reach into TraitConnect.
   =================================================================== */

/* Bootstrap underlines every bare <a>; inside these card layouts that reads
   as noise on both the name and the description under it. Scoped to .pg-page,
   which only the four restyled pages carry, so no other page changes. */
.pg-page a { text-decoration: none; }
.pg-page { max-width: 1200px; margin: 0 auto; padding: 26px 20px 76px; }

/* ---------------- hero ---------------- */
/* One hero language for the four entry pages: a rounded, deep-green panel
   that gives the site a face the pale navbar and pale content can lean on.
   The glow layers and the network motif keep it from reading as a flat
   colour block; both are pure CSS/SVG, no image request. */
.pg-hero {
    position: relative; overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 22px;
    background:
        radial-gradient(1100px 480px at 86% -12%, rgba(255, 255, 255, .15), transparent 62%),
        radial-gradient(760px 460px at -10% 112%, rgba(129, 208, 164, .28), transparent 60%),
        linear-gradient(132deg, #16382a 0%, #20583a 46%, #2f7a4e 100%);
    box-shadow: 0 26px 52px -30px rgba(22, 56, 42, .55);
    color: #fff;
    padding: 60px 58px 52px;
}
.pg-hero-sm { padding: 44px 52px 46px; }
.pg-hero .pg-eyebrow {
    font-size: .74rem; letter-spacing: .2em; text-transform: uppercase;
    font-weight: 700; color: rgba(255, 255, 255, .62); margin: 0 0 14px;
}
.pg-title {
    font-size: 3.55rem; font-weight: 800; letter-spacing: -.035em;
    line-height: 1.04; color: #fff; margin: 0 0 10px;
}
.pg-title-sub {
    font-size: 1.22rem; font-weight: 650; color: rgba(255, 255, 255, .95);
    letter-spacing: -.01em; margin: 0 0 18px;
}
.pg-lede {
    font-size: 1rem; line-height: 1.85; color: rgba(255, 255, 255, .8);
    max-width: 660px; margin: 0;
}
/* the constellation: absolutely placed, masked off towards the text so it
   decorates without competing for attention */
.pg-art {
    position: absolute; right: -50px; top: -36px;
    width: 560px; max-width: 52vw; height: auto; pointer-events: none;
    opacity: .95;
    -webkit-mask-image: radial-gradient(72% 72% at 62% 42%, #000 38%, transparent 98%);
            mask-image: radial-gradient(72% 72% at 62% 42%, #000 38%, transparent 98%);
}

.pg-stats {
    position: relative; display: grid; gap: 10px;
    grid-template-columns: repeat(6, 1fr); margin-top: 40px;
}
.pg-stat {
    background: rgba(255, 255, 255, .09);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 13px; padding: 15px 18px 13px;
}
.pg-stat .v {
    display: block; font-size: 1.72rem; font-weight: 750;
    letter-spacing: -.02em; line-height: 1.1; color: #fff;
    font-variant-numeric: tabular-nums;
}
.pg-stat .k {
    display: block; font-size: .72rem; font-weight: 600;
    letter-spacing: .11em; text-transform: uppercase;
    color: rgba(255, 255, 255, .6); margin-top: 5px;
}

.pg-cta { position: relative; display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.pg-btn {
    display: inline-flex; align-items: center; gap: 9px;
    border-radius: 12px; padding: 12px 24px;
    font-size: .95rem; font-weight: 650; line-height: 1;
    transition: transform .15s, box-shadow .15s, background .15s, border-color .15s;
}
.pg-btn-light { background: #fff; color: #1d4a31; }
.pg-btn-light:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .45); color: #1d4a31; }
.pg-btn-ghost { border: 1px solid rgba(255, 255, 255, .42); color: #fff; }
.pg-btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* ---------------- sections ---------------- */
.pg-sec { margin-top: 60px; }
.pg-sec-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 18px; margin-bottom: 22px;
}
.pg-kicker {
    font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
    font-weight: 700; color: var(--nt-green); margin: 0 0 8px;
}
.pg-h2 {
    font-size: 1.52rem; font-weight: 800; letter-spacing: -.02em;
    color: var(--nt-ink); margin: 0; line-height: 1.2;
}
.pg-sub { color: var(--nt-muted); font-size: .95rem; line-height: 1.65; margin: 7px 0 0; }
.pg-more {
    flex: none; font-size: .88rem; font-weight: 650; color: var(--nt-accent);
    white-space: nowrap; padding-bottom: 2px;
}
.pg-more:hover { color: #235d86; }

.pg-card {
    background: #fff; border: 1px solid var(--nt-line); border-radius: 16px;
    box-shadow: 0 1px 2px rgba(35, 48, 61, .04), 0 16px 36px -30px rgba(35, 48, 61, .35);
}
/* interactive cards lift; static ones do not move */
a.pg-card { display: block; color: inherit; transition: transform .16s, box-shadow .16s, border-color .16s; }
a.pg-card:hover {
    transform: translateY(-3px); text-decoration: none;
    border-color: #c8dcec;
    box-shadow: 0 2px 3px rgba(35, 48, 61, .04), 0 22px 44px -26px rgba(35, 48, 61, .4);
}

/* ---------------- homepage ---------------- */
.pg-news {
    display: flex; align-items: center; gap: 14px;
    margin-top: 18px; padding: 14px 20px;
}
.pg-news .tag {
    flex: none; font-size: .68rem; font-weight: 750; letter-spacing: .14em;
    text-transform: uppercase; color: var(--nt-green);
    background: var(--nt-green-soft); border-radius: 6px; padding: 4px 10px;
}
.pg-news .tx { font-size: .92rem; color: var(--nt-body); }
.pg-news b { color: var(--nt-ink); font-weight: 700; }
.pg-news .dim { color: var(--nt-muted); }

.pg-intro { display: grid; grid-template-columns: 300px 1fr; gap: 44px; }
.pg-intro-body p {
    font-size: .97rem; line-height: 1.85; color: var(--nt-body);
    margin: 0 0 16px; text-align: justify;
}
.pg-intro-body p:last-of-type { margin-bottom: 0; }
.pg-intro-body strong { color: var(--nt-green-deep, #245c3b); font-weight: 700; }
.pg-intro-body em { color: var(--nt-accent); font-style: normal; font-weight: 600; }
.pg-cite { position: relative; margin-top: 24px; padding: 18px 150px 18px 20px; }
.pg-cite .lbl {
    font-size: .68rem; letter-spacing: .15em; text-transform: uppercase;
    font-weight: 750; color: var(--nt-muted); margin-bottom: 7px;
}
.pg-cite .txt { font-size: .88rem; line-height: 1.7; color: var(--nt-body); }
.pg-cite .txt a { color: var(--nt-accent); }
.pg-copy {
    position: absolute; top: 14px; right: 14px;
    border: 1px solid var(--nt-line); background: #fff; color: var(--nt-muted);
    border-radius: 8px; padding: 5px 14px; font-size: .78rem; font-weight: 600;
    cursor: pointer; transition: color .14s, border-color .14s;
}
.pg-copy:hover { color: var(--nt-accent); border-color: #b9d3e6; }

.pg-nets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.pg-net .pic {
    aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center;
    background: radial-gradient(90% 90% at 50% 42%, #fbfdfc 0%, #f1f5f3 100%);
    padding: 20px;
}
.pg-net .pic img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.pg-net .cap { border-top: 1px solid var(--nt-line); padding: 14px 18px 15px; }
.pg-net .cap .t { display: flex; align-items: center; justify-content: space-between; gap: 8px;
    font-size: .95rem; font-weight: 700; color: var(--nt-ink); }
.pg-net .cap .go { color: #a9b6c2; font-size: .9em; transition: color .16s, transform .16s; }
a.pg-net:hover .cap .go { color: var(--nt-accent); transform: translateX(3px); }
.pg-net .cap .n { display: block; font-size: .79rem; color: var(--nt-muted); margin-top: 3px; }

/* the statistics table lives in a card; the DataTables chrome is scoped here
   so TraitConnect's own wrapper keeps the styling it is regression-tested on */
.pg-tbl-card { padding: 4px 20px 14px; }
.pg-tbl-card .dataTables_wrapper .dataTables_filter { font-size: .88rem; color: var(--nt-muted); }
.pg-tbl-card .dataTables_wrapper .dataTables_filter input {
    margin-left: 8px; border: 1px solid var(--nt-line); border-radius: 8px;
    padding: 5px 11px; font-size: .88rem; outline: none;
}
.pg-tbl-card .dataTables_wrapper .dataTables_filter input:focus { border-color: #b9d3e6; }
table.pg-tbl { width: 100% !important; font-size: .89rem; margin-bottom: 4px; }
table.pg-tbl thead th {
    background: transparent; color: var(--nt-muted); white-space: nowrap;
    font-weight: 700; font-size: .74rem; text-transform: uppercase; letter-spacing: .07em;
    border-top: 0 !important; border-bottom: 2px solid var(--nt-ink) !important;
    padding: 12px 10px 9px !important;
}
table.pg-tbl tbody td {
    vertical-align: middle; color: var(--nt-body);
    border-color: var(--nt-line) !important; padding: 9px 10px !important;
}
table.pg-tbl tbody tr:hover td { background: #f4f9f6 !important; }
table.pg-tbl td.num, table.pg-tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.pg-tbl td.name { font-weight: 650; color: var(--nt-ink); }
.pg-bar {
    display: inline-block; height: 5px; border-radius: 3px;
    background: linear-gradient(90deg, #7db894, #3f8f5f);
    vertical-align: middle; margin-left: 10px; min-width: 2px;
}

.pg-tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pg-tool { display: flex; gap: 15px; padding: 17px 18px; }
.pg-tool .ic {
    flex: none; width: 54px; height: 54px; border-radius: 14px;
    border: 1px solid var(--nt-line); background: var(--nt-soft);
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.pg-tool .ic img { width: 44px; height: 44px; object-fit: contain; display: block; }
.pg-tool .tx { min-width: 0; }
.pg-tool .nm {
    display: flex; align-items: center; gap: 6px;
    font-size: .97rem; font-weight: 700; color: var(--nt-ink);
    transition: color .15s;
}
.pg-tool:hover .nm { color: var(--nt-accent); }
.pg-tool .ds { font-size: .84rem; color: var(--nt-muted); line-height: 1.55; margin-top: 3px; }
.pg-ext { color: #a9b6c2; font-size: .8em; font-weight: 450; }

.pg-cat {
    font-size: .76rem; letter-spacing: .15em; text-transform: uppercase;
    font-weight: 750; color: var(--nt-muted); margin: 30px 0 14px;
}
.pg-tools + .pg-cat { margin-top: 34px; }
.pg-net { overflow: hidden; }

/* ---------------- links ---------------- */
.lk-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.lk-item { padding: 17px 20px; }
.lk-item .nm {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    font-size: .97rem; font-weight: 700; color: var(--nt-accent);
}
.lk-item .nm .go { color: #a9b6c2; font-size: .88em; transition: transform .16s, color .16s; }
.lk-item:hover .nm .go { color: var(--nt-accent); transform: translate(2px, -2px); }
.lk-item .ds { font-size: .88rem; color: var(--nt-body); line-height: 1.6; margin-top: 5px; }
.lk-count {
    font-size: .74rem; font-weight: 700; color: var(--nt-muted);
    background: var(--nt-soft); border: 1px solid var(--nt-line);
    border-radius: 999px; padding: 3px 11px; white-space: nowrap;
}

/* ---------------- contact ---------------- */
.ct-inst { padding: 40px 48px 36px; text-align: center; }
.ct-inst .logos { display: flex; align-items: center; justify-content: center; gap: 34px; flex-wrap: wrap; }
.ct-inst .logos img { max-height: 76px; width: auto; }
.ct-inst h2 {
    font-size: 1.5rem; font-weight: 750; letter-spacing: -.015em;
    color: var(--nt-ink); line-height: 1.35;
    max-width: 760px; margin: 26px auto 0;
}
.ct-rule { width: 64px; height: 3px; border-radius: 2px; background: var(--nt-green); margin: 20px auto 0; }
.ct-people { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.ct-person { padding: 24px 20px; text-align: center; }
.ct-person .av {
    width: 56px; height: 56px; border-radius: 50%; margin: 0 auto;
    background: var(--nt-green-soft); border: 1px solid #d3e7da;
    color: var(--nt-green); font-size: 1.1rem; font-weight: 750;
    display: flex; align-items: center; justify-content: center;
}
.ct-person .nm { font-size: 1rem; font-weight: 700; color: var(--nt-ink); margin-top: 13px; }
.ct-person .mail {
    display: inline-block; margin-top: 10px; font-size: .84rem; font-weight: 600;
    color: var(--nt-accent); background: var(--nt-accent-soft);
    border: 1px solid #d8e8f4; border-radius: 999px; padding: 6px 15px;
    word-break: break-all; transition: background .15s, color .15s, border-color .15s;
}
.ct-person .mail:hover { background: var(--nt-accent); border-color: var(--nt-accent); color: #fff; }
.ct-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.ct-fact { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; }
.ct-fact .ic {
    flex: none; width: 38px; height: 38px; border-radius: 11px;
    background: var(--nt-green-soft); border: 1px solid #d9e9df;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; color: var(--nt-green);
}
.ct-fact .k {
    font-size: .7rem; letter-spacing: .13em; text-transform: uppercase;
    font-weight: 750; color: var(--nt-muted);
}
.ct-fact .v { font-size: .92rem; color: var(--nt-body); line-height: 1.55; margin-top: 3px; }

/* ---------------- node search ---------------- */
/* the search card overlaps the hero: the form is the page's whole job, so it
   gets the single strongest position instead of floating in dead space */
.ns-panel { position: relative; margin-top: -44px; padding: 30px 34px 26px; z-index: 2; }
.ns-grid { display: grid; grid-template-columns: 1fr 300px auto; gap: 14px; align-items: end; }
.ns-field label {
    display: block; font-size: .74rem; font-weight: 750; letter-spacing: .1em;
    text-transform: uppercase; color: var(--nt-muted); margin-bottom: 7px;
}
.ns-field .form-control, .ns-field .form-select {
    height: 47px; border-radius: 11px; border-color: #d7dfe8;
    font-size: .98rem; box-shadow: none;
}
.ns-field .form-control:focus, .ns-field .form-select:focus {
    border-color: #8fc0a4; box-shadow: 0 0 0 3px rgba(47, 122, 78, .12);
}
.ns-btn {
    height: 47px; padding: 0 30px; border-radius: 11px; border: 0;
    background: linear-gradient(180deg, #35875a, #2f7a4e);
    color: #fff; font-size: .98rem; font-weight: 700; letter-spacing: .01em;
    box-shadow: 0 10px 20px -12px rgba(47, 122, 78, .8);
    transition: transform .15s, box-shadow .15s, filter .15s;
}
.ns-btn:hover { transform: translateY(-1px); filter: brightness(1.05); color: #fff;
    box-shadow: 0 14px 24px -12px rgba(47, 122, 78, .85); }
.ns-examples { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.ns-examples .lbl { font-size: .82rem; color: var(--nt-muted); }
.ns-chip {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .84rem; color: var(--nt-accent);
    background: #fff; border: 1px solid var(--nt-line); border-radius: 999px;
    padding: 5px 14px; cursor: pointer; transition: border-color .14s, background .14s;
}
.ns-chip:hover { border-color: #b9d3e6; background: var(--nt-accent-soft); }
.ns-hint { font-size: .85rem; color: var(--nt-muted); margin: 14px 0 0; }
.ns-what { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.ns-what .pg-card { padding: 22px 24px; }
.ns-what .ic {
    width: 42px; height: 42px; border-radius: 12px; margin-bottom: 13px;
    background: var(--nt-green-soft); border: 1px solid #d9e9df;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.05rem; color: var(--nt-green);
}
.ns-what .t { font-size: .97rem; font-weight: 700; color: var(--nt-ink); }
.ns-what .d { font-size: .86rem; color: var(--nt-muted); line-height: 1.6; margin-top: 5px; }

/* ---------------- responsive ---------------- */
@media (max-width: 1080px) {
    .pg-hero { padding: 48px 38px 44px; }
    .pg-hero-sm { padding: 40px 38px 42px; }
    .pg-stats { grid-template-columns: repeat(3, 1fr); }
    .pg-intro { grid-template-columns: 1fr; gap: 20px; }
    .pg-nets { grid-template-columns: repeat(2, 1fr); }
    .pg-tools { grid-template-columns: repeat(2, 1fr); }
    .ns-grid { grid-template-columns: 1fr; }
    .ns-btn { width: 100%; }
}
@media (max-width: 680px) {
    .pg-page { padding: 16px 14px 56px; }
    .pg-hero { border-radius: 16px; padding: 38px 24px 34px; }
    .pg-hero-sm { padding: 32px 24px 34px; }
    .pg-title { font-size: 2.35rem; }
    .pg-title-sub { font-size: 1.05rem; }
    .pg-art { width: 380px; right: -70px; opacity: .55; }
    .pg-stats { grid-template-columns: repeat(2, 1fr); margin-top: 30px; }
    .pg-sec { margin-top: 44px; }
    .pg-sec-head { flex-direction: column; align-items: flex-start; gap: 6px; }
    .pg-nets, .pg-tools, .lk-grid, .ct-people, .ct-facts, .ns-what { grid-template-columns: 1fr; }
    .pg-intro-body p { text-align: left; }
    .pg-cite { padding: 16px 18px; }
    .pg-copy { position: static; margin-bottom: 10px; }
    .ct-inst { padding: 30px 22px; }
    .ns-panel { margin-top: -30px; padding: 22px 18px 20px; }
}
