/* ===========================================================================
   Portfolio (/portfolio)

   Inherits the site's tokens and .card/.wrap/.hero from screener.css; this file
   only carries what is specific to a page whose job is a table of your money
   and four numbers above it.

   One rule runs through the whole sheet: a figure the site priced and a figure
   you typed in must never look the same. Every value on this page carries a
   provenance tag (LIVE / NAV / ACCRUED / YOURS / AT COST), and the tags are
   coloured, because a portfolio total that quietly mixes an NSE quote with a
   number somebody guessed about their flat is the one way this page could
   mislead badly.
   =========================================================================== */

.pf .mono,
.pf .pf-tbl,
.pf .pf-tile-v {
    font-family: "JetBrains Mono", ui-monospace, monospace;
}

.pf {
    max-width: 1180px;
}

/* ---------- Empty state ---------- */

.pf-intro {
    text-align: center;
    padding: 40px 0 20px;
}
.pf-privacy {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    text-align: left;
    max-width: 620px;
    margin: 0 auto 26px;
    padding: 16px 18px;
    border-radius: 14px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.22);
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.6;
}
.pf-privacy b {
    color: var(--txt);
}
.pf-lock {
    font-size: 20px;
    line-height: 1.2;
}

.pf-cta {
    appearance: none;
    border: 0;
    cursor: pointer;
    padding: 15px 30px;
    border-radius: 14px;
    font: 700 16px/1 "Inter", sans-serif;
    color: #fff;
    background: linear-gradient(120deg, var(--indigo), var(--violet));
    box-shadow: 0 14px 34px -14px rgba(139, 92, 246, 0.9);
    transition: transform 0.15s, box-shadow 0.15s;
}
.pf-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 40px -14px rgba(139, 92, 246, 1);
}
.pf-ghost {
    display: block;
    margin: 14px auto 0;
    appearance: none;
    background: none;
    border: 0;
    color: var(--muted);
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.pf-ghost:hover {
    color: var(--txt);
}

.pf-teaser {
    list-style: none;
    margin: 34px auto 0;
    padding: 0;
    max-width: 720px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
    text-align: left;
}
.pf-teaser li {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--card-brd);
    background: var(--card);
    color: var(--muted);
    font-size: 13px;
}
.pf-teaser b {
    color: var(--txt);
}

/* ---------- Board header ---------- */

.pf-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.pf-h1 {
    font-size: clamp(24px, 3.4vw, 34px);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0;
}
.pf-sub {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 12.5px;
}
.pf-warn {
    color: var(--amber);
}
.pf-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pf-btn {
    appearance: none;
    cursor: pointer;
    padding: 9px 14px;
    border-radius: 11px;
    font: 600 13px/1 "Inter", sans-serif;
    color: var(--txt);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-brd);
    transition: background 0.15s, border-color 0.15s;
}
.pf-btn:hover {
    background: rgba(255, 255, 255, 0.09);
}
.pf-btn.primary {
    background: linear-gradient(120deg, var(--indigo), var(--violet));
    border-color: transparent;
    color: #fff;
}
.pf-btn.spin {
    opacity: 0.6;
    pointer-events: none;
}

.pf-menu {
    position: relative;
}
.pf-menu-pop {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 40;
    min-width: 220px;
    padding: 6px;
    border-radius: 12px;
    background: #12142a;
    border: 1px solid var(--card-brd);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}
.pf-menu-pop button {
    display: block;
    width: 100%;
    text-align: left;
    appearance: none;
    background: none;
    border: 0;
    cursor: pointer;
    color: var(--txt);
    font: 500 13px/1.2 "Inter", sans-serif;
    padding: 10px 11px;
    border-radius: 9px;
}
.pf-menu-pop button:hover {
    background: rgba(255, 255, 255, 0.07);
}
.pf-menu-pop button.danger {
    color: var(--down);
}

/* ---------- The four tiles ---------- */

