/* Tenshen People — roster + dossier styles.
   Lifted from docs/mocks/people.html. Consumes design tokens from
   tenshen-shell.css. Scoped under `.roster` / `.dossier` so generic
   class names (pri-pill, status-pill, entlink, etc.) don't collide
   with tenshen-task.css or legacy beacon.css. */

/* ==================================================================
   /people — roster
   ================================================================ */
.roster {
    max-width: 720px;
    margin: 0 auto;
    padding: 32px 40px 80px;
}

/* Sub-head strip */
.roster .roster-subhead {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}
.roster-eyebrow {
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--t-mute);
    font-weight: 600;
}
.roster-eyebrow .pop {
    color: var(--t-accent);
    font-weight: 700;
}
.roster-search {
    flex: 1;
    min-width: 220px;
    padding: 10px 12px;
    background: var(--t-card);
    border: 1px solid var(--t-rule);
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}
.roster-search svg {
    width: 14px;
    height: 14px;
    stroke: var(--t-faint);
    stroke-width: 1.5;
    fill: none;
    flex-shrink: 0;
}
.roster-search input {
    flex: 1;
    min-width: 0;
    height: auto;
    margin: 0;
    padding: 0;
    padding-inline-start: 0;
    border: 0;
    border-radius: 0;
    background: transparent none;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    font-size: 13px;
    line-height: 1.35;
    color: var(--t-ink);
    outline: none;
}
.roster-search input:focus {
    background: transparent none;
    box-shadow: none;
    border-color: transparent;
}
.roster-search input::placeholder {
    color: var(--t-faint);
}
.roster-search .kbd {
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 10px;
    padding: 2px 6px;
    border: 1px solid var(--t-rule);
    color: var(--t-mute);
    background: var(--t-rail-soft);
    border-radius: 2px;
}
.roster-filter {
    display: inline-flex;
    gap: 4px;
    padding: 3px;
    background: var(--t-soft-bg);
    border-radius: 4px;
}
.roster-filter button {
    appearance: none;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 11px;
    padding: 5px 12px;
    margin: 0;
    border-radius: 3px;
    color: var(--t-mute);
    font-weight: 500;
    cursor: pointer;
}
.roster-filter button.active {
    background: var(--t-active-bg);
    color: var(--t-ink);
    font-weight: 550;
    box-shadow: var(--t-shadow-sm);
}

