/* Theta Scheduler */

.sched-body .app { padding-bottom: 0; height: 100vh; display: flex; flex-direction: column; min-width: 48rem; }
.sched-body .content { flex: 1; min-height: 0; display: flex; }
.sched { flex: 1; min-height: 0; display: flex; flex-direction: column; width: 100%; }

/* ---------- header ---------- */
.sched-head {
	display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 0.5rem 1rem;
	background: #fff; border-top: 1px solid #e5e7eb; border-bottom: 1px solid #e5e7eb;
}
.sched-title { display: flex; flex-direction: column; line-height: 1.2; min-width: 10rem; }
.sched-app { font-size: 0.75rem; font-weight: 600; color: #1d4ed8; text-transform: uppercase; letter-spacing: 0.04em; }
.sched-title strong { font-size: 1.05rem; }
.sched-actions { margin-left: auto; display: flex; align-items: center; gap: 0.375rem; flex-wrap: wrap; }
.sched-status { font-size: 0.75rem; color: #6b7280; margin-right: 0.5rem; }
.sched-status.error { color: #b91c1c; font-weight: 600; }

.sched-tabs { display: flex; gap: 0.25rem; }
.sched-tab {
	padding: 0.375rem 0.875rem; border-radius: 9999px; font-size: 0.875rem; font-weight: 500; color: #374151;
}
.sched-tab:hover { background: #f3f4f6; }
.sched-tab.on { background: #1f2937; color: #fff; }
.sched-tabs.small { flex-wrap: wrap; margin-bottom: 0.75rem; }
.sched-tabs.small .sched-tab { font-size: 0.8125rem; padding: 0.25rem 0.75rem; border: 1px solid #e5e7eb; background: #fff; }
.sched-tabs.small .sched-tab.on { background: #1f2937; border-color: #1f2937; color: #fff; }

.sched-main { flex: 1; min-height: 0; overflow: auto; }
.sched-welcome { text-align: left; }
.sched-welcome-btns { display: flex; gap: 0.5rem; }

/* ---------- forms ---------- */
.sched-dialog.wide { width: min(48rem, calc(100vw - 2rem)); }
.sched-form { display: flex; flex-direction: column; gap: 0.75rem; }
.sched-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.sched-check { display: inline-flex; align-items: center; gap: 0.375rem; font-size: 0.875rem; cursor: pointer; }
.sched-check.em { font-style: italic; }
.sched-hint { font-size: 0.8125rem; color: #6b7280; font-weight: 400; }
select.ht-input { padding-right: 1.5rem; }
textarea.ht-input { resize: vertical; font: inherit; font-size: 0.875rem; }

/* ---------- calendar view ---------- */
.cal-view { height: 100%; display: flex; flex-direction: column; }
.cal-toolbar { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; flex-wrap: wrap; }
.cal-legend { font-size: 0.75rem; color: #6b7280; }
.cal-body { flex: 1; min-height: 0; display: flex; gap: 0; }

.cal-scroll { flex: 1; min-width: 0; overflow: auto; background: #fff; border-top: 1px solid #e5e7eb; position: relative; }
.cal-grid { display: grid; position: relative; font-size: 0.8125rem; min-width: min-content; }

.cal-h {
	position: sticky; top: 0; z-index: 4; background: #1f2937; color: #fff; font-weight: 600; font-size: 0.75rem;
	padding: 0.375rem 0.5rem; text-transform: uppercase; letter-spacing: 0.03em; border-right: 1px solid #374151;
}
.sticky-l { position: sticky; z-index: 2; }
.cal-h.sticky-l { z-index: 5; }
.c1 { left: 0; }
.c2 { left: 5.5rem; }
.c3 { left: 8.5rem; box-shadow: 2px 0 0 #d1d5db; }

.cal-row { border-bottom: 1px solid #eef0f3; background: #fff; }
.cal-row.off { background: #f5f6f8; }
.cal-row.none { background: repeating-linear-gradient(135deg, #f3f4f6 0 6px, #e9ebef 6px 12px); }
.cal-row.week-start { border-top: 1px solid #d1d5db; }
.cal-row.month-start { border-top: 2px solid #6b7280; }
.cal-row.today.cal-date { background: #fde68a; font-weight: 700; }
.cal-row.today.cal-cell { background-color: #fffbeb; }

.cal-date, .cal-dow { padding: 0.25rem 0.5rem; white-space: nowrap; color: #111827; display: flex; align-items: flex-start; }
.cal-row.off.cal-date, .cal-row.off.cal-dow, .cal-row.none.cal-date, .cal-row.none.cal-dow { color: #6b7280; font-size: 0.75rem; padding-top: 0.125rem; }
.cal-dow { color: #4b5563; }
.cal-type { display: flex; align-items: flex-start; justify-content: center; padding-top: 0.25rem; }
.cal-row.off.cal-type, .cal-row.none.cal-type { padding-top: 0.0625rem; }
.cal-type:hover .type-badge { outline: 2px solid #93c5fd; }
.type-badge { display: inline-block; min-width: 1.5rem; text-align: center; border-radius: 0.25rem; font-weight: 700; font-size: 0.75rem; padding: 0 0.25rem; }
.type-badge.t-A { background: #1d4ed8; color: #fff; }
.type-badge.t-B { background: #c2410c; color: #fff; }
.type-badge.t-none { background: #9ca3af; color: #fff; }
.cal-row.off .type-badge { opacity: 0.55; }

.cal-cell { border-right: 1px solid #eef0f3; cursor: cell; position: relative; }
.cal-cell:hover { background-color: #eff6ff; }
.cal-row.none.cal-cell:hover { background: repeating-linear-gradient(135deg, #e0e7ff 0 6px, #e9ebef 6px 12px); }
.cal-cell.drop { background: #bfdbfe !important; }
.cal-note {
	z-index: 3; justify-self: start; align-self: start; margin: 1px 0 0 0.5rem; padding: 0 0.5rem; border-radius: 9999px;
	background: #374151; color: #fff; font-size: 0.6875rem; font-weight: 600; white-space: nowrap; pointer-events: none;
	position: sticky; left: 9.5rem;
}

.cal-block {
	z-index: 1; margin: 2px 3px; padding: 0.125rem 0.375rem; border-radius: 0.375rem; overflow: hidden; cursor: grab;
	background: #fff; border: 1px solid #d1d5db; box-shadow: 0 1px 2px rgb(0 0 0 / .08); position: relative;
	user-select: none; touch-action: none; min-height: 0;
}
.cal-block:focus-visible { outline: 2px solid #2563eb; outline-offset: 1px; }
.cal-block.sel { outline: 2px solid #1d4ed8; outline-offset: 1px; z-index: 3; }
.cal-block.dragging { opacity: 0.85; cursor: grabbing; z-index: 6; box-shadow: 0 6px 16px rgb(0 0 0 / .2); }
.cal-block.k-unit { border-color: rgb(0 0 0 / .12); font-weight: 600; }
.cal-block.k-topic { background: #f8fafc; border-color: #cbd5e1; }
.cal-block.k-activity { border-left: 4px solid #9ca3af; }
.cal-block.summative { background: #fef2f2; }
.blk-title { font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.blk-sub { font-size: 0.6875rem; color: #4b5563; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blk-handle { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; cursor: ns-resize; }
.cal-block:hover .blk-handle { background: linear-gradient(transparent, rgb(37 99 235 / .35)); }

/* ---------- activity bank ---------- */
.cal-bank {
	width: 15rem; flex: none; display: flex; flex-direction: column; gap: 0.5rem; padding: 0.75rem;
	background: #f9fafb; border-top: 1px solid #e5e7eb; border-right: 1px solid #e5e7eb; min-height: 0;
}
.cal-bank[hidden] { display: none; }
.bank-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; font-size: 0.875rem; }
.bank-list { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 0.25rem; }
.bank-item {
	display: flex; align-items: center; gap: 0.5rem; padding: 0.375rem 0.5rem; border-radius: 0.375rem; background: #fff;
	border: 1px solid #e5e7eb; font-size: 0.8125rem; cursor: grab;
}
.bank-item:hover { border-color: #93c5fd; }
.bank-item.sel { border-color: #1d4ed8; box-shadow: 0 0 0 1px #1d4ed8; }
.bank-dot { width: 0.5rem; height: 0.5rem; border-radius: 9999px; flex: none; }
.bank-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bank-empty { font-size: 0.8125rem; color: #6b7280; padding: 0.5rem; }

/* ---------- editor panel ---------- */
.cal-editor {
	width: 22rem; flex: none; overflow-y: auto; padding: 0.75rem 1rem 1.5rem; background: #fff;
	border-left: 1px solid #e5e7eb; border-top: 1px solid #e5e7eb; display: flex; flex-direction: column; gap: 0.625rem;
}
.cal-editor[hidden] { display: none; }
.ed-head { display: flex; align-items: center; justify-content: space-between; }
.ed-close { font-size: 1.5rem; line-height: 1; color: #6b7280; padding: 0 0.25rem; }
.ed-close:hover { color: #111827; }
.ed-color { width: 3rem; height: 2rem; padding: 0; border: 1px solid #d1d5db; border-radius: 0.375rem; background: none; }
.ed-foot { display: flex; gap: 0.375rem; align-items: center; margin-top: 0.5rem; padding-top: 0.75rem; border-top: 1px solid #e5e7eb; }
.obj-chips { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.obj-chip {
	display: inline-flex; align-items: center; gap: 0.125rem; background: #dbeafe; color: #1e3a8a; border-radius: 9999px;
	padding: 0.0625rem 0.25rem 0.0625rem 0.5rem; font-size: 0.75rem; font-weight: 600;
}
.obj-chip.alt { background: #dcfce7; color: #14532d; }
.obj-chip button { font-size: 0.875rem; line-height: 1; padding: 0 0.25rem; color: inherit; opacity: 0.6; }
.obj-chip button:hover { opacity: 1; }
.links-box { display: flex; flex-direction: column; gap: 0.25rem; }
.link-row { display: grid; grid-template-columns: 1fr 1.6fr auto auto; gap: 0.25rem; align-items: center; }
.link-row .ht-input { padding: 0.375rem 0.5rem; font-size: 0.8125rem; }
.link-open { font-size: 0.75rem; color: #1d4ed8; text-decoration: underline; }
.link-del { font-size: 1.125rem; line-height: 1; color: #6b7280; padding: 0 0.25rem; }
.link-del:hover { color: #b91c1c; }

/* ---------- objective picker ---------- */
.pick-list { max-height: 55vh; overflow: auto; display: flex; flex-direction: column; border: 1px solid #e5e7eb; border-radius: 0.5rem; padding: 0.25rem; }
.pick-row { display: flex; align-items: flex-start; gap: 0.5rem; padding: 0.25rem 0.375rem; font-size: 0.8125rem; border-radius: 0.25rem; cursor: pointer; }
.pick-row:hover { background: #f3f4f6; }
.pick-row input { margin-top: 0.2rem; }
.pick-code { font-weight: 700; white-space: nowrap; min-width: 4.5rem; }
.pick-text { flex: 1; }
.pick-badge { font-size: 0.6875rem; background: #fef3c7; color: #92400e; border-radius: 9999px; padding: 0 0.5rem; white-space: nowrap; }

/* ---------- pages (objectives, dashboard, settings) ---------- */
.sched-page { max-width: 72rem; margin: 0 auto; padding: 1rem 1rem 3rem; }

.ol-head { display: grid; grid-template-columns: 1fr 1.5fr 1fr; gap: 0.75rem; margin-bottom: 0.75rem; }
.ol-bar { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.ol-list { background: #fff; border: 1px solid #e5e7eb; border-radius: 0.5rem; padding: 0.25rem 0; }
.ol-row { display: flex; align-items: flex-start; gap: 0.375rem; padding: 0.125rem 0.5rem; border-bottom: 1px solid #f3f4f6; }
.ol-row:hover { background: #f9fafb; }
.ol-row:focus-within { background: #eff6ff; }
.ol-row.hidden-node { opacity: 0.5; }
.ol-row.hidden-node .ol-text { text-decoration: line-through; }
.ol-row.inferred .ol-text { font-style: italic; }
.ol-caret { width: 1.25rem; flex: none; color: #6b7280; padding-top: 0.25rem; text-align: center; }
.ol-caret.leaf { visibility: hidden; display: inline-block; }
.ol-level { width: 5.5rem; flex: none; font-size: 0.6875rem; color: #9ca3af; padding-top: 0.375rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ol-code, .ol-text { border: 1px solid transparent; border-radius: 0.25rem; padding: 0.25rem 0.375rem; font: inherit; font-size: 0.875rem; background: transparent; }
.ol-code { width: 6.5rem; flex: none; font-weight: 700; }
.ol-text { flex: 1; resize: none; overflow: hidden; line-height: 1.35; }
.ol-code:hover, .ol-text:hover { border-color: #e5e7eb; }
.ol-code:focus, .ol-text:focus { border-color: #93c5fd; background: #fff; outline: none; }
.ol-count { width: 1.75rem; flex: none; font-size: 0.75rem; color: #1d4ed8; font-weight: 700; padding-top: 0.375rem; text-align: right; }
.ol-tools { display: flex; gap: 1px; opacity: 0; flex: none; }
.ol-row:hover .ol-tools, .ol-row:focus-within .ol-tools { opacity: 1; }
.ol-tool { width: 1.6rem; height: 1.6rem; border-radius: 0.25rem; color: #4b5563; font-size: 0.875rem; }
.ol-tool:hover { background: #e5e7eb; color: #111827; }

.cm-bar { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.cm-bar .ht-field { width: 14rem; }
.cm-summary { font-size: 0.9375rem; padding-bottom: 0.5rem; }
.cm-wrap { background: #fff; border: 1px solid #e5e7eb; border-radius: 0.5rem; overflow: hidden; margin-top: 0.75rem; }
.cm-table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
.cm-table th { background: #1f2937; color: #fff; text-align: left; padding: 0.5rem; font-size: 0.75rem; position: sticky; top: 0; }
.cm-table th.num, .cm-table td.num { text-align: center; width: 8.5rem; }
.cm-table td { padding: 0.25rem 0.5rem; border-bottom: 1px solid #f3f4f6; vertical-align: top; }
.cm-table td:first-child { display: flex; align-items: flex-start; gap: 0.25rem; }
.cm-d0 td { background: #f3f4f6; font-weight: 700; }
.cm-d1 td:first-child { font-weight: 600; }
.cm-table tr.deeper td { color: #374151; }
.cm-code { font-weight: 700; white-space: nowrap; }
.cm-text { color: #374151; }
.cm-table td.cm-ok { background: #dcfce7; }
.cm-table td.cm-part { background: #fef9c3; }
.cm-table td.cm-zero { background: #fee2e2; color: #9ca3af; }
.cm-table td.cm-via { background: #fef3c7; }
.cm-count { font-weight: 700; padding: 0.125rem 0.5rem; border-radius: 0.25rem; }
.cm-count:hover { background: rgb(0 0 0 / .06); text-decoration: underline; }
.cm-via { font-weight: 500; color: #6b7280; }

.set-section { background: #fff; border: 1px solid #e5e7eb; border-radius: 0.75rem; padding: 1rem; margin-bottom: 1rem; display: flex; flex-direction: column; gap: 0.75rem; align-items: flex-start; }
.set-section h2 { font-size: 1.05rem; font-weight: 700; }
.set-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 0.75rem; width: 100%; }
.set-list { display: flex; flex-direction: column; gap: 0.5rem; width: 100%; }
.set-line { display: flex; align-items: flex-end; gap: 0.5rem; flex-wrap: wrap; width: 100%; }
.set-line .ht-field { min-width: 10rem; }
.set-card { border: 1px solid #e5e7eb; border-radius: 0.5rem; padding: 0.75rem; display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-start; width: 100%; background: #f9fafb; }
.set-checks { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
.tag-line { align-items: center; }
.tag-line .ht-field { min-width: 0; }
.tag-line .ht-field span:empty { display: none; }

/* ---------- schedule: weekday pattern, repeat rules, preview, minutes ---------- */
.qp { display: flex; flex-direction: column; gap: 0.5rem; width: 100%; }
.qp-top { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.qp-top .ht-input { width: auto; }
.qp-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; }
.qp-grid[hidden], .qp [hidden] { display: none; }
.qp-grid .ht-input { padding-left: 0.375rem; padding-right: 1.25rem; }

.rule-card { width: 100%; border: 1px solid #e5e7eb; border-left: 4px solid #1d4ed8; border-radius: 0.5rem; background: #fff; padding: 0.625rem 0.75rem; display: flex; flex-direction: column; gap: 0.5rem; }
.rule-card.empty { border-left-color: #f59e0b; }
.rule-line { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; font-size: 0.875rem; }
.rule-line > .ht-input { width: auto; }
.rule-line .ht-field { min-width: 9rem; }
.rule-line:nth-child(2) { align-items: flex-end; }
.ht-input.rule-every { width: 4rem; }
.dow-pills { display: inline-flex; gap: 0.25rem; }
.dow-pill {
	width: 2.25rem; height: 2.25rem; border-radius: 9999px; border: 1px solid #d1d5db; background: #fff;
	font-size: 0.8125rem; font-weight: 600; color: #374151;
}
.dow-pill:hover { border-color: #1d4ed8; }
.dow-pill.on { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }

.pv-table { border-collapse: collapse; font-size: 0.8125rem; }
.pv-table th, .pv-table td { padding: 0.25rem 0.75rem; text-align: center; border-bottom: 1px solid #f3f4f6; }
.pv-table th { font-size: 0.75rem; color: #6b7280; font-weight: 600; }
.pv-table td.pv-week { text-align: left; color: #374151; white-space: nowrap; }
.pv-table small { color: #6b7280; margin-left: 0.375rem; }
.type-badge.meet { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #111827; }

.cal-date { flex-direction: column; gap: 0; line-height: 1.2; }
.min-badge { font-size: 0.625rem; font-weight: 600; border-radius: 0.25rem; padding: 0 0.25rem; margin-top: 0.125rem; }
.min-badge.empty { color: #9ca3af; }
.min-badge.part { background: #fef9c3; color: #854d0e; }
.min-badge.full { background: #dcfce7; color: #166534; }
.min-badge.over { background: #fee2e2; color: #991b1b; }

/* ---------- school calendar wizard, templates, catch up ---------- */
.wiz { display: flex; flex-direction: column; gap: 1rem; }
.wiz-steps { display: flex; gap: 0.25rem; flex-wrap: wrap; counter-reset: none; }
.wiz-steps li button { padding: 0.25rem 0.75rem; border-radius: 9999px; font-size: 0.8125rem; font-weight: 600; color: #6b7280; background: #f3f4f6; }
.wiz-steps li.done button { color: #1d4ed8; background: #dbeafe; }
.wiz-steps li.on button { color: #fff; background: #1f2937; }
.wiz-body { min-height: 18rem; max-height: 62vh; overflow-y: auto; padding-right: 0.25rem; }
.sched-summary { font-size: 0.875rem; font-weight: 600; color: #111827; }
.sched-summary.error { color: #b91c1c; }

.hol-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 0.375rem; align-items: center; }
.hol-row.head { font-size: 0.75rem; font-weight: 600; color: #6b7280; }
.hol-row .ht-input { padding: 0.375rem 0.5rem; }
.hol-row.suggested .ht-input { background: #fefce8; border-color: #fde68a; }

.unit-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 0.125rem 1rem; max-height: 12rem; overflow-y: auto; }

.sched-row2.wide-first { grid-template-columns: 2fr 1fr; }
.cu-wrap { max-height: 40vh; overflow-y: auto; border: 1px solid #e5e7eb; border-radius: 0.5rem; }
.cu-table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
.cu-table th { position: sticky; top: 0; background: #f3f4f6; text-align: left; padding: 0.375rem 0.5rem; font-size: 0.75rem; }
.cu-table td { padding: 0.25rem 0.5rem; border-top: 1px solid #f3f4f6; white-space: nowrap; }
.cu-table td:first-child { white-space: normal; }
.cu-table .num { text-align: center; }
.cu-table tr.fin td { color: #166534; background: #f0fdf4; }
.cu-table tr.shorter td:last-child { color: #b45309; font-weight: 600; }
.cu-table tr.longer td:last-child { color: #1d4ed8; font-weight: 600; }

.ed-checks { display: flex; gap: 1rem; flex-wrap: wrap; }
.cal-block.pinned::after { content: '📌'; position: absolute; top: 1px; right: 3px; font-size: 0.6875rem; }
.cal-row.sem-start { border-top: 3px solid #7c3aed; }
.cal-note.sem { background: #7c3aed; }
.wiz-steps { list-style: none; padding: 0; margin: 0; }
/* [hidden] must win over display rules like .btn / .ht-field */
.sched [hidden], .sched-dialog [hidden] { display: none !important; }
.sched-toast {
	position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); z-index: 100; max-width: min(40rem, calc(100vw - 2rem));
	background: #111827; color: #fff; padding: 0.625rem 1rem; border-radius: 0.5rem; font-size: 0.875rem;
	box-shadow: 0 10px 25px rgb(0 0 0 / .25); transition: opacity .3s; display: flex; gap: 1rem; align-items: center;
}
.sched-toast.out { opacity: 0; pointer-events: none; }
.sched-toast button { color: #93c5fd; font-weight: 600; }

/* ---------- activity library ---------- */
.lib-page { display: grid; grid-template-columns: 16rem minmax(0, 1fr) 24rem; gap: 1rem; padding: 1rem; max-width: 96rem; margin: 0 auto; align-items: start; }
.lib-filters, .lib-detail { background: #fff; border: 1px solid #e5e7eb; border-radius: 0.75rem; padding: 1rem; display: flex; flex-direction: column; gap: 0.625rem; position: sticky; top: 0.5rem; max-height: calc(100vh - 12rem); overflow-y: auto; }
.lib-results { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.lib-head { display: flex; align-items: center; gap: 0.5rem; }
.lib-card { text-align: left; background: #fff; border: 1px solid #e5e7eb; border-radius: 0.625rem; padding: 0.625rem 0.75rem; display: flex; flex-direction: column; gap: 0.375rem; }
.lib-card:hover { border-color: #93c5fd; }
.lib-card.sel { border-color: #1d4ed8; box-shadow: 0 0 0 1px #1d4ed8; }
.lib-title { font-weight: 700; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.lib-badge { font-size: 0.6875rem; font-weight: 600; background: #dcfce7; color: #166534; border-radius: 9999px; padding: 0 0.5rem; }
.lib-badge.warn { background: #fef3c7; color: #92400e; }
.lib-chips { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.lib-chip { font-size: 0.6875rem; font-weight: 600; border: 1px solid #d1d5db; color: #374151; border-radius: 9999px; padding: 0 0.5rem; background: #fff; }
.lib-chip.formative { background: #fef9c3; border-color: #fde68a; }
.lib-chip.summative { background: #fee2e2; border-color: #fecaca; }
.lib-meta { display: flex; gap: 0.5rem; font-size: 0.75rem; color: #6b7280; }
.lib-dtitle { font-size: 1.125rem; font-weight: 700; }
.lib-dwrap { display: flex; flex-direction: column; gap: 0.625rem; }
.lib-links { list-style: disc; padding-left: 1.25rem; font-size: 0.875rem; }
.lib-links a { color: #1d4ed8; text-decoration: underline; }
.lib-notes { white-space: pre-wrap; font-size: 0.875rem; font-weight: 400; }
.lib-actions { display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-start; padding-top: 0.75rem; border-top: 1px solid #e5e7eb; }
.lib-actions .ht-input { width: auto; }
.lib-gate { width: auto; max-width: 36rem; display: flex; flex-direction: column; gap: 0.75rem; align-items: flex-start; }
.lib-gate a { color: #1d4ed8; text-decoration: underline; }
.obj-chip.missing { background: #f3f4f6; color: #9ca3af; text-decoration: line-through; }
.share-list { max-height: 50vh; overflow-y: auto; border: 1px solid #e5e7eb; border-radius: 0.5rem; }
.share-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: 0.5rem; align-items: center; padding: 0.375rem 0.625rem; border-bottom: 1px solid #f3f4f6; font-size: 0.8125rem; cursor: pointer; }
.share-row:hover { background: #f9fafb; }
.share-date { color: #6b7280; white-space: nowrap; }
.share-st { font-size: 0.6875rem; font-weight: 600; border-radius: 9999px; padding: 0 0.5rem; white-space: nowrap; }
.share-st.st-new { background: #dbeafe; color: #1e40af; }
.share-st.st-changed { background: #fef3c7; color: #92400e; }
.share-st.st-modified-copy { background: #ede9fe; color: #5b21b6; }
.ed-lib { display: flex; flex-direction: column; gap: 0.375rem; align-items: flex-start; padding-top: 0.5rem; border-top: 1px dashed #e5e7eb; }
@media (max-width: 1100px) { .lib-page { grid-template-columns: 14rem minmax(0, 1fr); } .lib-detail { grid-column: 1 / -1; position: static; max-height: none; } }
.lib-steps { list-style: decimal; padding-left: 1.25rem; font-size: 0.875rem; display: flex; flex-direction: column; gap: 0.25rem; }
.lib-gate code { background: #f3f4f6; border-radius: 0.25rem; padding: 0 0.25rem; font-size: 0.8125rem; }
