/* =========================================================================
   Veto · Control-surface screens for every secondary navigation node.
   Routed via /scaffold/<key>. Each key renders a real, dense, role-aware
   working screen from SURFACE_CONTENT — no placeholder, no "coming soon".
   Data is demo fixture content; the office decides, Veto records the review.
   ========================================================================= */
const { useState: useStateScaffold } = React;

const SURFACE_CONTENT = {
  "money-release": {
    "key": "money-release",
    "line": "money",
    "eyebrow": "MONEY CONTROL",
    "title": "Release Requests",
    "sub": "The no-bypass gate. Outgoing money queued against the current, source-linked record the office relied on. If that record is stale or missing, the request returns for an exception instead of going out.",
    "ownerNote": "One release is held on your decision: SP-0214 names an entity payee whose managing member of record matches the acting officer.",
    "stats": [
      {
        "label": "Held on stale record",
        "value": "1",
        "tone": "warn",
        "note": "Returns until v2 record or exception"
      },
      {
        "label": "Cleared to support release",
        "value": "3",
        "tone": "ok",
        "note": "Current record on file"
      },
      {
        "label": "Blocked on conflict",
        "value": "1",
        "tone": "stop",
        "note": "Officer / payee association"
      },
      {
        "label": "Open across files",
        "value": "5",
        "tone": "neutral"
      }
    ],
    "table": {
      "caption": "Each request is bound to the record that supports it. A held request never leaves on its own.",
      "columns": [
        {
          "key": "file",
          "label": "File",
          "mono": true
        },
        {
          "key": "action",
          "label": "Action"
        },
        {
          "key": "amount",
          "label": "Amount",
          "align": "right",
          "mono": true
        },
        {
          "key": "dest",
          "label": "Destination",
          "mono": true
        },
        {
          "key": "record",
          "label": "Supporting record",
          "mono": true
        }
      ],
      "rows": [
        {
          "cells": {
            "file": "SP-0214",
            "action": "Release seller proceeds",
            "amount": "$182,742.00",
            "dest": "Chase ··4431",
            "record": "REC-SP0214-v2 (draft)"
          },
          "status": "Blocked",
          "tone": "stop",
          "support": "Payee Whitfield Coast Holdings LLC; managing member of record matches the acting officer. Held until owner exception."
        },
        {
          "cells": {
            "file": "SP-0213",
            "action": "Release seller proceeds",
            "amount": "$402,180.00",
            "dest": "Wells Fargo ··7720",
            "record": "Awaiting v1"
          },
          "status": "Held",
          "tone": "warn",
          "support": "Final settlement statement not yet received. No current record to support release."
        },
        {
          "cells": {
            "file": "BF-0318",
            "action": "Return buyer overfund",
            "amount": "$3,540.00",
            "dest": "Buyer · BofA ··5188",
            "record": "REC-BF0318-v1"
          },
          "status": "Cleared",
          "tone": "ok",
          "support": "Overage matched to the buyer funding record; destination source-linked to funds received."
        },
        {
          "cells": {
            "file": "RF-0142",
            "action": "Release payoff",
            "amount": "$612,300.00",
            "dest": "Servicer ··2031",
            "record": "Awaiting callback"
          },
          "status": "Awaiting",
          "tone": "warn",
          "support": "Beneficiary callback on number of record still open. Demand current through close required first."
        },
        {
          "cells": {
            "file": "SP-0211",
            "action": "Release seller proceeds",
            "amount": "$1,029,450.00",
            "dest": "Schwab ··6014",
            "record": "REC-SP0211-v1"
          },
          "status": "Recorded",
          "tone": "ok",
          "support": "Trust certification and destination source-linked. Record current; release supports the office decision."
        }
      ]
    },
    "secondary": {
      "kind": "limitation",
      "title": "What a cleared request does and does not mean",
      "items": [
        "Cleared means a current, source-linked record supports the release. It is not confirmation of good funds, account control, or authority to receive.",
        "Veto does not move money or authorize the wire. The office decides and acts; Veto records the review.",
        "A request held on a stale record returns to Tasks; it does not silently expire into a send."
      ]
    },
    "footer": [
      {
        "label": "Open SP-0214",
        "to": "/file/$id",
        "params": {
          "id": "SP-0214"
        },
        "variant": "primary"
      },
      {
        "label": "Proceeds queue",
        "to": "/funds/proceeds",
        "variant": "ghost"
      },
      {
        "label": "Tasks",
        "to": "/tasks",
        "variant": "ghost"
      }
    ]
  },
  "money-changes": {
    "key": "money-changes",
    "line": "money",
    "eyebrow": "MONEY CONTROL",
    "title": "Changes After Reliance",
    "sub": "The change ledger. Every value that moved after the office already relied on a prior state: a payoff amount, a destination, a settlement version. A change here can stale a signed record.",
    "ownerNote": "One change staled a signed record and blocked a release on SP-0214; the v2 record or your exception is required to clear it.",
    "stats": [
      {
        "label": "Records staled this week",
        "value": "4",
        "tone": "warn"
      },
      {
        "label": "Blocked downstream actions",
        "value": "1",
        "tone": "stop",
        "note": "SP-0214 release"
      },
      {
        "label": "Oldest open change",
        "value": "42m",
        "tone": "neutral",
        "note": "SP-0214 destination"
      }
    ],
    "table": {
      "caption": "Each change shows the prior value the office relied on, the new value, and the record it staled.",
      "columns": [
        {
          "key": "file",
          "label": "File",
          "mono": true
        },
        {
          "key": "field",
          "label": "What changed"
        },
        {
          "key": "from",
          "label": "Prior",
          "mono": true
        },
        {
          "key": "to",
          "label": "Changed to",
          "mono": true
        },
        {
          "key": "staled",
          "label": "Staled record",
          "mono": true
        }
      ],
      "rows": [
        {
          "cells": {
            "file": "SP-0214",
            "field": "Seller proceeds payee",
            "from": "James Whitfield · Schwab ··9876",
            "to": "Whitfield Coast Holdings LLC · Chase ··4431",
            "staled": "Seller Proceeds Record v1"
          },
          "status": "Blocked",
          "tone": "stop",
          "support": "Payee changed from individual to entity after reliance. Release held until Seller Proceeds Record v2 or an owner exception is recorded."
        },
        {
          "cells": {
            "file": "SP-0213",
            "field": "Settlement statement version",
            "from": "Statement v2 · net $402,180.00",
            "to": "Statement v3 · net $399,640.00",
            "staled": "Proceeds draft v2"
          },
          "status": "Exception required",
          "tone": "warn",
          "support": "Net proceeds moved $2,540.00 after the prior draft. Amount on the supporting record no longer matches the current statement."
        },
        {
          "cells": {
            "file": "RF-0142",
            "field": "Payoff good-through date",
            "from": "Good through 2026-06-05",
            "to": "Good through 2026-05-28",
            "staled": "Payoff Record v1"
          },
          "status": "Open",
          "tone": "warn",
          "support": "Demand now expires before the scheduled close. Per diem and a refreshed demand source are required before release."
        },
        {
          "cells": {
            "file": "BF-0315",
            "field": "Buyer funding amount",
            "from": "Expected $469,500.00",
            "to": "Posted $466,960.00",
            "staled": "Funding Record v1"
          },
          "status": "Open",
          "tone": "warn",
          "support": "Shortage of $2,540.00 against expected. Good-funds status under office policy must be re-reviewed before reliance."
        },
        {
          "cells": {
            "file": "SP-0211",
            "field": "Trustee of record",
            "from": "Successor trustee pending",
            "to": "Successor trustee letter on file",
            "staled": "—"
          },
          "status": "Recorded",
          "tone": "ok",
          "support": "Authority source now current; the change cleared a prior hold rather than staling a record."
        }
      ]
    },
    "secondary": {
      "kind": "note",
      "title": "Why a change stales a record",
      "items": [
        "A signed record captures the exact state the office relied on. When a load-bearing value moves, the old record stays visible but no longer supports the action.",
        "Veto records the change and opens the required task. It does not approve the new value or detect intent."
      ]
    },
    "footer": [
      {
        "label": "Open SP-0214",
        "to": "/file/$id",
        "params": {
          "id": "SP-0214"
        },
        "variant": "primary"
      },
      {
        "label": "Tasks",
        "to": "/tasks",
        "variant": "ghost"
      },
      {
        "label": "Records",
        "to": "/records",
        "variant": "ghost"
      }
    ]
  },
  "money-exceptions": {
    "key": "money-exceptions",
    "line": "money",
    "eyebrow": "MONEY CONTROL",
    "title": "Money Exceptions",
    "sub": "Manager-reviewed money gaps converted into permission to proceed, each with the limitation that was accepted and who accepted it.",
    "ownerNote": "Two exceptions await your decision; one expires today at 17:30 and would permit a time-limited release with the limitation visible on the record.",
    "stats": [
      {
        "label": "Awaiting owner decision",
        "value": "2",
        "tone": "warn"
      },
      {
        "label": "Active with expiry",
        "value": "3",
        "tone": "ok",
        "note": "Limitation recorded"
      },
      {
        "label": "Expired unused",
        "value": "1",
        "tone": "neutral"
      }
    ],
    "table": {
      "caption": "An exception is permission to proceed with a named limitation, an approver, and an expiry. It is never a clean bill.",
      "columns": [
        {
          "key": "id",
          "label": "Exception",
          "mono": true
        },
        {
          "key": "file",
          "label": "File",
          "mono": true
        },
        {
          "key": "limitation",
          "label": "Limitation accepted"
        },
        {
          "key": "approver",
          "label": "Approver"
        },
        {
          "key": "expires",
          "label": "Expires",
          "mono": true
        }
      ],
      "rows": [
        {
          "cells": {
            "id": "EXC-SP0214-01",
            "file": "SP-0214",
            "limitation": "Destination changed after reliance; seller callback still open",
            "approver": "Owner / Principal",
            "expires": "2026-05-21 17:30"
          },
          "status": "Awaiting",
          "tone": "warn",
          "support": "Would permit a time-limited release request for $182,742.00 with the open callback and officer-conflict limitation shown on the record."
        },
        {
          "cells": {
            "id": "EXC-RF0142-01",
            "file": "RF-0142",
            "limitation": "Payoff demand good-through is short of close by 3 days",
            "approver": "Javier Reyes",
            "expires": "2026-05-26 12:00"
          },
          "status": "Awaiting",
          "tone": "warn",
          "support": "Permits release if per diem is added and a refreshed demand source is attached before the wire."
        },
        {
          "cells": {
            "id": "EXC-BF0315-01",
            "file": "BF-0315",
            "limitation": "Good-funds reviewed on provisional posting, not final settlement",
            "approver": "Javier Reyes",
            "expires": "2026-05-28 09:00"
          },
          "status": "Recorded",
          "tone": "ok",
          "support": "Active. Limitation visible on the funding record; release of dependent proceeds remains held until final posting."
        },
        {
          "cells": {
            "id": "EXC-SP0211-01",
            "file": "SP-0211",
            "limitation": "Trust certification accepted pending recorded successor-trustee letter",
            "approver": "Javier Reyes",
            "expires": "2026-05-24 17:00"
          },
          "status": "Recorded",
          "tone": "ok",
          "support": "Active exception; superseded once the successor-trustee letter was filed, limitation retained on the record."
        },
        {
          "cells": {
            "id": "EXC-SP0207-01",
            "file": "SP-0207",
            "limitation": "Late callback accepted within manager window",
            "approver": "Javier Reyes",
            "expires": "2026-05-16 18:00"
          },
          "status": "Restricted",
          "tone": "neutral",
          "support": "Expired unused; the release was supported by a current record before the exception was needed."
        }
      ]
    },
    "secondary": {
      "kind": "limitation",
      "title": "What an exception is",
      "items": [
        "An exception records a manager's decision to proceed despite a named gap. The limitation stays on the record and the receipt; it is not erased by the approval.",
        "Veto does not grant the exception or weigh the risk. It records who accepted what, and when it expires."
      ]
    },
    "footer": [
      {
        "label": "Open SP-0214",
        "to": "/file/$id",
        "params": {
          "id": "SP-0214"
        },
        "variant": "primary"
      },
      {
        "label": "Records",
        "to": "/records",
        "variant": "ghost"
      },
      {
        "label": "Tasks",
        "to": "/tasks",
        "variant": "ghost"
      }
    ]
  },
  "money-trust": {
    "key": "money-trust",
    "line": "money",
    "eyebrow": "ACCOUNTS",
    "title": "Trust Accounts",
    "sub": "The office trust accounts, read-only. Veto watches the balance against the record; it does not become the bank portal.",
    "ownerNote": "Trust ledger and open-escrow obligations reconcile across all four accounts; one account shows a posting still under review.",
    "stats": [
      {
        "label": "Trust accounts",
        "value": "4",
        "tone": "neutral",
        "note": "Read-only"
      },
      {
        "label": "Ledger total",
        "value": "$1,535,400.00",
        "tone": "ok"
      },
      {
        "label": "Open escrows held",
        "value": "7",
        "tone": "neutral"
      },
      {
        "label": "Postings in review",
        "value": "1",
        "tone": "warn"
      }
    ],
    "table": {
      "caption": "Balances are read from the bank of record and compared to the office ledger. Veto records the comparison; it does not move funds.",
      "columns": [
        {
          "key": "account",
          "label": "Account",
          "mono": true
        },
        {
          "key": "bank",
          "label": "Bank of record"
        },
        {
          "key": "ledger",
          "label": "Ledger held",
          "align": "right",
          "mono": true
        },
        {
          "key": "files",
          "label": "Open files",
          "align": "right",
          "mono": true
        },
        {
          "key": "recon",
          "label": "Reconciliation"
        }
      ],
      "rows": [
        {
          "cells": {
            "account": "Trust ··4012",
            "bank": "First Republic",
            "ledger": "$902,180.00",
            "files": "3",
            "recon": "Matched to ledger 2026-06-22"
          },
          "status": "Matched",
          "tone": "ok",
          "support": "Balance equals the sum of held escrow obligations. No variance recorded."
        },
        {
          "cells": {
            "account": "Trust ··6014",
            "bank": "Schwab",
            "ledger": "$481,620.00",
            "files": "2",
            "recon": "One posting under review"
          },
          "status": "In review",
          "tone": "warn",
          "support": "A $2,540.00 incoming posting is not yet attached to a funding record. Held out of available balance until source-linked."
        },
        {
          "cells": {
            "account": "Trust ··2208",
            "bank": "Wells Fargo",
            "ledger": "$118,400.00",
            "files": "1",
            "recon": "Matched to ledger 2026-06-22"
          },
          "status": "Matched",
          "tone": "ok",
          "support": "Single open escrow; balance reconciles to the seller proceeds obligation on file."
        },
        {
          "cells": {
            "account": "Trust ··8830",
            "bank": "BofA",
            "ledger": "$33,200.00",
            "files": "1",
            "recon": "Matched to ledger 2026-06-21"
          },
          "status": "Cleared",
          "tone": "ok",
          "support": "Fee and recording reserve for one closing file; reconciled and current."
        }
      ]
    },
    "secondary": {
      "kind": "limitation",
      "title": "Read-only by design",
      "items": [
        "Veto displays balances and the ledger comparison. It is not the banking portal and cannot initiate, hold, or release funds.",
        "A matched balance records that ledger and bank agree at the read time. It is not a guarantee of good funds or available cash."
      ]
    },
    "footer": [
      {
        "label": "Funds overview",
        "to": "/funds",
        "variant": "primary"
      },
      {
        "label": "Records",
        "to": "/records",
        "variant": "ghost"
      }
    ]
  },
  "money-destinations": {
    "key": "money-destinations",
    "line": "money",
    "eyebrow": "ACCOUNTS",
    "title": "Destination Accounts",
    "sub": "Where outgoing money may go, each tied to the files, payees, and source checks that touched it, with limitations shown on every row.",
    "ownerNote": "One destination is held: the entity account on SP-0214 is associated with the acting officer and awaits your decision.",
    "stats": [
      {
        "label": "Destinations on file",
        "value": "12",
        "tone": "neutral"
      },
      {
        "label": "Held on conflict",
        "value": "1",
        "tone": "stop",
        "note": "SP-0214 entity payee"
      },
      {
        "label": "Awaiting account / payee check",
        "value": "2",
        "tone": "warn"
      }
    ],
    "table": {
      "caption": "Every destination carries what its source checks do and do not prove. Full account values stay behind separate permission.",
      "columns": [
        {
          "key": "dest",
          "label": "Destination",
          "mono": true
        },
        {
          "key": "payee",
          "label": "Payee"
        },
        {
          "key": "file",
          "label": "File",
          "mono": true
        },
        {
          "key": "check",
          "label": "Last source check"
        },
        {
          "key": "limit",
          "label": "Limitation"
        }
      ],
      "rows": [
        {
          "cells": {
            "dest": "Chase ··4431",
            "payee": "Whitfield Coast Holdings LLC",
            "file": "SP-0214",
            "check": "Account / payee · 2026-05-21",
            "limit": "Entity payee; managing member matches acting officer"
          },
          "status": "Blocked",
          "tone": "stop",
          "support": "Account exists and payee name matched on file. Held: destination is associated with the officer of record on this file."
        },
        {
          "cells": {
            "dest": "Servicer ··2031",
            "payee": "Servicer of record",
            "file": "RF-0142",
            "check": "Awaiting callback",
            "limit": "Wire instructions from demand; not yet independently checked"
          },
          "status": "Awaiting",
          "tone": "warn",
          "support": "Callback to the beneficiary on the number of record is still open before this destination supports release."
        },
        {
          "cells": {
            "dest": "Schwab ··6014",
            "payee": "Hiroshi Tanaka",
            "file": "SP-0211",
            "check": "Account / payee · 2026-05-22",
            "limit": "Account existence and name match only"
          },
          "status": "Matched",
          "tone": "ok",
          "support": "Seller destination source-linked to the proceeds record. Not live bank confirmation or proof of account control."
        },
        {
          "cells": {
            "dest": "Wells Fargo ··7720",
            "payee": "Adaeze Okafor",
            "file": "SP-0213",
            "check": "Account / payee · 2026-05-21",
            "limit": "Name match only; statement version stale"
          },
          "status": "Exception required",
          "tone": "warn",
          "support": "Destination checks out, but the supporting settlement statement was superseded; amount must be re-recorded."
        },
        {
          "cells": {
            "dest": "BofA ··5188",
            "payee": "Priya Mehta (buyer)",
            "file": "BF-0318",
            "check": "Account / payee · 2026-05-22",
            "limit": "Refund destination matched to funds received"
          },
          "status": "Cleared",
          "tone": "ok",
          "support": "Overfund return destination matched to the account the buyer funded from."
        }
      ]
    },
    "secondary": {
      "kind": "limitation",
      "title": "What a destination check proves",
      "items": [
        "An account / payee check supports account existence and payee-name match. It is not live bank confirmation and proves neither control nor authority to receive.",
        "Full account and routing numbers are restricted; rows show the last-four mask and the limitation, never the raw value."
      ]
    },
    "footer": [
      {
        "label": "Open SP-0214",
        "to": "/file/$id",
        "params": {
          "id": "SP-0214"
        },
        "variant": "primary"
      },
      {
        "label": "Account checks",
        "to": "/funds",
        "variant": "ghost"
      },
      {
        "label": "Records",
        "to": "/records",
        "variant": "ghost"
      }
    ]
  },
  "money-sources": {
    "key": "money-sources",
    "line": "money",
    "eyebrow": "ACCOUNTS",
    "title": "Funding Source Accounts",
    "sub": "Where incoming money came from: buyer, lender, earnest money, and replacement funding, each with its source rows.",
    "ownerNote": "Two incoming legs post short of expected; good-funds status under office policy is re-reviewed before any dependent release.",
    "stats": [
      {
        "label": "Source accounts",
        "value": "8",
        "tone": "neutral"
      },
      {
        "label": "Posted and matched",
        "value": "5",
        "tone": "ok"
      },
      {
        "label": "Short or pending",
        "value": "2",
        "tone": "warn"
      }
    ],
    "table": {
      "caption": "Each incoming leg is matched to its funding record and the source rows that support reliance.",
      "columns": [
        {
          "key": "src",
          "label": "Source account",
          "mono": true
        },
        {
          "key": "party",
          "label": "Origin"
        },
        {
          "key": "file",
          "label": "File",
          "mono": true
        },
        {
          "key": "expected",
          "label": "Expected",
          "align": "right",
          "mono": true
        },
        {
          "key": "posted",
          "label": "Posted",
          "align": "right",
          "mono": true
        }
      ],
      "rows": [
        {
          "cells": {
            "src": "BofA ··5188",
            "party": "Priya Mehta · buyer closing funds",
            "file": "BF-0318",
            "expected": "$469,500.00",
            "posted": "$469,500.00"
          },
          "status": "Matched",
          "tone": "ok",
          "support": "Incoming funds matched to the buyer funding record and office file. Origin bank source-linked."
        },
        {
          "cells": {
            "src": "Schwab ··6014",
            "party": "Hiroshi Tanaka · earnest money",
            "file": "BF-0315",
            "expected": "$95,350.00",
            "posted": "$92,810.00"
          },
          "status": "Held",
          "tone": "warn",
          "support": "Posted $2,540.00 short of expected. Good-funds status under office policy held until the shortage is reconciled."
        },
        {
          "cells": {
            "src": "First Republic ··5521",
            "party": "Lender wire · loan #5521",
            "file": "BF-0315",
            "expected": "$1,374,000.00",
            "posted": "Scheduled 2026-05-24"
          },
          "status": "Awaiting",
          "tone": "warn",
          "support": "Lender funding desk callback on file; wire scheduled. Not yet posted, so it does not support reliance."
        },
        {
          "cells": {
            "src": "Chase ··3380",
            "party": "Adaeze Okafor · buyer closing funds",
            "file": "BF-0317",
            "expected": "$845,000.00",
            "posted": "$845,000.00"
          },
          "status": "Matched",
          "tone": "ok",
          "support": "Full closing funds posted and matched to the funding record; source-of-funds narrative complete."
        },
        {
          "cells": {
            "src": "QI ··7715",
            "party": "Replacement funding · 1031 intermediary",
            "file": "RF-0142",
            "expected": "$612,300.00",
            "posted": "Pending exchange ID"
          },
          "status": "Open",
          "tone": "warn",
          "support": "Qualified intermediary leg awaits identification of the replacement property before the funding record can be supported."
        }
      ]
    },
    "secondary": {
      "kind": "limitation",
      "title": "Posted is not good funds",
      "items": [
        "A posted balance records that money arrived. Good-funds status under office policy is a separate review and may still require a hold period.",
        "Veto records the source and the comparison to expected. It does not confirm the wire origin's legitimacy or detect fraud."
      ]
    },
    "footer": [
      {
        "label": "Funding In queue",
        "to": "/funds/funding-in",
        "variant": "primary"
      },
      {
        "label": "Funds overview",
        "to": "/funds",
        "variant": "ghost"
      }
    ]
  },
  "money-payees": {
    "key": "money-payees",
    "line": "money",
    "eyebrow": "ACCOUNTS",
    "title": "Payee Directory",
    "sub": "Cross-file payee memory. The same seller, lender, or beneficiary across files, so a changed account or callback number stands out.",
    "ownerNote": "One payee changed its account between files and another changed its callback number; both are surfaced for your review before release.",
    "stats": [
      {
        "label": "Payees across open files",
        "value": "9",
        "tone": "neutral"
      },
      {
        "label": "Account changed vs. prior file",
        "value": "1",
        "tone": "stop"
      },
      {
        "label": "Callback number changed",
        "value": "1",
        "tone": "warn"
      }
    ],
    "table": {
      "caption": "Cross-file memory makes a changed account or callback number visible instead of silent.",
      "columns": [
        {
          "key": "payee",
          "label": "Payee"
        },
        {
          "key": "seen",
          "label": "Seen on",
          "mono": true
        },
        {
          "key": "prior",
          "label": "Prior account",
          "mono": true
        },
        {
          "key": "current",
          "label": "Current account",
          "mono": true
        },
        {
          "key": "callback",
          "label": "Callback number"
        }
      ],
      "rows": [
        {
          "cells": {
            "payee": "James Whitfield",
            "seen": "SP-0214, SP-0209",
            "prior": "Schwab ··9876",
            "current": "Chase ··4431 (entity)",
            "callback": "On number of record"
          },
          "status": "Mismatch",
          "tone": "stop",
          "support": "Account moved from the individual's Schwab account to an entity Chase account between reliance states. Held for review."
        },
        {
          "cells": {
            "payee": "Servicer of record",
            "seen": "RF-0142, SP-0211",
            "prior": "··2031",
            "current": "··2031",
            "callback": "Changed since prior file"
          },
          "status": "Held",
          "tone": "warn",
          "support": "Account unchanged, but the demand-provided callback number differs from the prior file. Independent callback required."
        },
        {
          "cells": {
            "payee": "Hiroshi Tanaka",
            "seen": "SP-0211, BF-0315",
            "prior": "Schwab ··6014",
            "current": "Schwab ··6014",
            "callback": "On number of record"
          },
          "status": "Matched",
          "tone": "ok",
          "support": "Seller account and callback consistent across the proceeds and funding files."
        },
        {
          "cells": {
            "payee": "Adaeze Okafor",
            "seen": "SP-0213, BF-0317",
            "prior": "Wells Fargo ··7720",
            "current": "Wells Fargo ··7720",
            "callback": "On number of record"
          },
          "status": "Matched",
          "tone": "ok",
          "support": "Consistent account across seller and buyer files; no change to surface."
        },
        {
          "cells": {
            "payee": "First Republic (lender)",
            "seen": "BF-0315",
            "prior": "—",
            "current": "··5521",
            "callback": "Published funding desk"
          },
          "status": "Recorded",
          "tone": "ok",
          "support": "First appearance; lender wire instructions on letterhead, callback at the published number."
        }
      ]
    },
    "secondary": {
      "kind": "note",
      "title": "Why cross-file memory matters",
      "items": [
        "The same payee paid to a new account, or a callback number that quietly changed, is the pattern an officer is most likely to miss on a single file.",
        "Veto records the difference and surfaces it. It does not allege intent or block the file on its own; the office decides."
      ]
    },
    "footer": [
      {
        "label": "Open SP-0214",
        "to": "/file/$id",
        "params": {
          "id": "SP-0214"
        },
        "variant": "primary"
      },
      {
        "label": "Funds overview",
        "to": "/funds",
        "variant": "ghost"
      }
    ]
  },
  "money-checks": {
    "key": "money-checks",
    "line": "money",
    "eyebrow": "ACCOUNTS",
    "title": "Account Checks",
    "sub": "Every account / payee check and what it does and does not prove. Matched by API is not live bank confirmation, and proves neither control nor authority.",
    "ownerNote": "All checks recorded with limitations visible; one returned a Secretary-of-State mismatch tying the payee entity to the acting officer.",
    "stats": [
      {
        "label": "Checks recorded",
        "value": "14",
        "tone": "neutral"
      },
      {
        "label": "Returned a mismatch",
        "value": "1",
        "tone": "stop",
        "note": "SOS entity / officer"
      },
      {
        "label": "Awaiting result",
        "value": "2",
        "tone": "warn"
      }
    ],
    "table": {
      "caption": "A check is a source row, never a verdict. Each row states the result and its limitation.",
      "columns": [
        {
          "key": "check",
          "label": "Check"
        },
        {
          "key": "file",
          "label": "File",
          "mono": true
        },
        {
          "key": "result",
          "label": "Result"
        },
        {
          "key": "proves",
          "label": "Supports"
        },
        {
          "key": "notprove",
          "label": "Does not prove"
        }
      ],
      "rows": [
        {
          "cells": {
            "check": "Account / payee check",
            "file": "SP-0214",
            "result": "Account exists; payee Whitfield Coast Holdings LLC",
            "proves": "Account existence, payee-name match",
            "notprove": "Live bank confirmation, account control, authority"
          },
          "status": "Matched",
          "tone": "ok",
          "support": "Provider returned a match. Recorded as a source row with its limitation; not permission to release."
        },
        {
          "cells": {
            "check": "Secretary of State / KYB",
            "file": "SP-0214",
            "result": "Active CA LLC; managing member of record M. Lane",
            "proves": "Registration, status, managing member",
            "notprove": "Intent, account control, release authority"
          },
          "status": "Mismatch",
          "tone": "stop",
          "support": "Managing member of record matches the acting officer on this file. Surfaced as a conflict signal."
        },
        {
          "cells": {
            "check": "Independent callback",
            "file": "RF-0142",
            "result": "Pending callback to number of record",
            "proves": "Read-back from the reached party once recorded",
            "notprove": "Identity beyond the call, legal authority"
          },
          "status": "Open",
          "tone": "warn",
          "support": "A callback is evidence, never permission. Held open until the beneficiary reads back the destination."
        },
        {
          "cells": {
            "check": "Phone line context (Twilio)",
            "file": "RF-0142",
            "result": "Non-fixed VoIP; demand-provided number",
            "proves": "Line type and validity as context",
            "notprove": "That the line belongs to the true beneficiary"
          },
          "status": "Awaiting",
          "tone": "warn",
          "support": "A non-fixed VoIP on a demand-provided number is recorded as context that raises the bar for the callback."
        },
        {
          "cells": {
            "check": "Identity (Persona)",
            "file": "SP-0211",
            "result": "ID + selfie captured; name match recorded",
            "proves": "An identity check result",
            "notprove": "Authority over an account"
          },
          "status": "Recorded",
          "tone": "ok",
          "support": "Identity result recorded as a source row. Does not establish control of the destination account."
        }
      ]
    },
    "secondary": {
      "kind": "limitation",
      "title": "Matched by API is not confirmation",
      "items": [
        "A check returns what a provider read at a point in time. Veto records the result and its limitation; it does not confirm good funds, account control, or authority.",
        "No check is a verdict. The office weighs the source rows together and decides; Veto records the review."
      ]
    },
    "footer": [
      {
        "label": "Open SP-0214",
        "to": "/file/$id",
        "params": {
          "id": "SP-0214"
        },
        "variant": "primary"
      },
      {
        "label": "Restricted details",
        "to": "/settings",
        "variant": "ghost"
      },
      {
        "label": "Records",
        "to": "/records",
        "variant": "ghost"
      }
    ]
  },
  "money-restricted": {
    "key": "money-restricted",
    "line": "money",
    "eyebrow": "ACCOUNTS",
    "title": "Restricted Details",
    "sub": "Sensitive values behind separate permission: full account and routing numbers, raw provider responses, and identity fields.",
    "ownerNote": "You and the manager can open restricted values with a logged reason; the restricted reviewer is read-masked. One access is pending your grant.",
    "stats": [
      {
        "label": "Restricted fields",
        "value": "11",
        "tone": "neutral",
        "note": "Masked by default"
      },
      {
        "label": "Access requests pending",
        "value": "1",
        "tone": "warn"
      },
      {
        "label": "Opened this week (logged)",
        "value": "3",
        "tone": "ok"
      }
    ],
    "table": {
      "caption": "Every row shows the masked value and its limitation; the full value opens only with permission and is logged.",
      "columns": [
        {
          "key": "field",
          "label": "Restricted field"
        },
        {
          "key": "file",
          "label": "File",
          "mono": true
        },
        {
          "key": "masked",
          "label": "Shown",
          "mono": true
        },
        {
          "key": "who",
          "label": "Who may open"
        },
        {
          "key": "log",
          "label": "Last access"
        }
      ],
      "rows": [
        {
          "cells": {
            "field": "Full destination account / routing",
            "file": "SP-0214",
            "masked": "Chase ··4431",
            "who": "Owner, manager",
            "log": "Requested by ML · 2026-05-21"
          },
          "status": "Awaiting",
          "tone": "warn",
          "support": "Access request open pending owner grant. The masked row shows the source limitation without exposing the raw value."
        },
        {
          "cells": {
            "field": "Raw provider response (account check)",
            "file": "SP-0214",
            "masked": "JSON withheld",
            "who": "Owner, manager",
            "log": "Opened by JR · 2026-05-21"
          },
          "status": "Recorded",
          "tone": "ok",
          "support": "Raw KYB/account-check payload opened with a logged reason. Access recorded on the audit packet."
        },
        {
          "cells": {
            "field": "Identity fields (Persona)",
            "file": "SP-0211",
            "masked": "ID type only",
            "who": "Owner, manager",
            "log": "Not opened"
          },
          "status": "Restricted",
          "tone": "neutral",
          "support": "Government-ID and selfie fields held behind permission. The check result is visible; the underlying identity data is not."
        },
        {
          "cells": {
            "field": "Full source account / routing",
            "file": "BF-0318",
            "masked": "BofA ··5188",
            "who": "Owner, manager",
            "log": "Opened by ML · 2026-05-20"
          },
          "status": "Recorded",
          "tone": "ok",
          "support": "Opened to confirm the refund destination matched funds received; access logged with reason."
        },
        {
          "cells": {
            "field": "Any restricted value",
            "file": "—",
            "masked": "Masked",
            "who": "Restricted reviewer (AK)",
            "log": "Read-masked, no open"
          },
          "status": "Locked",
          "tone": "stop",
          "support": "Anita Kuroda holds read-only restricted access; full values stay locked and cannot be opened from this role."
        }
      ]
    },
    "secondary": {
      "kind": "limitation",
      "title": "Permission, not secrecy",
      "items": [
        "Restricted values are masked by default and open only with separate permission. Each open records who, when, and why on the audit packet.",
        "Masking the value never hides the limitation: the source row still states what the check does and does not prove."
      ]
    },
    "footer": [
      {
        "label": "Access settings",
        "to": "/settings",
        "variant": "primary"
      },
      {
        "label": "Open SP-0214",
        "to": "/file/$id",
        "params": {
          "id": "SP-0214"
        },
        "variant": "ghost"
      },
      {
        "label": "Records",
        "to": "/records",
        "variant": "ghost"
      }
    ]
  },
  "act-incoming": {
    "key": "act-incoming",
    "line": "money",
    "eyebrow": "MONEY CONTROL",
    "title": "Incoming",
    "sub": "Buyer and lender money arriving, expected against posted, with freshness.",
    "ownerNote": "Two legs sit short of the expected amount on open files you oversee — neither releases anything; both wait on office review.",
    "stats": [
      {
        "label": "Expected this week",
        "value": "$2,941,640.00",
        "tone": "neutral",
        "note": "Across 4 open funding files"
      },
      {
        "label": "Posted to trust",
        "value": "$2,469,500.00",
        "tone": "ok",
        "note": "Matched to a funding record"
      },
      {
        "label": "Short of expected",
        "value": "$472,140.00",
        "tone": "warn",
        "note": "1 leg held, 1 awaiting"
      }
    ],
    "table": {
      "caption": "Incoming legs are recorded against the funding record the office relied on. A posted balance is not a confirmation of good funds.",
      "columns": [
        {
          "key": "file",
          "label": "File",
          "mono": true
        },
        {
          "key": "leg",
          "label": "Incoming leg"
        },
        {
          "key": "expected",
          "label": "Expected",
          "align": "right",
          "mono": true
        },
        {
          "key": "posted",
          "label": "Posted",
          "align": "right",
          "mono": true
        },
        {
          "key": "freshness",
          "label": "Freshness",
          "mono": true
        }
      ],
      "rows": [
        {
          "cells": {
            "file": "BF-0318",
            "leg": "Buyer closing funds · Priya Mehta",
            "expected": "$469,500.00",
            "posted": "$469,500.00",
            "freshness": "2026-06-08"
          },
          "status": "Matched",
          "support": "Posted amount matched to the buyer funding record for 85 Linden Pl #4.",
          "tone": "ok"
        },
        {
          "cells": {
            "file": "BF-0317",
            "leg": "Buyer earnest money · Adaeze Okafor",
            "expected": "$42,250.00",
            "posted": "$42,250.00",
            "freshness": "2026-06-07"
          },
          "status": "Matched",
          "support": "Earnest deposit posted and matched to 412 Marigold Ave funding record.",
          "tone": "ok"
        },
        {
          "cells": {
            "file": "BF-0315",
            "leg": "Lender wire · First Republic loan #5521",
            "expected": "$1,480,000.00",
            "posted": "$1,480,000.00",
            "freshness": "2026-06-08"
          },
          "status": "Matched",
          "support": "Lender wire posted to trust and matched to the funding record for 2208 Westcliff Dr.",
          "tone": "ok"
        },
        {
          "cells": {
            "file": "BF-0315",
            "leg": "Buyer closing funds · Hiroshi Tanaka",
            "expected": "$372,140.00",
            "posted": "$0.00",
            "freshness": "Awaiting"
          },
          "status": "Awaiting",
          "support": "Buyer wire scheduled but not yet posted. Recorded as expected, not as received.",
          "tone": "warn"
        },
        {
          "cells": {
            "file": "BF-0317",
            "leg": "Buyer closing funds · Adaeze Okafor",
            "expected": "$802,750.00",
            "posted": "$702,750.00",
            "freshness": "2026-06-06"
          },
          "status": "Held",
          "support": "Posted $100,000.00 short of the expected statement amount. Held for office review of the shortage.",
          "tone": "warn"
        },
        {
          "cells": {
            "file": "RF-0142",
            "leg": "Replacement funding · Hiroshi Tanaka",
            "expected": "$275,000.00",
            "posted": "$0.00",
            "freshness": "Awaiting"
          },
          "status": "Awaiting",
          "support": "Replacement funding leg expected for 2208 Westcliff Dr. No posting recorded yet.",
          "tone": "warn"
        }
      ]
    },
    "secondary": {
      "kind": "limitation",
      "title": "What a posted balance shows",
      "items": [
        "A posted amount records what arrived in trust against the funding record reviewed.",
        "It is not live bank confirmation and does not establish good funds under office policy.",
        "The office decides. Veto records the review."
      ]
    },
    "footer": [
      {
        "label": "Open funding in",
        "to": "/funds/funding-in",
        "variant": "primary"
      },
      {
        "label": "Open file",
        "to": "/file/$id",
        "params": {
          "id": "BF-0317"
        },
        "variant": "ghost"
      }
    ]
  },
  "act-outgoing": {
    "key": "act-outgoing",
    "line": "money",
    "eyebrow": "MONEY CONTROL",
    "title": "Outgoing",
    "sub": "Money that left or is scheduled to leave: payoffs, proceeds, commissions, and fees.",
    "ownerNote": "One proceeds release is held against a stale record and needs your exception decision before it can be scheduled.",
    "stats": [
      {
        "label": "Scheduled to leave",
        "value": "$1,386,210.00",
        "tone": "neutral",
        "note": "Across 3 open files"
      },
      {
        "label": "Recorded out",
        "value": "$867,810.00",
        "tone": "ok",
        "note": "Matched to a release record"
      },
      {
        "label": "Held outflow",
        "value": "$182,742.00",
        "tone": "stop",
        "note": "Stale support record"
      }
    ],
    "table": {
      "caption": "Each outgoing leg is tied to the release record that supported it. A leg without a current record is held, not sent.",
      "columns": [
        {
          "key": "file",
          "label": "File",
          "mono": true
        },
        {
          "key": "leg",
          "label": "Outgoing leg"
        },
        {
          "key": "dest",
          "label": "Destination",
          "mono": true
        },
        {
          "key": "amount",
          "label": "Amount",
          "align": "right",
          "mono": true
        }
      ],
      "rows": [
        {
          "cells": {
            "file": "SP-0214",
            "leg": "Seller proceeds · Whitfield Coast Holdings LLC",
            "dest": "Chase ··4431",
            "amount": "$182,742.00"
          },
          "status": "Held",
          "support": "Destination changed after reliance. Held until Seller Proceeds Record v2 or an owner exception exists.",
          "tone": "stop"
        },
        {
          "cells": {
            "file": "SP-0211",
            "leg": "Payoff · 1st lien · Wells Fargo Home Mortgage",
            "dest": "Wells Fargo ··6014",
            "amount": "$812,460.00"
          },
          "status": "In review",
          "support": "Beneficiary callback open before this payoff can be scheduled. Recorded as pending, not sent.",
          "tone": "warn"
        },
        {
          "cells": {
            "file": "SP-0211",
            "leg": "Broker commissions · listing + buyer brokers",
            "dest": "On file",
            "amount": "$46,250.00"
          },
          "status": "Awaiting",
          "support": "Scheduled after the file balances. No release record submitted yet.",
          "tone": "warn"
        },
        {
          "cells": {
            "file": "SP-0213",
            "leg": "Seller proceeds · Adaeze Okafor",
            "dest": "Wells Fargo ··2208",
            "amount": "$391,180.00"
          },
          "status": "Recorded",
          "support": "Matched to the signed proceeds record for 412 Marigold Ave by amount and destination.",
          "tone": "ok"
        },
        {
          "cells": {
            "file": "SP-0211",
            "leg": "Title & escrow fees · 805 Escrow",
            "dest": "805 Escrow",
            "amount": "$9,100.00"
          },
          "status": "Recorded",
          "support": "Fee leg recorded against the settlement statement for 2208 Westcliff Dr.",
          "tone": "ok"
        },
        {
          "cells": {
            "file": "SP-0211",
            "leg": "Recording & transfer tax · Ventura County",
            "dest": "Ventura County",
            "amount": "$9,880.00"
          },
          "status": "Recorded",
          "support": "County leg recorded against the settlement statement and supporting source.",
          "tone": "ok"
        }
      ]
    },
    "secondary": {
      "kind": "limitation",
      "title": "What Outgoing records",
      "items": [
        "Veto records that the office relied on a current support record before money was scheduled.",
        "It does not authorize, release, or send funds — the office acts at the bank.",
        "A held leg stays visible until the support record is current or an exception is recorded."
      ]
    },
    "footer": [
      {
        "label": "Open payoffs",
        "to": "/funds/payoffs",
        "variant": "primary"
      },
      {
        "label": "Open proceeds",
        "to": "/funds/proceeds",
        "variant": "ghost"
      },
      {
        "label": "Open file",
        "to": "/file/$id",
        "params": {
          "id": "SP-0214"
        },
        "variant": "ghost"
      }
    ]
  },
  "act-pending": {
    "key": "act-pending",
    "line": "money",
    "eyebrow": "MONEY CONTROL",
    "title": "Pending Release",
    "sub": "Release requests not yet consumed or matched: active, expiring, blocked, or awaiting the wire room.",
    "ownerNote": "One release code expires within the hour and one is blocked on an officer-conflict signal — both await your decision before they clear.",
    "stats": [
      {
        "label": "Open requests",
        "value": "4",
        "tone": "neutral",
        "note": "Not yet consumed"
      },
      {
        "label": "Expiring under 2h",
        "value": "1",
        "tone": "warn",
        "note": "Code REL-SP0211-03"
      },
      {
        "label": "Blocked",
        "value": "1",
        "tone": "stop",
        "note": "Conflict signal open"
      }
    ],
    "table": {
      "caption": "A release request binds an outgoing leg to a current record. An expired or blocked request returns for an exception instead of going out.",
      "columns": [
        {
          "key": "code",
          "label": "Release code",
          "mono": true
        },
        {
          "key": "file",
          "label": "File",
          "mono": true
        },
        {
          "key": "leg",
          "label": "Leg"
        },
        {
          "key": "amount",
          "label": "Amount",
          "align": "right",
          "mono": true
        },
        {
          "key": "expires",
          "label": "Expires",
          "mono": true
        }
      ],
      "rows": [
        {
          "cells": {
            "code": "REL-SP0214-01",
            "file": "SP-0214",
            "leg": "Seller proceeds",
            "amount": "$182,742.00",
            "expires": "Locked"
          },
          "status": "Blocked",
          "support": "Payout entity's managing member of record matches the acting officer. Blocked pending owner review.",
          "tone": "stop"
        },
        {
          "cells": {
            "code": "REL-SP0211-03",
            "file": "SP-0211",
            "leg": "Payoff · 1st lien",
            "amount": "$812,460.00",
            "expires": "2026-06-22 16:30"
          },
          "status": "Awaiting",
          "support": "Request active and source-linked but not yet consumed by the wire room. Expires within the hour.",
          "tone": "warn"
        },
        {
          "cells": {
            "code": "REL-SP0213-02",
            "file": "SP-0213",
            "leg": "Seller proceeds",
            "amount": "$391,180.00",
            "expires": "2026-06-23 12:00"
          },
          "status": "Open",
          "support": "Active request matched to the signed proceeds record, awaiting the wire room.",
          "tone": "warn"
        },
        {
          "cells": {
            "code": "REL-BF0318-01",
            "file": "BF-0318",
            "leg": "Overage return to buyer",
            "amount": "$1,240.00",
            "expires": "2026-06-24 17:00"
          },
          "status": "Open",
          "support": "Return-of-overage request source-linked to the funding record for 85 Linden Pl #4.",
          "tone": "warn"
        },
        {
          "cells": {
            "code": "REL-SP0211-05",
            "file": "SP-0211",
            "leg": "Broker commissions",
            "amount": "$46,250.00",
            "expires": "Not configured"
          },
          "status": "Not started",
          "support": "No release request opened yet. Drafted only once the file balances and the record is current.",
          "tone": "neutral"
        }
      ]
    },
    "secondary": {
      "kind": "note",
      "title": "How a pending release clears",
      "items": [
        "A request is consumed only when the wire room records the matching outflow.",
        "Veto does not release funds or confirm accounts; it holds the request to a current record.",
        "An expired code returns for an exception — it does not auto-renew."
      ]
    },
    "footer": [
      {
        "label": "Open funds",
        "to": "/funds",
        "variant": "primary"
      },
      {
        "label": "Open tasks",
        "to": "/tasks",
        "variant": "ghost"
      }
    ]
  },
  "act-matched": {
    "key": "act-matched",
    "line": "money",
    "eyebrow": "MONEY CONTROL",
    "title": "Matched",
    "sub": "Actual wires reconciled to the Release Request Record that supported them, by amount, destination, and timestamp.",
    "ownerNote": "All reconciled outflow this week matched its supporting record on amount, destination, and timestamp — nothing awaits your decision here.",
    "stats": [
      {
        "label": "Matched outflow",
        "value": "$1,259,790.00",
        "tone": "ok",
        "note": "7-day window"
      },
      {
        "label": "Wires matched",
        "value": "5",
        "tone": "ok",
        "note": "All three fields aligned"
      },
      {
        "label": "Avg match latency",
        "value": "11 min",
        "tone": "neutral",
        "note": "Wire posted to match recorded"
      }
    ],
    "table": {
      "caption": "A match records that an actual wire aligned to its release record on amount, destination, and timestamp. It is reconciliation, not a guarantee of delivery.",
      "columns": [
        {
          "key": "code",
          "label": "Release code",
          "mono": true
        },
        {
          "key": "file",
          "label": "File",
          "mono": true
        },
        {
          "key": "amount",
          "label": "Amount",
          "align": "right",
          "mono": true
        },
        {
          "key": "dest",
          "label": "Destination",
          "mono": true
        },
        {
          "key": "ts",
          "label": "Wire timestamp",
          "mono": true
        }
      ],
      "rows": [
        {
          "cells": {
            "code": "REL-SP0209-01",
            "file": "SP-0209",
            "amount": "$298,640.00",
            "dest": "Chase ··3071",
            "ts": "2026-06-19 14:22"
          },
          "status": "Matched",
          "support": "Seller proceeds for 1408 Garnet Way matched to the signed record on all three fields.",
          "tone": "ok"
        },
        {
          "cells": {
            "code": "REL-SP0207-01",
            "file": "SP-0207",
            "amount": "$641,300.00",
            "dest": "Wells Fargo ··6014",
            "ts": "2026-06-16 10:08"
          },
          "status": "Matched",
          "support": "Payoff for 770 Crescent Bay Dr reconciled to its release record by amount and destination.",
          "tone": "ok"
        },
        {
          "cells": {
            "code": "REL-BF0312-01",
            "file": "BF-0312",
            "amount": "$1,240.00",
            "dest": "Chase ··8830",
            "ts": "2026-06-19 16:41"
          },
          "status": "Matched",
          "support": "Overage return for 1408 Garnet Way matched to the funding record on amount and timestamp.",
          "tone": "ok"
        },
        {
          "cells": {
            "code": "REL-SP0204-01",
            "file": "SP-0204",
            "amount": "$209,470.00",
            "dest": "BofA ··5512",
            "ts": "2026-06-14 13:55"
          },
          "status": "Matched",
          "support": "Seller proceeds for 63 Harbor Light Ln reconciled to its signed proceeds record.",
          "tone": "ok"
        },
        {
          "cells": {
            "code": "REL-SP0207-02",
            "file": "SP-0207",
            "amount": "$109,140.00",
            "dest": "805 Escrow",
            "ts": "2026-06-16 10:12"
          },
          "status": "Matched",
          "support": "Fees and commissions leg for 770 Crescent Bay Dr matched to the settlement record.",
          "tone": "ok"
        }
      ]
    },
    "secondary": {
      "kind": "limitation",
      "title": "What a match proves",
      "items": [
        "A match records that the actual wire equals the release record by amount, destination, and timestamp.",
        "It does not confirm the receiving account's control or that funds were credited at the bank.",
        "The office decides. Veto records the review."
      ]
    },
    "footer": [
      {
        "label": "Open records",
        "to": "/records",
        "variant": "primary"
      },
      {
        "label": "Open file",
        "to": "/file/$id",
        "params": {
          "id": "SP-0209"
        },
        "variant": "ghost"
      }
    ]
  },
  "act-unmatched": {
    "key": "act-unmatched",
    "line": "money",
    "eyebrow": "MONEY CONTROL",
    "title": "Unmatched",
    "sub": "The page that should always be empty: outflow without a supporting record, an amount or destination mismatch, a release after expiry.",
    "ownerNote": "No unmatched outflow on any file you oversee. This page is empty by design — when it is not, an item routes to you.",
    "stats": [
      {
        "label": "Unmatched outflow",
        "value": "0",
        "tone": "ok",
        "note": "Last checked 2026-06-22 15:40"
      },
      {
        "label": "Mismatches recorded",
        "value": "0",
        "tone": "ok",
        "note": "Amount or destination"
      },
      {
        "label": "Releases after expiry",
        "value": "0",
        "tone": "ok",
        "note": "Past 30 days"
      }
    ],
    "table": {
      "caption": "This page lists outflow that left without a supporting record, a mismatch, or a release after expiry. Empty is the recorded, expected state — not a placeholder.",
      "columns": [
        {
          "key": "file",
          "label": "File",
          "mono": true
        },
        {
          "key": "leg",
          "label": "Outgoing leg"
        },
        {
          "key": "reason",
          "label": "Why unmatched"
        },
        {
          "key": "amount",
          "label": "Amount",
          "align": "right",
          "mono": true
        }
      ],
      "rows": [
        {
          "cells": {
            "file": "—",
            "leg": "No unmatched outflow",
            "reason": "Every recorded wire reconciled to its release record",
            "amount": "$0.00"
          },
          "status": "Cleared",
          "support": "Across all open and recorded files, every outflow matched a current release record by amount, destination, and timestamp. Nothing requires review.",
          "tone": "ok"
        }
      ]
    },
    "secondary": {
      "kind": "note",
      "title": "Why this page stays empty",
      "items": [
        "Outflow is held to a current release record before it can leave, so unmatched activity is the exception, not the norm.",
        "If a wire ever posts without a supporting record, after expiry, or to the wrong destination, it appears here and routes to Activity Exceptions and the owner.",
        "An empty page is a recorded result of the no-bypass gate, not the absence of a feed."
      ]
    },
    "footer": [
      {
        "label": "Open funds",
        "to": "/funds",
        "variant": "primary"
      },
      {
        "label": "Open records",
        "to": "/records",
        "variant": "ghost"
      }
    ]
  },
  "act-exceptions": {
    "key": "act-exceptions",
    "line": "money",
    "eyebrow": "MONEY CONTROL",
    "title": "Activity Exceptions",
    "sub": "Money movement that needs review: manual matches, late releases, returns and reversals, and unmatched incoming funds.",
    "ownerNote": "Three activity exceptions await your decision: a manual match, a returned wire, and an unattributed incoming deposit.",
    "stats": [
      {
        "label": "Open exceptions",
        "value": "3",
        "tone": "warn",
        "note": "Awaiting a decision"
      },
      {
        "label": "Returns / reversals",
        "value": "1",
        "tone": "warn",
        "note": "$469,500.00"
      },
      {
        "label": "Unattributed incoming",
        "value": "$58,000.00",
        "tone": "warn",
        "note": "Not yet matched to a file"
      }
    ],
    "table": {
      "caption": "Each row is money movement that fell outside the clean path and needs office review. The limitation and required next step stay visible on every row.",
      "columns": [
        {
          "key": "file",
          "label": "File",
          "mono": true
        },
        {
          "key": "kind",
          "label": "Exception"
        },
        {
          "key": "detail",
          "label": "Detail"
        },
        {
          "key": "amount",
          "label": "Amount",
          "align": "right",
          "mono": true
        }
      ],
      "rows": [
        {
          "cells": {
            "file": "SP-0211",
            "kind": "Manual match proposed",
            "detail": "Payoff wire posted before the match was recorded automatically",
            "amount": "$812,460.00"
          },
          "status": "Exception required",
          "support": "Amount and destination align to REL-SP0211-03, but timestamp posted ahead of the record. A reviewer must accept the manual match with the limitation noted.",
          "tone": "warn"
        },
        {
          "cells": {
            "file": "BF-0318",
            "kind": "Return / reversal",
            "detail": "Buyer wire to 85 Linden Pl #4 returned by the receiving bank",
            "amount": "$469,500.00"
          },
          "status": "Open",
          "support": "Incoming funds reversed after posting. The funding record is held until the re-wire is recorded and re-matched.",
          "tone": "warn"
        },
        {
          "cells": {
            "file": "—",
            "kind": "Unmatched incoming",
            "detail": "Deposit to trust with no file attribution · sender Whitfield Coast Holdings LLC",
            "amount": "$58,000.00"
          },
          "status": "Awaiting",
          "support": "Recorded as received but not yet attached to any funding record. Held in suspense pending office attribution.",
          "tone": "warn"
        },
        {
          "cells": {
            "file": "SP-0214",
            "kind": "Late release attempt",
            "detail": "Seller proceeds release attempted against a stale support record",
            "amount": "$182,742.00"
          },
          "status": "Blocked",
          "support": "Attempt blocked because the support record was staled by the destination change. Returns for v2 or an owner exception.",
          "tone": "stop"
        },
        {
          "cells": {
            "file": "BF-0317",
            "kind": "Shortage on incoming",
            "detail": "Buyer closing funds posted $100,000.00 short of the statement",
            "amount": "$100,000.00"
          },
          "status": "Exception required",
          "support": "Shortage recorded against the funding record for 412 Marigold Ave. Requires office acceptance or a cure before the file balances.",
          "tone": "warn"
        }
      ]
    },
    "secondary": {
      "kind": "limitation",
      "title": "What an activity exception is",
      "items": [
        "An exception records a money movement that needs a human decision, with the limitation that was accepted and who accepted it.",
        "Veto does not clear, approve, or reverse the movement — it holds it visible until the office acts.",
        "Clearing an exception is a recorded decision, never an automatic one."
      ]
    },
    "footer": [
      {
        "label": "Open tasks",
        "to": "/tasks",
        "variant": "primary"
      },
      {
        "label": "Open funds",
        "to": "/funds",
        "variant": "ghost"
      },
      {
        "label": "Open file",
        "to": "/file/$id",
        "params": {
          "id": "BF-0318"
        },
        "variant": "ghost"
      }
    ]
  },
  "rec-all": {
    "key": "rec-all",
    "line": "records",
    "eyebrow": "RECORDS",
    "title": "All Records",
    "sub": "Every durable proof artifact across files, current, superseded, and exception alike.",
    "ownerNote": "2 records are in an exception or staled state and sit under your review before the office relies on them.",
    "stats": [
      {
        "label": "Records on file",
        "value": "61",
        "note": "Across 7 open files",
        "tone": "neutral"
      },
      {
        "label": "Current",
        "value": "54",
        "note": "Relied-on state",
        "tone": "ok"
      },
      {
        "label": "Staled",
        "value": "3",
        "note": "Superseded by a change",
        "tone": "warn"
      },
      {
        "label": "Exception",
        "value": "1",
        "note": "Awaiting owner decision",
        "tone": "stop"
      }
    ],
    "table": {
      "caption": "Records are produced by completed tasks, never written by hand. Each row is the artifact the office relied on, with its version and state.",
      "columns": [
        {
          "key": "record",
          "label": "Record",
          "mono": true
        },
        {
          "key": "kind",
          "label": "Kind"
        },
        {
          "key": "file",
          "label": "File",
          "mono": true
        },
        {
          "key": "version",
          "label": "Version",
          "mono": true,
          "align": "right"
        }
      ],
      "rows": [
        {
          "cells": {
            "record": "RR-0214",
            "kind": "Release Request Record",
            "file": "SP-0214",
            "version": "v2"
          },
          "status": "Blocked",
          "tone": "stop",
          "support": "Outgoing seller proceeds held against a draft v2 record. No current record supports release."
        },
        {
          "cells": {
            "record": "CIR-0214",
            "kind": "Change Impact Record",
            "file": "SP-0214",
            "version": "v1"
          },
          "status": "Exception required",
          "tone": "warn",
          "support": "Records the payee change after reliance and the owner decision it now requires."
        },
        {
          "cells": {
            "record": "PR-0214",
            "kind": "Proceeds Record",
            "file": "SP-0214",
            "version": "v1"
          },
          "status": "Staled",
          "tone": "warn",
          "support": "Superseded when the proceeds destination changed. Stays visible; no longer supports release."
        },
        {
          "cells": {
            "record": "PO-0142",
            "kind": "Payoff Record",
            "file": "RF-0142",
            "version": "v1"
          },
          "status": "Current",
          "tone": "ok",
          "support": "Beneficiary demand good-through May 28 with callback recorded. Supports the obligation as reviewed."
        },
        {
          "cells": {
            "record": "FR-0318",
            "kind": "Funding Record",
            "file": "BF-0318",
            "version": "v1"
          },
          "status": "Recorded",
          "tone": "ok",
          "support": "Buyer closing funds of $469,500.00 matched to source rows under office good-funds policy."
        },
        {
          "cells": {
            "record": "AP-0211",
            "kind": "Audit Packet",
            "file": "SP-0211",
            "version": "Draft"
          },
          "status": "Draft",
          "tone": "neutral",
          "support": "Not yet exported. Manifest assembles once the trust certification source row is current."
        }
      ]
    },
    "secondary": {
      "kind": "note",
      "title": "What a record is",
      "items": [
        "A record captures the state the office relied on, the sources behind it, and the limitations on each.",
        "A staled record is never deleted. It remains as proof of what was true before a change.",
        "The office decides. Veto records the review."
      ]
    },
    "footer": [
      {
        "label": "Open file",
        "to": "/file/$id",
        "params": {
          "id": "SP-0214"
        },
        "variant": "primary"
      },
      {
        "label": "Open tasks",
        "to": "/tasks",
        "variant": "ghost"
      },
      {
        "label": "Open records",
        "to": "/records",
        "variant": "ghost"
      }
    ],
    "notes": "Cross-file index spanning all record kinds; rows are one-of-each-kind, distinct from the per-kind surfaces."
  },
  "rec-release": {
    "key": "rec-release",
    "line": "records",
    "eyebrow": "RECORDS",
    "title": "Release Request Records",
    "sub": "The pre-money-action artifact: file, action, amount, payee, supporting sources, limitations, release code, and status.",
    "ownerNote": "1 release request is blocked on a conflict you own: the payout destination names an entity whose managing member of record matches the acting officer.",
    "stats": [
      {
        "label": "Release records",
        "value": "9",
        "note": "Across open files",
        "tone": "neutral"
      },
      {
        "label": "Matched",
        "value": "6",
        "note": "Wire reconciled to record",
        "tone": "ok"
      },
      {
        "label": "Held",
        "value": "2",
        "note": "Stale or missing support",
        "tone": "warn"
      },
      {
        "label": "Blocked",
        "value": "1",
        "note": "Officer conflict",
        "tone": "stop"
      }
    ],
    "table": {
      "caption": "A release record binds an outgoing money request to the current, source-linked record the office relied on. If that record is stale or missing, the request returns for an exception instead of going out.",
      "columns": [
        {
          "key": "record",
          "label": "Record",
          "mono": true
        },
        {
          "key": "action",
          "label": "Action"
        },
        {
          "key": "amount",
          "label": "Amount",
          "mono": true,
          "align": "right"
        },
        {
          "key": "payee",
          "label": "Payee · destination"
        }
      ],
      "rows": [
        {
          "cells": {
            "record": "RR-0214",
            "action": "Release seller proceeds",
            "amount": "$182,742.00",
            "payee": "Whitfield Coast Holdings LLC · Chase ··4431"
          },
          "status": "Blocked",
          "tone": "stop",
          "support": "Destination names an entity whose managing member of record matches the acting officer. Held until owner exception or a cured v2 record."
        },
        {
          "cells": {
            "record": "RR-0318",
            "action": "Release buyer overage refund",
            "amount": "$3,180.00",
            "payee": "Priya Mehta · acct ··6014"
          },
          "status": "Held",
          "tone": "warn",
          "support": "Funding Record posted an overage; release waits on the current funding record version."
        },
        {
          "cells": {
            "record": "RR-0142",
            "action": "Release lien payoff",
            "amount": "$612,460.00",
            "payee": "Servicer of record · 2208 Westcliff Dr"
          },
          "status": "Awaiting",
          "tone": "warn",
          "support": "Payoff Record current; release code issues once the wire room confirms the good-through window."
        },
        {
          "cells": {
            "record": "RR-0209",
            "action": "Release seller proceeds",
            "amount": "$311,840.00",
            "payee": "Liam Brennan · 1408 Garnet Way"
          },
          "status": "Matched",
          "tone": "ok",
          "support": "Wire reconciled to the supporting record by amount, destination, and timestamp."
        },
        {
          "cells": {
            "record": "RR-0207",
            "action": "Release seller proceeds",
            "amount": "$528,910.00",
            "payee": "Sofia Alvarez · 770 Crescent Bay Dr"
          },
          "status": "Matched",
          "tone": "ok",
          "support": "Release code consumed once; outgoing wire matched the record it supported."
        },
        {
          "cells": {
            "record": "RR-0204",
            "action": "Release commissions",
            "amount": "$46,250.00",
            "payee": "Listing + buyer brokers · 63 Harbor Light Ln"
          },
          "status": "Matched",
          "tone": "ok",
          "support": "Fee release matched to the record. No amount or destination drift."
        }
      ]
    },
    "secondary": {
      "kind": "limitation",
      "title": "What a release record does not do",
      "items": [
        "It does not authorize, release funds, or confirm the receiving account or good funds.",
        "A release code supports a single outgoing request against one current record; it is not a verdict on the wire.",
        "A blocked or held request is recorded, not resolved. Only the office acts."
      ]
    },
    "footer": [
      {
        "label": "Open file",
        "to": "/file/$id",
        "params": {
          "id": "SP-0214"
        },
        "variant": "primary"
      },
      {
        "label": "Release requests",
        "to": "/funds/release-requests",
        "variant": "ghost"
      },
      {
        "label": "Open tasks",
        "to": "/tasks",
        "variant": "ghost"
      }
    ],
    "notes": "RR- id family. Anchored on RR-0214 / Whitfield Coast Holdings conflict from fixtures."
  },
  "rec-change": {
    "key": "rec-change",
    "line": "records",
    "eyebrow": "RECORDS",
    "title": "Change Impact Records",
    "sub": "What changed, what it staled, and what action it now requires.",
    "ownerNote": "1 change staled a signed proceeds record and now requires either a v2 record or an owner exception before release.",
    "stats": [
      {
        "label": "Change records",
        "value": "5",
        "note": "After reliance",
        "tone": "neutral"
      },
      {
        "label": "Records staled",
        "value": "3",
        "note": "Prior state superseded",
        "tone": "warn"
      },
      {
        "label": "Open requirement",
        "value": "2",
        "note": "v2 or exception",
        "tone": "stop"
      }
    ],
    "table": {
      "caption": "Every material value that moved after the office already relied on a prior state. A change here can stale a signed record and opens the required task before release.",
      "columns": [
        {
          "key": "record",
          "label": "Record",
          "mono": true
        },
        {
          "key": "field",
          "label": "Changed field"
        },
        {
          "key": "staled",
          "label": "Staled record",
          "mono": true
        },
        {
          "key": "requires",
          "label": "Now requires"
        }
      ],
      "rows": [
        {
          "cells": {
            "record": "CIR-0214",
            "field": "Seller proceeds payee",
            "staled": "PR-0214 v1",
            "requires": "v2 record or owner exception"
          },
          "status": "Blocked",
          "tone": "stop",
          "support": "Payee changed from James Whitfield · Schwab ··9876 to Whitfield Coast Holdings LLC · Chase ··4431, 42m after reliance."
        },
        {
          "cells": {
            "record": "CIR-0213",
            "field": "Settlement net to seller",
            "staled": "PR-0213 v1",
            "requires": "v2 proceeds record"
          },
          "status": "Exception required",
          "tone": "warn",
          "support": "Final settlement statement revised the net at 412 Marigold Ave. Prior amount no longer current."
        },
        {
          "cells": {
            "record": "CIR-0142",
            "field": "Payoff good-through date",
            "staled": "PO-0142 v1",
            "requires": "Refreshed demand source"
          },
          "status": "Open",
          "tone": "warn",
          "support": "Good-through date moved inside the closing window; demand source must be re-pulled."
        },
        {
          "cells": {
            "record": "CIR-0318",
            "field": "Buyer wire origin bank",
            "staled": "—",
            "requires": "Source row re-check"
          },
          "status": "In review",
          "tone": "warn",
          "support": "Origin bank differed from the source-of-funds narrative. No record staled yet; review open."
        },
        {
          "cells": {
            "record": "CIR-0211",
            "field": "Vesting on title",
            "staled": "AP-0211 draft",
            "requires": "Trust certification source"
          },
          "status": "Open",
          "tone": "warn",
          "support": "Vesting moved to a trust; the audit packet cannot assemble until the certification row is current."
        }
      ]
    },
    "secondary": {
      "kind": "note",
      "title": "Reading a change impact record",
      "items": [
        "Prior and changed values both stay visible. The record shows the move, not a judgment of it.",
        "Staling is automatic when a relied-on value changes; clearing it requires a new record or a recorded exception.",
        "The office decides. Veto records the review."
      ]
    },
    "footer": [
      {
        "label": "Open file",
        "to": "/file/$id",
        "params": {
          "id": "SP-0214"
        },
        "variant": "primary"
      },
      {
        "label": "Open tasks",
        "to": "/tasks",
        "variant": "ghost"
      },
      {
        "label": "Funds changes",
        "to": "/funds",
        "variant": "ghost"
      }
    ],
    "notes": "CIR- id family. Mirrors CHANGE_EVENTS fixture (payee change) plus distinct change types per row."
  },
  "rec-payoff": {
    "key": "rec-payoff",
    "line": "records",
    "eyebrow": "RECORDS",
    "title": "Payoff Records",
    "sub": "Obligation support: amount, payee, destination, good-through date, per diem, demand source, and callback.",
    "ownerNote": "1 payoff record is stale: the good-through date now falls inside the closing window and the demand needs a refresh before release.",
    "stats": [
      {
        "label": "Payoff records",
        "value": "6",
        "note": "Open obligations",
        "tone": "neutral"
      },
      {
        "label": "Current",
        "value": "4",
        "note": "Good-through clears closing",
        "tone": "ok"
      },
      {
        "label": "Stale",
        "value": "1",
        "note": "Date inside window",
        "tone": "warn"
      },
      {
        "label": "Callback open",
        "value": "1",
        "note": "Beneficiary pending",
        "tone": "warn"
      }
    ],
    "table": {
      "caption": "Each payoff record holds the demand the office relied on: the amount good-through closing, the per diem after, and the callback to the beneficiary on a number not supplied by the demand.",
      "columns": [
        {
          "key": "record",
          "label": "Record",
          "mono": true
        },
        {
          "key": "payee",
          "label": "Beneficiary"
        },
        {
          "key": "amount",
          "label": "Good-through amount",
          "mono": true,
          "align": "right"
        },
        {
          "key": "through",
          "label": "Good-through",
          "mono": true
        }
      ],
      "rows": [
        {
          "cells": {
            "record": "PO-0142",
            "payee": "First Republic · loan #5521",
            "amount": "$612,460.00",
            "through": "2026-05-28"
          },
          "status": "Current",
          "tone": "ok",
          "support": "Demand on servicer letterhead; per diem $84.00 after good-through. Callback to servicer payoff desk recorded."
        },
        {
          "cells": {
            "record": "PO-0214",
            "payee": "Wells Fargo Home Mortgage",
            "amount": "$318,420.00",
            "through": "2026-05-22"
          },
          "status": "Held",
          "tone": "warn",
          "support": "Beneficiary callback pending on the number of record. Demand supports the amount only, not authority to collect."
        },
        {
          "cells": {
            "record": "PO-0211",
            "payee": "Servicer of record · 2208 Westcliff Dr",
            "amount": "$991,460.00",
            "through": "2026-05-20"
          },
          "status": "Stale",
          "tone": "warn",
          "support": "Good-through date now precedes the May 27 closing. Demand source must be re-pulled before release."
        },
        {
          "cells": {
            "record": "PO-0213",
            "payee": "Ventura County · judgment lien",
            "amount": "$22,180.00",
            "through": "2026-05-30"
          },
          "status": "Current",
          "tone": "ok",
          "support": "Agency demand on letterhead with statutory release language. Agency line from official directory."
        },
        {
          "cells": {
            "record": "PO-0317",
            "payee": "HOA via management company of record",
            "amount": "$4,640.00",
            "through": "2026-06-01"
          },
          "status": "Recorded",
          "tone": "ok",
          "support": "Assessment demand current; callback through the management company of record, not the demand contact."
        },
        {
          "cells": {
            "record": "PO-0315",
            "payee": "Private note holder · 2208 Westcliff Dr",
            "amount": "$148,900.00",
            "through": "2026-05-29"
          },
          "status": "Awaiting",
          "tone": "warn",
          "support": "Beneficiary statement signed; recorded deed of trust matched. Independent callback to named holder still open."
        }
      ]
    },
    "secondary": {
      "kind": "limitation",
      "title": "What a payoff record proves",
      "items": [
        "It records the demand amount and good-through window as reviewed. It does not confirm the receiving account or good funds.",
        "A callback supports the read-back from the party reached, never authority to collect the obligation.",
        "Per diem is recorded so a late release is matched against the right figure, not assumed current."
      ]
    },
    "footer": [
      {
        "label": "Open payoffs",
        "to": "/funds/payoffs",
        "variant": "primary"
      },
      {
        "label": "Open file",
        "to": "/file/$id",
        "params": {
          "id": "RF-0142"
        },
        "variant": "ghost"
      },
      {
        "label": "Open tasks",
        "to": "/tasks",
        "variant": "ghost"
      }
    ],
    "notes": "PO- id family. Uses payoff review kinds (institutional/agency/HOA/private) and RF-0142 fixture."
  },
  "rec-proceeds": {
    "key": "rec-proceeds",
    "line": "records",
    "eyebrow": "RECORDS",
    "title": "Proceeds Records",
    "sub": "Entitlement support: seller of record, vesting, net proceeds, destination, and trust / entity / POA branch.",
    "ownerNote": "1 proceeds record is staled and 1 is on the entity branch with the destination linked to the acting officer; both sit under your review.",
    "stats": [
      {
        "label": "Proceeds records",
        "value": "7",
        "note": "Seller entitlements",
        "tone": "neutral"
      },
      {
        "label": "Current",
        "value": "5",
        "note": "Supports release",
        "tone": "ok"
      },
      {
        "label": "Staled",
        "value": "1",
        "note": "Destination changed",
        "tone": "warn"
      },
      {
        "label": "Draft",
        "value": "1",
        "note": "Entity branch pending",
        "tone": "neutral"
      }
    ],
    "table": {
      "caption": "Each proceeds record holds the seller of record, vesting, and net entitlement the office reviewed before sign-off, with the branch (standard, trust, entity, POA) that governs the destination.",
      "columns": [
        {
          "key": "record",
          "label": "Record",
          "mono": true
        },
        {
          "key": "seller",
          "label": "Seller of record"
        },
        {
          "key": "net",
          "label": "Net proceeds",
          "mono": true,
          "align": "right"
        },
        {
          "key": "branch",
          "label": "Branch · destination"
        }
      ],
      "rows": [
        {
          "cells": {
            "record": "PR-0214 v1",
            "seller": "James Whitfield",
            "net": "$182,742.00",
            "branch": "Standard · Schwab ··9876"
          },
          "status": "Staled",
          "tone": "warn",
          "support": "Superseded when the destination changed to an entity payee. Supports the review of proceeds to the individual seller only."
        },
        {
          "cells": {
            "record": "PR-0214 v2",
            "seller": "Whitfield Coast Holdings LLC",
            "net": "$182,742.00",
            "branch": "Entity · Chase ··4431"
          },
          "status": "Draft",
          "tone": "neutral",
          "support": "Entity branch. Holds until the conflict signal resolves and all required source rows are accepted. Does not support release on its own."
        },
        {
          "cells": {
            "record": "PR-0213 v1",
            "seller": "Adaeze Okafor",
            "net": "$291,360.00",
            "branch": "Standard · 412 Marigold Ave"
          },
          "status": "In review",
          "tone": "warn",
          "support": "Final settlement statement not yet received; net is the prior figure pending the current statement."
        },
        {
          "cells": {
            "record": "PR-0211 v1",
            "seller": "Tanaka Family Trust",
            "net": "$1,029,450.00",
            "branch": "Trust · 2208 Westcliff Dr"
          },
          "status": "Awaiting",
          "tone": "warn",
          "support": "Trust branch. Certification of trust not on file; successor trustee letter from outside counsel required."
        },
        {
          "cells": {
            "record": "PR-0209 v1",
            "seller": "Liam Brennan",
            "net": "$311,840.00",
            "branch": "Standard · 1408 Garnet Way"
          },
          "status": "Signed",
          "tone": "ok",
          "support": "Seller of record, vesting, and destination matched. Supports the recorded release."
        },
        {
          "cells": {
            "record": "PR-0207 v1",
            "seller": "Sofia Alvarez",
            "net": "$528,910.00",
            "branch": "POA · 770 Crescent Bay Dr"
          },
          "status": "Signed",
          "tone": "ok",
          "support": "POA branch. Power of attorney of record and signer ID reviewed before sign-off."
        }
      ]
    },
    "secondary": {
      "kind": "limitation",
      "title": "What a proceeds record supports",
      "items": [
        "It supports the office review of the entitlement as stated; it does not prove the entity is entitled or that the account is controlled by the seller.",
        "An entity, trust, or POA branch adds required source rows; the limitation on each stays visible on the record.",
        "The office decides. Veto records the review."
      ]
    },
    "footer": [
      {
        "label": "Open proceeds",
        "to": "/funds/proceeds",
        "variant": "primary"
      },
      {
        "label": "Open file",
        "to": "/file/$id",
        "params": {
          "id": "SP-0214"
        },
        "variant": "ghost"
      },
      {
        "label": "Open records",
        "to": "/records",
        "variant": "ghost"
      }
    ],
    "notes": "PR- id family. Directly reuses PROCEEDS_RECORDS v1/v2 fixture; adds distinct trust/POA branch rows."
  },
  "rec-funding": {
    "key": "rec-funding",
    "line": "records",
    "eyebrow": "RECORDS",
    "title": "Funding Records",
    "sub": "Money-in support: buyer and lender funds, good-funds status under office policy, and shortage or overage.",
    "ownerNote": "1 funding record sits short of the settlement figure and 1 has an unmatched origin bank; both are under your good-funds review.",
    "stats": [
      {
        "label": "Funding records",
        "value": "7",
        "note": "Open files",
        "tone": "neutral"
      },
      {
        "label": "Good funds",
        "value": "4",
        "note": "Under office policy",
        "tone": "ok"
      },
      {
        "label": "Shortage",
        "value": "1",
        "note": "Below settlement",
        "tone": "warn"
      },
      {
        "label": "Origin mismatch",
        "value": "1",
        "note": "Bank differs",
        "tone": "stop"
      }
    ],
    "table": {
      "caption": "Each funding record holds the money-in the office reviewed: expected against posted, the good-funds state under office policy, and any shortage or overage to reconcile.",
      "columns": [
        {
          "key": "record",
          "label": "Record",
          "mono": true
        },
        {
          "key": "source",
          "label": "Source"
        },
        {
          "key": "posted",
          "label": "Posted",
          "mono": true,
          "align": "right"
        },
        {
          "key": "delta",
          "label": "Shortage / overage",
          "mono": true,
          "align": "right"
        }
      ],
      "rows": [
        {
          "cells": {
            "record": "FR-0318",
            "source": "Buyer closing funds · Priya Mehta",
            "posted": "$472,680.00",
            "delta": "+$3,180.00 over"
          },
          "status": "Recorded",
          "tone": "ok",
          "support": "Posted exceeds settlement by an overage; good funds under office policy. Overage routes to a refund release record."
        },
        {
          "cells": {
            "record": "FR-0317",
            "source": "Lender wire · 412 Marigold Ave",
            "posted": "$0.00",
            "delta": "—"
          },
          "status": "Awaiting",
          "tone": "warn",
          "support": "Funding authorization reviewed; lender wire scheduled. No funds posted yet."
        },
        {
          "cells": {
            "record": "FR-0315",
            "source": "Buyer closing funds · Hiroshi Tanaka",
            "posted": "$1,902,500.00",
            "delta": "-$4,640.00 short"
          },
          "status": "Held",
          "tone": "warn",
          "support": "Posted is short of the settlement figure. Held until the shortage is funded or the statement is reconciled."
        },
        {
          "cells": {
            "record": "RF-0142",
            "source": "Replacement funding · QI of record",
            "posted": "$1,907,140.00",
            "delta": "Balanced"
          },
          "status": "In review",
          "tone": "warn",
          "support": "1031 exchange. Origin bank differs from the source-of-funds narrative; review open before good funds is recorded."
        },
        {
          "cells": {
            "record": "FR-0312",
            "source": "Buyer earnest + closing · 1408 Garnet Way",
            "posted": "$738,200.00",
            "delta": "Balanced"
          },
          "status": "Recorded",
          "tone": "ok",
          "support": "Earnest and closing legs posted and matched to source rows. Good funds under office policy."
        },
        {
          "cells": {
            "record": "FR-0309",
            "source": "Lender wire · 770 Crescent Bay Dr",
            "posted": "$1,284,600.00",
            "delta": "Balanced"
          },
          "status": "Recorded",
          "tone": "ok",
          "support": "Closing disclosure and lender wire instructions matched. No shortage or overage."
        }
      ]
    },
    "secondary": {
      "kind": "limitation",
      "title": "What good funds means here",
      "items": [
        "Good funds is a state recorded under the office's own policy. Veto does not confirm good funds or clear the wire.",
        "A matched API result supports account existence and payee match; it is not live bank confirmation.",
        "Shortage and overage are recorded so the office reconciles before relying on the funds."
      ]
    },
    "footer": [
      {
        "label": "Funding in",
        "to": "/funds/funding-in",
        "variant": "primary"
      },
      {
        "label": "Open file",
        "to": "/file/$id",
        "params": {
          "id": "BF-0318"
        },
        "variant": "ghost"
      },
      {
        "label": "Open tasks",
        "to": "/tasks",
        "variant": "ghost"
      }
    ],
    "notes": "FR-/RF- id family. Uses buyer-funding fixtures and PROPERTY_VALUE-consistent amounts; 1031 branch on RF-0142."
  },
  "rec-exception": {
    "key": "rec-exception",
    "line": "records",
    "eyebrow": "RECORDS",
    "title": "Exception Records",
    "sub": "Manager-reviewed gaps: reason, source limitation, action allowed, approver, and expiration.",
    "ownerNote": "1 exception is awaiting your decision and 1 expired without use; both are recorded against the file as proof of the gap accepted.",
    "stats": [
      {
        "label": "Exception records",
        "value": "4",
        "note": "Across files",
        "tone": "neutral"
      },
      {
        "label": "Active",
        "value": "1",
        "note": "Within expiry",
        "tone": "ok"
      },
      {
        "label": "Awaiting decision",
        "value": "1",
        "note": "Owner review",
        "tone": "warn"
      },
      {
        "label": "Expired",
        "value": "1",
        "note": "Lapsed unused",
        "tone": "neutral"
      }
    ],
    "table": {
      "caption": "Each exception record converts a reviewed gap into permission to proceed, naming the limitation accepted, the approver, and the expiry. An exception is recorded, never assumed.",
      "columns": [
        {
          "key": "record",
          "label": "Record",
          "mono": true
        },
        {
          "key": "reason",
          "label": "Gap accepted"
        },
        {
          "key": "approver",
          "label": "Approver"
        },
        {
          "key": "expires",
          "label": "Expires",
          "mono": true
        }
      ],
      "rows": [
        {
          "cells": {
            "record": "EX-0214",
            "reason": "Destination changed after reliance; callback open",
            "approver": "Owner / Principal (OP)",
            "expires": "2026-05-21 17:30"
          },
          "status": "Awaiting",
          "tone": "warn",
          "support": "Would permit a time-limited release request with the limitation visible on the record. Awaits owner decision after conflict review."
        },
        {
          "cells": {
            "record": "EX-0213",
            "reason": "Final settlement statement not yet received",
            "approver": "Javier Reyes (JR)",
            "expires": "2026-05-22 12:00"
          },
          "status": "Held",
          "tone": "warn",
          "support": "Records the gap and the second-reviewer requirement; release stays held until the statement is current or the exception is accepted."
        },
        {
          "cells": {
            "record": "EX-0211",
            "reason": "Trust certification not on file",
            "approver": "Javier Reyes (JR)",
            "expires": "2026-05-24 17:00"
          },
          "status": "Restricted",
          "tone": "neutral",
          "support": "Exception path available only to manager and owner roles. Successor trustee letter still required to clear."
        },
        {
          "cells": {
            "record": "EX-0209",
            "reason": "Late release after demand good-through",
            "approver": "Owner / Principal (OP)",
            "expires": "2026-05-19 16:00"
          },
          "status": "Cleared",
          "tone": "ok",
          "support": "Accepted with per-diem recorded; outgoing wire later matched the supporting record within the window."
        }
      ]
    },
    "secondary": {
      "kind": "note",
      "title": "What an exception is",
      "items": [
        "An exception records who accepted which limitation and when it expires. It does not approve, verify, or release funds.",
        "An expired exception does not silently extend; the gap returns and the action holds again.",
        "Time-sensitive releases require a named second reviewer alongside the approver."
      ]
    },
    "footer": [
      {
        "label": "Open file",
        "to": "/file/$id",
        "params": {
          "id": "SP-0214"
        },
        "variant": "primary"
      },
      {
        "label": "Owner overview",
        "to": "/overview",
        "variant": "ghost"
      },
      {
        "label": "Open tasks",
        "to": "/tasks",
        "variant": "ghost"
      }
    ],
    "notes": "EX- id family. Mirrors EXCEPTION_RECORDS (EXC-SP0214 → EX-0214) with approver/expiry semantics; owner footer included."
  },
  "rec-holdlock": {
    "key": "rec-holdlock",
    "line": "records",
    "eyebrow": "RECORDS",
    "title": "Hold / Lock Records",
    "sub": "File holds, locks, and stop-action states, with who raised them and the cure required to clear them.",
    "ownerNote": "1 file is locked on an officer/payee association signal and 2 holds are open; the lock and its cure path sit under your review.",
    "stats": [
      {
        "label": "Hold / lock records",
        "value": "5",
        "note": "Open across files",
        "tone": "neutral"
      },
      {
        "label": "Open holds",
        "value": "3",
        "note": "Cure pending",
        "tone": "warn"
      },
      {
        "label": "Locked",
        "value": "1",
        "note": "Stop-action",
        "tone": "stop"
      },
      {
        "label": "In cure",
        "value": "1",
        "note": "Cure underway",
        "tone": "warn"
      }
    ],
    "table": {
      "caption": "Each record holds or locks an action until the cure is met. A hold pauses one line; a lock stops all action on the file until the named cure clears it.",
      "columns": [
        {
          "key": "record",
          "label": "Record",
          "mono": true
        },
        {
          "key": "raised",
          "label": "Raised by"
        },
        {
          "key": "scope",
          "label": "Scope"
        },
        {
          "key": "cure",
          "label": "Cure required"
        }
      ],
      "rows": [
        {
          "cells": {
            "record": "LCK-0214",
            "raised": "Owner / Principal (OP)",
            "scope": "Whole file · SP-0214",
            "cure": "Resolve officer conflict on the payout destination"
          },
          "status": "Locked",
          "tone": "stop",
          "support": "Payout destination names an entity whose managing member of record matches the acting officer. All action stopped until the conflict is reviewed off the file."
        },
        {
          "cells": {
            "record": "HOLD-0214a",
            "raised": "Javier Reyes (JR)",
            "scope": "Payoff line · SP-0214",
            "cure": "Confirm beneficiary phone against office contact file"
          },
          "status": "Open",
          "tone": "warn",
          "support": "Beneficiary callback pending. Payoff release holds until the number is confirmed against the contact of record."
        },
        {
          "cells": {
            "record": "HOLD-0214b",
            "raised": "Madeline Lane (ML)",
            "scope": "Buyer line · SP-0214",
            "cure": "Add missing transfer leg to source-of-funds narrative"
          },
          "status": "Held",
          "tone": "warn",
          "support": "Source-of-funds narrative is missing one transfer leg. Cure is underway."
        },
        {
          "cells": {
            "record": "HOLD-0211",
            "raised": "Javier Reyes (JR)",
            "scope": "Seller line · SP-0211",
            "cure": "Successor trustee letter from outside counsel"
          },
          "status": "Open",
          "tone": "warn",
          "support": "Trust certification not on file. Seller proceeds review holds until the letter is recorded."
        },
        {
          "cells": {
            "record": "HOLD-0213",
            "raised": "Madeline Lane (ML)",
            "scope": "Seller line · SP-0213",
            "cure": "Receive final settlement statement"
          },
          "status": "Cleared",
          "tone": "ok",
          "support": "Statement received and matched; the hold is cleared and stays as proof it was raised."
        }
      ]
    },
    "secondary": {
      "kind": "note",
      "title": "Holds and locks",
      "items": [
        "A hold or lock is recorded, not a verdict. It pauses the office's own action until a named cure is met.",
        "A cleared hold is never deleted; it remains as proof the stop-action was raised and answered.",
        "The office decides. Veto records the review."
      ]
    },
    "footer": [
      {
        "label": "Open file",
        "to": "/file/$id",
        "params": {
          "id": "SP-0214"
        },
        "variant": "primary"
      },
      {
        "label": "Open tasks",
        "to": "/tasks",
        "variant": "ghost"
      },
      {
        "label": "Owner overview",
        "to": "/overview",
        "variant": "ghost"
      }
    ],
    "notes": "LCK-/HOLD- id family. Reuses HOLD-014/HOLD-011/HOLD-018 cures from RAW fixture; adds file-level lock on SP-0214 conflict."
  },
  "rec-audit": {
    "key": "rec-audit",
    "line": "records",
    "eyebrow": "RECORDS",
    "title": "Audit Packets",
    "sub": "An exportable file-review package: records, source rows, manifest, policy version, and the event log.",
    "ownerNote": "1 packet is held until a draft proceeds record is cured; exporting it now would ship an incomplete manifest under your name.",
    "stats": [
      {
        "label": "Audit packets",
        "value": "6",
        "note": "One per file",
        "tone": "neutral"
      },
      {
        "label": "Exportable",
        "value": "3",
        "note": "Manifest complete",
        "tone": "ok"
      },
      {
        "label": "Held",
        "value": "2",
        "note": "Draft or stale record",
        "tone": "warn"
      },
      {
        "label": "Draft",
        "value": "1",
        "note": "Not assembled",
        "tone": "neutral"
      }
    ],
    "table": {
      "caption": "Each packet assembles the durable proof for one file: every record and source row, the policy version in force, and the full event log. A packet exports only when its manifest is complete.",
      "columns": [
        {
          "key": "record",
          "label": "Packet",
          "mono": true
        },
        {
          "key": "file",
          "label": "File",
          "mono": true
        },
        {
          "key": "policy",
          "label": "Policy version",
          "mono": true
        },
        {
          "key": "manifest",
          "label": "Manifest"
        }
      ],
      "rows": [
        {
          "cells": {
            "record": "AP-0214",
            "file": "SP-0214",
            "policy": "POL-SP-DEST-v1.4",
            "manifest": "5 records · 5 source rows · held"
          },
          "status": "Held",
          "tone": "warn",
          "support": "Includes draft v2 proceeds record and an open conflict signal. Manifest is incomplete until the draft is cured or exceptioned."
        },
        {
          "cells": {
            "record": "AP-0211",
            "file": "SP-0211",
            "policy": "POL-SP-DEST-v1.4",
            "manifest": "Not assembled"
          },
          "status": "Draft",
          "tone": "neutral",
          "support": "Trust certification source row not current; the manifest cannot assemble until it is recorded."
        },
        {
          "cells": {
            "record": "AP-0213",
            "file": "SP-0213",
            "policy": "POL-SP-DEST-v1.4",
            "manifest": "Awaiting settlement statement"
          },
          "status": "Awaiting",
          "tone": "warn",
          "support": "Final settlement statement pending; the event log is captured but the record set is not yet final."
        },
        {
          "cells": {
            "record": "AP-0209",
            "file": "SP-0209",
            "policy": "POL-SP-DEST-v1.3",
            "manifest": "Complete · 8 records · 14 source rows"
          },
          "status": "Recorded",
          "tone": "ok",
          "support": "All movements recorded and the release matched. Packet exportable under the policy version then in force."
        },
        {
          "cells": {
            "record": "AP-0207",
            "file": "SP-0207",
            "policy": "POL-SP-DEST-v1.3",
            "manifest": "Complete · 7 records · 11 source rows"
          },
          "status": "Recorded",
          "tone": "ok",
          "support": "Signed receipts and event log included. Limitations stay visible on every row in the export."
        },
        {
          "cells": {
            "record": "AP-0204",
            "file": "SP-0204",
            "policy": "POL-SP-DEST-v1.3",
            "manifest": "Complete · 6 records · 9 source rows"
          },
          "status": "Cleared",
          "tone": "ok",
          "support": "Exported for file review. Manifest, policy version, and the full event log travel with the packet."
        }
      ]
    },
    "secondary": {
      "kind": "limitation",
      "title": "What a packet is and is not",
      "items": [
        "A packet is an exportable record of what state allowed money to move. It is not a certification that the file was correct or fraud-free.",
        "The policy version in force at export is recorded so the packet is read against the rules of its time.",
        "Limitations on each source row travel with the export, not buried in a provider response."
      ]
    },
    "footer": [
      {
        "label": "Open records",
        "to": "/records",
        "variant": "primary"
      },
      {
        "label": "Open file",
        "to": "/file/$id",
        "params": {
          "id": "SP-0214"
        },
        "variant": "ghost"
      },
      {
        "label": "Settings",
        "to": "/settings",
        "variant": "ghost"
      }
    ],
    "notes": "AP- id family. Pins policy version POL-SP-DEST-v1.4 from POLICY_CONTROLS; signed files (SP-0209/0207/0204) yield complete manifests."
  },
  "sources": {
    "key": "sources",
    "line": "sources",
    "eyebrow": "SOURCES",
    "title": "Sources",
    "sub": "The source / claim / limitation graph. Every value the office relies on points back to a source that states what it proves and, just as important, what it does not.",
    "stats": [
      {
        "label": "Source rows on open files",
        "value": "118",
        "note": "Across 7 open files",
        "tone": "neutral"
      },
      {
        "label": "Current",
        "value": "94",
        "note": "Linked to a live claim",
        "tone": "ok"
      },
      {
        "label": "Stale or superseded",
        "value": "17",
        "note": "No longer supports a release",
        "tone": "warn"
      },
      {
        "label": "Mismatch recorded",
        "value": "1",
        "note": "SP-0214 entity payee",
        "tone": "stop"
      }
    ],
    "ownerNote": "One mismatch on SP-0214 is the only source row blocking a release this week. Coverage gaps you own sit under Limitations.",
    "table": {
      "caption": "What each relied-on value links back to, with the limitation made visible on the row.",
      "columns": [
        {
          "key": "value",
          "label": "Relied-on value"
        },
        {
          "key": "source",
          "label": "Source type"
        },
        {
          "key": "file",
          "label": "File",
          "mono": true
        },
        {
          "key": "proves",
          "label": "Supports"
        },
        {
          "key": "limit",
          "label": "Does not support"
        }
      ],
      "rows": [
        {
          "cells": {
            "value": "Whitfield Coast Holdings LLC · Chase ··4431",
            "source": "Seller instruction",
            "file": "SP-0214",
            "proves": "The payee entity the reviewer accepted for review",
            "limit": "Entitlement to proceeds or control of the account"
          },
          "status": "Current",
          "tone": "ok"
        },
        {
          "cells": {
            "value": "Managing member of record: M. Lane",
            "source": "CA SOS / KYB lookup",
            "file": "SP-0214",
            "proves": "Registered LLC and managing member on file",
            "limit": "Intent, account control, or release authority"
          },
          "status": "Mismatch",
          "tone": "stop"
        },
        {
          "cells": {
            "value": "Net seller proceeds $182,742.00",
            "source": "Settlement statement",
            "file": "SP-0214",
            "proves": "The amount reviewed against the current statement",
            "limit": "Authority to redirect proceeds to an entity payee"
          },
          "status": "Current",
          "tone": "ok"
        },
        {
          "cells": {
            "value": "Buyer closing funds $446,025.00",
            "source": "Reducto extraction",
            "file": "BF-0318",
            "proves": "What was read from the closing document for human review",
            "limit": "Receipt of good funds or office good-funds policy"
          },
          "status": "In review",
          "tone": "warn"
        },
        {
          "cells": {
            "value": "Beneficiary callback · 2208 Westcliff Dr",
            "source": "Independent callback",
            "file": "RF-0142",
            "proves": "What the reached party read back on the recorded call",
            "limit": "Identity beyond the call or authority to redirect a payoff"
          },
          "status": "Awaiting",
          "tone": "warn"
        },
        {
          "cells": {
            "value": "Demand good-through 2026-05-24",
            "source": "Payoff demand",
            "file": "SP-0213",
            "proves": "The amount and good-through date stated by the servicer",
            "limit": "That the demand covers the closing date"
          },
          "status": "Stale",
          "tone": "warn"
        }
      ]
    },
    "secondary": {
      "kind": "note",
      "title": "How to read this graph",
      "items": [
        "A source records an input and its limitation. It is never a verdict.",
        "Provider results (CA SOS/KYB, Persona, Twilio, Reducto) are recorded inputs, not confirmations.",
        "When a value changes, its source row stales and stops supporting any release.",
        "The office decides. Veto records the review."
      ]
    },
    "footer": [
      {
        "label": "Open SP-0214",
        "to": "/file/$id",
        "params": {
          "id": "SP-0214"
        },
        "variant": "primary"
      },
      {
        "label": "Open records",
        "to": "/records",
        "variant": "ghost"
      }
    ],
    "notes": "Top-level Sources surface; overview of the source/claim/limitation graph across open files."
  },
  "src-inbox": {
    "key": "src-inbox",
    "line": "sources",
    "eyebrow": "SOURCES",
    "title": "Source Inbox",
    "sub": "Documents, emails, checks, and callbacks that have arrived but are not yet attached to a claim.",
    "stats": [
      {
        "label": "Unattached items",
        "value": "9",
        "note": "Awaiting a reviewer",
        "tone": "warn"
      },
      {
        "label": "Oldest in inbox",
        "value": "1d 4h",
        "note": "Wire-change email, BF-0318",
        "tone": "warn"
      },
      {
        "label": "Attached today",
        "value": "6",
        "note": "Linked to a claim",
        "tone": "ok"
      }
    ],
    "ownerNote": "Two inbox items reference a changed destination after reliance. Nothing here can support a release until a reviewer attaches it.",
    "table": {
      "caption": "Arrived sources that do not yet point to a claim. Nothing here supports an office action until attached.",
      "columns": [
        {
          "key": "item",
          "label": "Arrived item"
        },
        {
          "key": "channel",
          "label": "Channel"
        },
        {
          "key": "file",
          "label": "Suggested file",
          "mono": true
        },
        {
          "key": "age",
          "label": "Age",
          "align": "right"
        },
        {
          "key": "note",
          "label": "What it appears to be"
        }
      ],
      "rows": [
        {
          "cells": {
            "item": "Email: \"Updated wire instructions\"",
            "channel": "Inbound email",
            "file": "BF-0318",
            "age": "1d 4h",
            "note": "Destination change after reliance — not yet a claim"
          },
          "status": "Open",
          "tone": "warn"
        },
        {
          "cells": {
            "item": "Final settlement statement (PDF)",
            "channel": "Upload · Reducto",
            "file": "SP-0213",
            "age": "6h",
            "note": "Extracted figures recorded for human review"
          },
          "status": "Awaiting",
          "tone": "warn"
        },
        {
          "cells": {
            "item": "Voicemail: beneficiary callback",
            "channel": "Recorded line",
            "file": "RF-0142",
            "age": "3h",
            "note": "Read-back to transcribe before attaching"
          },
          "status": "Awaiting",
          "tone": "warn"
        },
        {
          "cells": {
            "item": "Government ID + selfie",
            "channel": "Persona",
            "file": "SP-0211",
            "age": "2h",
            "note": "Identity check result, payee unattached"
          },
          "status": "Open",
          "tone": "warn"
        },
        {
          "cells": {
            "item": "Trust certification (PDF)",
            "channel": "Upload",
            "file": "SP-0211",
            "age": "1h",
            "note": "Successor-trustee letter pending review"
          },
          "status": "Open",
          "tone": "warn"
        },
        {
          "cells": {
            "item": "Lender wire instructions",
            "channel": "Inbound email",
            "file": "BF-0317",
            "age": "Draft",
            "note": "Not yet matched to a funding claim"
          },
          "status": "Draft",
          "tone": "neutral"
        }
      ]
    },
    "secondary": {
      "kind": "limitation",
      "title": "Inbox limitation",
      "items": [
        "Arrival is not attachment. An item in the inbox supports nothing until a reviewer links it to a claim.",
        "Channel of arrival (email, upload, call) is recorded as context, never as authority.",
        "A wire-change email is recorded as a change source — it does not authorize a redirect."
      ]
    },
    "footer": [
      {
        "label": "Open tasks",
        "to": "/tasks",
        "variant": "primary"
      },
      {
        "label": "Open BF-0318",
        "to": "/file/$id",
        "params": {
          "id": "BF-0318"
        },
        "variant": "ghost"
      }
    ],
    "notes": "Unattached arrived sources, queued for a reviewer to link to claims."
  },
  "src-rows": {
    "key": "src-rows",
    "line": "sources",
    "eyebrow": "SOURCES",
    "title": "Source Rows",
    "sub": "Every typed source tied to a claim, with its limitation, confidence, reviewer, and current / stale / superseded state.",
    "stats": [
      {
        "label": "Rows on SP-0214",
        "value": "5",
        "note": "Seller proceeds release",
        "tone": "neutral"
      },
      {
        "label": "Current",
        "value": "2",
        "note": "Linked to the live claim",
        "tone": "ok"
      },
      {
        "label": "Needs review or open",
        "value": "2",
        "note": "Account check + callback",
        "tone": "warn"
      },
      {
        "label": "Mismatch",
        "value": "1",
        "note": "Entity managing member",
        "tone": "stop"
      }
    ],
    "ownerNote": "The v2 record cannot be signed until every source row on SP-0214 is accepted and the mismatch is resolved.",
    "table": {
      "caption": "Typed source rows for SP-0214 · seller-proceeds-release, each carrying its own limitation.",
      "columns": [
        {
          "key": "id",
          "label": "Source",
          "mono": true
        },
        {
          "key": "type",
          "label": "Type"
        },
        {
          "key": "claim",
          "label": "Claim"
        },
        {
          "key": "reviewer",
          "label": "Reviewer"
        },
        {
          "key": "shows",
          "label": "Shows / does not show"
        }
      ],
      "rows": [
        {
          "cells": {
            "id": "SRC-SP0214-01",
            "type": "Seller instruction",
            "claim": "Proceeds to Whitfield Coast Holdings LLC · Chase ··4431",
            "reviewer": "Madeline Lane",
            "shows": "Shows the instruction received; not entitlement or account control"
          },
          "status": "Current",
          "tone": "ok"
        },
        {
          "cells": {
            "id": "SRC-SP0214-02",
            "type": "Settlement statement",
            "claim": "Net seller proceeds remain $182,742.00",
            "reviewer": "Madeline Lane",
            "shows": "Shows the amount reviewed; not authority to redirect"
          },
          "status": "Current",
          "tone": "ok"
        },
        {
          "cells": {
            "id": "SRC-SP0214-03",
            "type": "Account / payee check",
            "claim": "Account exists; payee name matches the entity",
            "reviewer": "Madeline Lane",
            "shows": "Shows existence and name match; not live bank confirmation or control"
          },
          "status": "In review",
          "tone": "warn"
        },
        {
          "cells": {
            "id": "SRC-SP0214-04",
            "type": "Independent callback",
            "claim": "Seller to read back entity payee and account",
            "reviewer": "Madeline Lane",
            "shows": "Shows the read-back once recorded; not legal authority to name an entity"
          },
          "status": "Open",
          "tone": "warn"
        },
        {
          "cells": {
            "id": "SRC-SP0214-05",
            "type": "CA SOS / KYB lookup",
            "claim": "Registered LLC · managing member M. Lane",
            "reviewer": "System",
            "shows": "Shows registration and member of record; not intent or transfer safety"
          },
          "status": "Mismatch",
          "tone": "stop"
        }
      ]
    },
    "secondary": {
      "kind": "rows",
      "title": "Row states",
      "items": [
        "Current — the row supports the live claim as reviewed.",
        "In review / Open / Awaiting — the row is recorded but not yet accepted.",
        "Stale — a value changed after reliance; the row no longer supports a release.",
        "Mismatch — the source contradicts the claim and routes to the Review Register."
      ]
    },
    "footer": [
      {
        "label": "Open SP-0214",
        "to": "/file/$id",
        "params": {
          "id": "SP-0214"
        },
        "variant": "primary"
      },
      {
        "label": "Open records",
        "to": "/records",
        "variant": "ghost"
      }
    ],
    "notes": "Typed source rows for the SP-0214 seller-proceeds reliance graph."
  },
  "src-checks": {
    "key": "src-checks",
    "line": "sources",
    "eyebrow": "SOURCES",
    "title": "Checks",
    "sub": "Narrow source checks: account / payee, business, identity, entity, callback. A check is a source row, never a verdict.",
    "stats": [
      {
        "label": "Checks recorded (30d)",
        "value": "212",
        "note": "Across all open files",
        "tone": "neutral"
      },
      {
        "label": "Returned a result",
        "value": "207",
        "note": "Recorded for human review",
        "tone": "ok"
      },
      {
        "label": "Returned a flag",
        "value": "3",
        "note": "Recorded as context",
        "tone": "warn"
      }
    ],
    "ownerNote": "A check returning clean is still not permission to release. The three flagged checks are recorded context, not blockers on their own.",
    "table": {
      "caption": "Provider-style checks as recorded inputs. Each states what it returned and what it cannot establish.",
      "columns": [
        {
          "key": "check",
          "label": "Check"
        },
        {
          "key": "provider",
          "label": "Provider"
        },
        {
          "key": "result",
          "label": "Recorded result"
        },
        {
          "key": "file",
          "label": "File",
          "mono": true
        },
        {
          "key": "limit",
          "label": "Does not establish"
        }
      ],
      "rows": [
        {
          "cells": {
            "check": "Account / payee",
            "provider": "Bank match API",
            "result": "Account exists · entity payee name match",
            "file": "SP-0214",
            "limit": "Live bank confirmation, control, or authority to receive"
          },
          "status": "In review",
          "tone": "warn"
        },
        {
          "cells": {
            "check": "Business entity / KYB",
            "provider": "CA SOS / KYB",
            "result": "Active LLC · managing member M. Lane",
            "file": "SP-0214",
            "limit": "Intent, account control, or release authority"
          },
          "status": "Mismatch",
          "tone": "stop"
        },
        {
          "cells": {
            "check": "Identity",
            "provider": "Persona",
            "result": "ID + selfie captured · name match recorded",
            "file": "SP-0211",
            "limit": "Authority over an account or the right to receive funds"
          },
          "status": "Recorded",
          "tone": "ok"
        },
        {
          "cells": {
            "check": "Phone line context",
            "provider": "Twilio Lookup",
            "result": "Non-fixed VoIP · line valid · demand-provided",
            "file": "RF-0142",
            "limit": "That the number reaches the true beneficiary"
          },
          "status": "Held",
          "tone": "warn"
        },
        {
          "cells": {
            "check": "Document extraction",
            "provider": "Reducto",
            "result": "Extracted $446,025.00 · acct ··6014",
            "file": "BF-0318",
            "limit": "Receipt of good funds; figures await human review"
          },
          "status": "In review",
          "tone": "warn"
        },
        {
          "cells": {
            "check": "Identity",
            "provider": "Persona",
            "result": "ID + selfie captured · name match recorded",
            "file": "BF-0317",
            "limit": "Source of funds or signing authority"
          },
          "status": "Recorded",
          "tone": "ok"
        }
      ]
    },
    "secondary": {
      "kind": "limitation",
      "title": "Why a check is not a verdict",
      "items": [
        "Matched by API is not live bank confirmation, and proves neither control nor authority.",
        "A non-fixed VoIP or invalid line is recorded as context. A callback is evidence, never permission.",
        "Identity recorded is not authority. Extraction recorded is not good funds.",
        "Every check lands as a source row with its limitation; the office decides on the whole record."
      ]
    },
    "footer": [
      {
        "label": "Open SP-0214",
        "to": "/file/$id",
        "params": {
          "id": "SP-0214"
        },
        "variant": "primary"
      },
      {
        "label": "Open tasks",
        "to": "/tasks",
        "variant": "ghost"
      }
    ],
    "notes": "Narrow provider-style checks recorded as inputs with explicit limitations."
  },
  "src-callbacks": {
    "key": "src-callbacks",
    "line": "sources",
    "eyebrow": "SOURCES",
    "title": "Callbacks",
    "sub": "Recorded callbacks with the number's origin (trusted source vs demand-provided) and what was read back.",
    "stats": [
      {
        "label": "Callbacks recorded (30d)",
        "value": "41",
        "note": "Across payoffs and proceeds",
        "tone": "neutral"
      },
      {
        "label": "Number from trusted source",
        "value": "34",
        "note": "Directory or contact of record",
        "tone": "ok"
      },
      {
        "label": "Demand-provided number",
        "value": "7",
        "note": "Recorded as weaker context",
        "tone": "warn"
      }
    ],
    "ownerNote": "Two open payoff callbacks use demand-provided numbers. A callback supports the read-back only — it is never permission to release.",
    "table": {
      "caption": "Recorded callbacks, each tagged by where the number came from and what the reached party read back.",
      "columns": [
        {
          "key": "party",
          "label": "Party called"
        },
        {
          "key": "origin",
          "label": "Number origin"
        },
        {
          "key": "file",
          "label": "File",
          "mono": true
        },
        {
          "key": "readback",
          "label": "Read back"
        },
        {
          "key": "limit",
          "label": "Does not support"
        }
      ],
      "rows": [
        {
          "cells": {
            "party": "Seller · James Whitfield",
            "origin": "Contact of record",
            "file": "SP-0214",
            "readback": "Entity payee + Chase ··4431 (pending)",
            "limit": "Authority to name an entity payee"
          },
          "status": "Open",
          "tone": "warn"
        },
        {
          "cells": {
            "party": "Beneficiary payoff desk",
            "origin": "Demand-provided",
            "file": "RF-0142",
            "readback": "Awaiting — number is non-fixed VoIP",
            "limit": "That the line reaches the true beneficiary"
          },
          "status": "Held",
          "tone": "stop"
        },
        {
          "cells": {
            "party": "Servicer payoff desk",
            "origin": "Servicer website",
            "file": "SP-0213",
            "readback": "Good-through 2026-05-24 confirmed by line",
            "limit": "That the demand covers the closing date"
          },
          "status": "Recorded",
          "tone": "ok"
        },
        {
          "cells": {
            "party": "Lender funding desk",
            "origin": "Published number",
            "file": "BF-0318",
            "readback": "Wire instructions read back to acct ··6014",
            "limit": "Receipt of good funds"
          },
          "status": "Recorded",
          "tone": "ok"
        },
        {
          "cells": {
            "party": "Trustee of record",
            "origin": "Contact of record",
            "file": "SP-0211",
            "readback": "Awaiting successor-trustee letter",
            "limit": "Authority to disburse to a named account"
          },
          "status": "Awaiting",
          "tone": "warn"
        }
      ]
    },
    "secondary": {
      "kind": "limitation",
      "title": "Callback limitation",
      "items": [
        "A callback supports the read-back from the reached party only — nothing more.",
        "A number supplied by the demand is recorded as weaker context than a number from a trusted directory or the contact of record.",
        "A callback is evidence, never permission. The office decides on the whole record."
      ]
    },
    "footer": [
      {
        "label": "Open payoffs",
        "to": "/funds/payoffs",
        "variant": "primary"
      },
      {
        "label": "Open SP-0214",
        "to": "/file/$id",
        "params": {
          "id": "SP-0214"
        },
        "variant": "ghost"
      }
    ],
    "notes": "Recorded callbacks tagged by number origin and read-back, with the read-back-only limitation."
  },
  "src-vault": {
    "key": "src-vault",
    "line": "sources",
    "eyebrow": "SOURCES",
    "title": "Vault",
    "sub": "Restricted values behind separate permission: full account and routing numbers, raw provider responses, identity fields, with an access log.",
    "stats": [
      {
        "label": "Restricted fields",
        "value": "23",
        "note": "Masked in every other view",
        "tone": "neutral"
      },
      {
        "label": "Accesses this week",
        "value": "5",
        "note": "All logged with reviewer",
        "tone": "ok"
      },
      {
        "label": "Restricted-role views",
        "value": "1",
        "note": "Anita Kuroda · read-only",
        "tone": "warn"
      }
    ],
    "ownerNote": "Every vault open is logged with who, when, and why. One restricted-reviewer view this week — confirm it was warranted.",
    "table": {
      "caption": "Sensitive values behind separate permission. The row shows the masked value and the access record, never the raw value here.",
      "columns": [
        {
          "key": "field",
          "label": "Restricted field"
        },
        {
          "key": "masked",
          "label": "Shown as",
          "mono": true
        },
        {
          "key": "file",
          "label": "File",
          "mono": true
        },
        {
          "key": "access",
          "label": "Last access"
        },
        {
          "key": "by",
          "label": "By"
        }
      ],
      "rows": [
        {
          "cells": {
            "field": "Full account number",
            "masked": "Chase ··4431",
            "file": "SP-0214",
            "access": "2026-05-21 15:31",
            "by": "Madeline Lane"
          },
          "status": "Restricted",
          "tone": "neutral"
        },
        {
          "cells": {
            "field": "Routing number",
            "masked": "·······4431",
            "file": "SP-0214",
            "access": "2026-05-21 15:31",
            "by": "Madeline Lane"
          },
          "status": "Restricted",
          "tone": "neutral"
        },
        {
          "cells": {
            "field": "Raw KYB response",
            "masked": "CA SOS payload",
            "file": "SP-0214",
            "access": "2026-05-21 15:36",
            "by": "Javier Reyes"
          },
          "status": "Locked",
          "tone": "stop"
        },
        {
          "cells": {
            "field": "Identity fields (Persona)",
            "masked": "DOB ··/··/···· · ID ··8830",
            "file": "SP-0211",
            "access": "2026-05-20 09:42",
            "by": "Madeline Lane"
          },
          "status": "Restricted",
          "tone": "neutral"
        },
        {
          "cells": {
            "field": "Funding account",
            "masked": "acct ··6014",
            "file": "BF-0318",
            "access": "2026-05-21 10:18",
            "by": "Anita Kuroda"
          },
          "status": "Restricted",
          "tone": "warn"
        }
      ]
    },
    "secondary": {
      "kind": "note",
      "title": "Vault rules",
      "items": [
        "Full account, routing, and identity values stay masked everywhere except behind separate permission.",
        "Raw provider responses are kept for audit, not for routine review.",
        "Every open writes an access-log entry: who, when, file, and field.",
        "Seeing a value here is not authority to act on it. The office decides."
      ]
    },
    "footer": [
      {
        "label": "Open settings",
        "to": "/settings",
        "variant": "primary"
      },
      {
        "label": "Open SP-0214",
        "to": "/file/$id",
        "params": {
          "id": "SP-0214"
        },
        "variant": "ghost"
      }
    ],
    "notes": "Restricted values behind permission with an access log; raw provider responses and identity fields."
  },
  "src-limitations": {
    "key": "src-limitations",
    "line": "sources",
    "eyebrow": "SOURCES",
    "title": "Limitations",
    "sub": "What each source type can and cannot support, surfaced on every record rather than buried in a provider response.",
    "stats": [
      {
        "label": "Source types in use",
        "value": "8",
        "note": "Each with a stated limitation",
        "tone": "neutral"
      },
      {
        "label": "Limitation shown on row",
        "value": "100%",
        "note": "On every record, every surface",
        "tone": "ok"
      },
      {
        "label": "Types proving authority",
        "value": "0",
        "note": "None — by design",
        "tone": "warn"
      }
    ],
    "ownerNote": "No source type on the office proves authority or control. This table is the reference behind every blocked release you review.",
    "table": {
      "caption": "The limitation reference. Read top to bottom: no input here establishes authority, control, or good funds on its own.",
      "columns": [
        {
          "key": "type",
          "label": "Source type"
        },
        {
          "key": "supports",
          "label": "Supports"
        },
        {
          "key": "limit",
          "label": "Does not support"
        }
      ],
      "rows": [
        {
          "cells": {
            "type": "Seller / buyer instruction",
            "supports": "The instruction received and the payee accepted for review",
            "limit": "Entitlement, account control, or a legal duty to release there"
          },
          "status": "Recorded",
          "tone": "ok"
        },
        {
          "cells": {
            "type": "Settlement statement",
            "supports": "The current amount reviewed",
            "limit": "Authority to redirect proceeds or name an entity payee"
          },
          "status": "Recorded",
          "tone": "ok"
        },
        {
          "cells": {
            "type": "Account / payee check",
            "supports": "Account existence and payee-name match returned by the provider",
            "limit": "Live bank confirmation, account control, or authority to receive"
          },
          "status": "Recorded",
          "tone": "ok"
        },
        {
          "cells": {
            "type": "CA SOS / KYB lookup",
            "supports": "Registration, status, and managing member of record",
            "limit": "Intent, account control, release authority, or transfer safety"
          },
          "status": "Recorded",
          "tone": "ok"
        },
        {
          "cells": {
            "type": "Identity (Persona)",
            "supports": "An identity check result and name match",
            "limit": "Authority over an account or the right to receive funds"
          },
          "status": "Recorded",
          "tone": "ok"
        },
        {
          "cells": {
            "type": "Phone line context (Twilio)",
            "supports": "Line type and validity for a callback number",
            "limit": "That the number reaches the true party; permission to release"
          },
          "status": "Recorded",
          "tone": "ok"
        },
        {
          "cells": {
            "type": "Document extraction (Reducto)",
            "supports": "What was read from a document, recorded for human review",
            "limit": "Receipt of good funds or office good-funds policy"
          },
          "status": "Recorded",
          "tone": "ok"
        }
      ]
    },
    "secondary": {
      "kind": "limitation",
      "title": "The point of this page",
      "items": [
        "A limitation belongs on the row the office relies on, not buried in a provider response.",
        "No single source proves authority or control. Strength comes from the whole record, accepted by a reviewer.",
        "The office decides. Veto records the review."
      ]
    },
    "footer": [
      {
        "label": "Open records",
        "to": "/records",
        "variant": "primary"
      },
      {
        "label": "Open settings",
        "to": "/settings",
        "variant": "ghost"
      }
    ],
    "notes": "Reference of what each source type supports and does not support; surfaced on every record."
  },
  "guard": {
    "key": "guard",
    "line": "guard",
    "eyebrow": "GUARD",
    "title": "Guard",
    "sub": "No-bypass control posture: which policies are active, where coverage is thin, which exceptions are clustering, and which files are exposed. Explained as control states, not magic risk scores.",
    "ownerNote": "2 exposures sit on files you own — SP-0214 release is blocked on a conflict, SP-0211 carries an open hold past its cure window.",
    "stats": [
      {
        "label": "Active controls",
        "value": "6",
        "tone": "ok",
        "note": "Money, change, sources, authority, signatures, exceptions"
      },
      {
        "label": "Controls firing as configured",
        "value": "5 of 6",
        "tone": "warn",
        "note": "Coverage thin on authority/conflict"
      },
      {
        "label": "Exposed files",
        "value": "3",
        "tone": "warn",
        "note": "SP-0214, SP-0211, SP-0213"
      },
      {
        "label": "Open incidents",
        "value": "1",
        "tone": "stop",
        "note": "Conflict on SP-0214 release"
      }
    ],
    "table": {
      "caption": "Control posture by domain — each row is a control state, not a score.",
      "columns": [
        {
          "key": "domain",
          "label": "Control domain"
        },
        {
          "key": "state",
          "label": "State"
        },
        {
          "key": "where",
          "label": "Where it bites",
          "mono": true
        },
        {
          "key": "support",
          "label": "What it supports"
        }
      ],
      "rows": [
        {
          "cells": {
            "domain": "Money movement",
            "state": "Held",
            "where": "SP-0214 · seller proceeds",
            "support": "Release held against a stale support record until a v2 record or owner exception exists."
          },
          "status": "Held",
          "tone": "warn",
          "support": "No release without a current, source-linked record."
        },
        {
          "cells": {
            "domain": "Material change",
            "state": "Recorded",
            "where": "CHG-SP0214-DEST",
            "support": "A payee change after reliance staled Seller Proceeds Record v1; the change is recorded and the prior record stays visible."
          },
          "status": "Recorded",
          "tone": "ok",
          "support": "Changes after reliance stale the prior record."
        },
        {
          "cells": {
            "domain": "Authority / conflict",
            "state": "Blocked",
            "where": "REL-SP0214-01",
            "support": "Payout entity's managing member of record matches the acting officer; release blocked pending owner decision."
          },
          "status": "Blocked",
          "tone": "stop",
          "support": "Conflict between payee and acting officer requires owner review."
        },
        {
          "cells": {
            "domain": "Sources",
            "state": "Open",
            "where": "SRC-SP0214-04",
            "support": "Independent seller callback recorded as open; account/payee check returned existence and name match only."
          },
          "status": "Open",
          "tone": "warn",
          "support": "Each source carries its visible limitation on the record."
        },
        {
          "cells": {
            "domain": "Signatures",
            "state": "Awaiting",
            "where": "SP-0211 · seller",
            "support": "Successor-trustee authority not yet on file; officer attestation awaited before the proceeds record is submitted."
          },
          "status": "Awaiting",
          "tone": "warn",
          "support": "An officer must attest before a record is submitted."
        },
        {
          "cells": {
            "domain": "Exceptions",
            "state": "Recorded",
            "where": "EXC-SP0214-01",
            "support": "A manager exception path is recorded with its accepted limitation and a 5:30 pm expiry — not yet exercised."
          },
          "status": "Recorded",
          "tone": "ok",
          "support": "Manager-reviewed gaps are recorded with limitation and expiry."
        }
      ]
    },
    "secondary": {
      "kind": "limitation",
      "title": "What Guard does not do",
      "items": [
        "Guard reports control states. It does not score risk, detect fraud, or rank files by a number.",
        "A held or blocked state is the control working — not a verdict that anything is wrong.",
        "The office decides. Veto records the review."
      ]
    },
    "footer": [
      {
        "label": "Open tasks",
        "to": "/tasks",
        "variant": "primary"
      },
      {
        "label": "Open SP-0214",
        "to": "/file/$id",
        "params": {
          "id": "SP-0214"
        }
      },
      {
        "label": "Veto Standard",
        "to": "/settings"
      }
    ],
    "notes": "Top-level Guard landing; blurb preserved from SCAFFOLD_COPY."
  },
  "guard-controls": {
    "key": "guard-controls",
    "line": "guard",
    "eyebrow": "CONTROLS",
    "title": "Controls",
    "sub": "The policy controls in force, by domain: money movement, material change, sources, authority, signatures, exceptions. Each shows its version, scope, and effect.",
    "ownerNote": "You own the policy versions below. The authority/conflict control (POL-OFF-CONFLICT-v1) is the one currently routing a release to your desk.",
    "stats": [
      {
        "label": "Controls in force",
        "value": "6",
        "tone": "ok",
        "note": "Across six domains"
      },
      {
        "label": "Effect: blocks release",
        "value": "3",
        "tone": "neutral",
        "note": "Money, change, authority"
      },
      {
        "label": "Last policy change",
        "value": "2026-05-01",
        "tone": "neutral",
        "note": "By Javier Reyes"
      }
    ],
    "table": {
      "caption": "Active policy controls — id, scope, and the effect when the trigger fires.",
      "columns": [
        {
          "key": "control",
          "label": "Control"
        },
        {
          "key": "version",
          "label": "Version",
          "mono": true
        },
        {
          "key": "scope",
          "label": "Scope"
        },
        {
          "key": "effect",
          "label": "Effect on trigger"
        }
      ],
      "rows": [
        {
          "cells": {
            "control": "Seller proceeds destination change requires v2 record",
            "version": "POL-SP-DEST-v1.4",
            "scope": "All seller proceeds over $25,000.00 and every trust, entity, POA, or last-minute destination change.",
            "effect": "Require v2 record"
          },
          "status": "Recorded",
          "tone": "ok",
          "support": "Active and firing — staled v1 on SP-0214."
        },
        {
          "cells": {
            "control": "No release without current support record",
            "version": "POL-REL-GATE-v2.1",
            "scope": "Every outgoing money request across all open files.",
            "effect": "Hold release until current record or exception"
          },
          "status": "Held",
          "tone": "warn",
          "support": "Holding SP-0214 seller proceeds release now."
        },
        {
          "cells": {
            "control": "Acting-officer / payee conflict review",
            "version": "POL-OFF-CONFLICT-v1",
            "scope": "Releases where the payee entity's officer of record matches the acting escrow officer.",
            "effect": "Block; route to owner"
          },
          "status": "Blocked",
          "tone": "stop",
          "support": "Blocking REL-SP0214-01 pending owner decision."
        },
        {
          "cells": {
            "control": "Independent callback before destination change",
            "version": "POL-CB-INDEP-v1.2",
            "scope": "Payoff beneficiaries and any changed proceeds destination.",
            "effect": "Require recorded callback on number of record"
          },
          "status": "Open",
          "tone": "warn",
          "support": "Seller callback on SP-0214 recorded as open."
        },
        {
          "cells": {
            "control": "Source limitations visible on record",
            "version": "POL-SRC-LIMIT-v1.0",
            "scope": "Every source row attached to a release record.",
            "effect": "Surface limitation on task and record"
          },
          "status": "Recorded",
          "tone": "ok",
          "support": "Account/payee check limitation shown on SP-0214."
        },
        {
          "cells": {
            "control": "Manager exception with limitation and expiry",
            "version": "POL-EXC-v1.3",
            "scope": "All gaps converted into permission to proceed.",
            "effect": "Require approver role, accepted limitation, expiry"
          },
          "status": "Recorded",
          "tone": "ok",
          "support": "Exception path on SP-0214 names role and 5:30 pm expiry."
        }
      ]
    },
    "secondary": {
      "kind": "note",
      "title": "How a control behaves",
      "items": [
        "A control is configured policy, not a judgment. Its effect is to hold, block, or require an exception — never to approve, verify, or release.",
        "Every effect leaves a record. The office still decides and acts."
      ]
    },
    "footer": [
      {
        "label": "Open settings",
        "to": "/settings",
        "variant": "primary"
      },
      {
        "label": "Changes after reliance",
        "to": "/funds/changes"
      }
    ],
    "notes": "Policy-controls inventory tied to POLICY_CONTROLS fixture (POL-SP-DEST-v1.4) and the conflict gate."
  },
  "guard-coverage": {
    "key": "guard-coverage",
    "line": "guard",
    "eyebrow": "COVERAGE",
    "title": "Coverage",
    "sub": "How consistently no-bypass controls fire, by officer, branch, file type, and record type. Thin coverage is where a control could be bypassed, not where fraud is alleged.",
    "ownerNote": "Entity / trust / POA destinations are your thinnest slice (84%). Those are the files most likely to need an owner exception.",
    "stats": [
      {
        "label": "Releases covered by a record",
        "value": "96%",
        "tone": "ok",
        "note": "47 of 49 across open files"
      },
      {
        "label": "Thinnest slice",
        "value": "84%",
        "tone": "warn",
        "note": "Entity / trust / POA destinations"
      },
      {
        "label": "Uncovered actions",
        "value": "2",
        "tone": "stop",
        "note": "Pending source or exception"
      }
    ],
    "table": {
      "caption": "Coverage by slice — share of controlled actions that fired with a current record.",
      "columns": [
        {
          "key": "slice",
          "label": "Slice"
        },
        {
          "key": "coverage",
          "label": "Coverage",
          "align": "right",
          "mono": true
        },
        {
          "key": "sample",
          "label": "Sample",
          "mono": true
        },
        {
          "key": "support",
          "label": "Where it thins"
        }
      ],
      "rows": [
        {
          "cells": {
            "slice": "Officer · Madeline Lane (ML)",
            "coverage": "94%",
            "sample": "32 actions",
            "support": "One blocked conflict release (SP-0214) and one open callback pull coverage down."
          },
          "status": "In review",
          "tone": "warn",
          "support": "805 Escrow · Westlake Village"
        },
        {
          "cells": {
            "slice": "Officer · Javier Reyes (JR)",
            "coverage": "100%",
            "sample": "11 actions",
            "support": "All controlled actions fired with a current record or recorded exception."
          },
          "status": "Current",
          "tone": "ok",
          "support": "Branch manager queue"
        },
        {
          "cells": {
            "slice": "File type · Seller proceeds",
            "coverage": "92%",
            "sample": "18 files",
            "support": "Destination-change control drives most holds here."
          },
          "status": "In review",
          "tone": "warn",
          "support": "SP-series files"
        },
        {
          "cells": {
            "slice": "File type · Buyer funding",
            "coverage": "100%",
            "sample": "12 files",
            "support": "Funding-in records present across BF-0318, BF-0317, BF-0315."
          },
          "status": "Current",
          "tone": "ok",
          "support": "BF-series files"
        },
        {
          "cells": {
            "slice": "Destination · Entity / trust / POA",
            "coverage": "84%",
            "sample": "9 actions",
            "support": "Whitfield Coast Holdings LLC on SP-0214 awaits callback and conflict review."
          },
          "status": "Open",
          "tone": "warn",
          "support": "Highest-scrutiny destination class"
        },
        {
          "cells": {
            "slice": "Record type · Release request",
            "coverage": "96%",
            "sample": "49 records",
            "support": "Two release requests sit without a current support record."
          },
          "status": "Held",
          "tone": "warn",
          "support": "Pre-money-action artifact"
        }
      ]
    },
    "secondary": {
      "kind": "limitation",
      "title": "Reading coverage",
      "items": [
        "Coverage measures whether a control fired and left a record — not whether a transaction was legitimate.",
        "100% coverage means every controlled action had a record or exception. It does not certify the underlying money is good or authorized."
      ]
    },
    "footer": [
      {
        "label": "Open files",
        "to": "/files",
        "variant": "primary"
      },
      {
        "label": "Funding queue",
        "to": "/funds/funding-in"
      }
    ],
    "notes": "Coverage by officer/branch/file-type/record-type, grounded in REVIEWERS (ML/JR) and SP/BF file series."
  },
  "guard-risks": {
    "key": "guard-risks",
    "line": "guard",
    "eyebrow": "RISKS",
    "title": "Risks",
    "sub": "Recurring exposure across files, explained as control states, not magic scores. Each row names the pattern, the files it touches, and the control state that holds it.",
    "ownerNote": "The acting-officer/payee conflict pattern is currently single-file (SP-0214) but is the one exposure that cannot clear without your decision.",
    "stats": [
      {
        "label": "Exposure patterns",
        "value": "4",
        "tone": "warn",
        "note": "Across open files"
      },
      {
        "label": "Held by a control",
        "value": "4 of 4",
        "tone": "ok",
        "note": "None can bypass"
      },
      {
        "label": "Needs owner decision",
        "value": "1",
        "tone": "stop",
        "note": "Conflict pattern"
      }
    ],
    "table": {
      "caption": "Recurring exposure patterns — each held by a named control state.",
      "columns": [
        {
          "key": "pattern",
          "label": "Exposure pattern"
        },
        {
          "key": "files",
          "label": "Files",
          "mono": true
        },
        {
          "key": "holdstate",
          "label": "Held by"
        },
        {
          "key": "support",
          "label": "Why it is exposure, not a score"
        }
      ],
      "rows": [
        {
          "cells": {
            "pattern": "Destination changed after reliance",
            "files": "SP-0214",
            "holdstate": "Held — v2 required",
            "support": "Proceeds payee moved from an individual to Whitfield Coast Holdings LLC after v1 was signed."
          },
          "status": "Held",
          "tone": "warn",
          "support": "Control staled v1 and opened the required task."
        },
        {
          "cells": {
            "pattern": "Payee entity linked to acting officer",
            "files": "SP-0214",
            "holdstate": "Blocked — owner review",
            "support": "Managing member of record on the payee LLC matches the acting officer; recorded as an association, not an allegation of intent."
          },
          "status": "Blocked",
          "tone": "stop",
          "support": "Records the link; does not allege fraud or intent."
        },
        {
          "cells": {
            "pattern": "Open callback before a destination change",
            "files": "SP-0214, SP-0211",
            "holdstate": "Open — awaiting read-back",
            "support": "Independent callback on the number of record not yet recorded; a callback is evidence, never permission."
          },
          "status": "Open",
          "tone": "warn",
          "support": "Release stays held until the callback is recorded."
        },
        {
          "cells": {
            "pattern": "Authority document missing",
            "files": "SP-0211",
            "holdstate": "Awaiting — successor trustee",
            "support": "Successor-trustee letter from outside counsel not on file; proceeds record cannot be submitted yet."
          },
          "status": "Awaiting",
          "tone": "warn",
          "support": "Hold HOLD-018 open on the seller line."
        }
      ]
    },
    "secondary": {
      "kind": "note",
      "title": "Why no risk score",
      "items": [
        "A single number hides which control is holding and what would clear it. Every row here names a control state and a concrete next step instead.",
        "Exposure means a control is actively holding the action — the no-bypass design working, not a prediction of harm."
      ]
    },
    "footer": [
      {
        "label": "Open tasks",
        "to": "/tasks",
        "variant": "primary"
      },
      {
        "label": "Open SP-0211",
        "to": "/file/$id",
        "params": {
          "id": "SP-0211"
        }
      }
    ],
    "notes": "Risks as explainable control states across SP-0214 / SP-0211; no numeric scoring."
  },
  "guard-exceptions": {
    "key": "guard-exceptions",
    "line": "guard",
    "eyebrow": "EXCEPTIONS",
    "title": "Exceptions",
    "sub": "Manager-reviewed gaps converted into permission to proceed: who accepted, what limitation, what expired. Each exception keeps its accepted limitation visible on the record.",
    "ownerNote": "One exception path on SP-0214 awaits a decision and expires 2026-06-22 at 5:30 pm — past that, the release returns to held with no exception in force.",
    "stats": [
      {
        "label": "Exceptions, last 30 days",
        "value": "7",
        "tone": "neutral",
        "note": "Across open files"
      },
      {
        "label": "Awaiting decision",
        "value": "1",
        "tone": "warn",
        "note": "SP-0214 release"
      },
      {
        "label": "Expired without use",
        "value": "2",
        "tone": "neutral",
        "note": "Returned to held"
      }
    ],
    "table": {
      "caption": "Exception records — approver, accepted limitation, and expiry.",
      "columns": [
        {
          "key": "exc",
          "label": "Exception",
          "mono": true
        },
        {
          "key": "file",
          "label": "File",
          "mono": true
        },
        {
          "key": "approver",
          "label": "Approver"
        },
        {
          "key": "limitation",
          "label": "Accepted limitation"
        },
        {
          "key": "expiry",
          "label": "Expiry",
          "mono": true
        }
      ],
      "rows": [
        {
          "cells": {
            "exc": "EXC-SP0214-01",
            "file": "SP-0214",
            "approver": "Escrow Manager",
            "limitation": "Destination changed after reliance and the seller callback remains open.",
            "expiry": "2026-06-22 17:30"
          },
          "status": "Awaiting",
          "tone": "warn",
          "support": "Would permit a time-limited release with the limitation visible."
        },
        {
          "cells": {
            "exc": "EXC-SP0211-04",
            "file": "SP-0211",
            "approver": "Javier Reyes (JR)",
            "limitation": "Trust certification pending; release held to fees only until the successor-trustee letter lands.",
            "expiry": "2026-06-24 12:00"
          },
          "status": "Open",
          "tone": "warn",
          "support": "Scoped to non-proceeds disbursements only."
        },
        {
          "cells": {
            "exc": "EXC-BF0318-02",
            "file": "BF-0318",
            "approver": "Javier Reyes (JR)",
            "limitation": "Buyer source-of-funds narrative missing one transfer leg; accepted for review continuation, not for release.",
            "expiry": "2026-06-20 09:00"
          },
          "status": "Cleared",
          "tone": "ok",
          "support": "Cured before expiry; transfer leg added."
        },
        {
          "cells": {
            "exc": "EXC-SP0213-01",
            "file": "SP-0213",
            "approver": "Escrow Manager",
            "limitation": "Payoff demand current through 2026-05-24, short of closing.",
            "expiry": "2026-05-23 17:00"
          },
          "status": "Exception required",
          "tone": "warn",
          "support": "Re-issued demand required before release."
        },
        {
          "cells": {
            "exc": "EXC-RF0142-01",
            "file": "RF-0142",
            "approver": "Javier Reyes (JR)",
            "limitation": "Replacement-funding callback recorded on a demand-provided number; superseded by a number of record.",
            "expiry": "2026-06-18 15:00"
          },
          "status": "Cleared",
          "tone": "ok",
          "support": "Independent callback recorded; exception closed."
        }
      ]
    },
    "secondary": {
      "kind": "limitation",
      "title": "What an exception is and is not",
      "items": [
        "An exception records a manager's decision to proceed despite a named gap. It does not erase the gap — the accepted limitation stays on the record.",
        "An expired exception is not a release. The action returns to held until cured or re-reviewed."
      ]
    },
    "footer": [
      {
        "label": "Open tasks",
        "to": "/tasks",
        "variant": "primary"
      },
      {
        "label": "Money exceptions",
        "to": "/funds"
      },
      {
        "label": "Open SP-0214",
        "to": "/file/$id",
        "params": {
          "id": "SP-0214"
        }
      }
    ],
    "notes": "Exception cluster grounded in EXCEPTION_RECORDS (EXC-SP0214-01) and extended across SP/BF/RF files."
  },
  "guard-incidents": {
    "key": "guard-incidents",
    "line": "guard",
    "eyebrow": "INCIDENTS",
    "title": "Incidents",
    "sub": "Locked files, officer/payee association signals, restricted-evidence access, unmatched outflow, policy bypass attempts. The page the office wants short, with each item held by a control state.",
    "ownerNote": "The SP-0214 conflict is the only open incident on your desk; nothing has bypassed a control and no outflow is unmatched.",
    "stats": [
      {
        "label": "Open incidents",
        "value": "1",
        "tone": "stop",
        "note": "Conflict on SP-0214"
      },
      {
        "label": "Unmatched outflow",
        "value": "0",
        "tone": "ok",
        "note": "The page that should stay empty"
      },
      {
        "label": "Bypass attempts",
        "value": "0",
        "tone": "ok",
        "note": "No control overridden"
      }
    ],
    "table": {
      "caption": "Incident log — each item names the control state holding it.",
      "columns": [
        {
          "key": "incident",
          "label": "Incident"
        },
        {
          "key": "file",
          "label": "File",
          "mono": true
        },
        {
          "key": "when",
          "label": "Recorded",
          "mono": true
        },
        {
          "key": "support",
          "label": "Control state"
        }
      ],
      "rows": [
        {
          "cells": {
            "incident": "Payout destination linked to the acting officer",
            "file": "SP-0214",
            "when": "2026-05-21 15:18",
            "support": "Signal SIG-SP0214-CONFLICT converted to a task and routed to the Review Register; release blocked."
          },
          "status": "Incident",
          "tone": "stop",
          "support": "Recorded as an association awaiting owner decision."
        },
        {
          "cells": {
            "incident": "Restricted-evidence access requested",
            "file": "SP-0214",
            "when": "2026-05-21 15:40",
            "support": "Full account value for Chase ··6014 sits behind separate permission; request recorded in the access log."
          },
          "status": "Restricted",
          "tone": "neutral",
          "support": "Vault values never enter the working view."
        },
        {
          "cells": {
            "incident": "Beneficiary callback on a demand-provided number",
            "file": "RF-0142",
            "when": "2026-05-22 11:05",
            "support": "Callback origin recorded as demand-provided; superseded by a number of record before any release."
          },
          "status": "Cleared",
          "tone": "ok",
          "support": "Held until an independent callback was recorded."
        },
        {
          "cells": {
            "incident": "File locked pending authority document",
            "file": "SP-0211",
            "when": "2026-05-22 09:30",
            "support": "Hold HOLD-018 locks the seller line until the successor-trustee letter is on file."
          },
          "status": "Locked",
          "tone": "stop",
          "support": "Cure required: successor-trustee letter from outside counsel."
        },
        {
          "cells": {
            "incident": "Unmatched outflow check",
            "file": "All open files",
            "when": "2026-06-22 06:00",
            "support": "No outgoing movement without a supporting record, and no amount or destination mismatch."
          },
          "status": "Cleared",
          "tone": "ok",
          "support": "The page that should always be empty — and is."
        }
      ]
    },
    "secondary": {
      "kind": "note",
      "title": "How incidents are framed",
      "items": [
        "An incident is a recorded event held by a control — a lock, a restricted-access request, a conflict signal. It is not an accusation.",
        "Veto records the event and the limitation. The office decides what it means and what to do."
      ]
    },
    "footer": [
      {
        "label": "Open tasks",
        "to": "/tasks",
        "variant": "primary"
      },
      {
        "label": "Records",
        "to": "/records"
      },
      {
        "label": "Open SP-0214",
        "to": "/file/$id",
        "params": {
          "id": "SP-0214"
        }
      }
    ],
    "notes": "Incident log grounded in ALERT_SIGNALS (SIG-SP0214-CONFLICT), vault mask ··6014, HOLD-018, and the empty-unmatched-outflow principle."
  },
  "standard": {
    "key": "standard",
    "line": "standard",
    "eyebrow": "VETO STANDARD",
    "title": "Veto Standard",
    "sub": "The control framework and coverage report: a practical mapping of no-bypass controls to ALTA Best Practices, office policy, and underwriter expectations. Control configured, record present, limitations visible, exception recorded.",
    "ownerNote": "Pillar 3 (escrow controls) is the one slice carrying a live limitation right now — SP-0214's blocked release is the control demonstrating, not failing.",
    "stats": [
      {
        "label": "Controls mapped",
        "value": "12",
        "tone": "ok",
        "note": "To ALTA pillars + office policy"
      },
      {
        "label": "Configured with record present",
        "value": "11 of 12",
        "tone": "ok",
        "note": "One awaiting exception"
      },
      {
        "label": "Limitations visible",
        "value": "100%",
        "tone": "ok",
        "note": "On every mapped row"
      }
    ],
    "table": {
      "caption": "Control framework — configured, record present, limitation visible, exception recorded.",
      "columns": [
        {
          "key": "mapping",
          "label": "Standard / pillar"
        },
        {
          "key": "control",
          "label": "No-bypass control"
        },
        {
          "key": "record",
          "label": "Record present",
          "mono": true
        },
        {
          "key": "support",
          "label": "Limitation kept visible"
        }
      ],
      "rows": [
        {
          "cells": {
            "mapping": "ALTA Pillar 3 · Escrow controls",
            "control": "No release without a current support record",
            "record": "REL-SP0214-01",
            "support": "A release record supports the office review at a point in time; it does not confirm good funds or account control."
          },
          "status": "Held",
          "tone": "warn",
          "support": "Configured; SP-0214 release held until v2 or exception."
        },
        {
          "cells": {
            "mapping": "ALTA Pillar 3 · Escrow controls",
            "control": "Material changes stale the prior record",
            "record": "CHG-SP0214-DEST",
            "support": "Records that a value moved after reliance; does not allege the change was improper."
          },
          "status": "Recorded",
          "tone": "ok",
          "support": "Configured and firing — staled Seller Proceeds Record v1."
        },
        {
          "cells": {
            "mapping": "ALTA Pillar 2 · Trust accounting",
            "control": "Trust balance reviewed against the record",
            "record": "REC-TRUST-805",
            "support": "Veto watches balance against the record; it is not the bank portal and does not confirm cleared funds."
          },
          "status": "Current",
          "tone": "ok",
          "support": "Configured; read-only against 805 Escrow trust."
        },
        {
          "cells": {
            "mapping": "ALTA Pillar 4 · Settlement processes",
            "control": "Source limitations visible on every record",
            "record": "SRC-SP0214-03",
            "support": "Account/payee check supports account existence and payee-name match only — not live confirmation or authority."
          },
          "status": "Recorded",
          "tone": "ok",
          "support": "Configured; limitation shown on task and record."
        },
        {
          "cells": {
            "mapping": "Office policy · Authority",
            "control": "Acting-officer / payee conflict routed to owner",
            "record": "SIG-SP0214-CONFLICT",
            "support": "Records the association between payee entity and acting officer; does not allege intent or wrongdoing."
          },
          "status": "Blocked",
          "tone": "stop",
          "support": "Configured; blocking until owner decision recorded."
        },
        {
          "cells": {
            "mapping": "Underwriter expectation · Wire integrity",
            "control": "Independent callback before a destination change",
            "record": "SRC-SP0214-04",
            "support": "A callback supports the read-back from the reached party only — it is evidence, never permission."
          },
          "status": "Open",
          "tone": "warn",
          "support": "Configured; SP-0214 callback recorded as open."
        },
        {
          "cells": {
            "mapping": "Office policy · Exceptions",
            "control": "Exception recorded with approver and expiry",
            "record": "EXC-SP0214-01",
            "support": "Names the role, accepted limitation, and expiry; an expired exception is not a release."
          },
          "status": "Recorded",
          "tone": "ok",
          "support": "Configured; exception path recorded with 5:30 pm expiry."
        }
      ]
    },
    "secondary": {
      "kind": "limitation",
      "title": "What the Veto Standard is",
      "items": [
        "A practical control framework, not a safety certification. Veto does not verify, approve, guarantee, insure, or release.",
        "Configured means the control is in force and producing records — not that a transaction is safe or authorized.",
        "Limitations stay visible on every row. The office decides. Veto records the review."
      ]
    },
    "footer": [
      {
        "label": "Open settings",
        "to": "/settings",
        "variant": "primary"
      },
      {
        "label": "Records",
        "to": "/records"
      },
      {
        "label": "Guard posture",
        "to": "/file/$id",
        "params": {
          "id": "SP-0214"
        }
      }
    ],
    "notes": "Standard maps no-bypass controls to ALTA Best Practices pillars + office policy/underwriter expectations; grounded in getVetoStandardCoverage and the SP-0214 fixture chain."
  }
};

