/* PHL ProSys — brand UI
   Colors come from the Red Hot Leads logo. Headings: Archivo. Body: Manrope. */

:root {
	--ink: #1F1512;
	--muted: #6E5F58;
	--faint: #9A8A83;
	--line: #EDE4DF;
	--line-2: #F3ECE8;
	--canvas: #FBF8F6;
	--card: #FFFFFF;
	--night: #160806;
	--night-2: #24110D;
	--night-text: #E6D6CF;
	--night-muted: #C9A89C;
	--red-900: #820E00;
	--red-700: #A51200;
	--red-600: #C02104;
	--red-500: #CB4A1A;
	--orange: #FD4502;
	--blush: #FFF3EE;
	--blush-2: #FDE4DA;
	--success: #1E7A46;
	--success-bg: #E7F4EC;
	--success-dot: #1E9E57;
	--review: #2A4A9A;
	--review-bg: #E8EEFB;
	--amber: #8A5200;
	--amber-bg: #FDF1DC;
	--danger: #B42318;
	--danger-bg: #FDECEA;
	--grad: linear-gradient(135deg, #820E00, #C02104 55%, #FD4502);
	--grad-btn: linear-gradient(135deg, #820E00, #C02104);
	--radius: 14px;
	--shadow: 0 1px 2px rgba(31, 21, 18, .04);
	--shadow-lg: 0 18px 50px rgba(31, 21, 18, .16);
	--font-h: 'Archivo', system-ui, sans-serif;
	--font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.rhl { background: var(--canvas); color: var(--ink); font-family: var(--font); font-size: 14.5px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
.rhl a { color: var(--red-700); }
.rhl a:hover { color: var(--red-900); }
.rhl h1, .rhl h2, .rhl h3, .rhl h4 { font-family: var(--font-h); margin: 0; letter-spacing: -.01em; }
.rhl button, .rhl input, .rhl select, .rhl textarea { font-family: inherit; font-size: inherit; color: inherit; }
.rhl [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.boot { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.boot img { width: 220px; opacity: .85; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- Buttons & inputs ---------- */
.rhl .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid #E3D5CE; background: #fff; color: var(--ink); font-weight: 700; font-size: 13.5px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .06s ease, box-shadow .15s ease, background .15s ease; }
.rhl .btn:hover { background: var(--canvas); color: var(--ink); }
.rhl .btn:active { transform: translateY(1px); }
.rhl .btn:disabled { opacity: .55; cursor: not-allowed; }
.rhl .btn-primary { border: 0; background: var(--grad-btn); color: #fff; box-shadow: 0 8px 18px rgba(192, 33, 4, .28); }
.rhl .btn-primary:hover { background: linear-gradient(135deg, #6f0c00, #A51200); color: #fff; }
.rhl .btn-dark { border: 0; background: var(--ink); color: #fff; }
.rhl .btn-dark:hover { background: #000; color: #fff; }
.rhl .btn-success { border: 0; background: var(--success); color: #fff; }
.rhl .btn-success:hover { background: #17633a; color: #fff; }
.rhl .btn-ghost { border-color: transparent; background: transparent; }
.rhl .btn-ghost:hover { background: var(--line-2); }
.rhl .btn-danger { color: var(--danger); }
.rhl .btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; }
.rhl .btn-xs { height: 26px; padding: 0 9px; font-size: 12px; border-radius: 8px; }
.rhl .btn-block { width: 100%; }
.rhl .btn-icon { width: 36px; height: 36px; padding: 0; }
.rhl .btn svg { flex-shrink: 0; }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--ink); }
.field .hint { font-weight: 500; color: var(--muted); font-size: 12.5px; }
.input, .rhl input[type=text], .rhl input[type=email], .rhl input[type=password], .rhl input[type=url], .rhl input[type=number], .rhl input[type=date], .rhl input[type=time], .rhl input[type=datetime-local], .rhl input[type=search], .rhl select, .rhl textarea {
	width: 100%; min-height: 40px; padding: 9px 12px; border-radius: 10px; border: 1px solid #E3D5CE; background: #fff; font-weight: 500; font-size: 14px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.rhl textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.rhl input:focus, .rhl select:focus, .rhl textarea:focus { border-color: var(--red-500); box-shadow: 0 0 0 3px rgba(203, 74, 26, .15); }
.rhl :focus-visible { outline: 2px solid var(--red-500); outline-offset: 2px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--red-600); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }

/* ---------- Chips / badges ---------- */
.rhl .chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 12px; font-size: 12px; font-weight: 700; background: var(--line-2); color: var(--muted); white-space: nowrap; }
.rhl .chip-success { background: var(--success-bg); color: var(--success); }
.rhl .chip-review { background: var(--review-bg); color: var(--review); }
.rhl .chip-amber { background: var(--amber-bg); color: var(--amber); }
.rhl .chip-red { background: var(--blush-2); color: var(--red-900); }
.rhl .chip-danger { background: var(--danger-bg); color: var(--danger); }
.rhl .chip-dark { background: var(--ink); color: #fff; }
.dot { width: 8px; height: 8px; border-radius: 4px; background: var(--success-dot); display: inline-block; flex-shrink: 0; }
.dot.live { box-shadow: 0 0 0 0 rgba(30, 158, 87, .5); animation: live 1.8s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 7px rgba(30, 158, 87, 0); } 100% { box-shadow: 0 0 0 0 rgba(30, 158, 87, 0); } }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--blush-2); color: var(--red-900); font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.avatar.dark { background: var(--ink); color: #fff; }
.avatar.sys { background: var(--line-2); color: var(--muted); }
.avatar.lg { width: 44px; height: 44px; font-size: 14px; }
.avatar.sm { width: 26px; height: 26px; font-size: 10.5px; }

.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.rhl .pill { height: 30px; padding: 0 12px; border-radius: 15px; border: 1px solid var(--line); background: #fff; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.rhl .pill.on { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 700; }

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2 { font-size: 19px; font-weight: 700; }
.card-head h3 { font-size: 16px; font-weight: 700; }
.card.flush { padding: 0; overflow: hidden; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.strong { font-weight: 700; }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--red-700); }
.label-cap { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.empty { padding: 34px 16px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink); font-family: var(--font-h); font-size: 16px; margin-bottom: 4px; }
.divider { height: 1px; background: var(--line-2); margin: 16px 0; }
.pre { white-space: pre-wrap; word-break: break-word; }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); }
.tile .num { font-family: var(--font-h); font-size: 30px; font-weight: 800; line-height: 1.1; }
.tile .num small { font-size: 16px; color: var(--muted); font-weight: 700; margin-left: 4px; }
.tile.hot { background: linear-gradient(135deg, var(--blush), #fff 70%); border-color: #F3C9B8; }
.tile.hot .label-cap { color: var(--red-700); }
.bar { height: 6px; border-radius: 3px; background: #F3E7E1; overflow: hidden; }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, #A51200, #CB4A1A); border-radius: 3px; }

.alert { padding: 12px 14px; border-radius: 12px; font-size: 13.5px; font-weight: 600; display: flex; gap: 10px; align-items: flex-start; }
.alert-error { background: var(--danger-bg); color: var(--danger); }
.alert-warn { background: var(--amber-bg); color: var(--amber); }
.alert-info { background: var(--review-bg); color: var(--review); }
.alert-hot { background: linear-gradient(135deg, var(--blush), #fff); border: 1px solid #F3C9B8; color: var(--red-900); }

/* ---------- App layout ---------- */
.layout { display: flex; min-height: 100vh; background: linear-gradient(90deg, var(--night) 0 248px, transparent 248px); }
.sidebar { width: 248px; flex-shrink: 0; background: var(--night); display: flex; flex-direction: column; padding: 28px 16px 20px; gap: 28px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; flex-direction: column; gap: 10px; padding: 0 8px; }
.brand img { width: 196px; height: auto; display: block; }
.brand span { font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--night-muted); }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px; color: var(--night-text); text-decoration: none; font-weight: 600; font-size: 14px; }
.nav a:hover { background: var(--night-2); color: #fff; }
.nav a.on { background: var(--grad-btn); color: #fff; font-weight: 700; box-shadow: 0 8px 20px rgba(192, 33, 4, .35); }
.nav a .badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--orange); color: var(--night); font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.nav .sep { height: 1px; background: #2c1712; margin: 10px 6px; }
.nav .group { font-size: 10.5px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: #8f7168; padding: 8px 14px 4px; }
.me-card { margin-top: auto; display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--night-2); }
.me-card .avatar { background: linear-gradient(135deg, #CB4A1A, #FD4502); color: var(--night); width: 38px; height: 38px; }
.me-card .who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.me-card .who b { color: #fff; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-card .who small { color: var(--night-muted); font-size: 12px; }
.me-card a { color: var(--night-muted); display: inline-flex; }
.me-card a:hover { color: #fff; }

.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.topline { height: 3px; background: var(--grad); }
.topbar { height: 72px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 36px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.weekpick { display: flex; align-items: center; gap: 12px; min-width: 0; }
.weekpick .lbl { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.weekpick .lbl b { font-family: var(--font-h); font-size: 17px; white-space: nowrap; }
.weekpick .lbl small { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.topbar .tools { display: flex; align-items: center; gap: 10px; }
.clock { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: var(--blush); color: var(--red-900); font-size: 13px; font-weight: 700; white-space: nowrap; }
.rhl .cmd-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--canvas); color: var(--muted); cursor: pointer; font-size: 13px; min-width: 220px; }
.rhl .cmd-btn kbd { margin-left: auto; font-family: var(--font); font-size: 11px; font-weight: 700; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; background: #fff; color: var(--muted); }
.rhl .menu-btn { display: none; }
.content { padding: 28px 36px 60px; display: flex; flex-direction: column; gap: 22px; max-width: 1480px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 30px; font-weight: 800; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 22px; align-items: start; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }

/* ---------- Feed ---------- */
.feed-day { margin-top: 16px; }
.feed-item { display: flex; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line-2); }
.feed-item:last-child { border-bottom: 0; }
.feed-time { width: 64px; flex-shrink: 0; font-size: 12.5px; color: var(--muted); padding-top: 7px; }
.feed-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.feed-body .line { font-size: 14.5px; line-height: 1.45; }
.feed-body .sub { font-size: 13px; color: var(--muted); }
.feed-body .quote { font-size: 13.5px; background: var(--canvas); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; white-space: pre-wrap; word-break: break-word; }
.feed-item.update .quote { background: linear-gradient(135deg, var(--blush), #fff 80%); border-color: #F6D5C8; }
.feed-more { display: flex; justify-content: center; padding: 14px 0 6px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tfoot td { font-weight: 800; border-top: 1px solid var(--line); }
.tbl td.zero { color: #cbbdb6; }

/* ---------- Tasks ---------- */
.task-group { display: flex; flex-direction: column; gap: 10px; }
.task-group > h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.task { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; gap: 14px; align-items: flex-start; box-shadow: var(--shadow); }
.task.is-done { background: #FCFEFD; }
.task .tick { width: 26px; height: 26px; border-radius: 8px; border: 2px solid #D8C8C1; background: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; margin-top: 1px; color: #fff; padding: 0; }
.task .tick:hover:not(:disabled):not([aria-disabled="true"]) { border-color: var(--red-500); }
.task .tick[aria-disabled="true"] { cursor: not-allowed; opacity: .9; }
.step.readonly input { cursor: not-allowed; }
.task .tick.pending { background: var(--review); border-color: var(--review); }
.task .tick.done { background: var(--success); border-color: var(--success); }
.task .tick:disabled { cursor: default; opacity: .9; }
.task .tick.hold { background: var(--amber-bg); border-color: #EBC98F; color: var(--amber); }
.task-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.task-title { font-weight: 700; font-size: 14.5px; line-height: 1.4; }
.task.is-done .task-title { color: var(--muted); }
.task-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); }
.task-desc { font-size: 13.5px; color: #3d302b; white-space: pre-wrap; word-break: break-word; }
.task-side { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; flex-shrink: 0; }
.steps { display: flex; flex-direction: column; gap: 4px; margin-top: 2px; }
.step { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; padding: 4px 0; cursor: pointer; }
.step input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--success); flex-shrink: 0; }
.step.done span { color: var(--muted); text-decoration: line-through; }
.step.readonly { cursor: default; }
.prio-high { color: var(--red-700); font-weight: 800; }
.flag { font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; background: var(--blush-2); color: var(--red-900); }

/* ---------- Drawer & modal ---------- */
.overlay { position: fixed; inset: 0; background: rgba(22, 8, 6, .42); z-index: 80; display: flex; justify-content: flex-end; animation: fade .15s ease; }
.overlay.center { justify-content: center; align-items: center; padding: 20px; }
@keyframes fade { from { opacity: 0; } }
.drawer { width: min(620px, 100%); height: 100%; background: #fff; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slide .2s ease; }
@keyframes slide { from { transform: translateX(30px); opacity: .6; } }
.drawer-head { padding: 20px 24px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.drawer-head h2 { font-size: 19px; }
.drawer-body { padding: 20px 24px 40px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 18px; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); padding: 24px; animation: pop .16s ease; }
.modal.wide { width: min(760px, 100%); }
@keyframes pop { from { transform: scale(.97); opacity: .5; } }
.modal h2 { font-size: 20px; margin-bottom: 6px; }
.modal .lead { color: var(--muted); margin: 0 0 16px; }

.notes { display: flex; flex-direction: column; gap: 10px; }
.note { display: flex; gap: 10px; }
.note .bubble { background: var(--canvas); border: 1px solid var(--line-2); border-radius: 12px; padding: 9px 12px; flex: 1; min-width: 0; }
.note .bubble .who { font-size: 12.5px; font-weight: 700; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.note .bubble .txt { font-size: 13.5px; white-space: pre-wrap; word-break: break-word; margin-top: 2px; }
.note.staff .bubble { background: var(--amber-bg); border-color: #F2DDB6; }
.files { display: flex; flex-wrap: wrap; gap: 8px; }
.rhl .file { display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; border-radius: 9px; border: 1px solid var(--line); background: var(--canvas); color: var(--ink); text-decoration: none; font-size: 12.5px; font-weight: 600; max-width: 100%; }
.rhl .file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rhl .file:hover { border-color: #E3C5B8; color: var(--ink); }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.thumbs a { display: block; width: 88px; height: 66px; border-radius: 9px; overflow: hidden; border: 1px solid var(--line); background: var(--canvas); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 12px; font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow-lg); animation: pop .16s ease; max-width: min(520px, 92vw); }
.toast.error { background: var(--danger); }
.toast.ok { background: var(--success); }

/* ---------- Command palette ---------- */
.palette { width: min(620px, 100%); background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; align-self: flex-start; margin-top: 12vh; animation: pop .14s ease; }
.palette input { border: 0 !important; border-bottom: 1px solid var(--line) !important; border-radius: 0 !important; min-height: 56px !important; font-size: 16px !important; padding: 0 18px !important; box-shadow: none !important; }
.palette ul { list-style: none; margin: 0; padding: 6px; max-height: 360px; overflow-y: auto; }
.palette li { padding: 10px 12px; border-radius: 10px; display: flex; justify-content: space-between; gap: 12px; cursor: pointer; font-size: 14px; }
.palette li small { color: var(--muted); }
.palette li.on { background: var(--blush); }
.palette .hint { padding: 10px 16px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line-2); }

/* ---------- Check-in (hero) ---------- */
.hero { position: relative; overflow: hidden; border-radius: 20px; padding: 24px 26px; color: #fff; background: var(--night); box-shadow: 0 18px 40px rgba(22, 8, 6, .25); }
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 140% at 100% 0%, rgba(253, 69, 2, .55), rgba(192, 33, 4, .25) 40%, transparent 70%); pointer-events: none; }
.hero > * { position: relative; }
.hero .eyebrow { color: #FFB598; }
.hero .timer { font-family: var(--font-h); font-size: 44px; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.hero .muted { color: var(--night-muted); }
.hero .btn { border: 0; }
.hero .btn-light { background: #fff; color: var(--night); }
.hero .btn-light:hover { background: #fff3ee; }
.hero .btn-outline { background: rgba(255, 255, 255, .08); color: #fff; border: 1px solid rgba(255, 255, 255, .22); }
.hero .btn-outline:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.hero select { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .25); }
.hero select option { color: var(--ink); }
.hero .row-between { align-items: flex-end; }
.hero-stats { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 14px; font-size: 13px; }
.hero-stats b { display: block; font-size: 17px; font-family: var(--font-h); color: #fff; }

/* Days bar chart */
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: end; height: 150px; }
.days .d { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.days .col { width: 100%; max-width: 34px; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, #FD4502, #A51200); min-height: 3px; }
.days .col.zero { background: #F3E7E1; }
.days .d small { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.days .d b { font-size: 11.5px; }
.days .d.today small { color: var(--red-700); }

/* ---------- Report ---------- */
.report-sheet { background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.report-cover { padding: 28px 32px; background: var(--night); color: #fff; position: relative; overflow: hidden; }
.report-cover::before { content: ''; position: absolute; inset: 0; background: radial-gradient(100% 160% at 100% 0%, rgba(253, 69, 2, .5), transparent 65%); }
.report-cover > * { position: relative; }
.report-cover img { width: 180px; display: block; margin-bottom: 18px; }
.report-cover h1 { font-size: 28px; }
.report-cover p { margin: 6px 0 0; color: var(--night-muted); }
.report-body { padding: 26px 32px 34px; display: flex; flex-direction: column; gap: 26px; }
.report-body h2 { font-size: 18px; margin-bottom: 10px; }
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.kpi { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.kpi b { display: block; font-family: var(--font-h); font-size: 24px; }
.kpi span { font-size: 12px; color: var(--muted); font-weight: 700; }
.list-clean { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.list-clean li { display: flex; gap: 8px; align-items: baseline; font-size: 13.5px; }

/* ---------- Login & message ---------- */
.rhl-login, .rhl-message { min-height: 100vh; }
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-brand { background: var(--night); color: #fff; padding: 56px 64px; display: flex; flex-direction: column; justify-content: center; gap: 18px; position: relative; overflow: hidden; }
.login-brand::before { content: ''; position: absolute; inset: 0; background: radial-gradient(90% 120% at 100% 0%, rgba(253, 69, 2, .55), rgba(192, 33, 4, .25) 40%, transparent 70%); }
.login-brand > * { position: relative; }
.login-logo { width: min(380px, 80%); height: auto; }
.login-brand h1 { font-size: 38px; font-weight: 800; }
.login-brand p { color: var(--night-muted); font-size: 16px; max-width: 460px; margin: 0; }
.login-brand ul { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; color: var(--night-text); }
.login-brand li::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 4px; background: var(--orange); margin-right: 10px; }
.login-form { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 24px; gap: 18px; }
.login-form form { width: min(380px, 100%); display: flex; flex-direction: column; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 28px; box-shadow: 0 10px 30px rgba(31, 21, 18, .06); }
.login-form h2 { font-size: 24px; }
.login-form label:not(.check) { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; }
.muted-link { text-align: center; font-size: 13px; }
.login-foot { font-size: 12.5px; color: var(--faint); margin: 0; }
.message-card { max-width: 460px; margin: 12vh auto; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 34px; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.message-logo { width: 220px; }
.message-card h1 { font-size: 22px; }
.message-card p { color: var(--muted); margin: 0 0 8px; }

/* ---------- Member page ---------- */
.m-top { background: var(--night); color: #fff; }
.m-top .inner { max-width: 1100px; margin: 0 auto; padding: 16px 22px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.m-top img { width: 170px; display: block; }
.m-top .who { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.m-top .who .avatar { background: linear-gradient(135deg, #CB4A1A, #FD4502); color: var(--night); }
.m-top .who small { display: block; color: var(--night-muted); font-weight: 600; font-size: 12px; }
.m-top .who-name { min-width: 0; }
.m-top .who-name span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.m-clock { color: var(--night-muted); font-weight: 700; white-space: nowrap; }
.m-wrap { max-width: 1100px; margin: 0 auto; padding: 22px 22px 70px; display: flex; flex-direction: column; gap: 20px; }
.m-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.m-weekbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.m-weekbar select { width: auto; min-width: 260px; font-weight: 700; }
.readonly-note { display: inline-flex; gap: 6px; align-items: center; }
.sheet { position: fixed; inset: auto 0 0 0; background: #fff; border-radius: 20px 20px 0 0; box-shadow: var(--shadow-lg); padding: 22px; max-height: 90vh; overflow-y: auto; animation: up .2s ease; }
@keyframes up { from { transform: translateY(40px); opacity: .6; } }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
	.split { grid-template-columns: minmax(0, 1fr); }
	.tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.cmd-btn { min-width: 0; }
	.cmd-btn .t { display: none; }
}
@media (max-width: 900px) {
	.layout { background: none; }
	.sidebar { position: fixed; left: 0; top: 0; z-index: 90; transform: translateX(-100%); transition: transform .2s ease; }
	body.nav-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
	.rhl .menu-btn { display: inline-flex; }
	.topbar { padding: 0 16px; height: 64px; }
	.content { padding: 20px 16px 60px; }
	.clock .t { display: none; }
	.m-grid { grid-template-columns: minmax(0, 1fr); }
	.login { grid-template-columns: 1fr; }
	.login-brand { padding: 36px 26px; }
	.login-brand h1 { font-size: 28px; }
	.grid-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
	.topbar { gap: 8px; padding: 0 10px; }
	.topbar .clock, .topbar .tools > span:first-child { display: none; }
	.rhl .cmd-btn { min-width: 0; width: 40px; padding: 0; justify-content: center; }
	.rhl .cmd-btn kbd { display: none; }
	.weekpick { gap: 6px; }
	.weekpick .btn-icon { width: 32px; height: 32px; }
	.weekpick .lbl b { font-size: 14px; white-space: normal; line-height: 1.2; }
	.page-head .actions { width: 100%; }
	.page-head .actions .btn { flex: 1; }
	.tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.tile { padding: 14px; }
	.tile .num { font-size: 24px; }
	.tile .label-cap { font-size: 11px; }
	.form-grid { grid-template-columns: minmax(0, 1fr); }
	.page-head h1 { font-size: 24px; }
	.weekpick .lbl small { display: none; }
	.feed-time { display: none; }
	.hero .timer { font-size: 36px; }
	.task { flex-wrap: wrap; }
	.task-side { flex-direction: row; align-items: center; width: 100%; justify-content: flex-start; padding-left: 40px; }
	.kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.m-top img { width: 130px; }
	.m-top .inner { padding: 14px 16px; }
	.m-clock, .m-top .who small { display: none !important; }
	.m-top .who-name span { max-width: 120px; font-size: 13.5px; }
	.m-wrap { padding: 16px 14px 60px; }
	.m-weekbar select { min-width: 0; width: 100%; }
	.card { padding: 18px; }
	.report-body, .report-cover { padding: 20px; }
	.drawer-head, .drawer-body { padding-left: 18px; padding-right: 18px; }
}

/* ---------- Print (reports) ---------- */
@media print {
	body.rhl { background: #fff; }
	.sidebar, .topbar, .topline, .no-print, .toasts { display: none !important; }
	.content { padding: 0; max-width: none; }
	.report-sheet { border: 0; box-shadow: none; }
	.report-cover { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
	.card, .task { break-inside: avoid; }
}

.rhl .btn-ghost.btn-xs { color: var(--red-700); padding-left: 0; padding-right: 6px; }
.rhl .btn-ghost.btn-xs:hover { background: transparent; text-decoration: underline; }

/* =========================================================
   Phase 2 — Visual guides (Developer Handoff) & blueprints
   ========================================================= */
:root {
	--g-red: #C42B1C; --g-red-bg: #FDECEA;
	--g-green: #1E7A46; --g-green-bg: #E7F4EC;
	--g-blue: #2A56C6; --g-blue-bg: #E8EEFB;
	--g-amber: #B26A00; --g-amber-bg: #FDF1DC;
	--g-purple: #6B3FA0; --g-purple-bg: #F1EAFB;
}
.guide { background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.guide-head { position: relative; overflow: hidden; background: var(--night); color: #fff; padding: 28px 32px 26px; }
.guide-head::before { content: ''; position: absolute; inset: 0; background: radial-gradient(100% 160% at 100% 0%, rgba(253, 69, 2, .5), transparent 65%); }
.guide-head > * { position: relative; }
.guide-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: #FFB598; border: 1px solid rgba(255, 181, 152, .45); border-radius: 999px; padding: 4px 12px; }
.guide-head h1 { font-size: 28px; margin-top: 12px; }
.guide-head .sum { color: var(--night-text); margin: 6px 0 0; max-width: 760px; }
.guide-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.guide-meta div { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.guide-meta small { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--night-muted); }
.guide-meta b { display: block; font-size: 14px; margin-top: 2px; overflow-wrap: anywhere; }
.guide-body { padding: 26px 32px 34px; display: flex; flex-direction: column; gap: 26px; }
.guide-body > section > h2 { font-size: 18px; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.howto-loop { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.howto-loop span.step { background: var(--canvas); border: 1px solid var(--line); border-radius: 10px; padding: 7px 12px; font-size: 13px; font-weight: 700; }
.howto-loop .arr { color: var(--faint); font-weight: 800; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.legend i { display: inline-block; width: 18px; height: 12px; border-radius: 3px; border: 2px solid; vertical-align: -2px; margin-right: 6px; }
.scope-note { margin-top: 12px; font-size: 13px; background: var(--amber-bg); color: var(--amber); border-radius: 10px; padding: 9px 12px; font-weight: 600; }

.rcard { border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; position: relative; scroll-margin-top: 90px; }
.rcard.is-new { border-color: #9ED3B3; box-shadow: 0 0 0 3px var(--g-green-bg); }
.rcard.is-changed { border-color: #EBC98F; box-shadow: 0 0 0 3px var(--g-amber-bg); }
.rcard.is-hold { background: repeating-linear-gradient(135deg, #fff, #fff 14px, #FFFBF3 14px, #FFFBF3 28px); }
.rcard.is-target { box-shadow: 0 0 0 3px rgba(203, 74, 26, .35); }
.rcard-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.gtag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 7px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; border: 1px solid; }
.gtag::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.gtag.important, .gtag.on_hold, .gtag.amber { color: var(--g-amber); background: var(--g-amber-bg); border-color: #EBC98F; }
.gtag.specific, .gtag.purple { color: var(--g-purple); background: var(--g-purple-bg); border-color: #D2BDF0; }
.gtag.rename, .gtag.blue { color: var(--g-blue); background: var(--g-blue-bg); border-color: #B8C9F2; }
.gtag.new, .gtag.green { color: var(--g-green); background: var(--g-green-bg); border-color: #9ED3B3; }
.gtag.fix, .gtag.red { color: var(--g-red); background: var(--g-red-bg); border-color: #F2B8B1; }
.rtitle { display: flex; gap: 12px; align-items: flex-start; }
.rno { flex-shrink: 0; width: 38px; height: 32px; border-radius: 9px; background: var(--g-red-bg); border: 1px solid #F2B8B1; color: var(--red-900); font-family: var(--font-h); font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.rtitle h3 { font-size: 17px; line-height: 1.3; }
.rtitle .loc { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.rquote { background: var(--canvas); border-left: 3px solid var(--red-500); border-radius: 0 10px 10px 0; padding: 10px 14px; }
.rquote q { font-style: italic; display: block; white-space: pre-wrap; }
.rquote q::before, .rquote q::after { content: none; }
.rquote small { color: var(--muted); display: block; margin-top: 4px; }
.rcorr { background: linear-gradient(135deg, #FFF7E8, #fff); border: 1px solid #EBC98F; border-radius: 12px; padding: 10px 14px; }
.rcorr b { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--g-amber); margin-bottom: 3px; }
.rcr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rcr > div { border-radius: 12px; padding: 10px 14px; border: 1px solid; }
.rcr.one { grid-template-columns: minmax(0, 1fr); }
.rcr .cur { background: var(--g-red-bg); border-color: #F2B8B1; }
.rcr .req { background: var(--g-green-bg); border-color: #9ED3B3; }
.rcr small { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.rcr p { margin: 0; white-space: pre-wrap; font-size: 13.5px; }
.rlabel { font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.flow .box { border: 1.5px solid var(--line); border-radius: 9px; padding: 6px 12px; font-size: 13px; font-weight: 600; background: #fff; }
.flow .box.new { border-color: var(--g-green); background: var(--g-green-bg); color: var(--g-green); font-weight: 800; }
.flow .box.removed { border: 1.5px dashed var(--g-red); color: var(--g-red); text-decoration: line-through; }
.flow .box.changed { border-color: var(--g-amber); background: var(--g-amber-bg); color: var(--g-amber); }
.flow .arrow { color: var(--faint); font-weight: 800; }
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; }
.shots .shot:only-child { max-width: 920px; }
.drawer select, .drawer input { max-width: 100%; }
.shot { margin: 0; }
.shot .frame { position: relative; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--canvas); line-height: 0; }
.shot .frame img { width: 100%; height: auto; display: block; }
.mark { position: absolute; border: 2.5px solid; border-radius: 4px; pointer-events: none; }
.mark span { position: absolute; left: -2px; top: 100%; margin-top: 2px; font-size: 10.5px; font-weight: 800; line-height: 1.3; padding: 1px 6px; border-radius: 4px; color: #fff; white-space: nowrap; }
.mark.lbl-top span { top: auto; bottom: 100%; margin: 0 0 2px; }
.mark.red { border-color: var(--g-red); } .mark.red span { background: var(--g-red); }
.mark.green { border-color: var(--g-green); border-style: dashed; } .mark.green span { background: var(--g-green); }
.mark.blue { border-color: var(--g-blue); } .mark.blue span { background: var(--g-blue); }
.mark.amber { border-color: var(--g-amber); } .mark.amber span { background: var(--g-amber); }
.mark.purple { border-color: var(--g-purple); } .mark.purple span { background: var(--g-purple); }
.shot figcaption { display: flex; gap: 8px; align-items: center; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.capt { border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; color: var(--ink); white-space: nowrap; }
.callouts { border: 1.5px dashed #D9C7BF; border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.callouts b { color: var(--red-900); }
.rtasks { display: flex; flex-direction: column; gap: 6px; }
.rtask { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.rtask .no { font-weight: 800; color: var(--muted); font-size: 12px; min-width: 36px; }
.guide table.tbl td, .guide table.tbl th { padding: 8px 10px; }
.changemap { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.changemap > div { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.changemap b { display: block; font-family: var(--font-h); margin-bottom: 6px; }
.changemap a { display: block; font-size: 13px; text-decoration: none; padding: 2px 0; color: var(--ink); }
.changemap a:hover { color: var(--red-700); }
.checklist { display: flex; flex-direction: column; }
.checklist .ck { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.checklist .ck:last-child { border-bottom: 0; }
.checklist .box { width: 18px; height: 18px; border-radius: 5px; border: 2px solid #D8C8C1; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.checklist .box.pending { background: var(--review); border-color: var(--review); }
.checklist .box.done { background: var(--success); border-color: var(--success); }
.checklist .box.hold { background: var(--amber-bg); border-color: #EBC98F; }
.checklist .ck.hold { color: var(--g-amber); }
.ck-note { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; font-style: italic; }
.diffbox { border: 1px solid #EBC98F; background: linear-gradient(135deg, #FFF7E8, #fff); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.diffbox .d-add { color: var(--g-green); } .diffbox .d-rem { color: var(--g-red); text-decoration: line-through; } .diffbox .d-chg { color: var(--g-amber); }
.rhl .cbadge { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 13px; border: 1px solid var(--line); background: #fff; font-size: 12px; font-weight: 700; cursor: pointer; color: var(--ink); }
.rhl .cbadge.open { background: var(--danger); border-color: var(--danger); color: #fff; }
.cthread { border-top: 1px dashed var(--line); padding-top: 10px; }
.cthread .note .bubble .sugg { margin-top: 6px; background: #fff; border: 1px dashed #D2BDF0; border-radius: 8px; padding: 6px 9px; font-size: 13px; white-space: pre-wrap; }
.note.internal .bubble { background: #F3F1FF; border-color: #DDD5FA; }
.guide-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.guide-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.guide-tile { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); cursor: pointer; }
.guide-tile:hover { border-color: #E3C5B8; }
.guide-tile code, .codechip { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: var(--canvas); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; color: var(--ink); }

/* Guide editor */
.gedit { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.gedit .side { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 14px; max-height: calc(100vh - 110px); overflow-y: auto; }
.ecard { border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.ecard > .eh { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; }
.ecard > .eh .t { flex: 1; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ecard > .eb { border-top: 1px solid var(--line-2); padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.rows { display: flex; flex-direction: column; gap: 6px; }
.rows .row > input, .rows .row > select { min-height: 36px; }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.gallery button, .gallery a { display: block; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; padding: 0; background: var(--canvas); aspect-ratio: 4 / 3; cursor: pointer; }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.savebar { position: sticky; bottom: 0; z-index: 10; background: rgba(251, 248, 246, .96); border-top: 1px solid var(--line); padding: 12px 0; display: flex; gap: 8px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.savebar .state { margin-right: auto; font-size: 12.5px; color: var(--muted); }
.annot { position: relative; line-height: 0; user-select: none; touch-action: none; cursor: crosshair; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.annot img { width: 100%; display: block; pointer-events: none; }
.annot .mark { pointer-events: none; }
.annot .mark.sel { outline: 2px solid #000; outline-offset: 1px; }

/* Blueprint */
.bp-sec { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; scroll-margin-top: 90px; }
.bp-sec h3 { font-size: 17px; display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.bp-body { white-space: pre-wrap; font-size: 14px; margin-top: 8px; }

@media (max-width: 1100px) {
	.gedit { grid-template-columns: minmax(0, 1fr); }
	.gedit .side { position: static; max-height: none; }
}
@media (max-width: 760px) {
	.guide-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.rcr { grid-template-columns: minmax(0, 1fr); }
	.guide-head, .guide-body { padding-left: 18px; padding-right: 18px; }
	.guide-head h1 { font-size: 22px; }
}
@media print {
	.guide { border: 0; box-shadow: none; overflow: visible; }
	.guide-head, .gtag, .rcr > div, .flow .box, .mark, .mark span, .rno, .checklist .box { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
	.cthread, .cbadge, .guide-toolbar { display: none !important; }
	/* A card runs on to the next page instead of jumping to a new one (no half-empty pages);
	   its small parts stay whole and a heading stays with what follows it. */
	/* Block, not flex, with no top padding: a page can then only break before a card or
	   between its parts — never leave an empty card top at the foot of a page. */
	.rcard { break-inside: auto; display: block; padding-top: 0; }
	.rcard > .rcard-top { padding-top: 18px; }
	.rcard > * + * { margin-top: 14px !important; }
	.guide-head, .rcard-top, .rtitle, .rquote, .rcorr, .flow, .shot, .callouts, .changemap > div, .guide tr, .diffbox, .howto-loop, .legend, .scope-note { break-inside: avoid; }
	.guide-body > section > h2, .rcard-top, .rtitle, .rlabel { break-after: avoid; }
	.rcr { align-items: start; } /* a short Current box does not run on as an empty block */
	.rcr p { orphans: 3; widows: 3; }
	/* Screenshots: at most about half a landscape page high, marks stay on the image */
	.shot .frame { width: fit-content; max-width: 100%; }
	.shot .frame img { width: auto; max-width: 100%; height: auto; max-height: 105mm; }
	/* Guide opened in a drawer (member page): print only the guide, in full */
	body:has(> .overlay .guide) > :not(.overlay) { display: none !important; }
	body:has(> .overlay .guide) > .overlay { position: static; display: block; background: none; animation: none; }
	body:has(> .overlay .guide) .drawer { width: auto !important; height: auto; display: block; box-shadow: none; animation: none; }
	body:has(> .overlay .guide) .drawer-head { display: none; }
	body:has(> .overlay .guide) .drawer-body { overflow: visible; padding: 0; display: block; }
}

/* Phase 3 — comments */
.cquote { font-style: italic; font-size: 13px; color: #3d302b; background: #fff; border-left: 3px solid var(--red-500); border-radius: 0 8px 8px 0; padding: 6px 10px; margin: 4px 0; white-space: pre-wrap; }
.note.draft .bubble { background: #FFFBF3; border-style: dashed; border-color: #EBC98F; }
.sel-pop { box-shadow: var(--shadow-lg); }
.guide ::selection, .report-sheet ::selection { background: #FDE4DA; }
.rep-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* Phase 4 — task types, Claude, analytics, projects, PIN */
.cf-box { display: contents; }
.rhl .chip.type-red { background: var(--g-red-bg); color: var(--g-red); }
.rhl .chip.type-green { background: var(--g-green-bg); color: var(--g-green); }
.rhl .chip.type-blue { background: var(--g-blue-bg); color: var(--g-blue); }
.rhl .chip.type-amber { background: var(--g-amber-bg); color: var(--g-amber); }
.rhl .chip.type-purple { background: var(--g-purple-bg); color: var(--g-purple); }
.rhl .chip-link { border: 0; cursor: pointer; text-decoration: none; background: var(--g-blue-bg); color: var(--g-blue); font-family: inherit; }
.rhl .chip-link:hover { text-decoration: underline; }
.meta-list { display: grid; grid-template-columns: minmax(120px, max-content) minmax(0, 1fr); gap: 8px 16px; background: var(--canvas); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 13.5px; }
.meta-list .meta-row { display: contents; }
.meta-list .k { font-weight: 700; color: var(--muted); font-size: 12.5px; }
.meta-list a { word-break: break-all; }
.tt-field select { width: 140px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); font-weight: 600; }
.legend i, .swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.vchart { display: flex; align-items: flex-end; gap: 10px; min-height: 230px; padding-top: 8px; overflow-x: auto; }
.vchart.small { min-height: 180px; }
.vbar { flex: 1 1 0; min-width: 38px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.vbar b { font-size: 12px; font-variant-numeric: tabular-nums; min-height: 16px; }
.vbar small { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.vbar.cur small { color: var(--red-500, #A51200); font-weight: 800; }
.vcol { width: 100%; max-width: 54px; border-radius: 6px 6px 3px 3px; background: #F3E7E1; display: flex; flex-direction: column-reverse; overflow: hidden; }
.vcol > span { display: block; width: 100%; }
.ask-answer { background: var(--canvas); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; font-size: 14.5px; line-height: 1.55; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-align: left; cursor: pointer; font-weight: 600; }
.linklike:hover { color: #A51200; text-decoration: underline; }
.report-sheet .decisions { background: #FFF6F2; border: 1px solid #F5D3C6; border-radius: 12px; padding: 12px 16px; }
.report-sheet .decisions h2 { margin-top: 0; }
.report-sheet .decisions li { display: flex; gap: 8px; align-items: flex-start; }
.tbl td.over { color: #A51200; font-weight: 700; }
.pin-card form { width: 100%; max-width: 280px; margin: 8px auto 0; }
.pin-input { text-align: center; font-size: 26px !important; letter-spacing: .5em; height: 56px; font-variant-numeric: tabular-nums; }
.bp-sec.is-target { box-shadow: 0 0 0 3px #F5D3C6; border-radius: 12px; }
@media print {
	.report-sheet .decisions { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media (max-width: 760px) {
	.meta-list { grid-template-columns: minmax(0, 1fr); gap: 2px; }
	.meta-list .k { margin-top: 6px; }
	.vbar { min-width: 30px; }
}

/* Roles picker (member form + settings) */
.role-list { display: flex; flex-wrap: wrap; gap: 8px; }
.role-item { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 10px; padding: 4px 4px 4px 10px; background: #fff; }
.role-item.plain { padding-left: 12px; font-size: 13px; font-weight: 700; background: var(--canvas); }
.role-item .check { font-weight: 600; }
.rhl .role-x { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; padding: 0; }
.rhl .role-x:hover { background: #FDECEA; color: #A51200; }

/* Your Claude app — copy prompt → paste reply */
.cw-step { display: flex; gap: 14px; align-items: flex-start; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: #fff; opacity: .6; transition: opacity .15s ease; }
.cw-step.on { opacity: 1; }
.cw-step:focus-within { opacity: 1; }
.cw-num { flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--grad-btn, #A51200); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 13px; }
.cw-list { margin: 0; padding-left: 18px; color: var(--muted); }
.cw-list li { margin: 2px 0; }
.rhl textarea.cw-prompt { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: var(--canvas); }
.ct-row { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff; }
.ct-row input[type=checkbox] { margin-top: 12px; }
.ct-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 760px) { .ct-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Screenshots in "Add tasks with your Claude app" */
.ct-drop { display: flex; align-items: center; gap: 12px; border: 2px dashed #E3C5B8; border-radius: 14px; padding: 12px 14px; background: var(--canvas); color: var(--ink); }
.ct-drop.on { border-color: #A51200; background: #FFF6F2; }
.ct-shots { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ct-shot { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 10px; padding: 3px 3px 3px 4px; background: #fff; font-size: 12px; font-weight: 600; }
.ct-shot img { width: 34px; height: 26px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.rhl select.ct-add { width: auto; height: 32px; font-size: 12.5px; padding: 0 28px 0 10px; }
/* Guide card → one member task with its checklist */
.rtaskbox { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: var(--canvas); display: flex; flex-direction: column; gap: 6px; }
.rtaskbox.hold { background: var(--amber-bg, #FDF1DC); border-color: #EBC98F; }
.rtaskbox .checklist .ck { padding: 6px 0; }
@media print { .rtaskbox { break-inside: avoid; -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* Guide editor: start from Ronnie's doc */
.rhl .doc-start { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; border-style: dashed; }
.rhl .doc-start p { margin: 6px 0 0; max-width: 560px; }
/* PDF import progress */
.rhl .work-box { max-width: 420px; }
.rhl .work-box h2 { font-size: 17px; margin-bottom: 12px; overflow-wrap: anywhere; }
.rhl .work-bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; margin-bottom: 10px; }
.rhl .work-bar span { display: block; height: 100%; width: 8%; background: var(--red-600); border-radius: 99px; transition: width .25s ease; }
/* Guides for several people */
.rhl .avatars { display: inline-flex; align-items: center; }
.rhl .avatars > .avatar + .avatar { margin-left: -10px; box-shadow: 0 0 0 2px var(--card); }
.rhl .people-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.rhl .pchip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 12px 6px 7px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; text-align: left; }
.rhl .pchip:hover { border-color: #E3C5B8; }
.rhl .pchip:focus-visible { outline: 2px solid var(--red-600); outline-offset: 2px; }
.rhl .pchip.on { background: var(--blush); border-color: var(--red-600); color: var(--red-900); }
.rhl .pchip .faint { font-weight: 500; }
.rhl .pchip-check { width: 26px; height: 26px; border-radius: 50%; background: var(--red-600); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rhl .people-pick.compact .pchip { min-height: 34px; padding: 4px 11px 4px 5px; font-size: 13px; }
.rhl .people-pick.compact .pchip:first-child { padding-left: 11px; }
.rhl .people-pick.compact .pchip.on:first-child { padding-left: 5px; }
.rhl .people-pick.compact .pchip-check, .rhl .people-pick.compact .avatar.sm { width: 24px; height: 24px; }
.rhl .chip.for-chip { background: #EEF2FD; color: #2A56C6; }
.rtaskbox .tpeople { display: flex; flex-direction: column; gap: 6px; border-top: 1px dashed var(--line); padding-top: 8px; margin-top: 2px; }
.rtaskbox .tperson { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rtaskbox .tname { font-size: 13px; font-weight: 700; }
.rtaskbox.other { background: var(--line-2); border-style: dashed; }
.rtaskbox.other .rlabel { color: var(--muted); text-transform: none; letter-spacing: 0; font-size: 13.5px; font-weight: 600; }
.rhl .chip.guide-of { background: #F4EFFB; color: #5B3F9A; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }

/* =========================================================
   2.0 — The RHL operations model
   ========================================================= */
.nav { gap: 2px; }
.nav a { padding: 8px 14px; font-size: 13.5px; }
.nav .group { padding-top: 12px; }
@media (min-height: 1000px) { .nav a { padding: 10px 14px; } }

.ddot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.rhl .chip.dchip { background: #fff; border: 1px solid var(--line); color: var(--ink); }
.who-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.who-chip.is-done { opacity: .75; }
.who-chip.is-off { opacity: .45; }
.hdot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: #B9AAA3; flex-shrink: 0; }
.hdot.h-green { background: var(--success-dot); }
.hdot.h-amber { background: #E0A100; }
.hdot.h-red { background: #D92D20; }
.hdot.big { width: 14px; height: 14px; border-radius: 5px; }
.hdots { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 2px; }
.text-success { color: var(--success); }
.text-amber { color: var(--amber); }
.text-danger { color: var(--danger); }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.muted-card { opacity: .72; }
.rhl .linkish { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; color: inherit; font: inherit; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.tabs-row { margin: 2px 0 2px; }
.tabs-row .pill { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; }
.tile-link { text-decoration: none; color: inherit; transition: border-color .15s, transform .1s; }
.tile-link:hover { border-color: #E3C5B8; color: inherit; }
.mini-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 10px; }
.mini-stats > div { background: var(--canvas); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.mini-stats b { font-family: var(--font-h); font-size: 20px; line-height: 1.15; }
.mini-stats span { font-size: 11.5px; color: var(--muted); font-weight: 600; }

/* Meter: a number against its goal */
.meter { display: flex; flex-direction: column; gap: 5px; }
.meter-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13px; }
.meter-label { font-weight: 600; color: var(--ink); }
.meter-val b { font-family: var(--font-h); font-size: 15px; }
.meter-bar { height: 8px; border-radius: 4px; background: #F1E8E3; overflow: hidden; }
.meter-bar > span { display: block; height: 100%; border-radius: 4px; background: var(--success-dot); transition: width .3s ease; }
.meter.m-behind .meter-bar > span { background: #E0A100; }
.meter.m-far .meter-bar > span { background: #D92D20; }
.meter.m-open .meter-bar > span, .meter.m-info .meter-bar > span { background: #8FA3C8; }
.meter.compact .meter-top { font-size: 12.5px; }
.meter.compact .meter-val b { font-size: 13.5px; }
.meter.compact .meter-bar { height: 6px; }
.rhl .chip.s-ok { background: var(--success-bg); color: var(--success); }
.rhl .chip.s-behind { background: var(--amber-bg); color: var(--amber); }
.rhl .chip.s-far { background: var(--danger-bg); color: var(--danger); }
.rhl .chip.health { gap: 6px; }

/* Overview */
.dept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.dept-card { position: relative; border-top: 4px solid var(--dc, #A51200); padding-top: 18px; display: flex; flex-direction: column; }
.dept-name { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-h); font-weight: 700; font-size: 16.5px; color: var(--ink) !important; text-decoration: none; }
.dept-name:hover span { text-decoration: underline; }
.reasons { margin: 10px 0 0; padding: 0 0 0 16px; font-size: 12.5px; color: var(--muted); display: flex; flex-direction: column; gap: 3px; }
.reasons li::marker { color: #D92D20; }
.reasons li.note::marker { color: #B9A79F; }
.reasons.on-dark { color: #F3DED6; margin-top: 14px; }
.dept-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 14px; }
.dept-stats > div { display: flex; flex-direction: column; gap: 1px; background: var(--canvas); border-radius: 10px; padding: 8px 9px; }
.dept-stats b { font-family: var(--font-h); font-size: 14.5px; white-space: nowrap; }
.dept-stats span { font-size: 10.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.dept-open { margin-top: auto; padding-top: 14px; font-size: 12.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.starter { border: 1px dashed #E3C5B8; background: linear-gradient(135deg, #fff, var(--blush) 140%); padding: 30px 32px; }
.starter h2 { font-size: 26px; margin: 6px 0 8px; }
.starter .lead { color: var(--muted); max-width: 760px; margin: 0; }
.setup-card .setup-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.setup-step { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink) !important; font-size: 13px; font-weight: 600; }
.setup-step .sdot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #D8C8C1; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; color: #fff; }
.setup-step.done { background: var(--success-bg); border-color: #BFE3CD; }
.setup-step.done .sdot { background: var(--success); border-color: var(--success); }

/* Department page */
.dept-hero { background: var(--night); color: #fff; border-radius: 20px; padding: 24px 28px; position: relative; overflow: hidden; border-left: 6px solid var(--dc, #A51200); }
.dept-hero::after { content: ''; position: absolute; inset: 0; background: radial-gradient(90% 140% at 100% 0%, color-mix(in srgb, var(--dc, #A51200) 45%, transparent), transparent 70%); pointer-events: none; }
.dept-hero > * { position: relative; z-index: 1; }
.dept-hero h1 { font-size: 30px; }
.dept-hero .lead { color: var(--night-text); margin: 4px 0 6px; max-width: 760px; }
.dept-hero .small, .dept-hero .muted { color: var(--night-muted); }
.dept-hero .small b { color: #fff; }
.dept-hero .back-link { color: var(--night-muted) !important; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.dept-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.seat-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 12px; }
.seat-row.open { border-style: dashed; background: var(--canvas); }

/* Organization chart */
.org-top { display: flex; justify-content: center; position: relative; padding-bottom: 18px; }
.org-top::after { content: ''; position: absolute; bottom: 0; left: 50%; width: 2px; height: 18px; background: #E3D5CE; }
.org-owner { display: inline-flex; align-items: center; gap: 12px; background: var(--night); color: #fff; padding: 12px 18px; border-radius: 14px; box-shadow: var(--shadow-lg); }
.org-owner .small { color: var(--night-muted); }
.org-chart { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; border-top: 2px solid #E3D5CE; padding-top: 18px; }
.org-col { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--dc, #A51200); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.org-col-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.org-col-head .dept-name { font-size: 15px; }
.org-lead { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: linear-gradient(135deg, var(--blush), #fff); border: 1px solid #F3D9CE; }
button.org-lead { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
button.org-lead:hover { border-color: #E9B8A6; }
.org-lead .small { line-height: 1.35; }
.org-lead.empty-lead { color: var(--muted); font-size: 13px; background: var(--canvas); border-style: dashed; justify-content: center; }
.rhl .org-seat { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; background: #fff; border: 1px solid var(--line-2); border-radius: 10px; padding: 7px 9px; cursor: pointer; }
.rhl .org-seat:hover { border-color: #E3C5B8; }
.rhl .org-seat .grow { display: flex; flex-direction: column; min-width: 0; }
.rhl .org-seat .small.muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rhl .org-seat.open { border-style: dashed; background: var(--canvas); }
.rhl .org-seat.paused { opacity: .6; }
.org-seat.lead-seat { cursor: default; padding: 2px 9px; border: 0; }
.org-add { align-self: flex-start; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.rhl .swatch { width: 26px; height: 26px; border-radius: 8px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.rhl .swatch.on { box-shadow: 0 0 0 2px var(--ink); }
.hire-card { border-left: 4px solid var(--dc, #6E5F58); }
.rhl select.compact { width: auto; min-height: 30px; height: 30px; padding: 0 26px 0 8px; font-size: 12.5px; }

/* Profile */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; }
.fact .label-cap { font-size: 10.5px; margin-bottom: 2px; }
.trend { display: flex; gap: 8px; align-items: flex-end; height: 92px; margin-top: 14px; }
.trend-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; }
.trend-bar { flex: 1; width: 100%; max-width: 36px; display: flex; align-items: flex-end; background: var(--canvas); border-radius: 6px; overflow: hidden; }
.trend-bar span { display: block; width: 100%; background: linear-gradient(180deg, #CB4A1A, #A51200); border-radius: 6px 6px 0 0; min-height: 2px; }
.trend-lbl { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.list-clean li.revoked { opacity: .55; text-decoration: line-through; }

/* Decisions */
.issue-line { padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 12px; }
.issue-card.answered, .issue-card.resolved, .issue-card.dropped { opacity: .85; }
.answer-box { margin-top: 12px; padding: 10px 14px; border-radius: 12px; background: var(--success-bg); color: #164E31; font-size: 13.5px; }
.answer-box .label-cap { color: var(--success); }

/* Pipeline */
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; padding-bottom: 6px; }
.board-col { background: #F6F0EC; border-radius: 14px; padding: 12px; border-top: 4px solid var(--dc, #6E5F58); min-height: 180px; display: flex; flex-direction: column; gap: 10px; }
.board-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.board-note { margin-top: -4px; }
.rhl .order-card { display: block; width: 100%; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; cursor: pointer; box-shadow: var(--shadow); }
.rhl .order-card:hover { border-color: #E3C5B8; }
.rhl .order-card.late { border-color: #F2B8B1; box-shadow: 0 0 0 3px var(--danger-bg); }
.rhl .order-card.hold { background: repeating-linear-gradient(135deg, #fff, #fff 10px, #FFFBF3 10px, #FFFBF3 20px); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.timeline li { position: relative; }
.timeline li::before { content: ''; position: absolute; left: -22px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--red-600); border: 2px solid #fff; }
.stage-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 12px; }
.stage-row select { width: auto; }
.code-block { background: var(--night); color: #F3DED6; border-radius: 10px; padding: 10px 12px; font-size: 11.5px; white-space: pre-wrap; word-break: break-all; margin: 0; }

/* Routines & numbers */
.routine-line { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 12px; }
.target-block { padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; }
.spark { position: relative; display: flex; gap: 6px; align-items: flex-end; margin-top: 14px; }
.spark-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.spark-bar { height: 56px; width: 100%; max-width: 34px; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; }
.spark-bar span { display: block; width: 100%; border-radius: 4px 4px 0 0; background: #CDBFB8; }
.spark-bar span.met { background: var(--success-dot); }
.spark-bar span.miss { background: #E8A598; }
.spark-bar span.now { background: repeating-linear-gradient(135deg, #E9DED8 0 5px, #F6F0EC 5px 10px); border: 1px solid #DCCBC3; border-bottom: 0; }
.spark-bar span.info { background: #9DB0D6; }
.spark-bar span.none { background: #EFE7E3; }
.spark-val { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--ink-2, #3B2A25); text-align: center; line-height: 1; margin-bottom: 3px; }
.spark-lbl { font-size: 10px; color: var(--muted); white-space: nowrap; height: 13px; line-height: 13px; }
.spark-lbl.now { font-weight: 700; color: var(--ink-2, #3B2A25); }
.spark-goal { position: absolute; left: 0; right: 0; border-top: 1.5px dashed #1E7A46; opacity: .55; pointer-events: none; }
.tbl.cover td.off { color: #D9CEC8; }
.tbl.cover tr.proposed td { background: #FFFCF5; }
.cover-gap { display: inline-block; font-size: 11px; font-weight: 800; color: var(--danger); background: var(--danger-bg); border-radius: 7px; padding: 3px 7px; }
.cover-on { display: inline-flex; }

/* SOPs */
.sop-body { padding: 26px 30px; }
.rich { font-size: 14.5px; line-height: 1.65; }
.rich h4 { font-family: var(--font-h); font-size: 15.5px; margin: 18px 0 6px; }
.rich p { margin: 6px 0; }
.rich ul, .rich ol { margin: 6px 0; padding-left: 22px; display: flex; flex-direction: column; gap: 4px; }
.tbl tr.clickable { cursor: pointer; }
.tbl tr.clickable:hover td { background: var(--canvas); }

/* Scorecards */
.loadbar { height: 5px; border-radius: 3px; background: #F1E8E3; margin-top: 4px; width: 110px; overflow: hidden; }
.loadbar span { display: block; height: 100%; background: linear-gradient(90deg, #A51200, #CB4A1A); }
.tbl.score td { vertical-align: top; }

/* Report */
.rep-ops .tbl td { vertical-align: top; }

/* Member page 2.0 */
.routine { border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; margin-top: 8px; }
.routine.is-done { background: var(--success-bg); border-color: #CBE8D6; }
.routine-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.routine .steps { margin-top: 6px; }
.num-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line-2); }
.order-row { display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 12px; }
.lead-panel { border: 1px solid #F3C9B8; background: linear-gradient(135deg, #fff, var(--blush) 160%); }
.person-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-2); }
.dept-mini { border-left: 4px solid #A51200; padding: 4px 0 4px 12px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 3px; }
.handover-box { background: var(--canvas); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.handover-form { border-top: 1px solid var(--line); padding-top: 12px; }
.rhl .sop-link { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 10px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; cursor: pointer; font-weight: 600; font-size: 13.5px; }
.rhl .sop-link.unread { border-color: #F3C9B8; background: var(--blush); }
.proof-hint { align-items: center; }

@media (max-width: 1200px) {
	.dept-layout { grid-template-columns: minmax(0, 1fr); }
	.grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
	.grid-3 { grid-template-columns: minmax(0, 1fr); }
	.dept-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.facts { grid-template-columns: minmax(0, 1fr); }
	.dept-hero { padding: 20px; }
}
@media print {
	.rep-ops { break-inside: avoid; }
}

/* 2.0.0 review fixes */
.issue-answer { margin-top: 6px; padding: 8px 10px; border-radius: 10px; background: #EEF7F1; color: #14532D; font-size: 13px; line-height: 1.45; }
.issue-line.is-answered { opacity: .92; }
.tbl.score { min-width: 860px; }
.routine-row-meta .edit-link { margin-left: 8px; }
.nowrap { white-space: nowrap; }

/* =========================================================
   2.1 — Funds (money received, spent, left) and statements
   ========================================================= */
.fund-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.fund-kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow); }
.fund-kpi b { font-family: var(--font-h); font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.15; }
.fund-kpi small { color: var(--muted); font-size: 12px; }
.fund-kpi.good b { color: var(--success); }
.fund-kpi.warn { background: var(--amber-bg); border-color: #F1D9A8; }
.fund-kpi.warn b { color: var(--amber); }
.fund-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.fund-card { border-top: 4px solid var(--fc, #A51200); display: flex; flex-direction: column; gap: 8px; }
.fund-left { display: flex; align-items: baseline; gap: 8px; margin-top: 2px; }
.fund-left b { font-family: var(--font-h); font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink); }
.fund-left span { color: var(--muted); font-weight: 700; font-size: 13px; }
.fund-left.neg b { color: var(--amber); }
.fund-bar { height: 8px; border-radius: 4px; background: #F1E8E3; overflow: hidden; }
.fund-bar > span { display: block; height: 100%; border-radius: 4px; background: var(--red-700); opacity: .85; }
.fund-card .small svg { vertical-align: -2px; color: var(--muted); }
.fund-actions { margin-top: auto; padding-top: 6px; gap: 6px; }
.rhl .chip.fchip { background: #fff; border: 1px solid var(--line); color: var(--ink); }
.ledger td.in { color: var(--success); font-weight: 700; }
.ledger td.out { color: var(--ink); font-weight: 700; }
.ledger tr.sub td { background: var(--canvas); font-style: italic; color: var(--muted); }
.dep-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.dep-row:last-child { border-bottom: 0; }
.dep-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dep-main b { font-family: var(--font-h); font-size: 17px; }
.dep-use { display: flex; flex-direction: column; gap: 6px; }
.dep-actions { gap: 6px; justify-content: flex-end; }
.dep-block { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; break-inside: avoid; }
.dep-block-head b { font-family: var(--font-h); }
.dep-block .num { font-variant-numeric: tabular-nums; }
.tbl.dep-uses th, .tbl.dep-uses td { padding: 7px 10px; font-size: 13px; }
.money-in { display: flex; align-items: stretch; }
.money-in span { display: inline-flex; align-items: center; padding: 0 10px; border: 1px solid var(--line); border-right: 0; border-radius: 10px 0 0 10px; background: var(--canvas); color: var(--muted); font-weight: 700; }
.money-in input { border-radius: 0 10px 10px 0 !important; flex: 1; min-width: 0; font-variant-numeric: tabular-nums; }
.fund-set-row { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.3fr) auto auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.fund-set-row.archived { opacity: .6; }
.fund-set-row .swatches { flex-wrap: nowrap; }
.fund-set-row .swatch { width: 20px !important; height: 20px !important; border-radius: 6px !important; }
.kpis.kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpis.kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fund-sheet .kpi b { font-variant-numeric: tabular-nums; font-size: 22px; }
.input-sm { height: 34px !important; font-size: 13px !important; }
@media (max-width: 900px) {
	.dep-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
	.dep-actions { justify-content: flex-start; }
	.fund-set-row { grid-template-columns: minmax(0, 1fr); }
	.kpis.kpis-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media print {
	.fund-sheet .report-body { gap: 18px; }
	.fund-sheet .tbl th, .fund-sheet .tbl td { padding: 6px 8px; font-size: 11.5px; }
	.fund-sheet .ledger tr, .fund-sheet .dep-uses tr { break-inside: avoid; }
	.fund-sheet .report-body h2, .fund-sheet .report-body h2 + p { break-after: avoid; }
	.fund-bar, .fund-bar > span, .ledger tr.sub td, .rhl .chip.fchip, .ddot { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
	.fund-sheet .kpis.kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.fund-sheet .kpis.kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.fund-sheet .table-wrap { overflow: visible; }
	/* Block layout (not flex) so a page can break cleanly between parts, and the totals row
	   prints once at the end instead of repeating at the foot of every page. */
	.fund-sheet .report-body, .fund-sheet .stack, .fund-sheet .dep-block { display: block; }
	.fund-sheet .report-body > * + * { margin-top: 18px; }
	.fund-sheet .stack > * + * { margin-top: 10px; }
	.fund-sheet .dep-block > * + * { margin-top: 8px; }
	.fund-sheet tfoot { display: table-row-group; }
	/* A long statement runs over several pages: no clipping by the rounded sheet or the app's flex layout. */
	.report-sheet.fund-sheet { overflow: visible; border-radius: 0; }
	body:has(.fund-sheet) .layout, body:has(.fund-sheet) .main, body:has(.fund-sheet) .content { display: block; min-height: 0; }
}
