/* OwnerTrail UI, from the OwnerTrail design system tokens */
:root{
--brand-700:#145a50;--brand-800:#0e4740;--brand-050:#e3efec;--on-brand:#fbfcfb;
--ground:#f4f6f5;--surface:#fbfcfb;--ink:#1c2724;--ink-muted:#50605b;--line:#d3dcd8;--line-strong:#7f8f8a;
--nm-fg:#3e4c59;--nm-bg:#eaeef1;--rv-fg:#7a4f00;--rv-bg:#fbf0d6;--mt-fg:#9b2424;--mt-bg:#f9e7e7;--un-fg:#56606b;--un-bg:#eff1f3;
--sans:'Source Sans 3','Segoe UI',system-ui,sans-serif;--serif:'Source Serif 4',Georgia,serif;--mono:'IBM Plex Mono',ui-monospace,Consolas,monospace;
--r-sm:4px;--r-md:8px;--r-lg:12px;
}
.ot{font-family:var(--sans);font-size:17px;line-height:1.55;color:var(--ink);background:var(--ground);-webkit-font-smoothing:antialiased}
.ot *{box-sizing:border-box}
.ot h1,.ot h2,.ot h3,.ot p{margin:0;text-wrap:balance}
.ot p{text-wrap:pretty}
.ot a{color:var(--brand-700);text-underline-offset:3px}
.ot a:hover{color:var(--brand-800)}
.ot :focus-visible{outline:2px solid var(--brand-700);outline-offset:2px}

/* buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 18px;border-radius:var(--r-md);font:600 17px/1 var(--sans);text-decoration:none;border:1px solid transparent;cursor:pointer;white-space:nowrap;transition:background-color .15s ease-out}
.btn:active{transform:scale(.98)}
.btn-primary{background:var(--brand-700);color:var(--on-brand)}
.ot a.btn-primary{color:var(--on-brand)}
.btn-primary:hover{background:var(--brand-800)}
.btn-secondary{background:var(--surface);color:var(--ink);border-color:var(--line-strong)}
.ot a.btn-secondary{color:var(--ink)}
.btn-secondary:hover{background:var(--brand-050)}
.btn-quiet{background:transparent;color:var(--brand-700);padding:0 10px}

/* status */
.badge{display:inline-flex;align-items:center;gap:8px;padding:5px 11px 5px 9px;border-radius:var(--r-sm);font:600 16px/1.3 var(--sans);border:1px solid transparent;white-space:nowrap}
.badge svg{width:18px;height:18px;flex:none}
.b-nm{color:var(--nm-fg);background:var(--nm-bg)}
.b-rv{color:var(--rv-fg);background:var(--rv-bg)}
.b-mt{color:var(--mt-fg);background:var(--mt-bg)}
.b-un{color:var(--un-fg);background:var(--un-bg);border:1px dashed currentColor}

/* surfaces */
.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-md)}
.src{font-size:15px;line-height:1.45;color:var(--ink-muted)}
.id{font-family:var(--mono);font-size:15px;letter-spacing:0}
.muted{color:var(--ink-muted)}

/* tables */
.tbl{width:100%;border-collapse:collapse;font-size:16px}
.tbl th{text-align:left;font-weight:600;font-size:15px;color:var(--ink-muted);padding:10px 16px;border-bottom:1px solid var(--line)}
.tbl td{padding:14px 16px;border-bottom:1px solid var(--line);vertical-align:top}
.tbl tr:last-child td{border-bottom:0}
.tbl tbody tr:hover{background:var(--brand-050)}

/* forms */
.field{display:flex;flex-direction:column;gap:6px}
.field label{font-weight:600;font-size:16px}
.field .hint{font-size:15px;color:var(--ink-muted)}
.input{min-height:44px;padding:0 12px;border:1px solid var(--line-strong);border-radius:var(--r-sm);background:var(--surface);font:400 17px var(--sans);color:var(--ink);width:100%}
.choice{display:flex;gap:12px;align-items:flex-start;padding:14px 16px;border:1px solid var(--line-strong);border-radius:var(--r-md);background:var(--surface);cursor:pointer}
.choice.on{border:2px solid var(--brand-700);background:var(--brand-050);padding:13px 15px}

/* app shell */
.nav a{display:flex;align-items:center;gap:10px;min-height:44px;padding:0 12px;border-radius:var(--r-md);color:var(--ink);text-decoration:none;font-weight:600;font-size:16px}
.nav a:hover{background:var(--brand-050);color:var(--ink)}
.nav a.on{background:var(--brand-050);color:var(--brand-800)}
.nav svg{width:20px;height:20px;flex:none}

/* ownership trail */
.trail,.trail ul{list-style:none;margin:0;padding:0}
.trail ul{margin-left:9px}
.trail li{position:relative;padding:8px 0}
.trail ul>li{padding-left:34px}
.trail ul>li::before{content:"";position:absolute;left:0;top:0;width:34px;height:21px;border-left:2px solid var(--brand-700);border-bottom:2px solid var(--brand-700)}
.trail ul>li:not(:last-child)::after{content:"";position:absolute;left:0;top:20px;bottom:0;border-left:2px solid var(--brand-700)}
/* notes sit under the name; when the node has children the spine runs down beside them to the first elbow */
.trail li>.src{padding-left:32px}
.trail li:has(>ul)>.node::after{content:"";position:absolute;left:9px;top:22px;bottom:0;border-left:2px solid var(--brand-700)}
.trail li:has(>ul)>.src{margin-left:9px;padding-left:21px;border-left:2px solid var(--brand-700)}
.node{position:relative;display:flex;align-items:flex-start;gap:4px 12px;flex-wrap:wrap;line-height:24px;padding-left:32px}
.dot{position:absolute;left:0;top:2px;width:20px;height:20px;border-radius:50%}
.ent .dot{border:3px solid var(--brand-700);background:var(--surface)}
.per .dot{background:var(--brand-700)}
.pct{font-weight:600;font-size:16px;min-width:44px}