/* Status tone → ink/dot color. Status is ALWAYS shown as dot + text
   (accessibility: never colour alone). Hue lives only on the small dot/pill. */
const CS_TONE = {
  ok: { dot: "bg-[var(--ok)]", text: "text-[var(--ok)]" },
  warn: { dot: "bg-[var(--warn)]", text: "text-[var(--warn)]" },
  stop: { dot: "bg-[var(--destructive)]", text: "text-[var(--destructive)]" },
  neutral: { dot: "bg-ink-soft/40", text: "text-ink-soft" },
};

function CSPill({ status, tone }) {
  const t = CS_TONE[tone] || CS_TONE.neutral;
  return (
    <span className={cn("inline-flex items-center gap-1.5 whitespace-nowrap text-[12px]", t.text)}>
      <span className={cn("inline-block h-1.5 w-1.5 shrink-0 rounded-full", t.dot)} aria-hidden="true" />
      {status}
    </span>
  );
}

function CSStats({ stats }) {
  if (!stats || !stats.length) return null;
  return (
    <div className="grid grid-cols-2 gap-3 sm:grid-cols-4">
      {stats.map((s, i) => (
        <div key={i} className="rounded-xl border border-line bg-background px-4 py-3">
          <div className="text-[10.5px] uppercase tracking-[0.06em] text-muted-foreground">{s.label}</div>
          <div className="mt-1.5 font-mono text-[19px] tabular-nums tracking-[-0.01em] text-ink">{s.value}</div>
          {s.note && <div className="mt-1 text-[11.5px] leading-snug text-ink-soft">{s.note}</div>}
        </div>
      ))}
    </div>
  );
}