/* New-person drawer */
.inline-create {
    border: 1px solid var(--t-rule);
    background: var(--t-card);
    border-radius: 4px;
    padding: 22px 24px;
    margin-bottom: 22px;
}
.inline-create .ic-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 18px;
}
.inline-create .ic-head .eyebrow {
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--t-mute);
    font-weight: 600;
}
.inline-create .ic-head .ghost {
    font-size: 11px;
    color: var(--t-faint);
    background: none;
    border: 0;
    font: inherit;
    cursor: pointer;
    padding: 0;
}
.inline-create .ic-head .ghost:hover {
    color: var(--t-ink);
}
.ic-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 18px;
    margin-bottom: 16px;
}
.ic-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ic-field label {
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--t-mute);
    font-weight: 600;
}
.ic-field input,
.ic-field select {
    height: auto;
    margin: 0;
    padding: 8px 10px;
    font: inherit;
    font-size: 13px;
    line-height: 1.35;
    background: var(--t-card);
    border: 1px solid var(--t-rule);
    border-radius: 4px;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
    color: var(--t-ink);
    outline: none;
    transition: border-color 120ms ease;
}
.ic-field input:focus,
.ic-field select:focus {
    background: var(--t-card);
    box-shadow: none;
    border-color: var(--t-ink);
}
.ic-ws-toggle {
    display: inline-flex;
    gap: 4px;
    padding: 3px;
    background: var(--t-soft-bg);
    border-radius: 4px;
    align-self: flex-start;
}
.ic-ws-toggle button {
    appearance: none;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 11px;
    padding: 5px 12px;
    margin: 0;
    border-radius: 3px;
    color: var(--t-mute);
    font-weight: 500;
    cursor: pointer;
}
.ic-ws-toggle button.active {
    background: var(--t-active-bg);
    color: var(--t-ink);
    font-weight: 550;
    box-shadow: var(--t-shadow-sm);
}
.ic-actions {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

/* Roster row */
.r-list {
    border-top: 1px solid var(--t-rule);
    background: var(--t-card);
    border-left: 1px solid var(--t-rule);
    border-right: 1px solid var(--t-rule);
    border-bottom: 1px solid var(--t-rule);
    border-radius: 4px;
    overflow: hidden;
}
.r-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--t-rule);
    color: var(--t-ink);
    text-decoration: none;
    position: relative;
    min-height: 76px;
    transition: background 120ms ease;
}
.r-row:last-child {
    border-bottom: 0;
}
.r-row:hover {
    background: var(--t-hover-bg);
}
.r-row[data-signal="attention"]::before {
    content: "";
    position: absolute;
    left: 0;
    top: 16px;
    bottom: 16px;
    width: 2px;
    background: var(--t-accent);
    border-radius: 1px;
}
.r-avatar {
    width: 36px;
    height: 36px;
    border-radius: 100px;
    background: var(--t-avatar-bg);
    color: var(--t-avatar-fg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.r-avatar[data-tone="warm"] { background: oklch(0.72 0.08 55); }
.r-avatar[data-tone="ink"]  { background: var(--t-avatar-bg); }
.r-avatar[data-tone="dusk"] { background: oklch(0.36 0.02 260); }
.r-avatar[data-tone="sage"] { background: oklch(0.52 0.04 150); }
.r-avatar[data-tone="rust"] { background: oklch(0.58 0.11 45); }
.r-core {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.r-name-line {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: 15px;
    font-weight: 550;
    color: var(--t-ink);
    letter-spacing: -0.005em;
    line-height: 1.2;
}
.r-chip {
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 10px;
    font-weight: 500;
    padding: 2px 7px;
    border-radius: 2px;
    background: var(--t-accent-soft);
    color: var(--t-ink);
    letter-spacing: 0;
    white-space: nowrap;
}
.r-role {
    font-size: 12px;
    color: var(--t-mute);
    font-weight: 500;
    line-height: 1.3;
}
.r-role a {
    color: var(--t-ink);
    text-decoration: none;
    border-bottom: 1px dotted var(--t-faint);
}
.r-role a:hover {
    border-bottom-style: solid;
}
.r-role .sep {
    color: var(--t-faint);
    margin: 0 6px;
}
.r-beat {
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 13px;
    color: var(--t-mute);
    line-height: 1.5;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.r-beat .hot {
    color: var(--t-accent);
    font-weight: 500;
}
.r-meta {
    flex-shrink: 0;
    display: flex;
    gap: 18px;
    align-items: center;
    margin-left: auto;
    padding-left: 18px;
}
.r-meta-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    min-width: 44px;
}
.r-meta-num {
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 13px;
    font-weight: 500;
    color: var(--t-ink);
    line-height: 1;
}
.r-meta-num.accent {
    color: var(--t-accent);
}
.r-meta-label {
    font-size: 9px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--t-faint);
    font-weight: 600;
}

/* ==================================================================
   /people/{id} — dossier
   ================================================================ */
.dossier {
    max-width: 760px;
    margin: 0 auto;
    padding: 44px 56px 80px;
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    color: var(--t-ink);
}
.d-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--t-rule);
    margin-bottom: 28px;
    gap: 12px;
    flex-wrap: wrap;
}
.d-crumb {
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--t-mute);
    font-weight: 600;
}
.d-crumb a {
    color: var(--t-mute);
    text-decoration: none;
    border-bottom: 1px dotted var(--t-faint);
}
.d-crumb a:hover {
    color: var(--t-ink);
    border-bottom-style: solid;
}
.d-crumb .sep {
    margin: 0 10px;
    color: var(--t-faint);
    letter-spacing: 0;
}
.d-headmeta {
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--t-faint);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}
.d-headmeta .sep {
    color: rgba(21, 24, 26, 0.2);
}
.d-headmeta .dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 100px;
    background: var(--t-accent);
    margin-right: 4px;
    vertical-align: 0.05em;
}

/* Identity block */
.d-identity {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 22px;
}
.d-avatar {
    width: 44px;
    height: 44px;
    border-radius: 100px;
    background: oklch(0.72 0.08 55);
    color: var(--t-on-ink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.d-id-body {
    flex: 1;
    min-width: 0;
}
.d-name-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.d-name {
    font-size: 36px;
    font-weight: 550;
    letter-spacing: -0.022em;
    line-height: 1.12;
    margin: 0;
    color: var(--t-ink);
}
.d-userchip {
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 2px;
    background: var(--t-accent-soft);
    color: var(--t-ink);
    text-decoration: none;
    white-space: nowrap;
}
.d-edit {
    margin-left: auto;
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--t-faint);
    font: inherit;
    font-size: 11px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 3px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 600;
}
.d-edit:hover {
    color: var(--t-ink);
    background: var(--t-soft-bg);
}
.d-facts {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: var(--t-mute);
}
.d-facts .sep {
    color: var(--t-faint);
}
.d-facts a.entlink {
    color: var(--t-ink);
    text-decoration: none;
    border-bottom: 1px dotted var(--t-faint);
    white-space: nowrap;
}
.d-facts a.entlink:hover {
    border-bottom-style: solid;
}
.d-facts a.entlink[data-sigil]::before {
    content: attr(data-sigil);
    font-size: 0.72em;
    color: var(--t-accent);
    margin-right: 3px;
    vertical-align: 0.08em;
}
.d-facts .email {
    color: var(--t-mute);
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
}

/* AI synopsis */
.d-synopsis {
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 17px;
    line-height: 1.65;
    color: var(--t-ink);
    margin: 28px 0 0;
    text-wrap: pretty;
}
.d-synopsis p {
    margin: 0 0 14px;
}
.d-synopsis p:last-child {
    margin-bottom: 0;
}
.d-synopsis em {
    font-style: italic;
}
.d-synopsis strong {
    font-weight: 600;
}
.d-synopsis .entlink {
    color: var(--t-ink);
    text-decoration: none;
    border-bottom: 1px dotted var(--t-faint);
    white-space: nowrap;
}
.d-synopsis .entlink:hover {
    border-bottom-style: solid;
}
.d-synopsis .entlink[data-sigil]::before {
    content: attr(data-sigil);
    font-size: 0.72em;
    color: var(--t-accent);
    margin-right: 3px;
    vertical-align: 0.08em;
    font-family: "Inter", system-ui, -apple-system, sans-serif;
}

/* Handled-note — user-authored context */
.d-note {
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 14px;
    color: var(--t-mute);
    font-style: italic;
    padding: 12px 0 12px 16px;
    border-left: 2px solid var(--t-accent);
    margin: 22px 0 0;
    line-height: 1.55;
}
.d-note strong {
    color: var(--t-ink);
    font-weight: 600;
    font-style: normal;
}
.d-note .when {
    display: block;
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    font-style: normal;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--t-faint);
    font-weight: 600;
    margin-bottom: 4px;
}

