/* Replybook app: a slim top bar and a front desk inbox in three panes */
body { font-size: 15px; }
.app-body { --bar: 40px; --top: 56px; }
h1, h2, h3 { font-family: var(--head); letter-spacing: -.005em; }
h3 { font-size: 15px; }
.muted { color: var(--ink-2); font-size: 14px; }
.hint { margin-top: 12px; color: var(--ink-2); font-size: 13.5px; }
.noscript { padding: 40px; text-align: center; }

.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 22px; height: var(--top); padding: 0 18px; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar .brand { flex: none; }
.topnav { display: flex; flex: 1; gap: 2px; min-width: 0; height: 100%; overflow-x: auto; scrollbar-width: none; }
.topnav a { display: flex; flex: none; align-items: center; gap: 6px; padding: 3px 10px 0; border-bottom: 3px solid transparent; color: var(--ink-2); font-weight: 600; font-size: 14.5px; text-decoration: none; }
.topnav a:hover { color: var(--ink); }
.topnav a.is-active { color: var(--accent-dark); border-bottom-color: var(--accent); font-weight: 800; }
.nav-count { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; }
.who { display: flex; flex: none; align-items: center; gap: 9px; min-height: 42px; padding: 3px 8px 3px 4px; border: 1px solid transparent; border-radius: var(--radius); background: none; text-align: left; cursor: pointer; }
.who:hover { background: var(--soft); }
.who > span:not(.avatar) { display: grid; line-height: 1.2; }
.who strong { font-size: 13.5px; }
.who small { color: var(--ink-2); font-size: 12px; }
.avatar { display: inline-grid; flex: none; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-tint); color: var(--accent-dark); font-weight: 800; font-size: 13px; }
.avatar.lg { width: 48px; height: 48px; font-size: 16px; }
.icon-btn { display: inline-grid; flex: none; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.icon-btn:hover { border-color: var(--ink-2); }

.page { max-width: 1280px; margin: 0 auto; padding: 22px 22px 48px; }
.page > * + *, .stack > * + * { margin-top: 16px; }
.stack { min-width: 0; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 20px; }
.page-head h1 { font-size: 27px; line-height: 1.2; }
.page-head p { color: var(--ink-2); }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; font-weight: 700; font-size: 14px; text-decoration: none; }
.back + .page-head { margin-top: 4px; }
.section-title { font-size: 18px; }