function CSTable({ table }) {
  if (!table || !table.columns) return null;
  const cols = table.columns;
  return (
    <section className="overflow-hidden rounded-xl border border-line bg-background">
      {table.caption && (
        <div className="border-b border-line bg-surface/40 px-4 py-2.5 text-[12px] leading-relaxed text-ink-soft">{table.caption}</div>
      )}
      <div className="overflow-x-auto">
        <table className="w-full border-collapse text-left">
          <thead>
            <tr className="border-b border-line bg-surface/20">
              {cols.map((c) => (
                <th key={c.key} scope="col"
                  className={cn("px-4 py-2.5 text-[10.5px] font-medium uppercase tracking-[0.06em] text-muted-foreground", c.align === "right" && "text-right")}>
                  {c.label}
                </th>
              ))}
              <th scope="col" className="px-4 py-2.5 text-right text-[10.5px] font-medium uppercase tracking-[0.06em] text-muted-foreground">Status</th>
            </tr>
          </thead>
          <tbody>
            {(table.rows || []).map((r, ri) => (
              <React.Fragment key={ri}>
                <tr className={cn(ri > 0 && "border-t border-line")}>
                  {cols.map((c) => (
                    <td key={c.key}
                      className={cn("px-4 pt-3 align-top text-[12.5px] text-ink", r.support ? "pb-1" : "pb-3",
                        c.mono && "font-mono text-[11.5px] tabular-nums text-ink-soft", c.align === "right" && "text-right")}>
                      {r.cells && r.cells[c.key] ? r.cells[c.key] : "—"}
                    </td>
                  ))}
                  <td className={cn("px-4 pt-3 text-right align-top", r.support ? "pb-1" : "pb-3")}>
                    <CSPill status={r.status} tone={r.tone} />
                  </td>
                </tr>
                {r.support && (
                  <tr>
                    <td colSpan={cols.length + 1} className="px-4 pb-3 pt-0 text-[12px] leading-relaxed text-ink-soft">{r.support}</td>
                  </tr>
                )}
              </React.Fragment>
            ))}
          </tbody>
        </table>
      </div>
    </section>
  );
}