.pf-tiles {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}
.pf-tile {
    padding: 18px;
    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid var(--card-brd);
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.pf-tile.big {
    background: linear-gradient(140deg, rgba(139, 92, 246, 0.16), rgba(99, 102, 241, 0.05));
    border-color: rgba(139, 92, 246, 0.3);
}
.pf-tile-k {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--faint);
    font-weight: 700;
}
.pf-tile-v {
    font-size: clamp(20px, 2.6vw, 28px);
    font-weight: 700;
    letter-spacing: -0.02em;
}
.pf-tile.big .pf-tile-v {
    font-size: clamp(24px, 3.2vw, 34px);
}
.pf-tile-s {
    font-size: 11.5px;
    color: var(--muted);
}

/* ---------- Cards ---------- */

.pf-grid2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}
.pf-card {
    padding: 20px;
}
.pf-card-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--card-brd);
}
.pf .eyebrow {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    font-weight: 700;
    color: var(--muted);
}
.pf-note {
    font-size: 11px;
    color: var(--faint);
}
.pf-link {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    white-space: nowrap;
}
.pf-link:hover {
    color: var(--indigo);
}
.pf-read {
    margin: 14px 0 0;
    font-size: 12.5px;
    line-height: 1.65;
    color: var(--muted);
}
.pf-dim {
    color: var(--faint);
}

/* ---------- Allocation ---------- */

.pf-bar {
    display: flex;
    height: 14px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}
.pf-bar span {
    display: block;
    height: 100%;
}
.pf-legend {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    display: grid;
    gap: 7px;
}
.pf-legend li {
    display: grid;
    grid-template-columns: 10px 1fr auto auto;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
}
.pf-dot {
    width: 9px;
    height: 9px;
    border-radius: 3px;
}
.pf-leg-w {
    color: var(--txt);
    font-weight: 600;
    font-size: 12px;
}
.pf-leg-v {
    color: var(--muted);
    font-size: 12px;
    min-width: 76px;
    text-align: right;
}

/* ---------- Definition rows ---------- */

.pf-dl {
    margin: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 9px 18px;
    font-size: 13px;
}
.pf-dl dt {
    color: var(--muted);
}
.pf-dl dd {
    margin: 0;
    text-align: right;
    font-weight: 600;
}
.pf-dl dd small {
    display: block;
    font-weight: 400;
    color: var(--faint);
    font-size: 11px;
    margin-top: 2px;
}

/* ---------- Holdings tables ---------- */

.pf-group {
    margin-bottom: 14px;
}
.pf-tblwrap {
    overflow-x: auto;
}
.pf-tbl {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}
.pf-tbl th {
    text-align: left;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--faint);
    font-weight: 700;
    padding: 0 10px 8px;
    white-space: nowrap;
}
.pf-tbl td {
    padding: 11px 10px;
    border-top: 1px solid var(--card-brd);
    vertical-align: middle;
    white-space: nowrap;
}
.pf-tbl .r {
    text-align: right;
}
.pf-tbl tbody tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}
.pf-name {
    white-space: normal !important;
    min-width: 190px;
}
.pf-name b {
    display: block;
    font-weight: 700;
    font-family: "Inter", sans-serif;
}
.pf-name small {
    display: block;
    color: var(--faint);
    font-size: 11px;
    margin-top: 2px;
}
.pf-tbl td small {
    display: block;
    font-size: 10.5px;
    color: var(--faint);
    margin-top: 1px;
}

/* Provenance. The whole point of the page having one. */
.pf-how {
    display: inline-block;
    margin-top: 5px;
    padding: 2px 6px;
    border-radius: 5px;
    font: 700 9px/1.4 "JetBrains Mono", monospace;
    letter-spacing: 0.06em;
}
.pf-how.live {
    color: var(--up);
    background: var(--up-soft);
}
.pf-how.nav {
    color: #a5b4fc;
    background: rgba(99, 102, 241, 0.16);
}
.pf-how.accrued {
    color: #7dd3fc;
    background: rgba(56, 189, 248, 0.14);
}
.pf-how.manual {
    color: var(--amber);
    background: rgba(245, 182, 81, 0.14);
}
.pf-how.cost {
    color: var(--faint);
    background: rgba(255, 255, 255, 0.05);
}

