/* =========================================================================
   NAV Tracker — Tool styles
   Layered on top of /sfo/terminal.css (Institutional Dark Mode).
   Prefix: .nt-*  (NAV Tracker)
   ========================================================================= */

/* ── Header ── */
.nt-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.nt-header h1 {
    margin: 0 0 0.35rem 0;
    font-size: 1.85rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}
.nt-header h1 i {
    color: var(--text-accent);
    margin-right: 0.4rem;
}
.nt-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}
.nt-tagline {
    color: var(--text-accent);
    font-size: 0.95rem;
    font-style: italic;
    font-weight: 500;
    margin-top: 0.25rem;
    letter-spacing: 0.01em;
}
.nt-subtitle em {
    color: var(--text-primary);
    font-style: normal;
}
.nt-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.55rem;
}
.nt-tagline-pill {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--text-accent);
    padding: 0.6rem 0.95rem;
    border-radius: 4px;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.85rem;
    color: var(--text-primary);
    white-space: nowrap;
}
.nt-tagline-pill i {
    color: var(--text-accent);
    margin-right: 0.4rem;
}
.nt-help-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1rem;
    background: var(--text-accent);
    color: white;
    border: 1px solid var(--text-accent);
    border-radius: 4px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: filter 120ms ease, transform 120ms ease;
}
.nt-help-btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.nt-help-btn i { font-size: 0.95rem; }
.nt-help-btn-back {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border);
}
.nt-help-btn-back:hover { background: var(--bg-hover); }

/* ── Cards ── */
.nt-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.nt-card-title {
    margin: 0 0 0.35rem 0;
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 600;
}
.nt-card-hint {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0 0 1.25rem 0;
}

/* ── Form ── */
.nt-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.nt-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.nt-field-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    font-weight: 600;
}
.nt-field input {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.7rem 0.85rem;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 120ms ease;
}
.nt-field input:focus {
    outline: none;
    border-color: var(--text-accent);
}
.nt-field input::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

.nt-form-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.nt-btn {
    border: 1px solid transparent;
    padding: 0.75rem 1.4rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background-color 120ms ease, border-color 120ms ease;
    font-family: inherit;
}
.nt-btn-primary {
    background: var(--text-accent);
    color: white;
}
.nt-btn-primary:hover { filter: brightness(1.1); }
.nt-btn-primary:disabled {
    background: var(--bg-hover);
    color: var(--text-secondary);
    cursor: not-allowed;
}
.nt-btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border);
}
.nt-btn-ghost:hover {
    color: var(--text-primary);
    border-color: var(--text-secondary);
}
.nt-btn i { margin-right: 0.4rem; }

/* ── Status / errors ── */
.nt-status {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    border: 1px solid;
}
.nt-status.nt-status-info {
    color: var(--text-accent);
    border-color: rgba(77, 166, 255, 0.4);
    background: rgba(77, 166, 255, 0.08);
}
.nt-status.nt-status-error {
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.08);
}

/* ── Results panel ── */
.nt-results { display: block; }

/* Position strip */
.nt-position-strip {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px 8px 0 0;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    border-bottom: none;
}
.nt-position-id {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.nt-ticker-badge {
    background: var(--text-accent);
    color: white;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-weight: 700;
    font-family: 'Fira Code', 'Consolas', monospace;
    letter-spacing: 0.04em;
}
.nt-position-name {
    color: var(--text-primary);
    font-weight: 500;
}
.nt-position-meta {
    color: var(--text-secondary);
    font-size: 0.85rem;
}
.nt-cashcow-state {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.nt-cashcow-state.is-cashcow {
    background: rgba(0, 183, 70, 0.15);
    border-color: var(--success);
    color: var(--success);
    font-weight: 600;
}
.nt-cashcow-state.is-gravy {
    background: rgba(0, 183, 70, 0.22);
    border-color: var(--success);
    color: var(--success);
    font-weight: 700;
}
.nt-cashcow-state i { font-size: 1rem; }

/* Metric tiles — portfolio-level dollar values FIRST */
.nt-metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-top: none;
    border-bottom: none;
}
.nt-metric {
    background: var(--bg-card);
    padding: 1.1rem 1.25rem;
}
.nt-metric-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 0.4rem;
}
.nt-metric-value {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Fira Code', 'Consolas', monospace;
    letter-spacing: -0.01em;
    line-height: 1.1;
}
.nt-metric-sub {
    margin-top: 0.35rem;
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-family: 'Fira Code', 'Consolas', monospace;
}
.nt-metric.is-positive .nt-metric-value { color: var(--success); }
.nt-metric.is-negative .nt-metric-value { color: var(--danger); }