function CSSecondary({ secondary }) {
  if (!secondary) return null;
  const kicker = secondary.kind === "limitation" ? "Limitations" : secondary.kind === "rows" ? "Detail" : "Note";
  return (
    <section className="rounded-xl border border-line bg-surface/30 px-5 py-4">
      <div className="text-[11px] uppercase tracking-[0.06em] text-muted-foreground">{kicker}</div>
      <div className="mt-1 text-[13px] font-medium text-ink">{secondary.title}</div>
      <ul className="mt-2.5 flex flex-col gap-2">
        {(secondary.items || []).map((it, i) => (
          <li key={i} className="flex gap-2 text-[12.5px] leading-relaxed text-ink-soft">
            <span className="mt-[7px] inline-block h-1 w-1 shrink-0 rounded-full bg-ink-soft/60" aria-hidden="true" />
            <span>{it}</span>
          </li>
        ))}
      </ul>
    </section>
  );
}

function CSFooter({ footer }) {
  if (!footer || !footer.length) return null;
  return (
    <div className="flex flex-wrap items-center gap-2 pt-1">
      {footer.map((a, i) => (
        <Link key={i} to={a.to} params={a.params}
          className={cn(
            "inline-flex items-center gap-1.5 rounded-md px-3.5 py-2 text-[12.5px] font-medium outline-none transition focus-visible:ring-2 focus-visible:ring-ink/40",
            a.variant === "primary"
              ? "bg-ink text-background hover:bg-ink/90"
              : "border border-line text-ink hover:bg-surface")}>
          {a.label}
        </Link>
      ))}
    </div>
  );
}