.card { min-width: 0; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.card-flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.card-head h2 { font-size: 17px; }
.card-head a { flex: none; font-size: 13.5px; font-weight: 700; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.span-2 { grid-column: 1 / -1; }
.empty { padding: 26px 16px; text-align: center; }
.empty p { margin-top: 3px; color: var(--ink-2); }
.empty .btn { margin-top: 12px; }
.locked { max-width: 480px; margin: 40px auto; padding: 32px 24px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.locked > .icon { width: 28px; height: 28px; margin: 0 auto 10px; color: var(--ink-2); }
.locked p { margin: 8px 0 18px; color: var(--ink-2); }

.summary { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.summary li + li { border-left: 1px solid var(--line); }
.summary a, .summary div { display: flex; flex-direction: column; height: 100%; padding: 13px 18px; color: inherit; text-decoration: none; }
.summary a:hover strong { color: var(--accent); }
.summary strong { font: 700 28px/1.15 var(--head); font-variant-numeric: tabular-nums; }
.summary span { color: var(--ink-2); font-size: 13.5px; }

.badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 99px; font-size: 12.5px; font-weight: 700; line-height: 1.5; white-space: nowrap; }
.tone-ok { background: var(--ok-tint); color: var(--ok); }
.tone-info { background: var(--info-tint); color: var(--info); }
.tone-wait { background: var(--wait-tint); color: var(--wait); }
.tone-danger { background: var(--danger-tint); color: var(--danger); }
.tone-done { background: #e4e6f3; color: #333a77; }
.tone-neutral { background: var(--soft); color: var(--ink-2); }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.searchfield { position: relative; display: flex; align-items: center; flex: 0 1 300px; min-width: 0; }
.searchfield .icon { position: absolute; left: 11px; color: var(--ink-2); }
.searchfield input { width: 100%; min-height: 40px; padding: 7px 10px 7px 37px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); }
.filter select, .filter input { min-height: 40px; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); }
.tabs.topnav { flex-wrap: nowrap; }
.toolbar .tabs { max-width: 100%; }
.tabs { display: flex; gap: 6px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; flex: none; align-items: center; gap: 6px; min-height: 34px; padding: 0 13px; border: 1px solid var(--line-2); border-radius: 99px; background: var(--surface); font-size: 13.5px; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.tab.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.count { font-weight: 600; opacity: .75; }
.list-count { color: var(--ink-2); font-size: 13.5px; }
#results > .list-count { margin-bottom: 8px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { padding: 10px 14px; text-align: left; font-size: 13px; color: var(--ink-2); background: #fafbfa; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
td small { display: block; color: var(--ink-2); font-size: 12.5px; white-space: nowrap; }
td a { text-decoration: none; color: var(--ink); }
td a:hover { color: var(--accent); text-decoration: underline; }
tbody tr:last-child td { border-bottom: 0; }
tr[data-href] { cursor: pointer; }
tr[data-href]:hover { background: #f6f9f6; }
.slim th, .slim td { padding: 8px 10px 8px 0; background: none; font-variant-numeric: tabular-nums; }

.facts > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.facts > div:last-child { border-bottom: 0; }
.facts dt { color: var(--ink-2); }
.facts dd { font-weight: 600; overflow-wrap: anywhere; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.appts li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.appts li:last-child { border-bottom: 0; }
.appts time { flex: none; width: 66px; font-weight: 800; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.appts a { display: grid; flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.appts a:hover strong { color: var(--accent); }
.appts small { color: var(--ink-2); font-size: 13px; }
.clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appt-end { display: flex; flex: none; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; }

.pipe { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.pipe button { display: flex; flex-direction: column; width: 100%; padding: 11px 22px 11px 18px; border: 0; background: var(--surface); text-align: left; cursor: pointer; clip-path: polygon(0 0, calc(100% - 13px) 0, 100% 50%, calc(100% - 13px) 100%, 0 100%); }
.pipe button:hover { background: var(--accent-tint); }
.pipe button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.pipe button:focus-visible { outline-offset: -5px; }
.pipe strong { font: 700 24px/1.15 var(--head); }
.pipe span { font-size: 13.5px; font-weight: 600; }

/* ---------- the front desk: list, chat, customer record ---------- */
.app.is-desk .page { display: flex; flex-direction: column; max-width: none; height: calc(100vh - var(--top) - var(--bar)); min-height: 520px; padding: 0; }
.app-body.is-embed .app.is-desk .page { height: auto; }
.desk { display: grid; flex: 1; grid-template-columns: 330px minmax(0, 1fr) 340px; min-height: 0; background: var(--surface); }
.desk > .pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; margin: 0; }
.pane-list { border-right: 1px solid var(--line); }
.pane-record { border-left: 1px solid var(--line); }
.pane-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; padding: 12px 12px 10px; border-bottom: 1px solid var(--line); }
.pane-title { display: flex; align-items: baseline; justify-content: space-between; }
.pane-title h1 { font-size: 21px; }
.pane-title span { color: var(--ink-2); font-size: 13px; }
.pane-head .searchfield { flex: none; }
.pane-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.thread { display: flex; gap: 11px; padding: 11px 12px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.thread:hover { background: #f6f9f6; }
.thread.is-active { background: #eaf6ed; box-shadow: inset 3px 0 0 var(--accent); }
.thread-main { display: grid; flex: 1; gap: 2px; min-width: 0; }
.thread-top { display: flex; justify-content: space-between; gap: 8px; }
.thread-top strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; }
.thread-top time { flex: none; color: var(--ink-2); font-size: 12px; }
.thread-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); font-size: 13.5px; }
.is-unread .thread-text { color: var(--ink); font-weight: 700; }
.thread-tags { display: flex; align-items: center; justify-content: space-between; margin-top: 2px; }
.unread { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 12px; }
.chat-head { display: flex; align-items: center; gap: 11px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.chat-head > div { flex: 1; min-width: 0; }
.chat-head h2 { font-size: 17px; line-height: 1.25; }
.chat-head p { color: var(--ink-2); font-size: 12.5px; }
.chat-head [data-narrow] { display: none; }
.messages { display: flex; flex: 1; flex-direction: column; gap: 10px; min-height: 0; overflow-y: auto; padding: 16px 20px; background: var(--bg); }
.messages > li:first-child { margin-top: auto; }
.day { align-self: center; color: var(--ink-2); font-size: 12.5px; font-weight: 700; text-align: center; }
.msg { max-width: min(78%, 460px); }
.msg p { padding: 9px 13px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg small { display: block; margin-top: 3px; color: var(--ink-2); font-size: 12px; }
.msg-in { align-self: flex-start; }
.msg-out { align-self: flex-end; text-align: right; }
.msg-out p { text-align: left; background: var(--accent-tint); border-color: #bfe2c9; }
.composer { display: grid; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--surface); }
.composer textarea { width: 100%; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: var(--radius); resize: none; }
.composer-row { display: flex; justify-content: space-between; gap: 8px; }
.record { padding: 16px; }
.record-id { display: flex; align-items: center; gap: 12px; }
.record-id h2 { font-size: 18px; line-height: 1.2; }
.record-id p { color: var(--ink-2); font-size: 14px; }
.stages { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; margin: 14px 0 8px; }
.stages li { padding-top: 9px; border-top: 5px solid var(--line); color: var(--ink-2); font-size: 12px; font-weight: 700; }
.stages li.is-past { border-color: #8fc7a0; }
.stages li.is-now { border-color: var(--accent); color: var(--accent-dark); font-weight: 800; }
.lost-note { margin: 14px 0 8px; padding: 9px 12px; border-radius: var(--radius); background: var(--soft); font-size: 14px; }
.record .facts > div { grid-template-columns: 96px minmax(0, 1fr); }
.record-block { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.record-block > .btn { margin-top: 10px; }
.record-block ul { margin-top: 6px; }
.record-block li + li { margin-top: 6px; }
.mini { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius); color: inherit; text-decoration: none; }
.mini:hover { border-color: var(--accent); }
.mini > span:first-child { display: grid; min-width: 0; font-size: 13.5px; line-height: 1.35; }
.mini small { color: var(--ink-2); font-size: 12.5px; }
.mini-note { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 5px; color: var(--warn); font-size: 13px; font-weight: 600; }
.plain li + li { margin-top: 8px; }
.quotes li { padding-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 14px; }

/* ---------- calendar ---------- */
.cal-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.cal-nav { display: flex; gap: 6px; }
.cal-nav .btn { min-height: 36px; }
.cal-head, .cal-body { display: grid; grid-template-columns: 58px repeat(var(--cols), minmax(0, 1fr)); }
.cal-head { border-bottom: 1px solid var(--line-2); }
.cal-head > div { display: grid; padding: 9px 10px; border-left: 1px solid var(--line); line-height: 1.3; }
.cal-head div span { color: var(--ink-2); font-size: 12.5px; }
.cal-body { grid-template-columns: 58px minmax(0, 1fr); padding: 10px 0; }
.cal-times { position: relative; }
.cal-times span { position: absolute; right: 8px; transform: translateY(-50%); color: var(--ink-2); font-size: 12px; white-space: nowrap; }
.cal-cols { position: relative; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); }
.cal-col { position: relative; border-left: 1px solid var(--line); background: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 72px); }
.cal-col .off { position: absolute; left: 0; right: 0; background: #edf0ee; border-top: 1px solid var(--line); }
.cal-col .off span { position: absolute; top: 8px; left: 10px; color: var(--ink-2); font-size: 12px; font-style: normal; font-weight: 700; }
.cal-col .off span:only-child { line-height: 1.2; }
.slot-cell { position: absolute; left: 3px; right: 3px; height: 35px; border: 1px dashed transparent; border-radius: 6px; background: none; color: var(--accent-dark); font-size: 12.5px; font-weight: 700; cursor: pointer; }
.slot-cell span { opacity: 0; }
.slot-cell:hover, .slot-cell:focus-visible { border-color: var(--accent); background: #f1f9f3; }
.slot-cell:hover span, .slot-cell:focus-visible span { opacity: 1; }
.appt { position: absolute; z-index: 2; left: 3px; right: 3px; display: flex; flex-direction: column; padding: 3px 8px; border: 1px solid #9fd0ae; border-left: 4px solid var(--accent); border-radius: 6px; background: var(--accent-tint); color: var(--ink); font-size: 12.5px; line-height: 1.25; text-decoration: none; overflow: hidden; }
.appt strong, .appt span { flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appt.is-short { padding-top: 1px; padding-bottom: 1px; line-height: 1.2; }
.appt:hover { box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .4); }
.appt-done { background: #e4e6f3; border-color: #bdc1e0; border-left-color: #4a529c; }
.appt-noshow { background: var(--danger-tint); border-color: #efbfc3; border-left-color: var(--danger); }
.cal-cols .now { position: absolute; z-index: 1; left: 0; right: 0; height: 2px; background: #d4532a; pointer-events: none; }
.cal-cols .now span { position: absolute; right: 100%; top: -9px; margin-right: 4px; padding: 1px 4px; border-radius: 4px; background: #a8391a; color: #fff; font-size: 11px; font-style: normal; font-weight: 700; white-space: nowrap; }

.tpl-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tpl-list a { display: grid; align-content: start; gap: 8px; height: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); color: var(--ink-2); text-decoration: none; }
.tpl-list a:hover { border-color: var(--accent); }
.tpl-top { display: flex; justify-content: space-between; gap: 10px; color: var(--ink); }
.tpl-body { margin-bottom: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--accent-tint); }

/* ---------- popups ---------- */
dialog { width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); padding: 0; border: 0; border-radius: var(--radius-lg); color: var(--ink); overflow: hidden; box-shadow: 0 30px 70px -20px rgba(14, 30, 20, .55); }
dialog[open] { display: flex; flex-direction: column; }
dialog::backdrop { background: rgba(16, 28, 20, .55); }
dialog.is-side { width: min(400px, calc(100vw - 48px)); height: 100dvh; max-height: 100dvh; margin: 0 0 0 auto; border-radius: var(--radius-lg) 0 0 var(--radius-lg); }
.dlg { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.dlg-head { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.dlg-head h2 { font-size: 19px; }
.dlg-body { min-height: 0; padding: 16px 18px 18px; overflow-y: auto; overscroll-behavior: contain; }
.dlg-body form > * + *, .dlg-body > * + * { margin-top: 12px; }
.is-side .dlg-body { padding: 0; }
.dlg-actions { position: sticky; bottom: -18px; display: flex; justify-content: flex-end; gap: 8px; margin: 14px -18px -18px; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--surface); }
.dlg-lead { color: var(--ink-2); }
.field { display: grid; gap: 4px; min-width: 0; align-content: start; }
.field > label, .field > legend { font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.field > legend { padding: 0; margin-bottom: 4px; }
.field input:not([type="checkbox"]), .field select, .field textarea { width: 100%; min-width: 0; min-height: 42px; padding: 8px 11px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); }
.field small { color: var(--ink-2); font-size: 12.5px; }
.field [aria-invalid="true"], .composer [aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.field-error { color: var(--danger); font-size: 13.5px; font-weight: 700; }
.form-error { padding: 9px 12px; border-radius: var(--radius); background: var(--danger-tint); color: var(--danger); font-weight: 700; }
.field-row, .field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.field-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.check { display: flex; align-items: center; gap: 9px; min-height: 36px; cursor: pointer; font-size: 14px; }
.check input { flex: none; width: 19px; height: 19px; margin: 0; accent-color: var(--accent); }
.checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; }
.checks-days { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.preview-msg span { font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.preview-msg p { margin-top: 4px; padding: 10px 13px; border-radius: var(--radius-lg); background: var(--accent-tint); overflow-wrap: anywhere; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; max-height: 172px; overflow-y: auto; padding: 3px; }
.slots button { min-height: 38px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); font-size: 13.5px; font-weight: 700; cursor: pointer; }
.slots button:hover { border-color: var(--accent); }
.slots button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.loading { padding: 12px 0; color: var(--ink-2); animation: pulse .9s ease-in-out infinite alternate; }
@keyframes pulse { to { opacity: .4; } }
.samples li + li { margin-top: 8px; }
.samples button { display: grid; gap: 4px; width: 100%; padding: 11px 13px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); text-align: left; cursor: pointer; }
.samples button:hover { border-color: var(--accent); background: #f4faf5; }
.samples strong { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; }
.samples strong span { color: var(--ink-2); font-size: 13px; font-weight: 600; }
.menu-actions { display: grid; gap: 8px; }

.toasts { position: fixed; z-index: 60; right: 16px; bottom: 16px; display: grid; gap: 8px; max-width: min(400px, calc(100vw - 32px)); pointer-events: none; }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 11px 15px; border-radius: var(--radius); background: var(--navy); color: #fff; box-shadow: 0 12px 28px -12px rgba(14, 30, 20, .6); }
.toast .icon { margin-top: 2px; color: #8fe0a8; }
.toast-warn .icon { color: #ffc35c; }

/* ---------- role screen ---------- */
.signin { max-width: 760px; margin: 0 auto; padding: 44px 20px 64px; text-align: center; }
.signin h1 { margin-top: 30px; font-size: clamp(27px, 4vw, 36px); line-height: 1.15; }
.signin-sub { max-width: 56ch; margin: 10px auto 0; color: var(--ink-2); }
.roles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 24px; text-align: left; }
.role { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; width: 100%; height: 100%; padding: 22px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-lg); text-align: left; cursor: pointer; transition: border-color .15s, transform .15s; }
.role:hover { border-color: var(--accent); transform: translateY(-2px); }
.role-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: var(--radius); background: var(--accent-tint); color: var(--accent-dark); }
.role-icon .icon { width: 24px; height: 24px; }
.role-title { margin-top: 10px; font: 700 21px/1.2 var(--head); }
.role-name { color: var(--accent-dark); font-weight: 700; }
.role-short { display: none; }
.role-points { display: grid; gap: 7px; margin-top: 12px; color: var(--ink-2); }
.role-points > span { display: flex; gap: 8px; }
.role-points .icon { width: 16px; height: 16px; margin-top: 3px; color: var(--ok); }

/* ---------- narrower desktops: the record opens as a side panel ---------- */
@media (max-width: 1199px) { .who > span:not(.avatar) { display: none; } .topbar { gap: 12px; padding: 0 12px; } .topnav a { padding: 3px 8px 0; font-size: 14px; } }
@media (max-width: 1099px) {
  .desk { grid-template-columns: 300px minmax(0, 1fr); }
  .desk > .pane-record { display: none; }
  .chat-head [data-narrow] { display: inline-flex; }
  .grid-main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .grid-2, .tpl-list { grid-template-columns: minmax(0, 1fr); }
  .desk { grid-template-columns: 270px minmax(0, 1fr); }
  .summary { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary li:nth-child(odd) { border-left: 0; }
  .summary li:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* Loading placeholder shown while a screen opens */
.page-skel { display: grid; grid-column: 1 / -1; align-content: start; gap: 14px; width: 100%; min-width: 0; padding: 2px; }
.page-skel i { display: block; height: 96px; border-radius: var(--radius-lg, 8px); background: linear-gradient(90deg, rgba(100, 112, 128, .13) 25%, rgba(100, 112, 128, .05) 50%, rgba(100, 112, 128, .13) 75%); background-size: 200% 100%; animation: skel-shimmer 1s linear infinite; }
.page-skel .sk-title { width: min(280px, 70%); height: 30px; }
.page-skel .sk-line { width: min(420px, 90%); height: 14px; }
.page-skel > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.page-skel .sk-block { height: 280px; }
@keyframes skel-shimmer { to { background-position: -200% 0; } }
@media (max-width: 760px) { .page-skel > div { grid-template-columns: minmax(0, 1fr); } .page-skel > div i { height: 68px; } }
.page-in > * { animation: page-in .3s ease-out both; }
@keyframes page-in { from { opacity: 0; } }
.page-skel.is-flush { box-sizing: border-box; padding: 22px 24px; }