/* Make NAV the hero — slightly emphasized */
.nt-metric-nav { background: linear-gradient(180deg, var(--bg-card) 0%, rgba(77, 166, 255, 0.06) 100%); }
.nt-metric-nav .nt-metric-value { color: var(--text-accent); }

/* Cash Cow row */
.nt-cashcow-row {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: 1px solid var(--border);
    border-radius: 0 0 8px 8px;
    padding: 1.25rem;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}
@media (max-width: 700px) {
    .nt-cashcow-row { grid-template-columns: 1fr; }
}
.nt-cashcow-block-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.nt-cashcow-bar {
    height: 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}
.nt-cashcow-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--text-accent), var(--success));
    transition: width 600ms ease;
}
.nt-cashcow-bar-caption {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-family: 'Fira Code', 'Consolas', monospace;
}
.nt-cashcow-bar-caption span {
    color: var(--text-primary);
    font-weight: 600;
}
.nt-cashcow-days {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Fira Code', 'Consolas', monospace;
    line-height: 1.1;
}
.nt-cashcow-days.is-cashcow { color: var(--success); }
.nt-cashcow-block-hint {
    margin-top: 0.35rem;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

/* =========================================================================
   GROWTH + YIELD CHART (slice 2)
   ========================================================================= */
.nt-chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem 1.25rem 1rem 1.25rem;
    margin-bottom: 1.5rem;
}
.nt-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
}
.nt-chart-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
}
.nt-chart-ticker {
    display: inline-block;
    background: var(--text-accent);
    color: white;
    padding: 0.15rem 0.55rem;
    border-radius: 4px;
    font-weight: 700;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.9rem;
    letter-spacing: 0.04em;
    margin-right: 0.15rem;
    vertical-align: 2px;
}
.nt-chart-fundname {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.98rem;
}
.nt-chart-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: 'Fira Code', 'Consolas', monospace;
}
.nt-chart-canvas-wrap {
    position: relative;
    height: 360px;        /* canvas needs a fixed container height for responsive: true */
    width: 100%;
}
@media (max-width: 600px) {
    .nt-chart-canvas-wrap { height: 280px; }
}
.nt-chart-status {
    margin-top: 0.6rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
}

/* Dividend history table */
.nt-dividend-history {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}
.nt-dividend-history summary {
    cursor: pointer;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.25rem 0;
    user-select: none;
}
.nt-dividend-history summary::marker { color: var(--text-secondary); }
.nt-dividend-table-wrap {
    margin-top: 1rem;
    max-height: 360px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 4px;
}
.nt-dividend-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.85rem;
}
.nt-dividend-table thead th {
    position: sticky;
    top: 0;
    background: var(--bg-hover);
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    padding: 0.6rem 0.85rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.nt-dividend-table td {
    padding: 0.55rem 0.85rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}
.nt-dividend-table tr:last-child td { border-bottom: none; }
.nt-dividend-table .nt-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.nt-dividend-table tbody tr:hover { background: var(--bg-hover); }
.nt-dividend-empty {
    color: var(--text-secondary);
    padding: 1rem;
    text-align: center;
    font-style: italic;
}

/* ── Step number badge ── */
.nt-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--text-accent);
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    margin-right: 0.55rem;
    vertical-align: -3px;
    font-family: 'Fira Code', 'Consolas', monospace;
}

/* ── Distribution-entry card ── */
.nt-dist-card .nt-card-hint strong { color: var(--danger); font-weight: 600; }
.nt-dist-card .nt-card-hint em { color: var(--text-accent); font-style: normal; font-weight: 500; }

.nt-dist-input-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 0.75rem;
    align-items: end;
    margin-bottom: 1.25rem;
}
@media (max-width: 600px) {
    .nt-dist-input-row { grid-template-columns: 1fr; }
    .nt-dist-input-row .nt-btn-add { width: 100%; }
}
.nt-btn-add {
    height: 44px;   /* aligns vertically with the inputs */
    white-space: nowrap;
}

.nt-dist-list-wrap { margin-top: 0.75rem; }

.nt-dist-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.9rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
}
.nt-dist-table thead th {
    background: var(--bg-hover);
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    padding: 0.6rem 0.85rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.nt-dist-table td {
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}
.nt-dist-table tr:last-child td { border-bottom: none; }
.nt-dist-table .nt-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.nt-dist-table tbody tr:hover { background: var(--bg-hover); }
.nt-dist-actions-col {
    width: 38px;
    text-align: right;
}
.nt-dist-remove {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.95rem;
    transition: color 120ms ease, background 120ms ease;
}
.nt-dist-remove:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}
.nt-dist-table tfoot th {
    background: var(--bg-hover);
    color: var(--text-primary);
    padding: 0.7rem 0.85rem;
    border-top: 2px solid var(--border);
    font-size: 0.9rem;
    text-align: left;
    font-weight: 600;
}
.nt-dist-table tfoot th.nt-num {
    text-align: right;
    font-family: 'Fira Code', 'Consolas', monospace;
    color: var(--text-accent);
}