function CSOwnerNote({ note }) {
  if (!note) return null;
  return (
    <div className="flex items-start gap-2.5 rounded-xl border border-line bg-surface/40 px-4 py-3">
      <Icon name="table" size={15} className="mt-0.5 shrink-0 text-ink-soft" />
      <div className="min-w-0">
        <div className="text-[10.5px] uppercase tracking-[0.06em] text-muted-foreground">Owner oversight</div>
        <div className="mt-0.5 text-[12.5px] leading-relaxed text-ink">{note}</div>
      </div>
    </div>
  );
}

/* The shared body. `headless` skips the eyebrow/title (used inside the Money
   tab shell, which already renders its own page header) to avoid a second h1. */
function ControlSurfaceBody({ spec, headless }) {
  const role = typeof useDemoRoleRead === "function" ? useDemoRoleRead() : (window.VETO_DEMO_ROLE || "officer");
  if (!spec) return null;
  return (
    <div className="flex flex-col gap-6">
      {headless ? (
        spec.sub && <p className="max-w-[640px] text-[13.5px] leading-relaxed text-ink-soft text-pretty">{spec.sub}</p>
      ) : (
        <header>
          {spec.eyebrow && <div className="font-mono text-[11px] uppercase tracking-[0.07em] text-muted-foreground">{spec.eyebrow}</div>}
          <h1 className="mt-1.5 text-[22px] font-semibold tracking-[-0.02em] text-ink">{spec.title}</h1>
          {spec.sub && <p className="mt-1.5 max-w-[640px] text-[13.5px] leading-relaxed text-ink-soft text-pretty">{spec.sub}</p>}
        </header>
      )}
      {role === "owner" && spec.ownerNote && <CSOwnerNote note={spec.ownerNote} />}
      <CSStats stats={spec.stats} />
      <CSTable table={spec.table} />
      <CSSecondary secondary={spec.secondary} />
      {spec.boundary && <p className="text-[12px] text-ink-soft">The office decides. Veto records the review.</p>}
      <CSFooter footer={spec.footer} />
    </div>
  );
}

