.dir { --dir-row:32px; min-width:0; font-size:.84rem; }
.dir-bar,.dir-pages,.dir-new {display:flex;align-items:center;gap:.45rem}
.dir-bar {justify-content:space-between;margin:.6rem 0;color:var(--grey)}
.dir p:empty {display:none}
.sg .dir .dir-bar button,.sg .dir .dir-history-nav button {min-height:30px;padding:.12rem .5rem}
.dir-new {display:grid;grid-template-columns:auto 105px minmax(135px,1.1fr) minmax(136px,1fr) minmax(114px,.7fr) minmax(150px,1.5fr) auto;gap:4px;padding:5px;background:var(--soft);border:1px solid var(--line);border-radius:5px 5px 0 0}
.dir-new strong {padding-inline:4px;color:var(--navy);font-size:.79rem}
.sg .dir-new input,.sg .dir-new select,.sg .dir-new button,.sg .dir-scroll input,.sg .dir-scroll select,.sg .dir-scroll textarea {min-width:0;width:100%;height:30px;min-height:30px;font:inherit;line-height:1.2;border:1px solid var(--control);border-radius:3px;color:var(--ink);background:var(--surface);padding:3px 5px}
.sg .dir-new button {background:var(--accent);color:var(--on-accent);border-color:var(--accent);font-weight:700}
.sg .dir-new button:disabled {opacity:.45}
.dir-message,.dir-error {color:var(--error);line-height:1.5;padding:.3rem .1rem}
.dir-scroll {overflow:auto;max-height:65vh;border:1px solid var(--line);background:var(--surface);isolation:isolate;overscroll-behavior-inline:contain}
.dir-scroll table {border-collapse:separate;border-spacing:0;table-layout:fixed;max-width:none;min-width:100%;margin:0;font:inherit;text-align:left}
.dir-scroll :is(th,td) {box-sizing:border-box;height:var(--dir-row);max-height:var(--dir-row);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.25;padding:0 5px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);background:var(--surface)}
.dir-scroll th {position:sticky;z-index:3;top:0;height:31px;background:var(--soft);color:var(--ink);font-weight:650}
.dir-scroll :is(th,td):nth-child(-n+2) {position:sticky;left:0;z-index:2}
.dir-scroll :is(th,td):nth-child(2) {left:100px;box-shadow:2px 0 2px #182c4912}
.dir-scroll th:nth-child(-n+2) {z-index:4}
.dir-scroll td:nth-child(2) {font-weight:650}
.dir-scroll :is(td,th):focus-within {outline:2px solid var(--accent);outline-offset:-2px}
.dir-scroll td[data-tone] {background:var(--city-color,var(--paper));color:var(--ink)}
.dir-scroll tr.dir-map-target td {border-block:1px solid var(--link);background:var(--blue-wash)}
.dir-scroll tr.dir-map-target td:first-child {box-shadow:inset 4px 0 var(--link);background:var(--city-color,var(--blue-wash))}
.dir-scroll .dir-marked-name {color:var(--navy)}
.dir-scroll [data-tone="0"],.dir-scroll [data-tone="6"] {--city-color:#d3f0ff}
.dir-scroll [data-tone="1"],.dir-scroll [data-tone="7"] {--city-color:var(--orange-wash)}
.dir-scroll [data-tone="2"],.dir-scroll [data-tone="8"] {--city-color:#eee1ff}
.dir-scroll [data-tone="3"],.dir-scroll [data-tone="9"] {--city-color:#edf5cb}
.dir-scroll [data-tone="4"],.dir-scroll [data-tone="10"] {--city-color:#fff1ba}
.dir-scroll [data-tone="5"],.dir-scroll [data-tone="11"] {--city-color:#d8f4e7}
.sg .dir-scroll td button,.sg .dir-scroll td a {
  display:inline-block;min-height:26px;max-width:100%;height:26px;line-height:26px;font:inherit;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:middle;padding:1px 3px;
  border:0;border-radius:2px;color:inherit;background:transparent;text-align:left;cursor:pointer;
}
.sg .dir-scroll td [data-dir=edit],.sg .dir-scroll td [data-dir=read] {width:100%}
.sg .dir-scroll td[data-col=website] a {color:var(--link);max-width:calc(100% - 3em);text-decoration:underline}
.sg .dir-scroll td[data-col=website] a + button {width:2.8em;color:var(--grey)}
.sg .dir-scroll td button:hover {background:#132c4610}
.sg .dir-scroll td [data-dir=request],.sg .dir-scroll td [data-dir=pin],.sg .dir-scroll td [data-action] {color:var(--link);text-decoration:underline;text-underline-offset:2px}
.dir-history-nav {margin:.4rem 0}
.dir-approvals h3 {margin:.8rem 0 .3rem}
.dir-approvals>div {padding:.5rem .75rem;border-bottom:1px solid var(--line);font-size:.87rem}
.dir-approvals p,.dir-full-record {white-space:pre-wrap;overflow-wrap:anywhere}
.dir-approvals button {margin:.3rem .3rem 0 0}
.dir-dialog label {display:grid;margin:.55rem 0;gap:.2rem}
.dir-dialog .dir-coords {display:grid;grid-template-columns:1fr 1fr;gap:.6rem}
@media(min-width:1100px){main:has([data-page=list]:not([hidden])){max-width:100%}}
@media(max-width:880px){.dir-new{grid-template-columns:105px 1fr 1fr}.dir-new strong{grid-column:1/-1}}
@media(max-width:540px){.dir-new{grid-template-columns:1fr 1fr}.dir-scroll :is(th,td):nth-child(2){position:static;box-shadow:none}.dir-scroll th:nth-child(2){position:sticky;left:auto}}