.pf-rowact button {
    appearance: none;
    background: none;
    border: 0;
    cursor: pointer;
    color: var(--faint);
    font-size: 13px;
    padding: 4px 5px;
    border-radius: 7px;
}
.pf-rowact button:hover {
    color: var(--txt);
    background: rgba(255, 255, 255, 0.07);
}

/* ---------- Sector rows ---------- */

.pf-rows {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 9px;
}
.pf-rows li {
    display: grid;
    grid-template-columns: minmax(90px, 1fr) minmax(70px, 2fr) auto;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
}
.pf-rk {
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pf-rbar {
    height: 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}
.pf-rbar i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--indigo), var(--violet));
}
.pf-rv {
    font-size: 11.5px;
    color: var(--txt);
    min-width: 46px;
    text-align: right;
}

/* ---------- Concentration ---------- */

.pf-conc-top {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.pf-verdict {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.pf-conc-sub {
    font-size: 12px;
    color: var(--muted);
}

/* ---------- Tax ---------- */

.pf-taxdl dd {
    font-family: "JetBrains Mono", monospace;
}
.pf-taxest {
    margin-top: 16px;
    padding: 15px 16px;
    border-radius: 14px;
    background: rgba(245, 182, 81, 0.08);
    border: 1px solid rgba(245, 182, 81, 0.24);
    display: grid;
    gap: 4px;
}
.pf-taxest-k {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--amber);
    font-weight: 700;
}
.pf-taxest-v {
    font: 700 24px/1.1 "JetBrains Mono", monospace;
}
.pf-taxest small {
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.6;
}
.pf-soon {
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--card-brd);
    background: rgba(255, 255, 255, 0.02);
    font-size: 12.5px;
}
.pf-soon ul {
    margin: 8px 0;
    padding-left: 18px;
    color: var(--muted);
}
.pf-soon li {
    margin: 4px 0;
}
.pf-soon small {
    color: var(--faint);
    font-size: 11.5px;
}

/* ---------- The wizard ---------- */

body.pf-locked {
    overflow: hidden;
}
.pf-modal {
    position: fixed;
    inset: 0;
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
/* An author `display` beats the `hidden` attribute's UA rule, so a flex
   container marked hidden is still on screen. Every element on this page that
   the script hides with `hidden` and styles with a display gets this back. */
.pf [hidden],
.pf-modal[hidden],
.pf-suggest[hidden] {
    display: none !important;
}
.pf-modal-back {
    position: absolute;
    inset: 0;
    background: rgba(5, 6, 12, 0.72);
    backdrop-filter: blur(4px);
}
.pf-modal-box {
    position: relative;
    width: min(620px, 100%);
    max-height: min(88vh, 780px);
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    background: linear-gradient(180deg, #14162c, #0f1120);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6);
    animation: pf-pop 0.18s ease both;
}
@keyframes pf-pop {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.985);
    }
}
@media (prefers-reduced-motion: reduce) {
    .pf-modal-box {
        animation: none;
    }
}

.pf-wiz-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 22px 12px;
}
.pf-wiz-title {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.pf-wiz-step {
    margin: 4px 0 0;
    font-size: 11.5px;
    color: var(--faint);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 600;
}
.pf-x {
    appearance: none;
    background: none;
    border: 0;
    cursor: pointer;
    color: var(--muted);
    font-size: 26px;
    line-height: 1;
    padding: 0 4px;
}
.pf-x:hover {
    color: var(--txt);
}

.pf-wiz-rail {
    display: flex;
    gap: 6px;
    padding: 0 22px 14px;
}
.pf-rail-dot {
    flex: 1;
    height: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
}
.pf-rail-dot.done {
    background: rgba(139, 92, 246, 0.55);
}
.pf-rail-dot.on {
    background: var(--violet);
}

.pf-wiz-body {
    flex: 1;
    /* Enough room that a one-field step doesn't collapse the dialog to a strip
       and then snap it back open on the next one — the box should feel like the
       same box throughout. */
    min-height: 250px;
    overflow-y: auto;
    padding: 4px 22px 8px;
}
/* See renderFields: a step with a search field opts out of clipping so its
   suggestion list can hang below the field. */
.pf-wiz-body.no-clip {
    overflow: visible;
}
.pf-step-title {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
}
.pf-wiz-hint {
    margin: 0 0 18px;
    font-size: 12.5px;
    line-height: 1.65;
    color: var(--muted);
}

.pf-picks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
    padding-bottom: 6px;
}
.pf-pick {
    appearance: none;
    cursor: pointer;
    text-align: left;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-brd);
    color: var(--txt);
    display: grid;
    gap: 3px;
    transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.pf-pick:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.4);
    transform: translateY(-1px);
}
.pf-pick.on {
    border-color: var(--violet);
    background: rgba(139, 92, 246, 0.14);
}
.pf-pick-ico {
    font-size: 20px;
}
.pf-pick b {
    font-size: 14px;
}
.pf-pick small {
    color: var(--faint);
    font-size: 11.5px;
    line-height: 1.45;
}