function fallbackSpec(k) {
  return {
    line: null,
    eyebrow: "CONTROL SURFACE",
    title: "Control surface",
    sub: "Review state, sources, limitations, and next actions for this office control.",
    footer: [{ label: "Back to Home", to: "/", variant: "ghost" }],
  };
}

/* ---- Recorded provider inputs + officer attestation (real, interactive) ---- */
const ADDITIONAL_CONTROLS = [
  { id: "sos-kyb", title: "Secretary of State / KYB entity check", detail: "CA SOS business entity lookup",
    mock: "Whitfield Coast Holdings LLC · Active · Managing member on file", limitation: "Records registration, status, managing member. Does not prove intent.", state: "Recorded" },
  { id: "persona", title: "Identity (Persona)", detail: "Government ID + selfie",
    mock: "ID + selfie captured · name match recorded", limitation: "Records an identity check result. Does not confirm authority over an account.", state: "Recorded" },
  { id: "twilio", title: "Phone line context (Twilio Lookup)", detail: "Line type / validity for callback number",
    mock: "Non-fixed VoIP · line valid · demand-provided number", limitation: "A non-fixed VoIP or invalid line is recorded as context. A callback is evidence, never permission.", state: "Recorded" },
  { id: "reducto", title: "Document extraction (Reducto)", detail: "Wire instructions / amounts from closing document",
    mock: "Extracted $412,850.00 · Acct ··8830 · recorded for human review", limitation: "Records what was read; a human reviews.", state: "Recorded" },
];
const ATTESTATION_STATEMENT = "I attest under penalty of perjury that the information in this record is true and correct to the best of my knowledge.";
const ATTESTATION_OFFICER = "M. Lane";
const ATTESTATION_ORG = "805 Escrow";