.nt-dist-empty {
    padding: 1.25rem;
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    border: 1px dashed var(--border);
    border-radius: 4px;
    background: var(--bg-input);
}
.nt-dist-empty i {
    margin-right: 0.4rem;
    color: var(--text-accent);
}

/* =========================================================================
   HELP & STRATEGY PAGE (help.php)
   ========================================================================= */

.nt-help-toc {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--text-accent);
    border-radius: 4px;
    padding: 0.85rem 1.25rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.4rem;
    align-items: center;
}
.nt-help-toc strong {
    color: var(--text-primary);
    margin-right: 0.4rem;
}
.nt-help-toc a {
    color: var(--text-accent);
    text-decoration: none;
    border-bottom: 1px dashed transparent;
    transition: border-color 120ms ease;
}
.nt-help-toc a:hover { border-bottom-color: var(--text-accent); }

.nt-help-article {
    max-width: 760px;          /* readable column for long-form text */
    line-height: 1.65;
    color: var(--text-primary);
    font-size: 1rem;
}
.nt-help-article p {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
}
.nt-help-article p em {
    font-style: italic;
    color: var(--text-primary);
}
.nt-help-article p strong { color: var(--text-primary); }
.nt-help-article a {
    color: var(--text-accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.nt-help-section {
    margin-bottom: 2.5rem;
    scroll-margin-top: calc(var(--nav-height) + 16px);  /* anchor-link offset under top nav */
}
.nt-help-section h2 {
    font-size: 1.45rem;
    color: var(--text-primary);
    margin: 0 0 0.85rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}
.nt-help-section h3 {
    font-size: 1.05rem;
    color: var(--text-accent);
    margin: 1.4rem 0 0.55rem 0;
    font-weight: 600;
}

.nt-help-equation {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--text-accent);
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
    border-radius: 4px;
    font-family: 'Fira Code', 'Consolas', monospace;
    text-align: center;
}
.nt-help-equation strong {
    display: block;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}
.nt-help-equation-sub {
    display: block;
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.nt-help-example {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-left: 3px solid var(--success);
    padding: 1rem 1.2rem;
    margin: 1rem 0 1.25rem 0;
    border-radius: 4px;
    font-size: 0.95rem;
}
.nt-help-example strong:first-child {
    color: var(--success);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.78rem;
    margin-right: 0.4rem;
}
.nt-help-example ul {
    margin: 0.6rem 0 0.6rem 1.2rem;
    padding: 0;
}
.nt-help-example li {
    margin-bottom: 0.3rem;
    color: var(--text-primary);
}

.nt-help-recommended {
    display: inline-block;
    background: rgba(0, 183, 70, 0.15);
    color: var(--success);
    border: 1px solid var(--success);
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: 0.5rem;
    vertical-align: 2px;
}

.nt-help-bottom-return {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* PMX feature bullet list inside help page */
.nt-help-pmx-features {
    list-style: none;
    padding: 0;
    margin: 1rem 0 1.25rem 0;
    display: grid;
    gap: 0.55rem;
}
.nt-help-pmx-features li {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--text-accent);
    padding: 0.7rem 1rem;
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.5;
}
.nt-help-pmx-features li strong { color: var(--text-accent); }

/* Big CTA button to PMX */
.nt-help-cta-wrap {
    text-align: center;
    margin: 1.75rem 0 0.5rem 0;
}
a.nt-help-cta,
.nt-help-article a.nt-help-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: linear-gradient(135deg, var(--text-accent) 0%, #2a7fd6 100%);
    color: #ffffff;
    padding: 0.95rem 1.75rem;
    border-radius: 6px;
    font-size: 1.05rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(77, 166, 255, 0.25);
    transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
    letter-spacing: 0.01em;
    border: none;
}
a.nt-help-cta:hover,
.nt-help-article a.nt-help-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(77, 166, 255, 0.4);
    filter: brightness(1.05);
    color: #ffffff;
    text-decoration: none;
}
a.nt-help-cta i,
.nt-help-article a.nt-help-cta i { font-size: 1rem; color: #ffffff; }

/* Footer */
.nt-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.78rem;
    color: var(--text-secondary);
}
.nt-footer-rule1 {
    font-style: italic;
    opacity: 0.85;
}