.pf-fields {
    display: grid;
    gap: 16px;
    padding-bottom: 6px;
}
.pf-field {
    display: grid;
    gap: 6px;
}
.pf-flabel {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--txt);
}
.pf-opt {
    font-style: normal;
    font-weight: 400;
    color: var(--faint);
    font-size: 11px;
}
.pf-fhint {
    color: var(--faint);
    font-size: 11.5px;
    line-height: 1.55;
}

.pf-inwrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-brd);
    border-radius: 11px;
    padding: 0 12px;
    transition: border-color 0.15s;
}
.pf-inwrap:focus-within {
    border-color: var(--violet);
}
.pf-affix {
    color: var(--faint);
    font-size: 12.5px;
    white-space: nowrap;
}
.pf-affix.suf {
    margin-left: auto;
}

.pf .pf-field input,
.pf-modal input,
.pf-modal select {
    appearance: none;
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-brd);
    border-radius: 11px;
    padding: 11px 12px;
    color: var(--txt);
    font: 500 14px/1.2 "Inter", sans-serif;
    outline: none;
}
.pf-inwrap input {
    background: none !important;
    border: 0 !important;
    padding: 12px 0 !important;
    border-radius: 0 !important;
}
.pf-modal input:focus,
.pf-modal select:focus {
    border-color: var(--violet);
}
.pf-modal select {
    cursor: pointer;
}
/* The native date picker's icon is invisible on a dark field without this. */
.pf-modal input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.7);
    cursor: pointer;
}

.pf-search {
    position: relative;
}
.pf-suggest {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 20;
    margin: 0;
    padding: 5px;
    list-style: none;
    max-height: 260px;
    overflow-y: auto;
    border-radius: 12px;
    background: #12142a;
    border: 1px solid var(--card-brd);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}
.pf-suggest li {
    padding: 9px 10px;
    border-radius: 9px;
    cursor: pointer;
}
.pf-suggest li:hover {
    background: rgba(139, 92, 246, 0.16);
}
.pf-suggest b {
    display: block;
    font-size: 13px;
}
.pf-suggest small {
    display: block;
    color: var(--faint);
    font-size: 11px;
    margin-top: 1px;
}
.pf-sug-none {
    color: var(--faint);
    font-size: 12.5px;
    cursor: default !important;
}
.pf-manual {
    appearance: none;
    background: none;
    border: 0;
    cursor: pointer;
    color: var(--muted);
    font-size: 11.5px;
    text-decoration: underline;
    text-underline-offset: 3px;
    padding: 0;
    justify-self: start;
}
.pf-manual:hover {
    color: var(--txt);
}

.pf-review {
    margin: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px 20px;
    font-size: 13.5px;
    padding: 16px 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-brd);
}
.pf-review dt {
    color: var(--muted);
}
.pf-review dd {
    margin: 0;
    text-align: right;
    font-weight: 600;
}

.pf-wiz-foot {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 22px 20px;
    border-top: 1px solid var(--card-brd);
}
.pf-wiz-err {
    flex: 1;
    font-size: 12px;
    color: var(--down);
    text-align: center;
}
.pf-wiz-foot .pf-btn[hidden] {
    display: none;
}
.pf-wiz-foot .primary {
    margin-left: auto;
    padding: 11px 20px;
}

