:root {
  --s8d-navy: #102b3d;
  --s8d-ink: #1c2c35;
  --s8d-muted: #6d7c84;
  --s8d-line: #d9e3e6;
  --s8d-soft-line: #e9eff1;
  --s8d-surface: #fff;
  --s8d-page: #f2f5f4;
  --s8d-soft: #f7f9fa;
  --s8d-accent: #1267a5;
  --s8d-accent-tint: #eaf3f9;
  --s8d-green: #226640;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--s8d-ink); background: var(--s8d-page); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.preview-nav { min-height: 66px; padding: 0 34px; display: flex; align-items: center; gap: 34px; color: #fff; background: var(--s8d-navy); box-shadow: 0 1px 0 rgba(255,255,255,.1) inset; }
.preview-brand { min-width: 190px; font-size: 15px; font-weight: 800; letter-spacing: .15em; }
.preview-brand small { display: block; margin-top: 3px; color: #b8c9d2; font-size: 10px; font-weight: 500; letter-spacing: .05em; }
.preview-links { display: flex; align-items: center; gap: 22px; color: #b9c9d1; font-size: 12px; }
.preview-links b { color: #fff; font-weight: 700; }
.preview-environment { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; color: #cbd8dd; font-size: 11px; white-space: nowrap; }
.preview-environment i { width: 7px; height: 7px; display: block; border-radius: 50%; background: #64b887; }
.preview-shell { width: min(1480px, calc(100% - 48px)); margin: 0 auto; padding: 20px 0 32px; }
.preview-breadcrumb { margin-bottom: 11px; color: #87969c; font-size: 11px; }
.preview-breadcrumb span { padding: 0 7px; color: #b5c0c4; }
.preview-panel { padding: 21px; border: 1px solid #dbe4e5; border-radius: 10px; background: #fff; box-shadow: 0 2px 7px rgba(24, 47, 57, .035); }
.preview-note { margin: 10px 2px 0; color: #87969c; font-size: 10px; }
.eyebrow { margin: 0 0 5px; color: #7b8a90; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.muted { color: var(--s8d-muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.secondary, .s8d-form-actions button { border: 1px solid #d1dde0; border-radius: 6px; padding: 8px 10px; color: #31434c; background: #f4f7f8; font-size: 11px; font-weight: 600; }
.secondary:hover { border-color: #adc4ce; background: #edf4f7; }
.s8d-topbar { display: grid; grid-template-columns: minmax(245px, .9fr) minmax(320px, 1.35fr) minmax(120px, .55fr); gap: 22px; align-items: end; margin: 1px 1px 17px; }
.s8d-title h1 { margin: 0; color: var(--s8d-ink); font-size: 25px; line-height: 1.1; letter-spacing: -.025em; }
.s8d-title p:last-child { max-width: 430px; margin: 8px 0 0; font-size: 11px; line-height: 1.5; }
.s8d-search { position: relative; display: block; }
.s8d-search input { width: 100%; height: 42px; padding: 0 13px 0 39px; border: 1px solid #cad8dc; border-radius: 7px; outline: 0; color: var(--s8d-ink); background: #fff; font-size: 12px; box-shadow: 0 1px 2px rgba(17, 42, 55, .03); }
.s8d-search input:focus { border-color: #6c9eb5; box-shadow: 0 0 0 3px rgba(18, 103, 165, .1); }
.s8d-search-icon { position: absolute; z-index: 1; top: 8px; left: 14px; color: #627983; font-size: 23px; line-height: 23px; transform: rotate(-20deg); }
.s8d-shortcuts { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.s8d-count { margin-right: 3px; color: #7a8b92; font-size: 10px; white-space: nowrap; }
.s8d-count strong { color: #40535c; font-size: 14px; }
.s8d-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; min-height: 520px; }
.s8d-workspace.has-detail { grid-template-columns: minmax(350px, .76fr) minmax(0, 1.24fr); }
.s8d-pane, .s8d-detail { min-width: 0; overflow: hidden; border: 1px solid var(--s8d-line); border-radius: 8px; background: var(--s8d-surface); }
.s8d-pane { display: flex; flex-direction: column; max-height: min(620px, calc(100vh - 245px)); }
.s8d-pane-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 14px 12px; border-bottom: 1px solid var(--s8d-line); background: #fff; }
.s8d-pane-head .eyebrow { margin-bottom: 3px; }
.s8d-pane-head h2 { margin: 0; color: var(--s8d-ink); font-size: 15px; letter-spacing: -.01em; }
.s8d-pane-head h2 span { display: inline-flex; align-items: baseline; gap: 2px; margin-left: 4px; padding: 3px 6px; border-radius: 999px; color: #50646c; background: #eef3f4; font-size: 10px; vertical-align: 2px; }
.s8d-pane-head h2 span i { color: #98a5aa; font-size: 9px; font-style: normal; font-weight: 500; }
.s8d-pane-head button { padding: 7px 9px; font-size: 10px; }
.s8d-org-filterbar { display: flex; gap: 5px; padding: 8px 13px; border-bottom: 1px solid var(--s8d-soft-line); background: #fbfcfc; }
.s8d-filter-button { padding: 5px 8px; border-radius: 999px; font-size: 9px; }
.s8d-filter-button.active { border-color: #1d668d; color: #fff; background: #1d668d; }
.s8d-card-list { overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.s8d-card { position: relative; width: 100%; display: grid; grid-template-columns: 27px minmax(0, 1fr) auto 11px; gap: 9px; align-items: center; padding: 11px 13px; border: 0; border-bottom: 1px solid var(--s8d-soft-line); border-left: 3px solid transparent; color: var(--s8d-ink); text-align: left; background: #fff; }
.s8d-card:hover { background: #fafcfd; }
.s8d-card.selected { border-left-color: var(--s8d-accent); background: var(--s8d-accent-tint); }
.s8d-card-copy { min-width: 0; display: grid; gap: 3px; }
.s8d-card strong, .s8d-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s8d-card strong { font-size: 12px; font-weight: 700; }
.s8d-card small { color: #738289; font-size: 10px; }
.s8d-card em { display: grid; justify-items: end; color: #51666f; font-size: 13px; font-style: normal; font-weight: 700; line-height: 1; white-space: nowrap; }
.s8d-card em small { margin-top: 3px; color: #8b999d; font-size: 8px; font-weight: 500; }
.s8d-chevron { color: #a3b1b5; font-size: 20px; font-weight: 300; line-height: 1; }
.s8d-avatar, .s8d-org-mark { width: 27px; height: 27px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: #286181; background: #e4f0f5; font-size: 9px; font-weight: 800; letter-spacing: .02em; }
.s8d-avatar.large { width: 39px; height: 39px; font-size: 11px; }
.s8d-org-mark { border-radius: 7px; color: #695d37; background: #f2eddc; }
.s8d-org-mark.small { width: 27px; height: 27px; font-size: 8px; }
.s8d-type { display: inline-flex; width: max-content; padding: 2px 5px; border-radius: 3px; color: #315b75; background: #e8f1f6; font-size: 8px; font-weight: 700; }
.s8d-empty-copy { margin: 0; padding: 24px 14px; color: var(--s8d-muted); font-size: 11px; }
.s8d-detail { max-height: min(620px, calc(100vh - 245px)); overflow: auto; padding: 18px; scrollbar-width: thin; }
.s8d-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 15px; border-bottom: 1px solid var(--s8d-line); }
.s8d-identity { display: flex; gap: 10px; min-width: 0; }
.s8d-identity > div { min-width: 0; }
.s8d-detail-head h2 { margin: 0 0 5px; color: var(--s8d-ink); font-size: 20px; letter-spacing: -.02em; }
.s8d-detail-head .muted { margin: 0; font-size: 11px; line-height: 1.4; }
.s8d-detail-actions { display: flex; gap: 6px; }
.s8d-detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 7px 0 0; color: #76858a; font-size: 10px; }
.s8d-detail-summary { margin: 7px 0 0; color: #49636f; font-size: 10px; font-weight: 700; }
.s8d-website { display: inline-block; max-width: 100%; margin-top: 7px; overflow-wrap: anywhere; color: #1f668f; font-size: 10px; }
.s8d-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; padding: 16px 0; }
.s8d-form label { display: grid; gap: 5px; color: #40525b; font-size: 10px; font-weight: 700; }
.s8d-form input, .s8d-form select, .s8d-form textarea { width: 100%; padding: 8px 9px; border: 1px solid #ccd9dd; border-radius: 5px; outline: 0; color: #24363f; background: #fff; font-size: 11px; }
.s8d-form input:focus, .s8d-form select:focus, .s8d-form textarea:focus { border-color: #6c9eb5; box-shadow: 0 0 0 2px rgba(18, 103, 165, .09); }
.s8d-form textarea { min-height: 70px; resize: vertical; line-height: 1.4; }
.s8d-form label small { color: #819097; font-size: 9px; font-weight: 400; line-height: 1.35; }
.s8d-full, .s8d-role-caption { grid-column: 1 / -1; }
.s8d-check { display: flex !important; grid-template-columns: auto 1fr; align-items: center; gap: 8px !important; }
.s8d-check input { width: auto; }
.s8d-role-caption { margin: -3px 0 0; padding: 8px 9px; border-radius: 5px; color: #315d73; background: #eef6fa; font-size: 10px; font-weight: 700; }
.s8d-form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 7px; padding-top: 13px; border-top: 1px solid var(--s8d-line); }
.s8d-form-actions button[type="submit"] { border-color: #1d668d; color: #fff; background: #1d668d; }
.s8d-related { margin-top: 2px; padding-top: 15px; border-top: 1px solid var(--s8d-line); }
.s8d-section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 9px; margin-bottom: 8px; }
.s8d-section-title h3 { margin: 0; color: var(--s8d-ink); font-size: 13px; }
.s8d-section-title small { color: #87959a; font-size: 10px; }
.s8d-event-list, .s8d-linked-list { display: grid; gap: 5px; }
.s8d-event-row, .s8d-linked-list button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 9px; border: 1px solid #e0e9eb; border-radius: 5px; color: var(--s8d-ink); text-align: left; background: var(--s8d-soft); }
.s8d-event-row:hover, .s8d-linked-list button:hover { border-color: #bfd2dc; background: #fff; box-shadow: 0 2px 6px rgba(29, 55, 68, .07); }
.s8d-event-main, .s8d-linked-list button > span:nth-child(2) { min-width: 0; display: grid; gap: 3px; }
.s8d-event-row strong, .s8d-linked-list strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.s8d-event-row small, .s8d-linked-list button > span:nth-child(2) > span { color: #7d8b91; font-size: 9px; }
.s8d-event-meta { display: grid; flex: 0 0 auto; justify-items: end; gap: 4px; text-align: right; white-space: nowrap; }
.s8d-status { display: inline-flex; padding: 3px 6px; border-radius: 999px; color: #53626a; background: #eef1f3; font-size: 8px; font-weight: 800; letter-spacing: .04em; }
.s8d-status.confirmed { color: var(--s8d-green); background: #e6f2eb; }
.s8d-status.hold { color: #85641f; background: #fff1d8; }
.s8d-status.open { color: #315b75; background: #e7f1f7; }
.s8d-linked-list button { justify-content: flex-start; }
.s8d-linked-list button > span:nth-child(2) { flex: 1; }
.s8d-modal-backdrop { position: fixed; z-index: 10; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(16, 43, 61, .36); }
.s8d-event-inspector { width: min(450px, 100%); padding: 18px; border: 1px solid #d8e3e6; border-radius: 9px; background: #fff; box-shadow: 0 18px 60px rgba(16, 43, 61, .25); }
.s8d-event-inspector dl { margin: 17px 0 0; border-top: 1px solid var(--s8d-line); }
.s8d-event-inspector dl div { display: flex; justify-content: space-between; gap: 18px; padding: 10px 0; border-bottom: 1px solid var(--s8d-soft-line); font-size: 11px; }
.s8d-event-inspector dt { color: #7b898f; }.s8d-event-inspector dd { margin: 0; color: #253943; font-weight: 650; text-align: right; }
.s8d-modal-note { margin: 16px 0 0; color: #859298; font-size: 10px; line-height: 1.4; }
.s8d-toast { position: fixed; z-index: 20; right: 22px; bottom: 22px; padding: 10px 13px; border: 1px solid #b8ddc5; border-radius: 6px; color: #23633e; background: #edf8f0; box-shadow: 0 7px 25px rgba(24, 56, 40, .12); font-size: 11px; }
@media (max-width: 900px) {
  .preview-nav { padding: 0 20px; }.preview-links { display: none; }.preview-environment { margin-left: auto; }
  .s8d-topbar { grid-template-columns: 1fr; gap: 11px; }.s8d-shortcuts { justify-content: flex-start; }.s8d-workspace, .s8d-workspace.has-detail { grid-template-columns: 1fr; min-height: 0; }.s8d-pane, .s8d-detail { max-height: none; }.s8d-card-list { overflow: visible; }.s8d-detail { order: 2; }.s8d-people-pane { order: 0; }.s8d-org-pane { order: 1; }
}
@media (max-width: 540px) {
  .preview-nav { min-height: 56px; padding: 0 14px; }.preview-brand { font-size: 13px; }.preview-shell { width: calc(100% - 20px); padding-top: 11px; }.preview-panel { padding: 12px; border-radius: 8px; }
  .s8d-title h1 { font-size: 22px; }.s8d-card { padding: 10px 10px; }.s8d-card em { display: none; }.s8d-detail { padding: 13px; }.s8d-detail-head h2 { font-size: 18px; }.s8d-detail-actions { flex-direction: column; }.s8d-form { grid-template-columns: 1fr; }.s8d-full, .s8d-role-caption, .s8d-form-actions { grid-column: auto; }.s8d-form-actions { flex-wrap: wrap; }.s8d-form-actions button { flex: 1; }.s8d-event-row { padding: 8px; }.s8d-event-meta small { max-width: 95px; white-space: normal; }.s8d-linked-list button { padding: 8px; }.s8d-org-filterbar { padding: 8px 10px; }.s8d-filter-button { flex: 1; }.s8d-event-main small { white-space: normal; }
}

/* Preview-only mobile inspection frame. Applied by directory-preview.html?mobile=1. */
body.preview-mobile { width: 390px; max-width: 100%; min-height: 100vh; margin: 0 auto; box-shadow: 0 0 0 1px #d8e2e5, 0 12px 45px rgba(16, 43, 61, .15); }
.preview-mobile .preview-nav { min-height: 56px; padding: 0 14px; }.preview-mobile .preview-brand { min-width: 0; font-size: 13px; }.preview-mobile .preview-links { display: none; }.preview-mobile .preview-shell { width: calc(100% - 20px); padding-top: 11px; }.preview-mobile .preview-panel { padding: 12px; border-radius: 8px; }
.preview-mobile .s8d-topbar { grid-template-columns: 1fr; gap: 11px; }.preview-mobile .s8d-shortcuts { justify-content: flex-start; }.preview-mobile .s8d-workspace, .preview-mobile .s8d-workspace.has-detail { grid-template-columns: 1fr; min-height: 0; }.preview-mobile .s8d-pane, .preview-mobile .s8d-detail { max-height: none; }.preview-mobile .s8d-card-list { overflow: visible; }.preview-mobile .s8d-detail { order: 2; }.preview-mobile .s8d-people-pane { order: 0; }.preview-mobile .s8d-org-pane { order: 1; }
.preview-mobile-detail .s8d-org-pane { display: none; }.preview-mobile-detail .s8d-detail { order: 0; }
.preview-mobile .s8d-title h1 { font-size: 22px; }.preview-mobile .s8d-card { padding: 10px; }.preview-mobile .s8d-card em { display: none; }.preview-mobile .s8d-detail { padding: 13px; }.preview-mobile .s8d-detail-head h2 { font-size: 18px; }.preview-mobile .s8d-detail-actions { flex-direction: column; }.preview-mobile .s8d-form { grid-template-columns: 1fr; }.preview-mobile .s8d-full, .preview-mobile .s8d-role-caption, .preview-mobile .s8d-form-actions { grid-column: auto; }.preview-mobile .s8d-form-actions { flex-wrap: wrap; }.preview-mobile .s8d-form-actions button, .preview-mobile .s8d-filter-button { flex: 1; }.preview-mobile .s8d-event-row, .preview-mobile .s8d-linked-list button { padding: 8px; }.preview-mobile .s8d-event-meta small { max-width: 95px; white-space: normal; }.preview-mobile .s8d-event-main small { white-space: normal; }.preview-mobile .s8d-org-filterbar { padding: 8px 10px; }