/* Claude review 2: phone Quote rows follow the approved phone frame. */
@media (max-width: 620px) {
  .nd-table-wrap:has(.nd-quote-table) { border: 0; border-radius: 0; overflow: visible; }
  .nd-quote-table:not(.nd-job-table),
  .nd-quote-table:not(.nd-job-table) tbody { display: block; width: 100%; background: transparent; }
  .nd-quote-table:not(.nd-job-table) thead { display: none; }
  .nd-quote-table:not(.nd-job-table) tbody tr { display: grid; grid-template-columns: auto minmax(0, 1fr) 62px; gap: 4px 8px; align-items: baseline; min-height: 64px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
  .nd-quote-table:not(.nd-job-table) tbody td { display: block; border: 0; padding: 0; font-size: 13.5px; }
  .nd-quote-table:not(.nd-job-table) tbody td:nth-child(1),
  .nd-quote-table:not(.nd-job-table) tbody td:nth-child(4) { display: none; }
  .nd-quote-table:not(.nd-job-table) tbody td:nth-child(2) { grid-column: 1; grid-row: 1; font-weight: 600; }
  .nd-quote-table:not(.nd-job-table) tbody td:nth-child(3) { grid-column: 2; grid-row: 1; white-space: nowrap; overflow-wrap: normal; }
  .nd-quote-table:not(.nd-job-table) tbody td:nth-child(5) { grid-column: 1 / 3; grid-row: 2; }
  .nd-quote-table:not(.nd-job-table) tbody td:nth-child(6) { grid-column: 3; grid-row: 1 / 3; align-self: center; text-align: right; font-size: 12.5px; line-height: 18px; }
  .nd-quote-table:not(.nd-job-table) .nd-credit-cell strong { display: block; font-size: 17px; line-height: 22px; }
  .nd-quote-table:not(.nd-job-table) .ps-chip { white-space: nowrap; min-height: 28px; height: 28px; }
  .nd-quote-table:not(.nd-job-table) .ps-chip--quoted { display: none; }
  .nd-quote-table:not(.nd-job-table) .ps-help { font-size: 12.5px; line-height: 18px; margin-top: 0; }
}

.nd-phone-quote-details, .nd-phone-step, .nd-charged-word { display: none; }
@media (max-width: 620px) {
  .nd-steps { display: none; }
  .nd-phone-step { display: block; margin: 0; padding: 16px; font: 500 11.5px/16px var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-muted); }
  .nd-quote-summary > .ps-summary__cell:nth-child(n+3) { display: none; }
  .nd-quote-summary > .ps-summary__cell:nth-child(-n+2) > .ps-help { display: none; }
  .nd-phone-quote-details { display: block; grid-column: 1 / -1; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 12.5px; line-height: 20px; color: var(--ink-muted); }
  .nd-job-table, .nd-job-table tbody { display: block; width: 100%; background: transparent; }
  .nd-job-table thead { display: none; }
  .nd-job-table tbody tr { display: grid; grid-template-columns: auto minmax(0, 1fr) 68px; gap: 6px 8px; position: relative; align-items: baseline; min-height: 76px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
  .nd-job-table tbody td { display: block; border: 0; padding: 0; font-size: 13.5px; }
  .nd-job-table tbody td:nth-child(1) { display: none; }
  .nd-job-table tbody td:nth-child(2) { display: block; grid-column: 1; grid-row: 1; font-weight: 600; }
  .nd-job-table tbody td:nth-child(3) { grid-column: 2 / 4; grid-row: 1; white-space: nowrap; overflow-wrap: normal; }
  .nd-job-table tbody td:nth-child(4) { grid-column: 1 / 3; grid-row: 2; }
  .nd-job-table tbody td:nth-child(5) { grid-column: 3; grid-row: 2; text-align: right; font-size: 12.5px; }
  .nd-job-table .ps-chip { height: 28px; white-space: nowrap; }
  .nd-job-table .ps-help { width: calc(100% + 76px); margin-top: 6px; font-size: 12.5px; line-height: 18px; }
  .nd-job-table .ps-row__link { position: absolute; right: 0; top: 2px; width: 44px; height: 44px; justify-content: center; font-size: 0; }
  .nd-charged-word { display: inline; font-family: var(--font-mono); }
}

/* Native modal top layer prevents later row actions from covering the sheet. */
.nd-sheet-handle { display: none; }
.nd-pop-identity { margin: 0 10px 10px; color: var(--ink-muted); font-size: 12.5px; }
.ps-pop__item { display: flex; align-items: center; gap: 10px; }
.nd-collection-sheet::backdrop { background: var(--scrim); }
@media (max-width: 620px) {
  .nd-collection-sheet { position: fixed; inset: auto 0 0; margin: 0; width: 100%; max-width: 100%; max-height: 80vh; padding: 16px; border-radius: 12px 12px 0 0; }
  .nd-collection-sheet .ps-pop { position: static; width: 100%; max-height: none; border: 0; box-shadow: none; padding: 0; }
  .nd-sheet-handle { display: block; width: 36px; height: 4px; border-radius: 2px; background: var(--line-hover); margin: 0 auto 16px; }
  .nd-collection-sheet .ps-pop__title { font-size: 15.5px; font-family: var(--font-sans); text-transform: none; color: var(--ink); }
  .nd-collection-sheet .ps-help { margin: 12px 10px; }
}

/* Credit amounts and search matches follow the ink tokens. */
.nd-credit-cell strong, .nd-quote-bar .ps-bar__count strong, .nd-job-figures p strong { color: var(--ink); }
.nd-match-passage mark { color: var(--ink-bright); background: var(--amber-tint); padding: 0; }

.nd-library-identity { display:flex; align-items:baseline; gap:12px; min-width:0; flex-wrap:wrap; }
.nd-library-title { font-family:var(--font-sans); font-size:15px; font-weight:500; color:var(--ink); }
@media(max-width:620px) { .nd-library-identity { grid-column:2; grid-row:1; gap:4px; } .nd-library-identity .nd-open { white-space:nowrap; } .nd-library-title { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } }

.nd-number { position:relative; }
.nd-number .ps-label { white-space:nowrap; }
.nd-number input { padding-right:56px; }
.nd-input-max { position:absolute; right:10px; bottom:13px; font-size:12.5px; color:var(--ink-muted); pointer-events:none; }
.nd-date-empty[hidden] { display:none!important; }
.nd-date-is-empty::-webkit-calendar-picker-indicator { opacity:0; }
@media(max-width:620px) {
 [data-result-row] { grid-template-columns:32px minmax(0,1fr) 32px!important; gap:8px!important; min-height:76px; padding:10px 0!important; }
 [data-result-row] .ps-row__n { display:none; }
 [data-result-row] .nd-result-title { grid-column:2; }
 [data-result-row] .ps-row__link { grid-column:3; font-size:0; width:32px; }
 .nd-result-extra { white-space:nowrap; font:12px var(--font-sans); }
 #nd-discovery-output .nd-results-head { flex-direction:row; align-items:center; gap:8px; }
 #nd-discovery-output .nd-results-head > div:first-child .ps-help { display:none; }
 #nd-discovery-output .nd-results-head .ps-btn { padding:8px; }
 #nd-clear-picked { display:none; }
}

.nd-checkout-test { padding:16px; background:var(--amber-tint); border:1px solid var(--amber); border-radius:8px; }
.nd-checkout-steps { display:grid; gap:16px; padding-left:24px; }

.nd-export-refusal { display:grid; gap:20px; }
.nd-export-refusal h2 { color:var(--alarm); display:flex; gap:12px; }

.nd-searching { display:grid; gap:16px; }
.nd-searching[hidden] { display:none; }
.nd-searching h2, .nd-searching p { margin:0; }
.nd-searching .ps-progress { margin:8px 0; }
.nd-paste-form { min-height:calc(100dvh - 260px); grid-template-rows:1fr auto; }
.nd-paste-form > aside { background:var(--surface-raised); color:var(--ink-muted); }
.nd-paste-form > aside h2 { font-size:15.5px; color:var(--ink); }
.ps-segment[aria-pressed="true"]::before, .ps-segment.is-active::before { content:none; }
.nd-auth-form > .ps-help, .nd-auth-form .ps-rule { text-align:left; }
.nd-auth-header > .ps-notice { margin-left:auto; }
.nd-auth-header > .nd-row { margin-left:0; }
@media(max-width:620px) { .nd-paste-form { min-height:calc(100dvh - 170px); } }

@media(min-width:621px) { .ps-seg button[aria-pressed="true"]::before { content:none; } }
@media(max-width:620px) { .ps-seg button[aria-pressed="true"]::before { content:"✓ "; } }

.nd-export.is-refused h2 { color:var(--alarm); }
.nd-export.is-refused .ps-choices, .nd-export.is-refused .nd-export-footer, .nd-export.is-refused form > div:not(.nd-row), .nd-export.is-refused form > .ps-help { display:none; }
.nd-auth-header > .nd-global-test { margin-left:auto; }
@media(max-width:850px) { .nd-auth-header > .nd-global-test { margin-left:-16px; } .nd-auth-header > .nd-row { margin-left:auto; } }

@media(max-width:620px) {
 body:has(#discovery-selection) .nd-header { min-height:0; }
 body:has(#discovery-selection) .nd-header h1, body:has(#discovery-selection) .ps-tabs { display:none; }
 body:has(#discovery-selection) .nd-search-panel { padding-top:16px; padding-bottom:16px; }
 .nd-phone-keyword-note { font-size:12.5px; color:var(--ink-muted); margin:0; }
}
@media(min-width:621px) { .nd-phone-keyword-note { display:none; } }

@media(max-width:620px) {
 body:has(#discovery-selection) #nd-discovery-output { padding-top:0; gap:12px; }
 [data-result-row] { min-height:68px; padding:8px 0!important; }
 [data-result-row] .ps-row__title { padding:0; line-height:20px; }
}


.nd-auth-form .ps-rule { align-items:flex-start; }
@media(max-width:850px) { .nd-shell { align-content:start; } }


.nd-unquoted-phone { display:none; }
@media(max-width:620px) {
 .nd-unquoted-phone { display:inline; }
 .nd-unquoted-desktop { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
}

/* Checkout follows the board's purchase card, unboxed steps and paired actions. */
.nd-checkout-purchase, .nd-checkout-result { width:100%; max-width:770px; }
.nd-checkout-purchase { gap:16px; }
.nd-checkout-steps { list-style:none; counter-reset:checkout-step; padding:0; margin:0; max-width:770px; gap:12px; }
.nd-checkout-steps li { counter-increment:checkout-step; display:grid; grid-template-columns:22px minmax(0,1fr); gap:12px; color:var(--ink); font-size:14px; line-height:22px; }
.nd-checkout-steps li::before { content:counter(checkout-step); width:20px; height:20px; border:1px solid var(--line-control); border-radius:50%; display:grid; place-items:center; font:500 12px/18px var(--font-mono); }
.nd-checkout-flow { gap:24px; }
.nd-checkout-flow .nd-row { gap:10px; }
.nd-checkout-purchase .ps-plan__gets { margin:0; }

@media(max-width:620px) {
 .nd-checkout-flow form.nd-row { flex-direction:column; align-items:stretch; }
 .nd-checkout-flow form.nd-row > .ps-btn { width:100%; }
 .nd-checkout-flow form.nd-row > a { order:2; }
}


.nd-checkout-steps li { padding:0; margin:0; font-size:14.5px; }


@media(max-width:620px) { .nd-job-table tbody td:nth-child(2) { font:500 15px/22px var(--font-sans); } .nd-job-table tbody td:nth-child(3) { font:400 13.5px/18px var(--font-mono); } }

.nd-phone-activity { display:none; }
@media(max-width:850px) { .nd-phone-activity { display:grid; gap:24px; } .nd-phone-activity h3 { font:500 11.5px/16px var(--font-mono); letter-spacing:.06em; text-transform:uppercase; color:var(--ink-faint); margin-bottom:12px; } }

@media(max-width:850px) { .nd-phone-activity { order:6; } }

.nd-payment-phone-label { display:none; }
.nd-checkout-link { display:flex; align-items:center; gap:12px; min-height:56px; color:var(--ink); text-decoration:none; border-bottom:1px solid var(--line-soft); }
.nd-checkout-link > .nd-item-main { flex:1; display:flex; flex-direction:column; gap:2px; }
.nd-checkout-link > .ps-ic { color:var(--ink-muted); }
@media(max-width:620px) {
 .nd-payments .nd-tablewrap { overflow:visible; border:0; }
 .nd-payments .ps-ptable, .nd-payments .ps-ptable tbody { display:block; width:100%; min-width:0; }
 .nd-payments .ps-ptable thead { display:none; }
 .nd-payments .ps-ptable tr { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px 12px; padding:16px 0; border-bottom:1px solid var(--line); }
 .nd-payments .ps-ptable td { display:block; padding:0; border:0; white-space:normal; font-size:13px; text-align:left; }
 .nd-payments .ps-ptable td:nth-child(1) { grid-column:1; grid-row:1; }
 .nd-payments .ps-ptable td:nth-child(2) { grid-column:2; grid-row:1; text-align:right; font-family:var(--font-mono); font-size:14px; }
 .nd-payments .ps-ptable td:nth-child(4) { grid-column:1 / -1; grid-row:2; }
 .nd-payments .ps-ptable td:nth-child(3) { grid-column:1; grid-row:3; }
 .nd-payments .ps-ptable td:nth-child(5) { grid-column:2; grid-row:3; }
 .nd-payments .ps-ptable td:nth-child(6) { grid-column:1 / -1; grid-row:4; color:var(--ink-muted); }
 .nd-payment-phone-label { display:inline; }
}

.nd-checkout-outcome { max-width:980px; padding:24px 28px; }
.nd-checkout-outcome > .ps-ic { width:24px; height:24px; flex:0 0 24px; margin-top:2px; }
.nd-checkout-outcome.ps-msg--success > .ps-ic { color:var(--saved); }
.nd-checkout-outcome .ps-msg__body { gap:12px; }
.nd-checkout-outcome .ps-msg__actions { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin-top:8px; }
.nd-checkout-result-meta { display:flex; align-items:center; flex-wrap:wrap; gap:6px 12px; color:var(--ink-muted); font-size:13px; }
.nd-checkout-result-meta .ps-test { min-height:26px; font-size:12px; }
@media(max-width:620px) { .nd-checkout-outcome { padding:20px 16px; } .nd-checkout-outcome .ps-msg__actions { flex-direction:column; align-items:stretch; } .nd-checkout-outcome .ps-msg__actions > *, .nd-checkout-outcome .ps-msg__actions .ps-btn { width:100%; } }

.nd-export-refusal[hidden] { display:none; }
.nd-export.is-refused > .nd-export-normal { display:none; }
.nd-export-refusal .ps-msg { padding:18px 16px; }
.nd-export-refusal .ps-msg h2 { display:block; color:var(--ink); }
.nd-export-refusal .ps-msg > .ps-ic { color:var(--alarm); flex-shrink:0; }
.nd-export-normal { display:flex; flex-direction:column; gap:16px; }
@media(max-width:620px) { .nd-refusal-actions { flex-direction:column; align-items:stretch; } .nd-refusal-actions .ps-btn { width:100%; } }

.nd-expired-actions { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
@media(max-width:620px) { .nd-expired-actions { flex-direction:column; align-items:stretch; } .nd-expired-actions > * { width:100%; } .nd-expired-actions .ps-btn { width:100%; } }

@media(max-width:850px) { .nd-library-pagination { order:5; } .nd-phone-activity .ps-activity__item { flex-wrap:wrap; gap:8px; } }