/* Section head (briefing motif) */
.d-section-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 44px 0 14px;
}
.d-section-head .eyebrow {
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--t-mute);
    font-weight: 600;
}
.d-section-head .rule {
    flex: 1;
    height: 1px;
    background: var(--t-rule);
}
.d-section-head .count {
    font-size: 10px;
    color: var(--t-faint);
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Outbound rail */
.d-rail {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.d-rail-lede {
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 15px;
    line-height: 1.55;
    color: var(--t-mute);
    margin: 0;
}
.d-rail-lede strong {
    color: var(--t-ink);
    font-weight: 600;
}
.d-rail-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.d-rail-form input,
.d-rail-form textarea {
    font: inherit;
    font-size: 13px;
    padding: 10px 12px;
    background: var(--t-card);
    border: 1px solid var(--t-rule);
    border-radius: 4px;
    color: var(--t-ink);
    outline: none;
    transition: border-color 120ms ease;
    resize: vertical;
    font-family: "Inter", system-ui, -apple-system, sans-serif;
}
.d-rail-form input:focus,
.d-rail-form textarea:focus {
    border-color: var(--t-ink);
}
.d-rail-form textarea {
    min-height: 96px;
    line-height: 1.5;
}
.d-rail-submit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.d-rail-kbd {
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 10px;
    color: var(--t-faint);
    letter-spacing: 0.02em;
}
.d-rail-status {
    font-size: 12px;
    color: var(--t-accent);
    font-weight: 500;
}

/* Linked work rows (crow) */
.d-clist {
    display: flex;
    flex-direction: column;
}
.d-crow {
    padding: 12px 4px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--t-rule);
    min-height: 44px;
    transition: background 120ms ease;
}
.d-crow:last-child {
    border-bottom: 0;
}
.d-crow:hover {
    background: var(--t-hover-bg);
}
.dossier .pri-pill {
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 2px;
    font-weight: 700;
    letter-spacing: 0.04em;
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
.dossier .pri-pill.p1 {
    background: var(--t-accent);
    color: #fff;
}
.dossier .pri-pill.p2 {
    background: var(--t-accent-soft);
    color: var(--t-ink);
}
.dossier .pri-pill.p3 {
    background: var(--t-soft-bg);
    color: var(--t-mute);
}
.dossier .status-pill {
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 2px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: var(--t-soft-bg);
    color: var(--t-mute);
}
.dossier .status-pill.in-progress {
    background: var(--t-accent-soft);
    color: var(--t-ink);
}
.dossier .status-pill.done {
    background: var(--t-ink);
    color: var(--t-on-ink);
}
.dossier .status-pill.active {
    background: var(--t-accent-soft);
    color: var(--t-ink);
}
.d-crow-title {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    color: var(--t-ink);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.d-crow-title a {
    color: var(--t-ink);
    text-decoration: none;
    border-bottom: 1px dotted var(--t-faint);
}
.d-crow-title a:hover {
    border-bottom-style: solid;
}
.d-crow-age {
    font-size: 11px;
    color: var(--t-faint);
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: 0;
    flex-shrink: 0;
}

/* Delete — soft closing line */
.d-sep {
    border: 0;
    border-top: 1px solid var(--t-rule);
    margin: 48px 0 20px;
}
.d-delete {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--t-faint);
    font: inherit;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 0;
    transition: color 120ms ease;
}
.d-delete:hover {
    color: var(--t-accent);
}

/* ==================================================================
   Responsive
   ================================================================ */
@media (max-width: 760px) {
    .roster {
        padding: 22px 18px 60px;
    }
    .dossier {
        padding: 28px 20px 60px;
    }
    .d-name {
        font-size: 30px;
    }
    .ic-grid {
        grid-template-columns: 1fr;
    }
    .r-meta {
        gap: 12px;
    }
}