/* ---------- Colour ---------- */

.pf .up {
    color: var(--up);
}
.pf .down {
    color: var(--down);
}
.pf-modal .up {
    color: var(--up);
}

/* ---------- Narrow ---------- */

@media (max-width: 900px) {
    .pf-tiles {
        grid-template-columns: 1fr 1fr;
    }
    .pf-grid2 {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 560px) {
    .pf-head {
        align-items: stretch;
    }
    .pf-actions {
        width: 100%;
    }
    .pf-actions .pf-btn.primary {
        flex: 1;
    }
    .pf-tile-v {
        font-size: 20px;
    }
    .pf-legend li {
        grid-template-columns: 10px 1fr auto;
    }
    /* The rupee value drops on a phone; the percentage is the comparison. */
    .pf-leg-v {
        display: none;
    }
    .pf-modal {
        padding: 0;
        align-items: flex-end;
    }
    .pf-modal-box {
        max-height: 92vh;
        width: 100%;
        border-radius: 20px 20px 0 0;
    }
}

/* ---------- The basket: picking several stocks at once ---------- */

.pf-chips {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.pf-chips-none {
    color: var(--faint);
    font-size: 12.5px;
}
.pf-chips-n {
    color: var(--faint);
    font-size: 11.5px;
    margin-left: 2px;
}
.pf-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 6px 6px 11px;
    border-radius: 999px;
    background: rgba(139, 92, 246, 0.16);
    border: 1px solid rgba(139, 92, 246, 0.42);
}
.pf-chip b {
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.01em;
}
.pf-chip button {
    appearance: none;
    border: 0;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.08);
    color: var(--muted);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    line-height: 1;
    font-size: 14px;
    padding: 0;
}
.pf-chip button:hover {
    background: var(--down);
    color: #fff;
}

/* One row per picked stock. The columns collapse to a stack on a phone rather
   than shrinking to three unusable slivers. */
.pf-lots {
    display: grid;
    gap: 10px;
}
.pf-lot {
    padding: 12px 13px;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-brd);
}
.pf-lot-head {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 9px;
}
.pf-lot-head b {
    font-size: 13.5px;
}
.pf-lot-head small {
    color: var(--faint);
    font-size: 11.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pf-lot-x {
    appearance: none;
    border: 0;
    background: none;
    cursor: pointer;
    color: var(--faint);
    font-size: 18px;
    line-height: 1;
    padding: 0 2px;
    margin-left: auto;
}
.pf-lot-x:hover {
    color: var(--down);
}
.pf-lot-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1.15fr;
    gap: 9px;
    align-items: end;
}
.pf-lot-f {
    display: grid;
    gap: 4px;
    min-width: 0;
}
.pf-lot-f span {
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
}
.pf-modal .pf-lot-f input {
    padding: 9px 10px;
    font-size: 13px;
}
.pf-lot-inv {
    grid-column: 1 / -1;
    font-size: 11.5px;
    color: var(--faint);
    text-align: right;
    min-height: 14px;
}
.pf-bulkbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    padding-bottom: 4px;
}
.pf-lot-total {
    font-size: 12.5px;
    color: var(--muted);
    margin-left: auto;
}
.pf-lot-total b {
    color: var(--txt);
}

/* ---------- Card-style choices inside a step ---------- */

.pf-cards {
    grid-template-columns: 1fr 1fr;
}
.pf-field .pf-cards {
    margin-top: 2px;
}

/* ---------- Typed symbol, checked against NSE ---------- */

.pf-symchk {
    font-size: 11.5px;
    line-height: 1.55;
    color: var(--faint);
}
.pf-symchk.ok {
    color: var(--up);
}
.pf-symchk.bad {
    color: var(--warn, #f5b651);
}

@media (max-width: 560px) {
    .pf-lot-grid {
        grid-template-columns: 1fr 1fr;
    }
    .pf-lot-grid .pf-lot-f:nth-child(3) {
        grid-column: 1 / -1;
    }
    .pf-cards {
        grid-template-columns: 1fr;
    }
}