function AdditionalControlsSection() {
  return (
    <section className="overflow-hidden rounded-xl border border-line bg-background">
      <div className="border-b border-line bg-surface/40 px-4 py-3">
        <div className="text-[11px] uppercase tracking-[0.06em] text-muted-foreground">Additional controls</div>
        <div className="mt-1 text-[13px] font-medium text-ink">Recorded control inputs</div>
        <div className="mt-1 text-[12px] leading-relaxed text-ink-soft">Provider results recorded for {ATTESTATION_ORG}. Each row shows a result and its limitation — not a verdict.</div>
      </div>
      <div className="divide-y divide-line">
        {ADDITIONAL_CONTROLS.map((c) => (
          <div key={c.id} className="px-4 py-3">
            <div className="flex items-start justify-between gap-4">
              <div className="min-w-0">
                <div className="text-[12.5px] font-medium text-ink">{c.title}</div>
                <div className="mt-0.5 text-[12px] text-ink-soft">{c.detail}</div>
              </div>
              <span className="inline-flex shrink-0 items-center gap-1.5 rounded-full border border-line bg-surface/50 px-2 py-0.5 text-[11px] font-medium text-ink-soft">
                <span className="h-1.5 w-1.5 rounded-full bg-[var(--ok)]" aria-hidden="true" />{c.state}
              </span>
            </div>
            <div className="mt-2 font-mono text-[10.5px] text-muted-foreground">{c.mock}</div>
            <div className="mt-2 text-[12px] leading-relaxed text-ink-soft"><span className="text-ink">Limitation</span> {c.limitation}</div>
          </div>
        ))}
      </div>
    </section>
  );
}

