:root {
  color-scheme: dark;
  --ground: #101918;
  --paper: #182320;
  --inset: #111b18;
  --ink: #f5f3e9;
  --muted: #bdc8bb;
  --border: #49544b;
  --accent: #d7eba6;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  font: 16px/1.55 "DM Sans", "Helvetica Neue", Arial, sans-serif;
  background: var(--ground);
  color: var(--ink);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: var(--accent); text-underline-offset: .24em; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button, input, select, textarea { border: 1px solid #697568; border-radius: 4px; color: var(--ink); background: var(--inset); }
input::placeholder { color: #a7b5aa; opacity: 1; }
button { min-height: 44px; padding: .65rem .9rem; font-size: .88rem; font-weight: 700; }
button:hover:enabled { background: #2a3931; border-color: var(--accent); }
button:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.primary { background: var(--accent); color: #16241c; border-color: var(--accent); white-space: nowrap; }
.primary:hover:enabled { background: #e6f5c0; }
.primary span { font-size: 1.15em; margin-right: .25em; }
h1, h2, p { margin: 0; }
h1, h2 { font-family: var(--serif); font-weight: 500; }
h1 { font-size: clamp(3.4rem, 6vw, 6.5rem); letter-spacing: -.06em; line-height: .98; }
h1 em { color: #d3e6a6; font-weight: 400; }
.eyebrow, .product, .account, figcaption, .site-footer { font-family: var(--mono); font-size: .73rem; letter-spacing: .07em; }
.eyebrow, .product { color: var(--accent); }
.eyebrow { text-transform: uppercase; margin: 0 0 1.2rem; }
.masthead, .landing, main, .site-footer { width: min(1360px, 90%); margin-inline: auto; }
.masthead, .account, figcaption { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; }
.masthead { padding: 1.7rem 0; border-bottom: 1px solid var(--border); }
.wordmark { color: var(--ink); text-decoration: none; font-size: 1.23rem; font-weight: 750; letter-spacing: .1em; }
.wordmark span { font-size: .62rem; margin-left: .38rem; letter-spacing: .15em; }
.account { color: var(--accent); overflow-wrap: anywhere; }
.account button { padding: .42rem .8rem; }
main { padding-bottom: 3rem; }
.login { min-height: 100svh; display: flex; flex-direction: column; }
.landing, .workspace-intro { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 5vw; align-items: center; }
.landing { flex: 1; padding: clamp(2.5rem, 5vw, 5rem) 0; }
.landing h1 { font-size: clamp(4.2rem, 8.6vw, 8.9rem); line-height: .88; }
.workspace-intro { padding: clamp(2.5rem, 5vw, 4.5rem) 0; }
.intro, .archive { min-width: 0; }
.lede { max-width: 40ch; font-size: clamp(1rem, 1.35vw, 1.2rem); color: #d0d5cd; margin: 1.35rem 0; }
.archive { margin: 0; }
.photograph { overflow: hidden; position: relative; background: #95a08a; border-radius: 3px; }
.photograph img { display: block; width: 100%; height: clamp(16rem, 48vw, 35rem); object-fit: cover; object-position: 50% 38%; mix-blend-mode: multiply; filter: contrast(1.06); }
.workspace .photograph img { height: clamp(14rem, 26vw, 23rem); }
.photograph::after { content: ""; position: absolute; inset: .85rem; border: 1px solid #e9efda88; pointer-events: none; }
figcaption { padding-top: .55rem; color: var(--muted); font-size: .67rem; letter-spacing: 0; }
figcaption a { color: inherit; }
.site-footer { padding: 1.4rem 0; border-top: 1px solid var(--border); color: var(--muted); }
.login-card { width: min(100%, 27rem); padding-top: 1.15rem; border-top: 1px solid var(--border); display: grid; gap: .75rem; }
.login-card p:not(.error) { color: var(--muted); font-size: .86rem; }
.login-card button { justify-self: start; }
.startup { margin: 2rem auto; width: 90%; color: var(--muted); }
.directory { background: var(--paper); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 740px) {
  .landing, .workspace-intro { grid-template-columns: 1fr; gap: 1.75rem; }
  .masthead { padding: 1rem 0; }
  .landing h1 { font-size: clamp(4rem, 15vw, 6.5rem); }
  .photograph img { height: 18rem; }
}
@media (max-width: 420px) {
  .fields { grid-template-columns: 1fr; }
}
.toolbar { display: flex; flex-wrap: wrap; gap: .7rem; padding: 1rem 1.15rem; border-bottom: 1px solid var(--border); }
.search { flex: 1 1 260px; position: relative; }
.search input { width: 100%; padding: .68rem .8rem .68rem 2.3rem; min-height: 42px; }
.magnifier { position: absolute; top: 14px; left: .85rem; border: 1.6px solid var(--muted); width: 12px; height: 12px; border-radius: 50%; pointer-events: none; }
.magnifier::after { content: ""; position: absolute; width: 6px; height: 1.6px; background: var(--muted); bottom: -3px; right: -4px; transform: rotate(47deg); }
select { padding: .62rem .7rem; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .84rem; white-space: nowrap; }
th, td { text-align: left; padding: .75rem .65rem; border-bottom: 1px solid var(--border); }
th:first-child { padding-left: 1.15rem; }
th:last-child, td:last-child { padding-right: 1.15rem; }
thead th { background: var(--inset); color: var(--muted); font-size: .74rem; letter-spacing: .025em; }
tbody tr:hover { background: #21302a; }
.person { display: flex; align-items: center; gap: .65rem; }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; flex: none; background: #314336; color: #dbedbf; border-radius: 50%; font-size: .7rem; }
tr:nth-child(3n + 2) .avatar { background: #273d33; color: #c2dfc1; }
tr:nth-child(3n) .avatar { background: #3e392a; color: #f4d6a3; }
.category { display: inline-block; padding: .25rem .52rem; border-radius: 6px; background: #25362a; color: var(--accent); font-size: .72rem; font-weight: 650; }
.edit { padding: .35rem .6rem; color: var(--accent); }
.table-footer { display: flex; min-height: 3.1rem; align-items: center; justify-content: space-between; padding: .5rem 1.15rem; color: var(--muted); font-size: .8rem; }
#pages { display: flex; gap: .4rem; }
.empty { padding: 2.5rem 1rem; text-align: center; color: var(--muted); }
.empty h2 { color: var(--ink); margin-bottom: .35rem; font-size: 1rem; }
dialog { width: min(560px, calc(100% - 1.5rem)); max-height: calc(100dvh - 1.5rem); padding: 1.35rem; border: 1px solid var(--border); color: var(--ink); background: var(--paper); border-radius: 4px; box-shadow: 0 12px 60px #0007; }
dialog::backdrop { background: #101918bb; }
.editor-header, .editor-footer { display: flex; align-items: center; justify-content: space-between; gap: .55rem; }
.editor-header { margin-bottom: 1rem; }
.editor-header h2 { font-family: var(--serif); font-weight: normal; font-size: 1.7rem; }
.close { font-size: 1.25rem; line-height: 1; padding: .35rem .55rem; }
.editor-footer { justify-content: end; margin-top: 1rem; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }
.wide { grid-column: 1 / -1; }
.fields label, .login label { display: grid; gap: .32rem; font-weight: 650; font-size: .85rem; }
.fields input, .fields select, .fields textarea, .login input { min-width: 0; width: 100%; padding: .65rem; font-weight: 500; }
textarea { resize: vertical; }
.error { color: #ffd3c9; font-size: .86rem; margin: .75rem 0 0; }
.list-error { margin: .7rem 1.15rem; }
.field-hint { color: var(--muted); font-size: .75rem; font-weight: 500; }
.enrichment { margin-top: 1rem; padding: .8rem; border: 1px solid var(--border); border-radius: 4px; background: var(--inset); }
.enrichment summary { cursor: pointer; color: var(--accent); font-size: .9rem; font-weight: 750; }
.simulation-label { margin-left: .35rem; color: var(--muted); font-size: .72rem; font-weight: 600; }
.enrichment-controls { display: grid; gap: .85rem; margin-top: .8rem; }
.lookup { display: grid; gap: .4rem; justify-items: start; }
.lookup + .lookup { border-top: 1px solid var(--border); padding-top: .75rem; }
.lookup label { font-size: .82rem; font-weight: 650; }
.lookup input { width: 100%; padding: .55rem .65rem; }
.lookup p, .enrichment-status, .enrichment-review p { color: var(--muted); font-size: .82rem; }
.lookup-actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.text-button { border-color: transparent; background: transparent; color: var(--accent); }
.enrichment-status { margin-top: .75rem; }
.enrichment-review { display: grid; gap: .55rem; margin-top: .8rem; padding: .8rem; border-radius: 4px; background: var(--inset); border: 1px solid var(--border); }
.enrichment-review h3 { margin: 0; font-size: .95rem; }
.enrichment-review button { justify-self: start; }
.review-field { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .5rem; padding: .55rem 0; align-items: start; border-top: 1px solid var(--border); cursor: pointer; }
.review-field input { accent-color: var(--accent); }
.review-field strong, .review-field span span { display: block; overflow-wrap: anywhere; font-size: .8rem; }
.review-field span span { color: var(--muted); margin-top: .2rem; }
.live-lookup { margin-top: .8rem; border-top: 1px solid var(--border); padding-top: .75rem; }
.twilio-setup { padding: 1.1rem; margin-bottom: 1rem; border: 1px solid var(--border); border-radius: 4px; background: var(--paper); }
.twilio-setup h2 { font-size: 1.15rem; }
.twilio-setup p { margin-top: .35rem; font-size: .88rem; }
.twilio-setup form { margin-top: .85rem; }
.twilio-setup button { margin-top: .85rem; }
#phone-check-list { padding-left: 1.15rem; margin: 0; display: grid; gap: .3rem; font-size: .84rem; }

#recovery-dialog { width: min(660px, calc(100vw - 2rem)); }
#recovery-form { margin-top: 1rem; }
#recovery-form .lookup-actions { margin-top: 1rem; align-items: center; }
#recovery-template { color: var(--accent); font-size: .85rem; }
#recovery-results { display: grid; gap: .4rem; }
#recovery-results > p { padding: .55rem 0; }
#recovery-results ul { margin: 0; padding-left: 1.2rem; font-size: .86rem; overflow-wrap: anywhere; }
#vcard-import-options { margin-top: 1rem; }
#vcard-import-options .fields { margin-top: .65rem; }
#recovery-import-notes { padding-left: 1.25rem; font-size: .85rem; overflow-wrap: anywhere; }
#leasing-office-source .fields { margin-top: .65rem; }
#leasing-office-source .field-hint { margin-top: .55rem; }

.dry-run-evidence, .address-export-preview {
  max-height: 16rem;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

#contact-address-output > h3, #contact-address-output > details {
  margin-top: 1rem;
}

#contact-address-output h4 {
  margin: 0;
}
