/* Patta owner on the certificate: a registrar's marginal note inside the EC card on the Verify My Land
   report. Every entry naming the revenue owner sits on a dated rail, each stamped with what it is (the deed
   the property came by, a mortgage raised as owner, its release, a later transfer away), and the rows in
   the transaction table that name the owner take a warm tint and a mark.
   Ink, hairlines and the orange are the report's own; document numbers and dates take the table's
   monospace so the note reads as part of the same register. Borders are always all four sides: emphasis
   comes from tint and shadow, never from one painted edge. */
.ll-ot {
    --ot-ink: #1a1a1c;
    --ot-mute: #6b7280;
    --ot-faint: #9ca3af;
    --ot-rule: #e5e7eb;
    --ot-paper: #fffaf4;
    --ot-acc: #ff6725;
    --ot-acc-deep: #c2410c;
    --ot-acc-soft: #f3c9ae;
    --ot-green: #15803d;
    --ot-amber: #b45309;
    --ot-red: #b42318;
    --ot-mono: 'SF Mono', 'Menlo', Consolas, monospace;
    position: relative;
    margin: 0 var(--ll-spacing-md, 1rem) var(--ll-spacing-md, 1rem);
    padding: 1rem 1.125rem 1.125rem;
    /* ruled paper under a warm wash: the ledger the note is written in the margin of */
    background:
        repeating-linear-gradient(180deg, transparent 0 27px, rgba(26, 26, 28, 0.035) 27px 28px),
        linear-gradient(180deg, #fffdf9 0%, var(--ot-paper) 100%);
    border: 1px solid var(--ot-rule);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(26, 26, 28, 0.04), 0 12px 28px -22px rgba(194, 65, 12, 0.45);
    overflow: hidden;
}

/* ---- head: the owner, and the figures the reader sets each entry against ---- */
.ll-ot-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0.75rem 1.5rem; margin-bottom: 0.875rem; }
.ll-ot-title { min-width: 0; flex: 1 1 260px; }
.ll-ot-eyebrow { display: inline-flex; align-items: center; gap: 6px; font-family: var(--ot-mono); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ot-acc-deep); }
.ll-ot-eyebrow svg { width: 14px; height: 14px; flex: none; }
.ll-ot-owner { margin: 0.3rem 0 0; font-size: 1.0625rem; font-weight: 700; color: var(--ot-ink); line-height: 1.35; overflow-wrap: anywhere; }
.ll-ot-owner-en { display: block; margin-top: 2px; font-size: 0.8125rem; font-weight: 500; color: var(--ot-mute); }
.ll-ot-facts { display: flex; flex: none; margin: 0; border: 1px solid var(--ot-rule); border-radius: 8px; background: #fff; overflow: hidden; }
.ll-ot-facts > div { display: grid; gap: 2px; padding: 0.5rem 0.875rem; }
.ll-ot-facts > div + div { box-shadow: -1px 0 0 var(--ot-rule); }
.ll-ot-facts dt { margin: 0; font-family: var(--ot-mono); font-size: 0.625rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ot-faint); white-space: nowrap; }
.ll-ot-facts dd { margin: 0; font-family: var(--ot-mono); font-size: 0.9375rem; font-weight: 700; color: var(--ot-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ll-ot-facts dd small { font-size: 0.6875rem; font-weight: 500; color: var(--ot-mute); }
.ll-ot-facts dd.is-acc { color: var(--ot-acc-deep); }

/* ---- the verdict, in the report's body face ---- */
.ll-ot-verdict { margin: 0; font-size: 0.9375rem; font-weight: 500; line-height: 1.55; color: var(--ot-ink); }
.ll-ot-detail { margin: 0.375rem 0 0; font-size: 0.8125rem; line-height: 1.55; color: var(--ot-mute); }

/* ---- the rail: one stop per entry, oldest first ---- */
.ll-ot-rail { position: relative; list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.5rem; }
.ll-ot-rail::before { content: ''; position: absolute; left: 7px; top: 12px; bottom: 12px; width: 2px; border-radius: 2px; background: var(--ot-rule); }
.ll-ot-stop {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.25rem 0.75rem;
    padding: 0.625rem 0.75rem 0.625rem 1.75rem;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: 10px;
    animation: ll-ot-in 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    animation-delay: calc(var(--i, 0) * 70ms);
}
.ll-ot-stop.is-key { background: #fff; border-color: var(--ot-acc-soft); box-shadow: 0 2px 12px -8px rgba(194, 65, 12, 0.55); }
.ll-ot-dot { position: absolute; left: 2px; top: 15px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--ot-faint); box-shadow: 0 0 0 3px var(--ot-paper); }
.ll-ot-stop.is-acquired .ll-ot-dot { border-color: var(--ot-acc); background: var(--ot-acc); }
.ll-ot-stop.is-mortgaged .ll-ot-dot { border-color: var(--ot-amber); }
.ll-ot-stop.is-released .ll-ot-dot { border-color: var(--ot-green); background: var(--ot-green); }
.ll-ot-stop.is-transferred_out .ll-ot-dot { border-color: var(--ot-red); background: var(--ot-red); }
.ll-ot-stop.is-possible .ll-ot-dot { border-style: dashed; background: #fff; }
.ll-ot-stop-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem 0.625rem; }
.ll-ot-stamp { font-family: var(--ot-mono); font-size: 0.625rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 0.2rem 0.45rem; border-radius: 4px; background: #f3f4f6; color: #374151; white-space: nowrap; }
.ll-ot-stamp em { font-style: italic; font-weight: 500; letter-spacing: 0.02em; text-transform: none; opacity: 0.85; }
.ll-ot-stop.is-acquired .ll-ot-stamp { background: #ffe9db; color: var(--ot-acc-deep); }
.ll-ot-stop.is-mortgaged .ll-ot-stamp { background: #fff4e5; color: var(--ot-amber); }
.ll-ot-stop.is-released .ll-ot-stamp { background: #dcfce7; color: var(--ot-green); }
.ll-ot-stop.is-transferred_out .ll-ot-stamp { background: #fdecea; color: var(--ot-red); }
.ll-ot-stop.is-possible .ll-ot-stamp { background: #fff; border: 1px dashed #d1d5db; }
.ll-ot-when, .ll-ot-doc { font-family: var(--ot-mono); font-size: 0.6875rem; color: var(--ot-mute); }
.ll-ot-when { font-weight: 600; color: var(--ot-ink); font-variant-numeric: tabular-nums; }
.ll-ot-stop-body { grid-column: 1; display: flex; flex-wrap: wrap; gap: 0.125rem 0.5rem; font-size: 0.8125rem; line-height: 1.5; color: #334155; min-width: 0; }
.ll-ot-party { font-weight: 600; color: var(--ot-ink); overflow-wrap: anywhere; }
.ll-ot-other { overflow-wrap: anywhere; }
.ll-ot-party i, .ll-ot-other i { font-style: normal; font-size: 0.75rem; color: var(--ot-faint); }
.ll-ot-figs { width: 100%; font-family: var(--ot-mono); font-size: 0.6875rem; color: var(--ot-mute); }
.ll-ot-jump, .ll-ot-aside { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-family: var(--ot-mono); font-size: 0.6875rem; font-weight: 600; white-space: nowrap; padding: 0.3rem 0.6rem; border-radius: 999px; }
.ll-ot-jump { color: var(--ot-acc-deep); background: #fff; border: 1px solid var(--ot-acc-soft); text-decoration: none; cursor: var(--ll-cur-pointer, pointer); transition: background 0.15s, border-color 0.15s, transform 0.15s, box-shadow 0.15s; }
/* the pill warms and lifts on hover; it never inverts to a solid button, which shouted on the paper card */
.ll-ot-jump:hover { background: #ffe9db; border-color: var(--ot-acc); color: var(--ot-acc-deep); transform: translateY(-1px); box-shadow: 0 4px 12px -8px rgba(194, 65, 12, 0.6); }
.ll-ot-jump:active { transform: none; background: #ffdcc6; box-shadow: none; }
.ll-ot-jump:focus-visible { outline: none; border-color: var(--ot-acc); box-shadow: 0 0 0 3px rgba(255, 103, 37, 0.3); }
.ll-ot-aside { color: var(--ot-mute); background: #f9fafb; border: 1px dashed #d1d5db; font-weight: 500; }

/* ---- a note under the rail: the entry the Name Match is measured against, when it is not the owner's ---- */
.ll-ot-note { margin: 0.875rem 0 0; padding: 0.625rem 0.75rem; font-size: 0.78rem; line-height: 1.5; color: var(--ot-mute); background: #fff; border: 1px solid var(--ot-rule); border-radius: 8px; }
.ll-ot-note a { color: var(--ot-acc-deep); font-weight: 600; text-decoration: none; }
.ll-ot-note a:hover { text-decoration: underline; }

/* ---- the transaction table: rows naming the owner ---- */
.ll-txn-table tbody tr.ll-ot-row td { background: #fff6ec; }
.ll-txn-table tbody tr.ll-ot-row.is-acquired td { background: #ffeddc; }
.ll-txn-table tbody tr.ll-ot-row.is-possible td { background: #fffbf5; }
.ll-txn-table tbody tr.ll-ot-row:hover td { background: #ffe9d6; }
.ll-ot-mark { display: inline-block; margin-left: 0.375rem; vertical-align: 1px; font-family: 'SF Mono', 'Menlo', Consolas, monospace; font-size: 0.5625rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 0.1rem 0.35rem; border-radius: 3px; background: #ff6725; color: #fff; white-space: nowrap; }
.ll-ot-mark.is-possible { background: #fff; color: #c2410c; border: 1px dashed #f3c9ae; }
.ll-txn-table tbody tr.is-flash td { animation: ll-ot-flash 1.6s ease-out; }

@keyframes ll-ot-flash { 0% { background: #ffd2b0; } 100% { background: #fff6ec; } }
@keyframes ll-ot-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---- small screens: the facts strip goes full width, each stop stacks ---- */
@media (max-width: 640px) {
    .ll-ot { margin: 0 var(--ll-spacing-sm, 0.75rem) var(--ll-spacing-sm, 0.75rem); padding: 0.875rem 0.875rem 1rem; }
    .ll-ot-facts { width: 100%; }
    .ll-ot-facts > div { flex: 1 1 0; padding: 0.45rem 0.5rem; }
    .ll-ot-facts dt { white-space: normal; font-size: 0.5625rem; letter-spacing: 0.08em; }
    .ll-ot-facts dd { font-size: 0.875rem; }
    .ll-ot-stop { grid-template-columns: minmax(0, 1fr); }
    .ll-ot-jump, .ll-ot-aside { grid-column: 1; grid-row: auto; justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
    .ll-ot-stop { animation: none; }
    .ll-txn-table tbody tr.is-flash td { animation: none; }
}

/* the PDF is a still: no reveal, and no link that cannot be followed on paper */
.pdf-capture-mode .ll-ot-stop { animation: none; }
.pdf-capture-mode .ll-ot-jump, .pdf-capture-mode .ll-ot-note a { display: none; }
.pdf-capture-mode .ll-ot { break-inside: avoid; page-break-inside: avoid; }