function AttestationModal({ open, onClose, onSubmit }) {
  const [name, setName] = useStateScaffold("");
  if (!open) return null;
  const trimmed = name.trim();
  const canSign = trimmed.length >= 3;
  return (
    <div className="fixed inset-0 z-[100] flex items-center justify-center bg-ink/25 px-4 backdrop-blur-[1px]" onMouseDown={onClose}>
      <div role="dialog" aria-modal="true" aria-labelledby="attest-modal-title"
        className="w-full max-w-[440px] overflow-hidden rounded-2xl border border-line bg-background shadow-[0_24px_64px_-24px_rgba(0,0,0,0.4)]"
        onMouseDown={(e) => e.stopPropagation()}>
        <div className="border-b border-line px-5 py-4 text-left">
          <div className="text-[11px] uppercase tracking-[0.06em] text-muted-foreground">Officer attestation</div>
          <h2 id="attest-modal-title" className="mt-1 text-[15px] font-semibold text-ink">Sign before submitting this record</h2>
          <div className="mt-1 text-[12px] text-ink-soft">{ATTESTATION_ORG} · release / record submission</div>
        </div>
        <div className="space-y-4 px-5 py-4 text-left">
          <p className="text-[12.5px] leading-relaxed text-ink-soft">{ATTESTATION_STATEMENT}</p>
          <div>
            <label htmlFor="attest-signature" className="text-[11px] uppercase tracking-[0.06em] text-muted-foreground">Type your full name to sign</label>
            <input id="attest-signature" value={name} onChange={(e) => setName(e.target.value)} placeholder={ATTESTATION_OFFICER}
              className="mt-1.5 h-10 w-full rounded-lg border border-line bg-background px-3 font-mono text-[13.5px] text-ink outline-none transition placeholder:text-muted-foreground focus:border-ink/40 focus:ring-1 focus:ring-ink/15" />
          </div>
        </div>
        <div className="flex items-center justify-end gap-2 border-t border-line px-5 py-3">
          <button type="button" onClick={onClose} className="rounded-lg px-3 py-2 text-[12.5px] text-ink-soft outline-none transition hover:text-ink focus-visible:ring-2 focus-visible:ring-ink/40">Cancel</button>
          <button type="button" disabled={!canSign} onClick={() => onSubmit(trimmed)}
            className={cn("rounded-lg px-4 py-2 text-[12.5px] font-semibold outline-none transition focus-visible:ring-2 focus-visible:ring-ink/40",
              canSign ? "cursor-pointer bg-ink text-background hover:bg-ink/90" : "cursor-not-allowed bg-surface text-muted-foreground")}>
            Sign &amp; submit
          </button>
        </div>
      </div>
    </div>
  );
}

function AttestationBeat() {
  const [open, setOpen] = useStateScaffold(false);
  const [attested, setAttested] = useStateScaffold(null);
  const submit = (name) => {
    const ts = new Date().toLocaleString("en-US", { month: "short", day: "numeric", year: "numeric", hour: "numeric", minute: "2-digit" });
    setAttested({ name, ts });
    setOpen(false);
  };
  return (
    <section className="overflow-hidden rounded-xl border border-line bg-background text-left">
      <div className="border-b border-line bg-surface/40 px-4 py-3">
        <div className="text-[11px] uppercase tracking-[0.06em] text-muted-foreground">Accountability</div>
        <div className="mt-1 text-[13px] font-medium text-ink">Officer attestation before record submission</div>
        <div className="mt-1 text-[12px] leading-relaxed text-ink-soft">The office decides. Veto records who attested and when.</div>
      </div>
      <div className="px-4 py-4">
        {attested ? (
          <div className="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between">
            <span className="inline-flex items-center gap-1.5 rounded-full border border-line bg-surface/50 px-2.5 py-1 font-mono text-[11.5px] text-ink-soft">
              <span className="h-1.5 w-1.5 rounded-full bg-[var(--ok)]" aria-hidden="true" />
              Attested · {attested.name} · {attested.ts}
            </span>
            <span className="text-[12px] text-muted-foreground">Record submission recorded for {ATTESTATION_ORG}.</span>
          </div>
        ) : (
          <div className="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between">
            <p className="max-w-[420px] text-[12.5px] leading-relaxed text-ink-soft">An officer must attest before this release record is submitted. Typed-name signature only — no provider keys.</p>
            <button type="button" onClick={() => setOpen(true)}
              className="inline-flex shrink-0 items-center justify-center rounded-lg border border-line bg-background px-4 py-2.5 text-[12.5px] font-semibold text-ink outline-none transition hover:bg-surface focus-visible:ring-2 focus-visible:ring-ink/40">
              Open attestation
            </button>
          </div>
        )}
      </div>
      <AttestationModal open={open} onClose={() => setOpen(false)} onSubmit={submit} />
    </section>
  );
}

function ScaffoldPage({ k }) {
  const spec = (typeof SURFACE_CONTENT !== "undefined" && SURFACE_CONTENT[k]) || fallbackSpec(k);
  const extras = spec.line === "guard" || spec.line === "standard";
  return (
    <AppShell activeLine={spec.line || null}>
      <div className="mx-auto w-full max-w-[920px] px-6 py-10 lg:px-10 lg:py-12">
        <ControlSurfaceBody spec={spec} />
        {extras && (
          <div className="mt-6 flex flex-col gap-6">
            <AdditionalControlsSection />
            <AttestationBeat />
          </div>
        )}
      </div>
    </AppShell>
  );
}

Object.assign(window, {
  ScaffoldPage, ControlSurfaceBody, CSPill, AttestationModal, AttestationBeat, AdditionalControlsSection,
  SURFACE_CONTENT: (typeof SURFACE_CONTENT !== "undefined" ? SURFACE_CONTENT : {}),
});
