:root {
  --ink-980: #0d1726;
  --ink-940: #132237;
  --ink-860: #1d304b;
  --ink-760: #304665;
  --ink-620: #576c87;
  --ink-500: #7588a1;
  --line-strong: #b8c7da;
  --line: #cfdae8;
  --line-soft: #dde5ef;
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --surface-tint: #edf3fb;
  --accent: #0f7668;
  --accent-strong: #0b5f54;
  --accent-soft: #d3eee7;
  --party-accent: #0f7668;
  --portal-sidebar-top: #213247;
  --portal-sidebar-bottom: #18283a;
  --blue-soft: #e4eefc;
  --warn-soft: #fff4dd;
  --danger-soft: #fde8e8;
  --danger-ink: #a43131;
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 9px;
  --shadow-soft: 0 10px 30px rgba(11, 24, 43, 0.1);
  --shadow-panel: 0 8px 24px rgba(11, 24, 43, 0.08);
  --shadow-crisp: 0 12px 24px rgba(11, 24, 43, 0.14);
}

/* Portal architecture v1 */

.portal-page-shell {
  display: grid;
  gap: 1.2rem;
}

.portal-page-header-tight {
  align-items: end;
}

.portal-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.9rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(138, 158, 184, 0.22);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 20px 50px rgba(20, 44, 78, 0.08);
}

.portal-toolbar-static {
  margin-bottom: 0;
}

.portal-toolbar-main,
.portal-toolbar-views,
.portal-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
}

.portal-toolbar-search,
.portal-toolbar-select,
.portal-toolbar label select {
  min-height: 2.65rem;
  border-radius: 999px;
  border: 1px solid rgba(120, 145, 178, 0.28);
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  color: #22334d;
}

.portal-toolbar-search {
  width: min(24rem, 100%);
  padding: 0 0.95rem;
}

.portal-toolbar-select,
.portal-toolbar label select {
  min-width: 10.5rem;
  padding: 0 2.35rem 0 0.95rem;
}

.portal-toolbar-views {
  justify-content: center;
  padding-left: 0.35rem;
  border-left: 1px solid rgba(138, 158, 184, 0.22);
}

.portal-toolbar-views-label {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6f8097;
}

.portal-tab-pill {
  min-height: 2.45rem;
  padding: 0 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(120, 145, 178, 0.24);
  background: #fff;
  color: #415978;
  font-weight: 700;
}

.portal-tab-pill.is-active {
  border-color: rgba(14, 109, 94, 0.22);
  background: #f4fbf8;
  color: #0b695f;
  box-shadow: 0 8px 20px rgba(15, 93, 81, 0.12);
}

.thread-workspace {
  display: grid;
  grid-template-columns: 18rem minmax(0, 1fr);
  gap: 1.1rem;
  align-items: start;
}

.thread-finder,
.thread-main,
.snapshot-card,
.thread-block {
  border: 1px solid rgba(136, 157, 184, 0.22);
  border-radius: 1.4rem;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 22px 50px rgba(20, 44, 78, 0.08);
}

.thread-finder {
  padding: 1rem;
}

.thread-finder-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.thread-finder-head h2 {
  margin: 0;
}

.thread-finder-head span {
  font-weight: 800;
  color: #1d385a;
}

.thread-finder-list {
  display: grid;
  gap: 0.7rem;
}

.thread-finder-row,
.thread-link-row {
  display: grid;
  gap: 0.45rem;
  padding: 0.9rem 0.95rem;
  border: 1px solid rgba(136, 157, 184, 0.2);
  border-radius: 1rem;
  background: #fff;
  text-decoration: none;
  color: inherit;
}

.thread-link-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.thread-link-row-stacked {
  grid-template-columns: minmax(0, 1fr);
  gap: 0.3rem;
}

.thread-link-row-stacked span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.thread-link-row-spacious {
  padding-block: 1rem;
}

.thread-link-row-static {
  cursor: default;
}

.thread-inline-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
  margin-top: 0.55rem;
}

.thread-finder-row.is-active,
.thread-finder-row:hover,
.thread-link-row.is-active,
.thread-link-row:hover {
  border-color: rgba(15, 109, 94, 0.2);
  box-shadow: 0 12px 30px rgba(20, 44, 78, 0.08);
}

.thread-finder-row.is-active,
.thread-link-row.is-active {
  background: linear-gradient(180deg, rgba(243, 250, 248, 0.95), rgba(238, 247, 252, 0.98));
}

.thread-finder-row-main,
.thread-finder-row-meta,
.thread-finder-row-icons,
.thread-finder-row-tags,
.thread-record-card-meta,
.thread-timeline-meta,
.snapshot-activity-side,
.snapshot-focus-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
  align-items: center;
}

.thread-finder-row-main {
  flex-direction: column;
  align-items: flex-start;
}

.thread-finder-row-main strong,
.thread-link-row strong,
.thread-record-card strong {
  font-size: 1rem;
  line-height: 1.3;
  color: #172a43;
}

.thread-finder-row-main span,
.thread-finder-row-meta small,
.thread-finder-row-meta span,
.thread-record-card-meta span,
.thread-timeline-meta span,
.thread-link-row span,
.thread-mini-row span,
.snapshot-activity-row span,
.snapshot-focus-facts span,
.thread-media-copy span,
.thread-activity-card small {
  font-size: 0.86rem;
  color: #6c7d93;
}

.thread-finder-row-meta {
  justify-content: space-between;
}

.thread-finder-row-tags {
  align-items: flex-start;
}

.thread-finder-empty,
.thread-empty {
  padding: 1.4rem;
  border: 1px dashed rgba(136, 157, 184, 0.28);
  border-radius: 1rem;
  color: #6b7a90;
}

.thread-main {
  padding: 1.25rem;
  display: grid;
  gap: 1rem;
}

.thread-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.thread-header h1 {
  margin: 0.15rem 0 0;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.02;
  color: #172a43;
}

.thread-header-copy .support-text {
  max-width: 52rem;
}

.thread-header-actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.thread-metric-strip,
.workspace-stat-strip.workspace-stat-strip-compact {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.thread-metric-card,
.workspace-stat-strip.workspace-stat-strip-compact > a,
.workspace-stat-strip.workspace-stat-strip-compact > article,
.workspace-stat-strip.workspace-stat-strip-compact > div {
  display: grid;
  gap: 0.15rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(136, 157, 184, 0.2);
  border-radius: 1rem;
  background: #fff;
  text-decoration: none;
  color: inherit;
}

.thread-metric-card span,
.workspace-stat-strip.workspace-stat-strip-compact span {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6d8096;
}

.thread-metric-card strong,
.workspace-stat-strip.workspace-stat-strip-compact strong {
  font-size: 1.2rem;
  color: #17314f;
}

.thread-panel {
  display: grid;
  gap: 1rem;
}

.thread-block {
  padding: 1.1rem 1.15rem;
}

.thread-block-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  margin-bottom: 0.8rem;
}

.thread-block-head h2 {
  margin: 0;
  font-size: 1.04rem;
  color: #1d3654;
}

.thread-block-head p {
  margin: 0.18rem 0 0;
  color: #6f8097;
  font-size: 0.92rem;
}

.thread-reading-surface,
.thread-activity-card,
.thread-entry-surface,
.thread-status-banner {
  padding: 1rem 1.05rem;
  border: 1px solid rgba(136, 157, 184, 0.18);
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 249, 252, 0.9));
}

.thread-reading-surface-compact {
  padding: 0.9rem 1rem;
}

.thread-reading-kicker {
  margin-bottom: 0.55rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6a7d95;
}

.thread-reading-surface p,
.thread-activity-card p,
.thread-entry-surface p,
.thread-status-banner p,
.thread-record-card p {
  margin: 0;
  line-height: 1.7;
  color: #23364f;
}

.thread-split-blocks,
.thread-detail-grid,
.snapshot-grid,
.snapshot-signals-grid,
.reference-layout,
.builder-layout {
  display: grid;
  gap: 1rem;
}

.thread-split-blocks {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.thread-mini-list,
.thread-card-list,
.snapshot-activity-list {
  display: grid;
  gap: 0.8rem;
}

.thread-mini-row,
.snapshot-activity-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid rgba(136, 157, 184, 0.18);
  border-radius: 0.95rem;
  background: #fff;
}

.thread-mini-row {
  align-items: baseline;
}

.thread-media-card,
.thread-record-card {
  display: grid;
  gap: 0.7rem;
  padding: 0.95rem;
  border: 1px solid rgba(136, 157, 184, 0.18);
  border-radius: 1rem;
  background: #fff;
}

.thread-media-card img,
.thread-media-grid img {
  width: 100%;
  border-radius: 0.9rem;
  display: block;
  object-fit: cover;
}

.thread-media-copy {
  display: grid;
  gap: 0.18rem;
}

.thread-entry-surface-head,
.thread-record-card-head,
.snapshot-focus-main,
.snapshot-activity-row,
.builder-layout-map .builder-main,
.builder-layout-map .builder-side {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.thread-entry-surface-head {
  align-items: center;
  margin-bottom: 0.7rem;
}

.thread-entry-composer {
  display: grid;
  gap: 0.8rem;
  padding: 1.1rem 1.15rem;
  border: 1px solid rgba(15, 109, 94, 0.16);
  border-radius: 1.2rem;
  background: linear-gradient(180deg, rgba(245, 252, 249, 0.96), rgba(240, 248, 244, 0.94));
}

.thread-entry-composer textarea {
  width: 100%;
  min-height: 15rem;
  padding: 1rem 1.05rem;
  border-radius: 1rem;
  border: 1px solid rgba(136, 157, 184, 0.22);
  background: #fff;
  color: #22344d;
}

.thread-entry-composer-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
}

.thread-inline-field {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
  font-size: 0.84rem;
  font-weight: 700;
  color: #5c7088;
}

.thread-inline-field input {
  min-height: 2.45rem;
  padding: 0 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(136, 157, 184, 0.24);
  background: #fff;
}

.thread-timeline {
  display: grid;
  gap: 0.9rem;
}

.thread-timeline-row {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(136, 157, 184, 0.18);
  border-left: 4px solid #9db0c8;
  border-radius: 1rem;
  background: #fff;
}

.thread-timeline-row.is-update {
  border-left-color: #18a077;
}

.thread-timeline-row.is-item {
  border-left-color: #e3ad2a;
}

.thread-timeline-row.is-photo {
  border-left-color: #8e73d4;
}

.thread-timeline-label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #66809d;
}

.thread-timeline-body {
  display: grid;
  gap: 0.35rem;
}

.thread-detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.thread-detail-grid div {
  padding: 0.8rem 0.95rem;
  border: 1px solid rgba(136, 157, 184, 0.18);
  border-radius: 1rem;
  background: #fff;
}

.thread-detail-grid dt {
  margin: 0 0 0.3rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #688099;
}

.thread-detail-grid dd {
  margin: 0;
  color: #22344e;
  line-height: 1.55;
}

.thread-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.8rem;
}

.snapshot-grid {
  grid-template-columns: 1.35fr 1fr 1fr;
  align-items: start;
}

.snapshot-card {
  padding: 1rem 1.1rem;
}

.snapshot-card-focus,
.snapshot-card-wide {
  grid-column: span 2;
}

.snapshot-focus-main,
.snapshot-focus-facts {
  align-items: start;
}

.snapshot-focus-copy {
  display: grid;
  gap: 0.45rem;
}

.snapshot-focus-facts {
  flex-wrap: wrap;
}

.snapshot-focus-facts div {
  min-width: 7rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(136, 157, 184, 0.18);
  border-radius: 0.9rem;
  background: #fff;
}

.snapshot-focus-facts strong {
  display: block;
  margin-top: 0.25rem;
  color: #16324f;
}

.snapshot-attention-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.snapshot-attention-card {
  display: grid;
  gap: 0.25rem;
  padding: 0.9rem 0.95rem;
  border-radius: 1rem;
  text-decoration: none;
  color: inherit;
}

.snapshot-attention-card span {
  font-size: 1.35rem;
  font-weight: 800;
  color: #17304d;
}

.snapshot-attention-card.is-due {
  background: #eef7ff;
}

.snapshot-attention-card.is-overdue {
  background: #fff1ee;
}

.snapshot-attention-card.is-stale {
  background: #fff8ea;
}

.snapshot-signals-grid,
.reference-layout,
.builder-layout {
  grid-template-columns: minmax(0, 1fr) 22rem;
  align-items: start;
}

.snapshot-signal-block {
  padding: 0.3rem 0;
}

.reference-main,
.reference-side,
.builder-main,
.builder-side {
  display: grid;
  gap: 1rem;
}

.reference-form {
  display: grid;
  gap: 0.8rem;
}

.reference-form input,
.reference-form textarea,
.reference-form select {
  width: 100%;
  margin-top: 0.3rem;
}

.portal-form-surface {
  display: grid;
  gap: 0.9rem;
}

.portal-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.portal-form-grid label {
  display: grid;
  gap: 0.3rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.86rem;
  font-weight: 800;
}

.portal-form-grid input,
.portal-form-grid textarea,
.portal-form-grid select {
  width: 100%;
}

.portal-form-grid .issue-inline-edit-actions {
  grid-column: 1 / -1;
}

.builder-preview {
  display: grid;
  gap: 1rem;
}

.portal-list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.45rem;
}

.portal-list li {
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.5;
}

.builder-layout-map {
  grid-template-columns: minmax(0, 1fr) 24rem;
}

.thread-status-banner {
  display: grid;
  gap: 0.7rem;
}

@media (max-width: 1360px) {
  .portal-toolbar {
    grid-template-columns: 1fr;
  }

  .portal-toolbar-views {
    justify-content: flex-start;
    padding-left: 0;
    border-left: 0;
  }

  .thread-workspace,
  .builder-layout-map {
    grid-template-columns: 1fr;
  }

  .thread-finder {
    order: 2;
  }
}

@media (max-width: 1120px) {
  .thread-split-blocks,
  .thread-detail-grid,
  .snapshot-grid,
  .snapshot-signals-grid,
  .reference-layout,
  .builder-layout,
  .workspace-stat-strip.workspace-stat-strip-compact,
  .thread-metric-strip,
  .snapshot-attention-grid {
    grid-template-columns: 1fr;
  }

  .thread-header,
  .snapshot-focus-main,
  .thread-entry-surface-head,
  .thread-record-card-head {
    flex-direction: column;
    align-items: stretch;
  }

  .thread-timeline-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .portal-toolbar-search,
  .portal-toolbar-select {
    width: 100%;
  }

  .thread-link-row,
  .thread-mini-row,
  .snapshot-activity-row {
    grid-template-columns: 1fr;
    flex-direction: column;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  position: relative;
  color: var(--ink-940);
  font-family: "Manrope", "Segoe UI", sans-serif;
  background:
    radial-gradient(920px 420px at -12% -8%, #d8e6f8 12%, transparent 62%),
    radial-gradient(840px 420px at 108% -6%, #d8efe9 10%, transparent 60%),
    linear-gradient(180deg, #eff4fb 0%, #edf3fb 52%, #f4f7fc 100%);
  padding-bottom: 36px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(33, 55, 86, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(33, 55, 86, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at 50% -20%, black 10%, transparent 75%);
}

a {
  color: #1f4f8d;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}

a:hover {
  color: #133766;
}

.shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 16px 10px;
}

.topbar {
  position: sticky;
  top: 8px;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  box-shadow: 0 14px 30px rgba(11, 24, 43, 0.1);
}

.topbar .row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

.topbar form {
  margin: 0;
}

.topbar details {
  margin-top: 0;
}

.topbar h1 {
  margin: 0;
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: clamp(1.92rem, 2.4vw, 2.28rem);
  line-height: 1;
  letter-spacing: 0.01em;
}

.topbar h1 a {
  color: var(--ink-980);
  text-decoration: none;
}

.topbar h1 a:hover {
  color: #17395f;
}

.brand-lockup {
  min-width: 0;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-980);
  text-decoration: none;
}

.brand-link:hover {
  color: var(--ink-980);
}

.brand-mark {
  display: inline-flex;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(18, 40, 68, 0.14);
}

.brand-mark svg {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 16px;
}

.brand-copy {
  display: grid;
  gap: 3px;
}

.brand-name {
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: clamp(1.64rem, 2vw, 1.96rem);
  line-height: 1;
}

.brand-tag {
  color: var(--ink-620);
  font-size: 0.79rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
}

.app-top-nav {
  position: relative;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0 0 14px;
  padding: 6px;
  border: 1px solid rgba(190, 206, 225, 0.92);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 24px rgba(11, 24, 43, 0.08);
}

.app-top-nav a {
  flex: 0 0 auto;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink-760);
  font-size: 0.92rem;
  font-weight: 760;
}

.app-top-nav-icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
  color: #214c79;
}

.app-top-nav-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.app-top-nav a:hover {
  background: var(--surface-tint);
  color: var(--ink-980);
}

.app-top-nav a.active {
  background: linear-gradient(145deg, #eaf4ff, #e0edff);
  color: #133a64;
  box-shadow: inset 0 0 0 1px #c4d6ed;
}

.panel {
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
  padding: 18px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: linear-gradient(170deg, #ffffff 0%, #f9fcff 100%);
  box-shadow: var(--shadow-panel);
  animation: rise-in 240ms ease both;
}

.panel-compact {
  padding: 12px;
  border-radius: 14px;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(15, 118, 104, 0.34), rgba(34, 95, 161, 0.26));
}

.hero {
  border-color: #bfd2e7;
  background: linear-gradient(140deg, #f8fcff 0%, #edf4ff 55%, #f3fbf8 100%);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--ink-620);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 800;
}

.hero h2 {
  margin: 0;
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: clamp(1.38rem, 2.2vw, 1.9rem);
}

.hero p {
  margin: 10px 0 0;
  max-width: 68ch;
  color: var(--ink-760);
}

.app-screen {
  display: grid;
  gap: 12px;
}

.page-hero {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-panel);
}

.page-hero-main {
  display: grid;
  gap: 6px;
}

.page-kicker {
  margin: 0;
  color: var(--ink-620);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 800;
}

.page-hero h2,
.page-hero h3 {
  margin: 0;
}

.page-hero p {
  margin: 0;
  color: var(--ink-760);
}

.page-hero-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.page-hero-actions > * {
  flex: 0 0 auto;
}

.issue-action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 10px;
}

.issue-action-row form,
.issue-action-row > a {
  min-width: 0;
}

.issue-action-retry {
  order: 1;
  grid-column: 1;
}

.issue-action-map {
  order: 2;
  grid-column: 1;
}

.issue-action-open {
  order: 1;
  grid-column: 2;
}

.issue-action-waiting {
  order: 2;
  grid-column: 2;
}

.issue-action-resolve {
  order: 3;
  grid-column: 1 / -1;
}

.issue-action-row .btn,
.issue-action-row a.btn {
  width: 100%;
  min-height: 44px;
  justify-content: center;
}

.issue-action-row .manage-edit-link {
  order: 4;
  grid-column: 1 / -1;
}

.issue-action-row .btn-ghost {
  color: #18466f;
  border: 1px solid #b7cde5;
  border-radius: 12px;
  background: linear-gradient(145deg, #ffffff 0%, #eef6ff 100%);
  box-shadow: 0 10px 18px rgba(17, 54, 93, 0.12);
  font-weight: 780;
}

.issue-action-row .btn-ghost:hover {
  background: linear-gradient(145deg, #ffffff 0%, #e7f1ff 100%);
  box-shadow: 0 12px 22px rgba(17, 54, 93, 0.16);
}

.issue-action-row .btn:disabled,
.issue-action-row .btn[disabled] {
  cursor: default;
  opacity: 0.58;
  box-shadow: none;
  filter: none;
  transform: none;
}

.issue-action-row .btn-soft-neutral,
.detail-status-menu .btn-soft-neutral {
  color: #214868;
  border-color: #c4d4e5;
  background: linear-gradient(145deg, #ffffff 0%, #f3f8fd 100%);
}

.issue-action-row .btn-soft-neutral:hover,
.detail-status-menu .btn-soft-neutral:hover {
  background: linear-gradient(145deg, #ffffff 0%, #edf5fc 100%);
}

.issue-action-row .btn-soft-open,
.detail-status-menu .btn-soft-open {
  color: #16486f;
  border-color: #b7d0e8;
  background: linear-gradient(145deg, #fafdff 0%, #e8f4ff 100%);
}

.issue-action-row .btn-soft-open:hover,
.detail-status-menu .btn-soft-open:hover {
  background: linear-gradient(145deg, #fdfefe 0%, #e1f0ff 100%);
}

.issue-action-row .btn-soft-waiting,
.detail-status-menu .btn-soft-waiting {
  color: #765300;
  border-color: #e4d49d;
  background: linear-gradient(145deg, #fffdf6 0%, #fff1cf 100%);
}

.issue-action-row .btn-soft-waiting:hover,
.detail-status-menu .btn-soft-waiting:hover {
  background: linear-gradient(145deg, #fffdf3 0%, #ffeabf 100%);
}

.issue-action-row .btn-soft-monitored,
.detail-status-menu .btn-soft-monitored {
  color: #25545f;
  border-color: #b9d8dd;
  background: linear-gradient(145deg, #fbfeff 0%, #e4f2f5 100%);
}

.issue-action-row .btn-soft-monitored:hover,
.detail-status-menu .btn-soft-monitored:hover {
  background: linear-gradient(145deg, #fbfeff 0%, #dbeef2 100%);
}

.issue-action-row .btn-soft-resolved,
.detail-status-menu .btn-soft-resolved {
  color: #2d6459;
  border-color: #b8dbd3;
  background: linear-gradient(145deg, #fbfffe 0%, #e5f5f1 100%);
}

.issue-action-row .btn-soft-resolved:hover,
.detail-status-menu .btn-soft-resolved:hover {
  background: linear-gradient(145deg, #fbfffe 0%, #dbf0ea 100%);
}

.issue-action-row .btn-soft-map,
.detail-status-menu .btn-soft-map {
  color: #255768;
  border-color: #b9d8e2;
  background: linear-gradient(145deg, #fbfeff 0%, #e6f6fb 100%);
}

.issue-action-row .btn-soft-map:hover,
.detail-status-menu .btn-soft-map:hover {
  background: linear-gradient(145deg, #fbfeff 0%, #dcf2f9 100%);
}

.mini-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 10px;
}

.mini-nav a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid #c6d7ea;
  border-radius: 12px;
  background: linear-gradient(145deg, #f7fbff, #eef4fb);
  color: var(--ink-860);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 780;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.mini-nav a:hover {
  background: linear-gradient(145deg, #eef5ff, #e5eef9);
  color: var(--ink-980);
}

.page-hero-actions .btn,
.page-hero-actions .inline-form,
.page-hero-actions .case-status-form {
  margin: 0;
}

.page-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.page-stat {
  display: grid;
  gap: 4px;
  min-height: 82px;
  padding: 11px;
  border-radius: 14px;
  border: 1px solid #c6d7ea;
  background: linear-gradient(162deg, #ffffff 0%, #f2f7ff 100%);
  color: inherit;
  text-decoration: none;
}

.page-stat-value {
  margin: 0;
  color: var(--ink-980);
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: 1.7rem;
  line-height: 1;
}

.page-stat-value.is-text {
  font-size: 1.08rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.page-stat-label {
  margin: 0;
  color: var(--ink-760);
  font-size: 0.82rem;
  font-weight: 760;
  line-height: 1.25;
}

.page-stat-note {
  margin: 0;
  color: var(--ink-620);
  font-size: 0.78rem;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

h2,
h3,
h4 {
  margin: 0 0 12px;
  color: var(--ink-980);
  letter-spacing: 0.01em;
}

h2 {
  font-size: 1.45rem;
  font-family: "Fraunces", "Times New Roman", serif;
}

h3 {
  font-size: 1.14rem;
}

h4 {
  font-size: 1rem;
}

p {
  margin: 10px 0;
  line-height: 1.52;
}

.grid.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.view-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 7px;
}

.view-tile {
  display: grid;
  place-items: center;
  min-height: 56px;
  padding: 8px 6px;
  border: 1px solid #c5d7ec;
  border-radius: 12px;
  text-align: center;
  text-decoration: none;
  color: var(--ink-760);
  background: linear-gradient(165deg, #f9fcff 0%, #eef5ff 100%);
  font-size: 0.84rem;
  font-weight: 760;
}

.view-tile:hover {
  color: var(--ink-980);
  border-color: #9fb8d8;
}

.view-tile.active {
  background: linear-gradient(145deg, #eaf4ff, #e0edff);
  color: #133a64;
  border-color: #a8c3e2;
  box-shadow: inset 0 0 0 1px #bfd4ec;
}

.metric-link {
  display: block;
  color: inherit;
  text-decoration: none;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.metric-link .metric {
  border: 1px solid #9fb8d8;
  background: linear-gradient(162deg, #f9fcff 0%, #eef6ff 100%);
  box-shadow: var(--shadow-panel);
  cursor: pointer;
}

.metric-link .metric h2,
.metric-link .metric p {
  color: var(--ink-940);
}

.metric-link .metric::after {
  display: block;
}

.metric {
  margin-bottom: 0;
  border-color: #bfd0e5;
  background: linear-gradient(162deg, #f9fcff 0%, #eef5ff 100%);
}

.metric::after {
  content: "";
  position: absolute;
  right: -36px;
  top: -36px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(15, 118, 104, 0.14), rgba(15, 118, 104, 0));
}

.metric-link:hover .metric {
  transform: translateY(-1px);
  border-color: #99b4d3;
  box-shadow: var(--shadow-crisp);
}

.metric-link.is-active .metric {
  border-color: #8fb2d5;
  background: linear-gradient(145deg, #f4f9ff, #eaf3ff);
  box-shadow: inset 0 0 0 1px #c4d6ed;
}

.capture-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.capture-card-link {
  display: block;
  height: 100%;
}

.capture-card {
  min-height: 188px;
  height: 100%;
  padding: 20px;
  display: grid;
  align-content: start;
  gap: 16px;
}

.capture-card::after {
  display: block;
  opacity: 0.9;
}

.capture-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  color: #fff;
  box-shadow: 0 10px 20px rgba(39, 66, 112, 0.18);
}

.capture-card-icon svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.capture-card-icon-issue,
.capture-card-icon-log {
  background: linear-gradient(145deg, #44c495 0%, #28a86f 100%);
}

.capture-card-icon-update,
.capture-card-icon-update-log {
  background: linear-gradient(145deg, #5c97f1 0%, #3c75d9 100%);
}

.capture-card-copy {
  display: grid;
  gap: 8px;
  grid-template-rows: minmax(2.35em, auto) auto;
}

.capture-card-copy h3 {
  margin: 0;
  min-height: 2.2em;
  font-size: clamp(1.55rem, 3.9vw, 1.9rem);
  line-height: 1.08;
}

.capture-card-copy p {
  margin: 0;
  color: var(--ink-620);
  font-size: 1rem;
  line-height: 1.4;
}

.update-area-picker {
  border: 1px dashed var(--line-soft);
  border-radius: 16px;
  padding: 14px;
  background: linear-gradient(180deg, #fbfdff 0%, #f3f7fc 100%);
}

.update-area-picker legend {
  padding: 0 6px;
  font-weight: 800;
  color: var(--ink-760);
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.check-card {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-height: 48px;
  padding: 11px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #fff;
  color: var(--ink-760);
  font-weight: 700;
}

.check-card input {
  margin: 0;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  align-self: center;
}

.check-card span {
  min-width: 0;
  overflow-wrap: break-word;
  word-break: normal;
  line-height: 1.35;
}

article.metric {
  border: 1px dashed #c4d2e3;
  background: linear-gradient(180deg, #f6f9fd 0%, #eef3f9 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.85);
  cursor: default;
}

article.metric h2,
article.metric p {
  color: #50657f;
}

article.metric::after {
  display: none;
}

article.metric h2 {
  font-size: clamp(1.3rem, 2.1vw, 1.75rem);
}

article.metric p {
  font-weight: 650;
}

.metric h2 {
  margin: 0;
  font-size: clamp(2.1rem, 3vw, 2.6rem);
  line-height: 1;
}

.metric p {
  margin: 8px 0 0;
  color: var(--ink-760);
  font-weight: 700;
}

.metric-compact {
  padding: 12px 10px;
  border-radius: 14px;
  min-height: 92px;
  display: grid;
  align-content: space-between;
}

.metric-compact::after {
  display: none;
}

.metric-compact h2 {
  font-size: clamp(1.45rem, 2.5vw, 1.92rem);
}

.metric-compact p {
  margin: 5px 0 0;
  font-size: 0.8rem;
  line-height: 1.2;
}

.case-list,
.stacked-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.case-list li,
.stacked-list li {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #ffffff 0%, var(--surface-soft) 100%);
  padding: 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.compact-list {
  gap: 8px;
}

.compact-list li {
  padding: 10px;
  border-radius: 11px;
}

.case-list li:hover,
.stacked-list li:hover {
  border-color: #b6c9df;
  box-shadow: var(--shadow-soft);
}

.case-list li a {
  color: inherit;
  text-decoration: none;
  display: grid;
  gap: 4px;
}

.record-link {
  color: inherit;
  text-decoration: none;
}

.record-link:hover {
  color: inherit;
}

.record-card {
  display: grid;
  gap: 10px;
}

.recent-case-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.recent-case-grid li {
  padding: 0;
  min-height: 0;
}

.recent-case-tile .record-link {
  display: grid;
  gap: 6px;
  min-height: 86px;
  padding: 12px;
}

.recent-case-tile strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.25;
}

.recent-case-tile .record-meta {
  gap: 4px;
  font-size: 0.82rem;
}

.recent-case-tile .record-meta span {
  display: block;
  width: 100%;
}

.record-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.record-card-head strong {
  margin: 0;
  color: var(--ink-980);
  font-size: 1rem;
}

.record-summary {
  margin: 0;
  color: var(--ink-760);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.case-lead {
  margin: 6px 0 0;
  color: var(--ink-760);
  font-size: 0.95rem;
}

.update-notes-line {
  margin: 6px 0 0;
  color: var(--ink-760);
  font-size: 0.98rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

.update-summary-line {
  margin: 8px 0 0;
  color: var(--ink-980);
  font-weight: 780;
  font-size: 1.14rem;
  line-height: 1.32;
}

.record-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--ink-620);
  font-size: 0.84rem;
  font-weight: 700;
}

.record-meta strong {
  font-size: inherit;
}

.meta-chip-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.inline-search-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.inline-search-row input[type="search"] {
  flex: 1 1 auto;
}

.linked-issue-picker {
  padding: 2px 0 0;
}

.linked-issue-current {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #d7e3de;
  border-radius: 12px;
  background: rgba(249, 252, 251, 0.9);
}

.linked-issue-current strong {
  color: var(--ink-620);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.linked-issue-current span {
  color: var(--ink-940);
  font-weight: 650;
  line-height: 1.4;
}

.linked-issue-option {
  display: grid;
  grid-template-columns: 1fr;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid #d7e3de;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
}

.linked-issue-result {
  width: 100%;
  text-align: left;
  cursor: pointer;
  gap: 10px;
}

.linked-issue-result:hover {
  border-color: #c4d7d1;
  background: rgba(246, 250, 248, 0.98);
}

.linked-issue-result-copy {
  display: grid;
  gap: 4px;
}

.linked-issue-result-kicker {
  color: var(--ink-620);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.linked-issue-option span {
  display: grid;
  gap: 3px;
}

.linked-issue-option strong {
  color: var(--ink-940);
}

.linked-issue-option small {
  color: var(--ink-620);
  font-size: 0.84rem;
  line-height: 1.35;
}

.linked-issue-result-action {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid #d7e3de;
  border-radius: 999px;
  background: rgba(245, 249, 247, 0.95);
  color: var(--ink-620);
  font-size: 0.78rem;
  font-weight: 760;
 }

.linked-issue-results-label {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-620);
  margin-top: 2px;
}

.linked-issue-result {
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.linked-issue-result:hover {
  border-color: #c4d7d1;
  background: rgba(246, 250, 248, 0.98);
}

.badge.neutral {
  color: #214c79;
  border-color: #c7d8eb;
  background: #f2f7fd;
}

.badge.sensitive {
  color: var(--danger-ink);
  border-color: #efc4c4;
  background: var(--danger-soft);
}

.badge.pothole {
  color: #825400;
  border-color: #e8c67a;
  background: #fff1cc;
}

.section-card {
  padding: 16px;
}

.section-card-attention {
  border-color: #c9d9ea;
  background: linear-gradient(165deg, rgba(251, 253, 255, 0.98) 0%, rgba(239, 246, 255, 0.98) 100%);
}

.section-card-feed {
  border-color: #cadfd7;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.98) 0%, rgba(243, 250, 247, 0.98) 100%);
}

.section-card-report {
  border-color: #d7dce6;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 248, 252, 0.98) 100%);
}

.case-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.case-summary-item {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid #d6e4f1;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
}

.case-summary-item strong {
  font-size: 0.8rem;
  color: var(--ink-620);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.case-summary-item span {
  color: var(--ink-940);
  font-weight: 760;
  overflow-wrap: anywhere;
}

.street-history-note {
  margin: 0 0 8px;
  color: var(--accent-strong);
  font-weight: 760;
}

.support-text {
  margin: 4px 0 0;
  color: var(--ink-620);
  font-size: 0.9rem;
}

.cases-toolbar {
  display: grid;
  gap: 10px;
}

.cases-toolbar-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(160px, 0.9fr);
  gap: 10px;
}

.cases-toolbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.filter-chip-row-compact {
  margin-top: 0;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid #c7d8eb;
  border-radius: 999px;
  background: #f4f8fd;
  color: #214c79;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 760;
}

.filter-chip:hover {
  color: #17395f;
  border-color: #b3c8df;
}

.filter-chip.is-active {
  border-color: #add6ce;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.cases-results {
  gap: 8px;
}

.case-result-card {
  padding: 0;
}

.case-result-card .record-link {
  display: grid;
  gap: 7px;
  padding: 12px;
}

.contacts-results {
  gap: 8px;
}

.contact-result-card {
  padding: 0;
}

.contact-result-card .record-link {
  display: grid;
  gap: 7px;
  padding: 12px;
}

.form-shell {
  display: grid;
  gap: 12px;
}

.form-shell.compact {
  gap: 8px;
}

.form-section {
  display: grid;
  gap: 14px;
}

.form-section-head {
  display: grid;
  gap: 4px;
}

.form-section-head h3 {
  margin: 0;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field-grid > label,
.field-grid > div {
  min-width: 0;
}

.report-date-grid label {
  min-width: 0;
}

.field-span-full {
  grid-column: 1 / -1;
}

.form-note {
  margin: 0;
  color: var(--ink-620);
  font-size: 0.84rem;
}

.form-submit-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.empty-state {
  margin: 0;
  color: var(--ink-620);
}

.inline-code-block {
  display: block;
  margin-top: 6px;
  padding: 10px 12px;
}

.case-list strong,
.stacked-list strong {
  font-weight: 800;
}

.attachments-list a {
  word-break: break-word;
}

.file-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.file-choice-trigger {
  display: flex;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  align-items: center;
}

.file-choice-input-hidden {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.attachment-thumb-link {
  display: block;
  margin-top: 8px;
}

.attachment-card-grid {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.attachment-thumb {
  width: 100%;
  max-width: 300px;
  border-radius: 11px;
  border: 1px solid #cad8ea;
  box-shadow: 0 8px 18px rgba(11, 24, 43, 0.14);
}

.location-suggestions {
  min-height: 24px;
}

.field-action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.helper-note {
  margin: 0;
}

.helper-note-caution {
  color: #8a5a00;
}

.map-filter-row {
  display: grid;
  gap: 10px;
}

.issue-map-canvas {
  height: 52vh;
  min-height: 320px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #c8d6e8;
}

.map-popup-list {
  margin: 8px 0 0;
  padding-left: 18px;
}

.map-popup-list li {
  margin: 0 0 8px;
}

.map-popup-list li:last-child {
  margin-bottom: 0;
}

.suggestion-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.suggestion-chip {
  border: 1px solid #c8d6e8;
  background: #eef5ff;
  color: var(--ink-900);
  border-radius: 999px;
  padding: 9px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.suggestion-empty {
  margin: 0;
}

.stack {
  display: grid;
  gap: 12px;
}

.stack.compact {
  gap: 8px;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.row.wrap {
  flex-wrap: wrap;
}

.row.wrap > label {
  flex: 1 1 160px;
  min-width: 140px;
}

.row.gap {
  justify-content: space-between;
}

.inline-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.case-status-form {
  width: min(430px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.case-status-form select {
  min-width: 0;
}

.case-status-form .status-update-btn {
  min-height: 44px;
  padding-inline: 14px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--ink-760);
  font-size: 0.92rem;
  font-weight: 700;
}

.field-label {
  color: var(--ink-760);
  font-size: 0.92rem;
  font-weight: 700;
}

input,
textarea,
select,
button {
  font: inherit;
}

input,
textarea,
select {
  width: 100%;
  min-height: 44px;
  border-radius: var(--radius-md);
  border: 1px solid #c6d4e6;
  background: #ffffff;
  color: var(--ink-940);
  padding: 10px 12px;
  box-shadow: inset 0 1px 1px rgba(18, 36, 58, 0.03);
  transition: border-color 130ms ease, box-shadow 130ms ease, background 130ms ease;
}

input:hover,
textarea:hover,
select:hover {
  border-color: #aebfd5;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #2e6ea5;
  box-shadow: 0 0 0 4px rgba(46, 110, 165, 0.17);
  background: #fcfeff;
}

textarea {
  resize: none;
}

.choice-group {
  margin: 0;
  border: 1px solid #ccd9e9;
  border-radius: var(--radius-md);
  padding: 9px 10px 10px;
  background: #f7fbff;
}

.choice-group legend {
  padding: 0 4px;
  color: var(--ink-760);
  font-size: 0.92rem;
  font-weight: 800;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 7px;
}

.choice {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  border: 1px solid #c5d4e8;
  border-radius: 10px;
  padding: 6px 8px;
  background: #fff;
  color: var(--ink-940);
  font-size: 0.88rem;
  font-weight: 600;
}

.choice input[type="radio"] {
  width: 15px;
  height: 15px;
  min-height: 15px;
  margin: 0;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.check input[type="checkbox"] {
  width: 20px;
  min-height: 20px;
  margin: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  color: #fff;
  cursor: pointer;
  font-weight: 780;
  letter-spacing: 0.01em;
  text-decoration: none;
  background: linear-gradient(145deg, var(--accent), var(--accent-strong));
  box-shadow: 0 10px 18px rgba(10, 88, 77, 0.34);
  transition: transform 120ms ease, filter 120ms ease, box-shadow 120ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 12px 24px rgba(10, 88, 77, 0.38);
}

.btn:active {
  transform: translateY(0);
}

.btn-small {
  min-height: 36px;
  padding: 7px 11px;
  border-radius: 10px;
  font-size: 0.89rem;
}

.btn-ghost {
  color: #1b466f;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border: 1px solid #b8cee3;
  box-shadow: none;
}

.btn-ghost:hover {
  box-shadow: 0 8px 16px rgba(11, 24, 43, 0.12);
  background: linear-gradient(180deg, #ffffff, #f1f7ff);
}

.btn-danger {
  background: linear-gradient(145deg, #c44f4f, #a43131);
  box-shadow: 0 10px 18px rgba(164, 49, 49, 0.28);
}

.btn-danger:hover {
  box-shadow: 0 12px 24px rgba(164, 49, 49, 0.34);
}

.btn-danger-ghost {
  color: #8a3131;
  background: linear-gradient(180deg, #fff9f9, #fff2f2);
  border: 1px solid #e4c2c4;
  box-shadow: none;
}

.btn-danger-ghost:hover {
  background: linear-gradient(180deg, #fff6f6, #ffeded);
  box-shadow: 0 8px 16px rgba(164, 49, 49, 0.12);
}

.btn.is-active,
.btn-ghost.is-active {
  border-color: #8fb2d5;
  background: linear-gradient(180deg, #f4f9ff, #eaf3ff);
  color: #11365d;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #c8d5e7;
  border-radius: 999px;
  background: #f3f8ff;
  padding: 3px 9px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge.overdue {
  color: var(--danger-ink);
  border-color: #efc4c4;
  background: var(--danger-soft);
}

.badge.waiting {
  color: #8e6302;
  border-color: #f0dca8;
  background: var(--warn-soft);
}

.badge.monitored {
  color: #25545f;
  border-color: #c5dde2;
  background: #e9f4f6;
}

.badge.todo {
  color: #1f4f8d;
  border-color: #c6d8ef;
  background: #edf5ff;
}

.badge.done {
  color: #0f664d;
  border-color: #a8dbc5;
  background: var(--accent-soft);
}

.badge.open {
  color: #0d4f3f;
  border-color: #bde2d5;
  background: #e6f5ef;
}

.badge.on_hold {
  color: #7d5b00;
  border-color: #eedca9;
  background: #fff6e2;
}

.badge.closed {
  color: #1a4a76;
  border-color: #c5d9f0;
  background: var(--blue-soft);
}

.badge.resolved {
  color: #0f664d;
  border-color: #a8dbc5;
  background: var(--accent-soft);
}

.metadata {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.metadata div {
  border: 1px solid #cbd9ea;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #f9fcff 0%, #f2f7fe 100%);
  padding: 10px;
}

.metadata dt {
  margin: 0;
  color: var(--ink-620);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 800;
}

.metadata dd {
  margin: 6px 0 0;
  font-weight: 800;
  font-size: 0.96rem;
}

details {
  margin-top: 8px;
  border-radius: var(--radius-md);
  border: 1px solid #d1dceb;
  background: linear-gradient(180deg, #fafdff 0%, #f3f8ff 100%);
  overflow: clip;
}

summary {
  cursor: pointer;
  padding: 9px 10px;
  color: #1f4c79;
  font-weight: 780;
}

details form {
  padding: 8px 10px 10px;
}

.inline-expander {
  border-radius: 11px;
  border-color: #cddbeb;
  background: linear-gradient(180deg, #fcfeff 0%, #f5f9ff 100%);
}

.inline-expander > summary {
  padding: 8px 10px;
  font-size: 0.92rem;
  color: #214f7d;
}

.inline-expander > form,
.inline-expander > div {
  padding: 0 10px 10px;
}

.manage-expander {
  min-width: min(320px, 100%);
}

.manage-expander > summary {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #bfd2e6;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f6fbff 100%);
  color: #1b466f;
  font-weight: 800;
  box-shadow: 0 6px 14px rgba(11, 24, 43, 0.08);
}

.manage-expander > summary::after {
  content: "▾";
  font-size: 0.92rem;
  color: #56789b;
}

.manage-expander[open] > summary::after {
  content: "▴";
}

.manage-expander-danger > summary {
  border-color: #e5c6c8;
  background: linear-gradient(180deg, #fff9f9 0%, #fff3f3 100%);
  color: #8a3131;
  box-shadow: none;
}

.manage-expander-danger > summary::after {
  color: #b25656;
}

.account-expander {
  min-width: 0;
  overflow: visible;
}

.account-expander[open] {
  overflow: visible;
}

.account-expander > summary {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 1.35rem;
  line-height: 1;
}

.account-expander > div {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 170px;
  border-radius: 14px;
  border: 1px solid #cddbeb;
  background: linear-gradient(180deg, #fcfeff 0%, #f5f9ff 100%);
  box-shadow: 0 14px 30px rgba(11, 24, 43, 0.14);
}

.account-expander > div .btn,
.account-expander > div form,
.account-expander > div a {
  width: 100%;
}

.account-menu-btn {
  font-weight: 700;
}

.manage-delete-form {
  padding-top: 0;
  border-top: 0;
}

.manage-edit-link {
  font-weight: 800;
}

.manage-danger-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #eed6d7;
  border-radius: 12px;
  background: linear-gradient(180deg, #fffafa 0%, #fff4f4 100%);
}

.manage-expander > div .btn,
.manage-expander > div a,
.manage-expander-danger > div .btn,
.manage-expander-danger > div a {
  width: 100%;
}

.page-hero-actions .manage-edit-link {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
}

.page-hero-actions .manage-delete-toggle {
  flex: 1 1 0;
  min-width: 0;
  justify-content: center;
}

.page-hero-actions .manage-delete-toggle.is-open {
  box-shadow: 0 12px 22px rgba(164, 49, 49, 0.32);
}

.alert-inline {
  margin: 0;
}

.app-accordion {
  padding: 0;
}

.app-accordion > summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  padding: 14px 16px;
  min-height: 52px;
  background: linear-gradient(180deg, #fbfdff 0%, #f5f9ff 100%);
}

.app-accordion > summary::-webkit-details-marker {
  display: none;
}

.app-accordion > summary::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2px solid #3f5f86;
  border-bottom: 2px solid #3f5f86;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 120ms ease;
  margin-left: 4px;
}

.app-accordion[open] > summary::after {
  transform: rotate(225deg) translateY(-1px);
}

.app-accordion-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--ink-940);
}

.app-accordion > .app-accordion-body {
  padding: 4px 16px 16px;
}

.app-accordion > .app-accordion-body > :first-child {
  margin-top: 6px;
}

.app-accordion-inline {
  margin-top: 6px;
  border: 1px solid #d0dceb;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfdff 0%, #f5f9ff 100%);
}

.app-accordion-inline > summary {
  padding: 11px 12px;
  min-height: 44px;
}

.app-accordion-inline > .app-accordion-body {
  padding: 2px 12px 12px;
}

.section-head-compact {
  gap: 8px;
  align-items: center;
}

.section-head-compact .muted {
  margin: 0;
}

.pilot-inline-suggestions {
  margin-top: 8px;
}

.triage-summary-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.triage-summary-card {
  padding: 12px;
  border: 1px solid #d6e4f1;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  display: grid;
  gap: 8px;
}

.triage-summary-card .filter-chip {
  cursor: pointer;
}

.pilot-contact-suggestion {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  display: grid;
  gap: 4px;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.pilot-contact-suggestion span {
  color: var(--ink-620);
  font-weight: 700;
}

.report-head {
  margin-bottom: 10px;
}

.report-head h3 {
  margin-bottom: 5px;
}

.issue-attention-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.attention-column {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 14px 14px 14px 16px;
  border: 1px solid #d6e4f1;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.attention-column::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  border-radius: 16px 0 0 16px;
}

.attention-column-due {
  border-color: #cfe0d6;
  background: linear-gradient(180deg, rgba(246, 251, 248, 0.96) 0%, rgba(238, 247, 242, 0.96) 100%);
}

.attention-column-due::before {
  background: linear-gradient(180deg, #8cc4b0 0%, #4d9b84 100%);
}

.attention-column-overdue {
  border-color: #ebd2d2;
  background: linear-gradient(180deg, rgba(255, 248, 248, 0.98) 0%, rgba(253, 236, 236, 0.98) 100%);
}

.attention-column-overdue::before {
  background: linear-gradient(180deg, #e28787 0%, #b63f3f 100%);
}

.attention-column-stale {
  border-color: #e7dcc0;
  background: linear-gradient(180deg, rgba(255, 250, 240, 0.98) 0%, rgba(252, 244, 225, 0.98) 100%);
}

.attention-column-stale::before {
  background: linear-gradient(180deg, #dfbf6f 0%, #a98322 100%);
}

.attention-column h3 {
  margin: 0;
  font-size: 0.98rem;
}

.compact-link-list {
  list-style: none;
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
}

.compact-link-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  font-size: 0.92rem;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.38);
}

.compact-link-list li + li {
  margin-top: 4px;
}

.compact-link-list a {
  color: var(--ink-940);
  text-decoration: none;
  font-weight: 760;
  min-width: 0;
  overflow-wrap: anywhere;
}

.compact-link-list span {
  color: var(--ink-620);
  font-size: 0.84rem;
  flex: 0 0 auto;
  padding-left: 8px;
  border-left: 1px solid rgba(123, 145, 168, 0.18);
}

.attention-column-due .compact-link-list li {
  background: rgba(255, 255, 255, 0.42);
}

.attention-column-overdue .compact-link-list li {
  background: rgba(255, 255, 255, 0.48);
}

.attention-column-stale .compact-link-list li {
  background: rgba(255, 252, 244, 0.58);
}

.issue-feed {
  display: grid;
  gap: 14px;
}

.update-feed {
  display: grid;
  gap: 14px;
}

.update-feed-card {
  position: relative;
  padding: 0;
  overflow: hidden;
  margin-top: 0;
  border: 1px solid #cfded8;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f6faf8 100%);
  box-shadow: 0 10px 22px rgba(16, 34, 49, 0.08);
}

.update-feed-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: linear-gradient(180deg, #b9d8cf 0%, #83bbaa 100%);
}

.update-feed-card:hover {
  border-color: #b7cdc6;
  box-shadow: 0 14px 26px rgba(16, 34, 49, 0.12);
}

.update-feed-card > summary {
  list-style: none;
  display: grid;
  gap: 10px;
  padding: 16px 16px 16px 18px;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 250, 248, 0.94) 100%);
}

.update-feed-card[open] > summary {
  background: linear-gradient(180deg, rgba(238, 247, 244, 0.98) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.update-feed-card > summary::-webkit-details-marker {
  display: none;
}

.update-feed-card > summary::marker {
  content: "";
}

.update-feed-main {
  display: grid;
  gap: 7px;
}

.update-feed-head strong {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-620);
}

.update-feed-title {
  margin: 0;
  color: var(--accent-strong);
  font-size: 0.98rem;
  font-weight: 760;
  line-height: 1.45;
}

.update-feed-meta {
  padding-top: 10px;
  border-top: 1px dashed #d4e0db;
  justify-content: space-between;
}

.update-feed-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid #d7e3de;
  border-radius: 999px;
  background: rgba(245, 249, 247, 0.95);
  color: var(--ink-620);
  font-size: 0.78rem;
  font-weight: 760;
}

.update-feed-detail {
  display: grid;
  gap: 10px;
  padding: 0 16px 16px 18px;
  border-top: 1px solid #dde7e2;
  background: linear-gradient(180deg, rgba(249, 252, 251, 0.96) 0%, rgba(255, 255, 255, 0.96) 100%);
}

.update-log-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}

.update-log-primary {
  box-shadow: 0 8px 14px rgba(10, 88, 77, 0.24);
}

.update-log-primary:hover {
  box-shadow: 0 10px 18px rgba(10, 88, 77, 0.28);
}

.update-log-clear {
  color: var(--ink-620);
  border-color: #d3dfdb;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: none;
}

.update-log-clear:hover {
  background: rgba(246, 250, 248, 0.96);
  color: var(--ink-860);
  box-shadow: none;
}

.issue-feed-card {
  position: relative;
  padding: 0;
  overflow: hidden;
  margin-top: 0;
  border: 1px solid #cfded8;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f6faf8 100%);
  box-shadow: 0 10px 22px rgba(16, 34, 49, 0.08);
}

.issue-feed-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: linear-gradient(180deg, #b9d8cf 0%, #83bbaa 100%);
}

.issue-feed-card[data-status="waiting"]::before {
  background: linear-gradient(180deg, #f0d797 0%, #d7b458 100%);
}

.issue-feed-card[data-status="resolved"]::before {
  background: linear-gradient(180deg, #9bd3c0 0%, #4e9c80 100%);
}

.issue-feed-card:hover {
  border-color: #b7cdc6;
  box-shadow: 0 14px 26px rgba(16, 34, 49, 0.12);
}

.issue-feed-card > summary {
  list-style: none;
  display: grid;
  gap: 10px;
  padding: 16px 16px 16px 18px;
  cursor: pointer;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 250, 248, 0.94) 100%);
}

.issue-feed-card[open] > summary {
  background: linear-gradient(180deg, rgba(238, 247, 244, 0.98) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.issue-feed-card > summary::-webkit-details-marker {
  display: none;
}

.issue-feed-main {
  display: grid;
  gap: 7px;
}

.issue-feed-detail {
  display: grid;
  gap: 10px;
  padding: 0 16px 16px 18px;
  border-top: 1px solid #dde7e2;
  background: linear-gradient(180deg, rgba(249, 252, 251, 0.96) 0%, rgba(255, 255, 255, 0.96) 100%);
}

.issue-location-line {
  margin: 0;
  color: var(--accent-strong);
  font-weight: 780;
  font-size: 1rem;
}

.issue-location-line a {
  color: inherit;
  text-decoration: none;
}

.issue-feed-summary .record-card-head strong {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-620);
}

.issue-feed-summary .record-summary {
  color: var(--ink-940);
  font-size: 0.98rem;
  line-height: 1.45;
}

.issue-feed-meta {
  padding-top: 10px;
  border-top: 1px dashed #d4e0db;
  justify-content: space-between;
}

.issue-feed-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid #d7e3de;
  border-radius: 999px;
  background: rgba(245, 249, 247, 0.95);
  color: var(--ink-620);
  font-size: 0.78rem;
  font-weight: 760;
}

.note-list {
  gap: 10px;
}

.note-list li,
.note-card {
  display: grid;
  gap: 6px;
}

.note-list p,
.note-card p {
  margin: 0;
}

.note-edit-actions {
  justify-content: flex-start;
}

.note-delete-actions {
  justify-content: flex-start;
}

.note-edit-panel {
  padding: 14px;
  border: 1px solid #d7e2ed;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.issue-note-thread-list {
  margin-top: 8px;
  margin-left: min(calc(var(--note-depth, 0) * 18px + 14px), 72px);
  padding-left: 12px;
  border-left: 2px solid rgba(42, 121, 101, 0.16);
}

.issue-note-thread-child {
  background: rgba(248, 252, 250, 0.78);
}

.issue-note-update-form {
  margin-top: 4px;
}

.note-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.report-preview-block {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #d8dfe8;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.report-preview-block h3 {
  margin: 0;
}

@media (max-width: 720px) {
  .issue-attention-grid {
    grid-template-columns: 1fr;
  }
}

/* Map workspace: use the same calm reference-workspace language as Issues and Enquiries. */
.casework-map-workspace {
  grid-template-columns: 270px minmax(0, 1fr) 320px;
  min-height: calc(100vh - 76px);
  background: rgba(255, 255, 255, 0.62);
}

.casework-map-sidebar {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  align-self: stretch;
  gap: 0.78rem;
  min-height: 0;
  max-height: none;
  padding: 1.25rem 0.75rem 0.9rem;
  border: 0;
  border-right: 1px solid rgba(24, 43, 68, 0.09);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: none;
}

.casework-map-sidebar .thread-finder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 0 0.3rem;
}

.casework-map-sidebar .thread-finder-head h2 {
  color: var(--ink-940);
  font-size: 0.96rem;
  font-weight: 800;
}

.casework-map-sidebar .thread-finder-head span {
  color: var(--ink-620);
  font-size: 0.72rem;
  font-weight: 750;
}

.casework-map-filters {
  gap: 0.5rem;
}

.casework-map-filters label {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  align-items: center;
  gap: 0.55rem;
  min-height: 2.35rem;
  padding: 0 0.7rem;
  border: 1px solid rgba(30, 50, 75, 0.12);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink-820);
  font-size: 0.72rem;
  font-weight: 800;
}

.casework-map-filters select {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink-940);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 750;
  text-align: right;
  box-shadow: none;
}

.casework-map-filters .portal-finder-actions {
  justify-content: flex-start;
  margin-top: 0.05rem;
}

.casework-map-filters .portal-finder-actions .btn {
  min-height: 2rem;
  padding: 0.35rem 0.58rem;
  font-size: 0.7rem;
}

.casework-map-list {
  align-content: start;
  min-height: 0;
  overflow: hidden;
  border-top: 1px solid rgba(24, 43, 68, 0.08);
}

.casework-map-list-row {
  gap: 0.38rem;
  min-height: 0;
  padding: 0.68rem 0.7rem;
  border: 0;
  border-bottom: 1px solid rgba(24, 43, 68, 0.08);
  border-left: 3px solid transparent;
  background: transparent;
  color: var(--ink-940);
}

.casework-map-list-row:hover,
.casework-map-list-row.is-active {
  border-left-color: #12a66c;
  background: linear-gradient(90deg, rgba(236, 252, 244, 0.94), rgba(255, 249, 230, 0.74));
}

.casework-map-list-main,
.casework-map-list-meta {
  gap: 0.18rem;
}

.casework-map-list-main strong {
  color: var(--ink-940);
  font-size: 0.73rem;
  line-height: 1.28;
}

.casework-map-list-main span,
.casework-map-list-meta span {
  color: var(--ink-620);
  font-size: 0.66rem;
  line-height: 1.3;
}

.casework-map-list-row .meta-chip-row {
  gap: 0.28rem;
}

.casework-map-list-row .meta-chip-row .badge {
  min-height: 1.15rem;
  padding: 0.08rem 0.34rem;
  border-radius: 4px;
  font-size: 0.56rem;
}

.casework-map-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.1rem;
  padding: 0;
  color: var(--ink-620);
  font-size: 0.72rem;
  font-weight: 700;
}

.casework-map-pager > div {
  display: flex;
  gap: 0.35rem;
}

.casework-map-page-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.9rem;
  min-height: 2rem;
  padding: 0.35rem 0.55rem;
  font-size: 0.72rem;
}

.casework-map-main {
  min-width: 0;
  padding: 0.7rem;
}

.casework-map-shell,
.casework-map-canvas {
  min-height: calc(100vh - 90px);
}

.casework-map-shell {
  border: 1px solid rgba(24, 43, 68, 0.1);
  border-radius: 0.7rem;
  background: #eef2f4;
  box-shadow: 0 16px 34px rgba(25, 44, 72, 0.07);
}

.casework-map-canvas {
  background: #eef2f4;
}

.casework-map-mode,
.casework-map-heat-mode {
  border-color: rgba(24, 43, 68, 0.1);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(25, 44, 72, 0.12);
}

.casework-map-mode button,
.casework-map-heat-mode button {
  color: var(--ink-720);
}

.casework-map-mode button:hover,
.casework-map-mode button.is-active,
.casework-map-heat-mode button:hover,
.casework-map-heat-mode button.is-active {
  background: #fff5d7;
  color: var(--ink-940);
}

.casework-map-heat-legend {
  border-color: rgba(24, 43, 68, 0.1);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink-820);
}

.casework-map-detail {
  display: grid;
  align-content: start;
  gap: 0.85rem;
  min-width: 0;
  padding: 0.7rem 0.85rem 0.85rem 0.15rem;
  border-left: 1px solid rgba(24, 43, 68, 0.07);
  background: rgba(255, 255, 255, 0.54);
}

.casework-map-selected,
.casework-map-nearby,
.casework-map-inspector {
  display: grid;
  gap: 0.72rem;
  padding: 1rem;
  border: 1px solid rgba(24, 43, 68, 0.1);
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 30px rgba(25, 44, 72, 0.06);
}

.casework-map-nearby[hidden] {
  display: none;
}

.casework-map-selected-head h2,
.casework-map-nearby h3,
.casework-map-inspector h3 {
  margin: 0;
  color: var(--ink-940);
  font-size: 0.9rem;
  line-height: 1.32;
}

.casework-map-selected-location,
.casework-map-selected-reference,
.casework-map-inspector p {
  margin: 0;
  color: var(--ink-720);
  font-size: 0.73rem;
  line-height: 1.42;
}

.casework-map-selected-reference {
  margin-top: -0.3rem;
}

.casework-map-detail-list {
  display: grid;
  gap: 0;
  margin: 0;
  border-top: 1px solid rgba(24, 43, 68, 0.09);
}

.casework-map-detail-list div {
  display: grid;
  grid-template-columns: minmax(78px, 0.72fr) minmax(0, 1.28fr);
  gap: 0.55rem;
  padding: 0.56rem 0;
  border-bottom: 1px solid rgba(24, 43, 68, 0.08);
}

.casework-map-detail-list dt {
  color: var(--ink-620);
  font-size: 0.64rem;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.casework-map-detail-list dd {
  min-width: 0;
  margin: 0;
  color: var(--ink-940);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.casework-map-status::before {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.32rem;
  border-radius: 50%;
  background: #10a673;
  content: "";
}

.casework-map-open-issue {
  width: 100%;
  min-height: 2.25rem;
  justify-content: center;
  margin-top: 0.05rem;
  text-decoration: none;
}

.casework-map-nearby > div,
.casework-map-inspector-records {
  display: grid;
  gap: 0;
  border-top: 1px solid rgba(24, 43, 68, 0.09);
}

.casework-map-nearby a,
.casework-map-inspector-record {
  display: grid;
  gap: 0.16rem;
  padding: 0.62rem 0;
  border-bottom: 1px solid rgba(24, 43, 68, 0.08);
  border-radius: 0;
  background: transparent;
  color: var(--ink-940);
  text-decoration: none;
}

.casework-map-nearby a strong,
.casework-map-inspector-record strong {
  font-size: 0.72rem;
}

.casework-map-nearby a span,
.casework-map-inspector-record span,
.casework-map-inspector-kicker,
.casework-map-inspector-category span,
.casework-map-inspector-stats span {
  color: var(--ink-620);
  font-size: 0.66rem;
}

.casework-map-inspector[data-risk-band="blue"],
.casework-map-inspector[data-risk-band="green"],
.casework-map-inspector[data-risk-band="amber"],
.casework-map-inspector[data-risk-band="red"] {
  border-color: rgba(24, 43, 68, 0.12);
}

.casework-map-inspector-stats div {
  background: #f7f9fc;
}

.casework-map-inspector-stats strong,
.casework-map-inspector-category strong {
  color: var(--ink-940);
}

.casework-map-workspace .leaflet-container {
  background: #eef2f4;
}

.casework-map-workspace .leaflet-popup-content-wrapper,
.casework-map-workspace .leaflet-popup-tip {
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(25, 44, 72, 0.16);
}

@media (max-width: 1240px) {
  .casework-map-workspace {
    grid-template-columns: 248px minmax(0, 1fr) 286px;
  }
}

@media (max-width: 980px) {
  .casework-map-workspace {
    grid-template-columns: 1fr;
  }

  .casework-map-sidebar,
  .casework-map-detail {
    border: 0;
    border-bottom: 1px solid rgba(24, 43, 68, 0.09);
  }

  .casework-map-sidebar {
    grid-template-rows: auto auto auto auto;
    max-height: none;
  }

  .casework-map-list {
    max-height: 32rem;
  }

  .casework-map-main {
    padding: 0.75rem;
  }

  .casework-map-shell,
  .casework-map-canvas {
    min-height: 34rem;
  }

  .casework-map-detail {
    padding: 0.75rem;
  }
}

.report-metrics {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.report-stat {
  border: 1px solid #c6d7ea;
  border-radius: var(--radius-lg);
  padding: 12px;
  background: linear-gradient(164deg, #f8fcff 0%, #edf5ff 100%);
}

.report-stat .label {
  margin: 0;
  color: var(--ink-620);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 800;
}

.report-stat .value {
  margin: 7px 0 0;
  color: var(--ink-980);
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: 1.65rem;
  line-height: 1;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.report-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.report-block {
  border: 1px solid #d0dceb;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #fcfeff 0%, #f5f9ff 100%);
  padding: 11px 12px;
}

.report-block h4 {
  margin-bottom: 8px;
}

.report-list {
  margin: 0;
  padding-left: 18px;
}

.report-list li {
  margin: 5px 0;
}

.roll-forward-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

li {
  margin: 6px 0;
}

.muted {
  color: var(--ink-620);
  font-size: 0.91rem;
}

.alert {
  margin-bottom: 10px;
  border-radius: var(--radius-md);
  border: 1px solid #efc5c5;
  background: linear-gradient(180deg, #fff5f5, #ffeaea);
  color: var(--danger-ink);
  padding: 10px 12px;
  font-weight: 780;
}

.auth-panel {
  max-width: 560px;
  margin: 14px auto;
}

code {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.87em;
  background: #eff4fb;
  border: 1px solid #d0dceb;
  border-radius: 7px;
  padding: 2px 6px;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 12px;
  z-index: 55;
  width: min(780px, calc(100% - 18px));
  display: flex;
  gap: 4px;
  padding: 5px;
  border-radius: 18px;
  border: 1px solid rgba(190, 206, 225, 0.98);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  box-shadow: 0 16px 32px rgba(11, 24, 43, 0.16);
  overflow-x: auto;
}

.bottom-nav a {
  flex: 1;
  min-width: 90px;
  min-height: 48px;
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  color: var(--ink-760);
  font-size: 0.88rem;
  font-weight: 760;
}

.bottom-nav a:hover {
  background: var(--surface-tint);
  color: var(--ink-980);
}

.bottom-nav a.active {
  background: linear-gradient(145deg, #eaf4ff, #e0edff);
  color: #133a64;
  box-shadow: inset 0 0 0 1px #c4d6ed;
}

.fab {
  position: fixed;
  right: 20px;
  bottom: 86px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  text-decoration: none;
  font-size: 2rem;
  line-height: 1;
  background: linear-gradient(145deg, #0f7668, #0b5a4f);
  box-shadow: 0 14px 24px rgba(8, 73, 64, 0.44);
}

.fab:hover {
  filter: brightness(1.04);
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 860px) {
  .shell {
    padding: 12px 12px 8px;
  }

  .metadata {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  body {
    padding-bottom: 22px;
  }

  .shell {
    max-width: 460px;
    padding: 10px 10px 8px;
  }

  .grid.two {
    grid-template-columns: 1fr;
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .check-grid {
    grid-template-columns: 1fr;
  }

  .view-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .view-tile {
    min-height: 48px;
    font-size: 0.78rem;
  }

  .topbar {
    top: 4px;
    align-items: flex-start;
    padding: 8px 10px;
    margin-bottom: 10px;
    border-radius: 14px;
  }

  .topbar h1 {
    font-size: 1.45rem;
    flex: 1 1 140px;
  }

  .topbar .row {
    flex: 0 1 auto;
    gap: 6px;
    max-width: 100%;
  }

  .app-top-nav {
    top: 74px;
    gap: 4px;
    margin-bottom: 10px;
    padding: 4px;
    border-radius: 14px;
  }

  .app-top-nav a {
    flex: 1 1 calc(50% - 4px);
    min-height: 52px;
    font-size: 0.82rem;
    padding: 7px 8px;
    gap: 4px;
  }

  .app-top-nav-icon {
    width: 18px;
    height: 18px;
  }

  .panel {
    padding: 12px;
    border-radius: 14px;
    margin-bottom: 8px;
  }

  .page-hero,
  .section-card {
    padding: 12px;
    border-radius: 16px;
  }

  .section-head {
    align-items: stretch;
  }

  .field-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .cases-toolbar-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  input,
  textarea,
  select {
    font-size: 16px;
  }

  .record-card-head,
  .form-submit-row {
    align-items: stretch;
  }

  .case-status-form {
    width: 100%;
    grid-template-columns: 1fr auto;
  }

  .report-metrics,
  .report-grid,
  .roll-forward-form {
    grid-template-columns: 1fr;
  }

  .roll-forward-form .btn {
    width: 100%;
  }

  .stack,
  .stack.compact,
  .case-list,
  .stacked-list {
    gap: 7px;
  }

  .case-list li,
  .stacked-list li {
    padding: 10px;
    border-radius: 11px;
  }

  .recent-case-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .recent-case-grid li {
    padding: 0;
  }

  .recent-case-tile .record-link {
    min-height: 78px;
    padding: 10px;
  }

  .metadata {
    gap: 7px;
  }

  .attachment-card-grid {
    grid-template-columns: 1fr;
  }

  .metadata div {
    padding: 8px;
    border-radius: 11px;
  }

  .app-accordion > summary {
    min-height: 46px;
    padding: 11px 12px;
  }

  .app-accordion > .app-accordion-body {
    padding: 2px 12px 12px;
  }

  .fab {
    right: 14px;
    bottom: 18px;
    width: 50px;
    height: 50px;
    font-size: 1.7rem;
  }

  .account-expander > div {
    right: -4px;
    min-width: 156px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .panel,
  .btn,
  .metric,
  .fab {
    animation: none;
    transition: none;
  }
}

.field-mode-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  background: linear-gradient(180deg, #eef7f4 0%, #f8fbfa 100%);
  border-color: rgba(11, 143, 122, 0.18);
}

.field-mode-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  width: 44px;
  padding: 0;
}

.field-mode-toggle-icon {
  position: relative;
  display: inline-flex;
  width: 22px;
  height: 22px;
  color: #214c79;
}

.field-mode-toggle-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.field-toggle-dot {
  position: absolute;
  right: -2px;
  bottom: -1px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #9aa9bb;
  border: 2px solid #fff;
  box-shadow: inset 0 0 0 1px rgba(13, 23, 38, 0.08);
}

.field-toggle-dot-on {
  background: #0b8f7a;
}

.field-toggle-dot-pending {
  background: #d49712;
}

.field-mode-bar.field-mode-error {
  background: linear-gradient(180deg, #fff3f1 0%, #fff9f8 100%);
  border-color: rgba(187, 64, 41, 0.2);
}

.field-mode-bar-main,
.field-mode-bar-actions,
.outbox-item-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field-mode-bar-actions {
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
}

.outbox-panel {
  margin-bottom: 12px;
}

.outbox-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(29, 49, 73, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
}

.attachment-thumb-button {
  display: block;
  width: 100%;
  margin: 8px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.photo-viewer-open {
  overflow: hidden;
}

.photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 90;
}

.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 95;
}

.confirm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 15, 25, 0.62);
}

.confirm-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(440px, calc(100% - 24px));
  margin: 14vh auto 0;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid #d7e0eb;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 20px 40px rgba(11, 24, 43, 0.24);
}

.photo-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 15, 25, 0.78);
}

.photo-viewer-dialog {
  position: relative;
  z-index: 1;
  width: min(960px, calc(100% - 24px));
  max-height: calc(100vh - 24px);
  margin: 12px auto;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(16, 23, 34, 0.96);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.photo-viewer-dialog .section-head {
  margin-bottom: 10px;
  color: #f7fbff;
}

.photo-viewer-image {
  display: block;
  width: 100%;
  max-height: calc(100vh - 120px);
  object-fit: contain;
  border-radius: 12px;
  background: #0b0f16;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.is-hidden {
  display: none !important;
}

.shell {
  max-width: 1420px;
  padding: 20px 18px 18px;
}

.workspace-content {
  display: grid;
  gap: 14px;
}

.topbar {
  gap: 16px;
  padding: 14px 18px;
}

.topbar h1 {
  font-size: clamp(1.72rem, 2vw, 2.05rem);
}

.app-top-nav {
  gap: 8px;
  padding: 8px;
}

.app-top-nav a {
  flex: 0 1 auto;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  padding: 10px 14px;
  border-radius: 13px;
}

.app-top-nav-icon {
  width: 18px;
  height: 18px;
}

.desktop-page {
  display: grid;
  gap: 14px;
}

.desktop-home {
  display: grid;
  gap: 14px;
}

.desktop-home-hero {
  display: grid;
  gap: 8px;
}

.desktop-home-hero-copy {
  display: grid;
  gap: 6px;
}

.desktop-home-hero-copy h2 {
  margin: 0;
  font-size: clamp(1.8rem, 2.5vw, 2.4rem);
}

.desktop-home-grid {
  display: grid;
  grid-template-columns: minmax(280px, 330px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.desktop-home-rail,
.desktop-home-main {
  display: grid;
  gap: 14px;
}

.desktop-home-panel {
  margin-bottom: 0;
}

.desktop-action-list {
  display: grid;
  gap: 10px;
}

.desktop-action-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid #d4e0ec;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  color: var(--ink-940);
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(11, 24, 43, 0.06);
}

.desktop-action-item:hover {
  border-color: #b7cadf;
  box-shadow: 0 12px 24px rgba(11, 24, 43, 0.1);
  color: var(--ink-980);
}

.desktop-action-item strong,
.desktop-action-item small {
  display: block;
}

.desktop-action-item strong {
  margin-bottom: 3px;
  font-size: 1rem;
}

.desktop-action-item small {
  color: var(--ink-620);
  font-size: 0.84rem;
}

.desktop-action-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 8px 18px rgba(39, 66, 112, 0.16);
}

.desktop-action-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.desktop-action-icon-issue,
.desktop-action-icon-log {
  background: linear-gradient(145deg, #44c495 0%, #28a86f 100%);
}

.desktop-action-icon-update,
.desktop-action-icon-update-log {
  background: linear-gradient(145deg, #5c97f1 0%, #3c75d9 100%);
}

.desktop-home-stat-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.desktop-home-stat {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid #d5e2ef;
  border-radius: 15px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  color: var(--ink-940);
  text-decoration: none;
}

.desktop-home-stat strong {
  font-size: 1.55rem;
  line-height: 1;
}

.desktop-home-stat span {
  color: var(--ink-620);
  font-size: 0.83rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.desktop-attention-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.desktop-home-dual {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.desktop-record-list {
  display: grid;
  gap: 8px;
}

.desktop-record-row {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #d7e3ef;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  color: var(--ink-940);
  text-decoration: none;
}

.desktop-record-row:hover {
  border-color: #bccfe3;
  color: var(--ink-980);
}

.desktop-record-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.desktop-record-copy strong {
  font-size: 0.96rem;
}

.desktop-record-copy span {
  color: var(--ink-620);
  font-size: 0.86rem;
}

.desktop-record-meta {
  display: flex;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.desktop-detail-page {
  display: grid;
  gap: 14px;
}

.desktop-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.desktop-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 320px);
  gap: 16px;
  align-items: start;
}

.desktop-detail-hero-main {
  display: grid;
  gap: 8px;
}

.desktop-detail-hero-main h2 {
  margin: 0;
  font-size: clamp(1.65rem, 2.5vw, 2.3rem);
}

.desktop-detail-hero-main h2 a {
  color: inherit;
  text-decoration: none;
}

.desktop-detail-hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.desktop-detail-stat {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid #d6e2ee;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.desktop-detail-stat strong {
  font-size: 1.1rem;
}

.desktop-detail-stat span {
  color: var(--ink-620);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.desktop-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.9fr);
  gap: 14px;
  align-items: start;
}

.desktop-detail-main,
.desktop-detail-side {
  display: grid;
  gap: 14px;
}

.desktop-detail-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.detail-status-expander {
  margin-top: 0;
}

.detail-status-expander > summary {
  list-style: none;
}

.detail-status-expander > summary::-webkit-details-marker {
  display: none;
}

.detail-status-menu {
  margin-top: 8px;
  min-width: 220px;
}

.detail-status-menu .btn {
  width: 100%;
  justify-content: center;
}

.desktop-detail-side .attachment-thumb {
  max-width: 100%;
}

.desktop-detail-side .case-summary-grid {
  grid-template-columns: 1fr;
}

.desktop-form-shell {
  gap: 14px;
}

.desktop-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(290px, 0.85fr);
  gap: 14px;
  align-items: start;
}

.desktop-form-main,
.desktop-form-side {
  display: grid;
  gap: 14px;
}

.desktop-form-submit-card .btn {
  width: 100%;
  justify-content: center;
}

.portal-page-shell-builder .desktop-form-shell .thread-block,
.portal-page-shell-builder .desktop-form-shell .app-accordion,
.portal-page-shell-builder .desktop-form-shell .desktop-form-submit-card {
  border-color: rgba(136, 157, 184, 0.22);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink-940);
}

.portal-page-shell-builder .desktop-form-shell label,
.portal-page-shell-builder .desktop-form-shell .field-label,
.portal-page-shell-builder .desktop-form-shell .app-accordion > summary,
.portal-page-shell-builder .desktop-form-shell .section-head h2 {
  color: var(--ink-940);
}

.portal-page-shell-builder .desktop-form-shell .support-text,
.portal-page-shell-builder .desktop-form-shell .muted {
  color: var(--ink-620);
}

.portal-page-shell-builder .desktop-form-shell input:not([type="checkbox"]):not([type="file"]),
.portal-page-shell-builder .desktop-form-shell textarea,
.portal-page-shell-builder .desktop-form-shell select {
  border-color: #c6d4e6;
  background: #ffffff;
  color: var(--ink-940);
}

.portal-page-shell-builder .desktop-form-shell input::placeholder,
.portal-page-shell-builder .desktop-form-shell textarea::placeholder {
  color: var(--ink-500);
}

/* Normal issue capture mirrors the iPhone field order without desktop-only guidance panels. */
.issue-capture-page {
  max-width: 920px;
}

.issue-capture-header {
  margin-bottom: 0.15rem;
}

.issue-capture-form {
  gap: 1rem;
}

.issue-capture-card,
.issue-capture-options,
.issue-capture-source {
  border-color: rgba(136, 157, 184, 0.22);
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink-940);
}

.issue-capture-source {
  display: grid;
  gap: 0.15rem;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(136, 157, 184, 0.22);
  border-radius: 12px;
}

.issue-capture-source span,
.issue-capture-role span,
.field-optional,
.issue-capture-status {
  color: var(--ink-620);
  font-size: 0.86rem;
}

.issue-capture-role {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(136, 157, 184, 0.2);
}

.issue-capture-fields {
  display: grid;
  gap: 0.9rem;
}

.issue-capture-core {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.issue-capture-fields label {
  display: grid;
  gap: 0.38rem;
  color: var(--ink-940);
  font-weight: 800;
}

.issue-capture-fields input:not([type="checkbox"]),
.issue-capture-fields textarea,
.issue-capture-fields select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #c6d4e6;
  border-radius: 8px;
  background: #fff;
  color: var(--ink-940);
}

.issue-capture-fields textarea {
  min-height: 126px;
}

.issue-capture-location-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: -0.25rem;
}

.issue-capture-options {
  border: 1px solid rgba(136, 157, 184, 0.22);
  border-radius: 12px;
  overflow: hidden;
}

.issue-capture-options > summary {
  padding: 1rem 1.1rem;
  color: var(--ink-940);
  cursor: pointer;
  font-weight: 800;
}

.issue-capture-options[open] > summary {
  border-bottom: 1px solid rgba(136, 157, 184, 0.2);
}

.issue-capture-options-body {
  padding: 1rem 1.1rem 1.1rem;
}

.issue-capture-check {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.issue-capture-check input {
  width: 18px;
  height: 18px;
}

.issue-capture-upload-list {
  display: grid;
  gap: 0.3rem;
  margin: -0.15rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink-620);
  font-size: 0.9rem;
}

.issue-capture-upload-list li::before {
  content: "Attached: ";
  font-weight: 800;
}

.issue-capture-submit {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 0.7rem;
  padding: 1rem 0 0.2rem;
  background: linear-gradient(to bottom, rgba(250, 247, 240, 0), rgba(250, 247, 240, 0.96) 26%);
}

@media (max-width: 640px) {
  .issue-capture-core {
    grid-template-columns: 1fr;
  }

  .issue-capture-submit {
    justify-content: stretch;
  }

  .issue-capture-submit .btn {
    flex: 1;
    justify-content: center;
  }
}

.update-capture-map {
  min-height: 340px;
  height: min(42vh, 420px);
  border: 1px solid #c6d4e6;
  background: #eef4f8;
}

.archive-grid {
  align-items: start;
}

.archive-record-row {
  align-items: center;
}

.archive-record-actions {
  display: grid;
  gap: 8px;
  justify-items: end;
  min-width: 140px;
}

.desktop-page-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  padding: 6px 2px 0;
}

.desktop-page-copy {
  display: grid;
  gap: 6px;
  max-width: 720px;
}

.desktop-page-copy h2 {
  margin: 0;
  font-size: clamp(1.7rem, 2.3vw, 2.2rem);
}

.desktop-page-copy .support-text {
  font-size: 0.98rem;
}

.workbench-layout {
  display: grid;
  grid-template-columns: minmax(290px, 360px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.workbench-sidebar,
.workbench-main {
  display: grid;
  gap: 14px;
}

.workbench-panel,
.workbench-main-panel {
  margin-bottom: 0;
}

.workbench-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.workbench-metric-grid .metric {
  min-height: 118px;
  display: grid;
  align-content: end;
}

.cases-toolbar-grid-stacked {
  grid-template-columns: 1fr;
}

.workbench-filter-form {
  gap: 12px;
}

.workbench-filter-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.attention-stack {
  display: grid;
  gap: 10px;
}

.workbench-results-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 14px;
}

.workbench-results-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.issue-feed-desktop,
.update-feed-desktop {
  gap: 12px;
}

.issue-workbench-card,
.update-workbench-card {
  border-radius: 20px;
}

.issue-workbench-summary,
.update-workbench-summary {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
}

.issue-workbench-main,
.update-workbench-main {
  gap: 10px;
}

.issue-workbench-head,
.update-workbench-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 14px;
}

.issue-workbench-copy,
.update-workbench-copy {
  display: grid;
  gap: 7px;
}

.issue-workbench-copy strong,
.update-workbench-copy strong {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-620);
}

.issue-workbench-tags,
.update-workbench-tags {
  justify-content: flex-end;
}

.issue-workbench-summary-text,
.update-workbench-title {
  margin: 0;
}

.issue-workbench-meta,
.update-workbench-meta {
  display: grid;
  gap: 8px;
  justify-items: end;
  align-content: start;
  min-width: 188px;
  padding-top: 0;
  border-top: 0;
}

.issue-workbench-meta span,
.update-workbench-meta span {
  justify-content: center;
}

.issue-workbench-detail,
.update-workbench-detail {
  gap: 14px;
}

.workbench-note-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.workbench-note-list li {
  padding: 12px;
  border: 1px solid #dce7e2;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbf9 100%);
}

.workbench-card-actions {
  display: flex;
  justify-content: flex-end;
}

.update-workbench-card::before {
  background: linear-gradient(180deg, #bfd4ea 0%, #7ba5d6 100%);
}

.update-workbench-card:hover {
  border-color: #bccbe0;
}

.update-workbench-detail {
  border-top-color: #d9e3ef;
  background: linear-gradient(180deg, rgba(246, 249, 253, 0.96) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.update-workbench-title {
  color: #20496f;
}

.update-workbench-shell {
  gap: 16px;
}

.update-workbench-grid {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.update-workbench-list,
.update-workbench-preview {
  display: grid;
  gap: 12px;
}

.update-list-row {
  padding: 0;
  border: 1px solid #d9e4ef;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 8px 18px rgba(11, 24, 43, 0.05);
}

.update-list-row-link {
  display: grid;
  gap: 9px;
  padding: 14px 15px;
  color: var(--ink-940);
  text-decoration: none;
  border-radius: 18px;
}

.update-list-row:hover {
  border-color: #bbcee2;
  box-shadow: 0 12px 24px rgba(11, 24, 43, 0.09);
}

.update-list-row:hover .update-list-row-link {
  color: var(--ink-980);
}

.update-list-row.is-active {
  border-color: #9fbfe1;
  background: linear-gradient(180deg, #f4f9ff 0%, #eaf3ff 100%);
  box-shadow: inset 0 0 0 1px #c2d9f1;
}

.update-list-row-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 10px;
}

.update-list-row-top strong {
  font-size: 1rem;
  line-height: 1.35;
}

.update-list-row p,
.update-list-row small {
  margin: 0;
}

.update-list-row p {
  color: var(--ink-620);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.update-list-row small {
  color: var(--ink-680);
  font-size: 0.9rem;
  line-height: 1.4;
}

.update-list-row-tags {
  justify-content: flex-start;
}

.update-preview-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 18px;
}

.update-preview-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #d8e3ee;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.update-preview-copy {
  display: grid;
  gap: 10px;
}

.update-preview-copy h3 {
  margin: 0;
  font-size: clamp(1.45rem, 2.3vw, 2rem);
}

.update-preview-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.update-preview-summary {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  border: 1px solid #cedae7;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #eef5fd 100%);
}

.update-preview-summary strong {
  color: var(--ink-620);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.update-preview-summary span {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--ink-940);
}

.update-preview-block {
  gap: 12px;
  border-color: #d8e4ef;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
}

.update-preview-block h3 {
  margin: 0;
}

.update-preview-block p {
  margin: 0;
  line-height: 1.55;
}

.update-preview-note-list {
  display: grid;
  gap: 10px;
}

.update-preview-note-list li {
  padding: 12px;
  border: 1px solid #dce7e2;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbf9 100%);
}

@media (max-width: 1040px) {
  .desktop-home-grid,
  .desktop-form-layout,
  .desktop-detail-layout,
  .desktop-detail-hero,
  .note-edit-grid,
  .workbench-layout,
  .update-workbench-grid,
  .update-preview-summary-grid {
    grid-template-columns: 1fr;
  }

  .desktop-attention-grid,
  .workbench-metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .attention-stack {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .brand-link,
  .desktop-detail-head,
  .desktop-home-hero,
  .desktop-page-head,
  .workbench-results-head,
  .issue-workbench-head,
  .update-workbench-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .desktop-home-stat-list,
  .desktop-detail-hero-stats,
  .desktop-attention-grid,
  .desktop-home-dual,
  .workbench-metric-grid,
  .attention-stack,
  .workbench-note-list {
    grid-template-columns: 1fr;
  }

  .issue-workbench-summary,
  .update-workbench-summary {
    grid-template-columns: 1fr;
  }

  .issue-workbench-meta,
  .update-workbench-meta {
    justify-items: start;
    min-width: 0;
  }

  .field-mode-bar {
    grid-template-columns: 1fr;
  }

  .field-mode-bar-actions,
  .outbox-item {
    grid-template-columns: 1fr;
  }

  .field-mode-bar-actions {
    justify-content: stretch;
  }
}

body {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0) 34%),
    linear-gradient(180deg, #edf3f9 0%, #e8eef6 100%);
}

.portal-shell {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  min-height: 100vh;
}

.portal-sidebar {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 20px;
  padding: 20px 12px 18px;
  background: linear-gradient(180deg, var(--portal-sidebar-top) 0%, var(--portal-sidebar-bottom) 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  height: 100vh;
}

.portal-brand {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
  align-items: center;
  color: #f3f8fc;
  text-decoration: none;
}

.portal-brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.portal-brand-mark img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.portal-brand-copy {
  display: grid;
  gap: 1px;
}

.portal-brand-copy strong {
  font-size: 1rem;
}

.portal-brand-copy small {
  color: rgba(236, 244, 250, 0.66);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.portal-nav {
  display: grid;
  gap: 8px;
  align-content: start;
}

.portal-nav-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 38px;
  padding: 9px 11px;
  border-radius: 12px;
  color: rgba(236, 244, 250, 0.82);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
  text-align: left;
  transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.portal-nav-link:hover,
.portal-nav-link.is-active {
  color: #ffffff;
  background: rgba(109, 154, 121, 0.28);
}

.portal-sidebar-footer {
  display: grid;
  gap: 10px;
  justify-items: start;
}

.portal-user-chip {
  display: grid;
  grid-template-columns: 36px 1fr;
  justify-items: start;
  gap: 8px;
  color: rgba(236, 244, 250, 0.88);
  text-align: left;
}

.portal-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-weight: 800;
}

.portal-user-copy {
  display: grid;
}

.portal-account-menu {
  position: relative;
}

.portal-account-summary {
  list-style: none;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.portal-account-summary::-webkit-details-marker {
  display: none;
}

.portal-account-sheet {
  position: absolute;
  left: calc(100% + 12px);
  bottom: 0;
  min-width: 160px;
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid #d8e4ef;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 20px 36px rgba(11, 24, 43, 0.16);
  z-index: 20;
}

.portal-account-sheet a {
  padding: 9px 10px;
  border-radius: 10px;
  color: var(--ink-940);
  text-decoration: none;
  font-weight: 600;
}

.portal-account-sheet a:hover {
  background: #eef5fb;
}

.portal-stage {
  display: grid;
  gap: 18px;
  min-width: 0;
  padding: 18px 22px 24px;
}

.portal-commandbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1440px, 100%);
  margin: 0 auto;
}

.portal-searchbar {
  flex: 1 1 auto;
  max-width: 520px;
}

.portal-searchbar input {
  width: 100%;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid #d5e2ee;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px rgba(11, 24, 43, 0.05);
}

.portal-command-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.portal-content {
  display: grid;
  gap: 16px;
  width: min(1440px, 100%);
  margin: 0 auto;
  min-width: 0;
}

.portal-page {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.portal-page-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.portal-page-header h1 {
  margin: 2px 0 4px;
  font-size: clamp(1.9rem, 3vw, 2.45rem);
}

.portal-page-actions {
  display: flex;
  gap: 10px;
}

.portal-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.portal-stat-card {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid #d7e4ef;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f6fafc 100%);
  color: var(--ink-940);
  text-decoration: none;
  box-shadow: 0 12px 24px rgba(11, 24, 43, 0.05);
}

.portal-stat-card strong {
  font-size: 1.6rem;
  line-height: 1;
  color: #2c7c69;
}

.portal-stat-card span {
  color: var(--ink-680);
  font-weight: 700;
}

.portal-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.8fr);
  gap: 16px;
  align-items: start;
}

.portal-workspace-grid {
  display: grid;
  gap: 18px;
  align-items: start;
}

.portal-workspace-grid-issues {
  grid-template-columns: 220px minmax(0, 1fr) 320px;
}

.portal-workspace-grid-updates {
  grid-template-columns: 220px minmax(0, 1fr) 320px;
}

.portal-workspace-grid-report {
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 340px);
}

.portal-workspace-grid-map {
  grid-template-columns: minmax(0, 1.35fr) 300px;
}

.portal-stack {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.portal-panel {
  padding: 16px;
  border-radius: 20px;
  border: 1px solid #d7e4ef;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(247, 251, 255, 0.94) 100%);
  box-shadow: 0 18px 30px rgba(11, 24, 43, 0.06);
  min-width: 0;
}

.portal-panel .section-head {
  margin-bottom: 14px;
}

.portal-activity-list,
.portal-record-list,
.portal-note-list,
.portal-action-grid,
.portal-filter-links,
.portal-attention-stack {
  display: grid;
  gap: 10px;
}

.portal-activity-row,
.portal-record-row,
.portal-action-card,
.portal-filter-link,
.portal-table-row {
  display: grid;
  gap: 5px;
  padding: 12px 13px;
  border: 1px solid #d8e4ef;
  border-radius: 16px;
  background: #ffffff;
  color: var(--ink-940);
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(11, 24, 43, 0.04);
  min-width: 0;
}

.portal-activity-row:hover,
.portal-record-row:hover,
.portal-action-card:hover,
.portal-filter-link:hover,
.portal-table-row:hover {
  border-color: #b6cbde;
  box-shadow: 0 14px 24px rgba(11, 24, 43, 0.08);
}

.portal-activity-copy,
.portal-record-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.portal-activity-copy strong,
.portal-record-main strong,
.portal-table-main strong,
.portal-action-card strong {
  color: var(--ink-980);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.portal-activity-copy small,
.portal-record-main small,
.portal-table-main small,
.portal-action-card span,
.portal-note-row small {
  color: var(--ink-680);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.portal-activity-meta,
.portal-record-side {
  display: grid;
  gap: 4px;
  justify-items: end;
  color: var(--ink-640);
  font-size: 0.85rem;
}

.portal-attention-card {
  display: grid;
  gap: 10px;
  padding: 14px 15px;
  border: 1px solid #d7e4ef;
  border-radius: 18px;
  background: #ffffff;
}

.portal-attention-card.is-due {
  border-color: #b7dfcf;
  background: #f4fbf7;
}

.portal-attention-card.is-overdue {
  border-color: #ebc3c3;
  background: #fff5f5;
}

.portal-attention-card.is-stale {
  border-color: #ead8b8;
  background: #fffaf0;
}

.portal-filter-form,
.portal-report-preview {
  display: grid;
  gap: 12px;
}

.portal-form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.portal-inline-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.portal-filter-inline {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}

.portal-filter-links {
  grid-template-columns: 1fr;
}

.portal-filter-link {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.portal-filter-link.is-active,
.portal-table-row.is-active {
  border-color: #9fbfe1;
  background: linear-gradient(180deg, #f4f9ff 0%, #eaf3ff 100%);
  box-shadow: inset 0 0 0 1px #c2d9f1;
}

.portal-table {
  display: grid;
}

.portal-table-head,
.portal-table-row {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) 150px 210px 96px;
  gap: 12px;
  align-items: center;
}

.portal-table-head {
  padding: 0 8px 10px;
  color: var(--ink-620);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portal-table-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.portal-copy-block {
  display: grid;
  gap: 8px;
  padding: 13px 14px;
  border: 1px solid #d8e4ef;
  border-radius: 16px;
  background: #ffffff;
}

.portal-copy-block p,
.portal-note-row p {
  margin: 0;
  line-height: 1.55;
}

.portal-note-row {
  display: grid;
  gap: 6px;
  padding: 13px 14px;
  border: 1px solid #d8e4ef;
  border-radius: 16px;
  background: #ffffff;
}

.portal-mini-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.portal-mini-stats div {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  border: 1px solid #d5e1ec;
  border-radius: 16px;
  background: #ffffff;
}

.portal-mini-stats strong {
  color: var(--ink-620);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portal-mini-stats span {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink-940);
}

.portal-map-canvas {
  min-height: 560px;
  border-radius: 18px;
  overflow: hidden;
}

.portal-stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.portal-stat-strip-card {
  display: grid;
  gap: 4px;
  padding: 12px 13px;
  border: 1px solid #d7e4ef;
  border-radius: 16px;
  background: #ffffff;
}

.portal-stat-strip-card strong {
  font-size: 1.35rem;
  color: var(--ink-940);
}

.portal-stat-strip-card span {
  color: var(--ink-680);
  font-size: 0.88rem;
  font-weight: 700;
}

.portal-inline-actions {
  display: flex;
  gap: 8px;
}

.owner-access-list {
  display: grid;
  gap: 12px;
}

.owner-access-card {
  overflow: hidden;
}

.owner-access-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.owner-access-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.owner-access-main strong {
  color: var(--ink-980);
  display: block;
  overflow-wrap: anywhere;
}

.owner-access-main small {
  color: var(--ink-680);
}

.owner-access-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.owner-access-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 8px 0 14px;
}

.owner-access-facts div {
  display: grid;
  gap: 4px;
  padding: 12px 13px;
  border: 1px solid #d8e4ef;
  border-radius: 14px;
  background: #ffffff;
}

.owner-access-facts span {
  color: var(--ink-620);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.owner-access-facts strong {
  color: var(--ink-940);
  font-size: 0.92rem;
  line-height: 1.35;
}

.owner-access-form {
  margin-top: 2px;
}

.owner-access-form .portal-inline-grid {
  grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(120px, 0.7fr));
}

@media (max-width: 1180px) {
  .owner-access-facts,
  .owner-access-form .portal-inline-grid {
    grid-template-columns: 1fr;
  }
}

.portal-split-list,
.portal-split-detail {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.portal-split-row {
  display: grid;
  gap: 7px;
  padding: 13px 14px;
  border: 1px solid #d8e4ef;
  border-radius: 16px;
  background: #ffffff;
  color: var(--ink-940);
  text-decoration: none;
  min-width: 0;
}

.portal-split-row.is-active {
  border-color: #9fbfe1;
  background: linear-gradient(180deg, #f4f9ff 0%, #eaf3ff 100%);
  box-shadow: inset 0 0 0 1px #c2d9f1;
}

.portal-split-row-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
  min-width: 0;
}

.portal-split-row-top strong {
  color: var(--ink-980);
  line-height: 1.35;
  min-width: 0;
  flex: 1 1 auto;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.portal-split-row-top span {
  color: var(--ink-640);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.portal-side-rail {
  align-content: start;
}

.portal-workbench-panel {
  min-height: 0;
}

.portal-scroll-region {
  overflow: auto;
  padding-right: 6px;
}

.portal-scroll-region-medium {
  max-height: 320px;
}

.portal-scroll-region-short {
  max-height: 240px;
}

.portal-scroll-region-tall {
  max-height: 520px;
}

.portal-table-scroll {
  min-width: 0;
}

.portal-worklist-shell {
  display: grid;
  gap: 10px;
}

.portal-worklist-head,
.portal-worklist-row {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) 160px 140px;
  gap: 12px;
  align-items: center;
}

.portal-worklist-head {
  padding: 0 8px;
  color: var(--ink-620);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portal-worklist-body {
  display: grid;
  gap: 10px;
}

.portal-worklist-row {
  padding: 12px 13px;
  border: 1px solid #d8e4ef;
  border-radius: 16px;
  background: #ffffff;
  color: var(--ink-940);
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(11, 24, 43, 0.04);
}

.portal-worklist-row:hover {
  border-color: #b6cbde;
  box-shadow: 0 14px 24px rgba(11, 24, 43, 0.08);
}

.portal-worklist-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.portal-worklist-main strong,
.portal-worklist-main small {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.portal-worklist-main strong {
  -webkit-line-clamp: 2;
}

.portal-worklist-main small {
  -webkit-line-clamp: 2;
  color: var(--ink-680);
}

.portal-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.portal-photo-card {
  display: block;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #d8e4ef;
  background: #f7fbff;
}

.portal-photo-card img {
  display: block;
  width: 100%;
  height: 110px;
  object-fit: cover;
}

.portal-photo-card-large img {
  height: 180px;
}

.portal-report-setup-form .portal-inline-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-link-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

@media (min-width: 1160px) {
  .portal-stage {
    padding-inline: 24px;
  }
}

@media (max-width: 1180px) {
  .portal-dashboard-grid,
  .portal-workspace-grid-issues,
  .portal-workspace-grid-updates,
  .portal-workspace-grid-report,
  .portal-workspace-grid-map,
  .portal-stat-grid,
  .portal-stat-strip {
    grid-template-columns: 1fr;
  }

  .portal-table-head,
  .portal-table-row {
    grid-template-columns: 1fr;
  }

  .portal-page-header,
  .portal-commandbar {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 860px) {
  .portal-shell {
    grid-template-columns: 1fr;
  }

  .portal-sidebar {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }

  .portal-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .portal-sidebar-footer {
    justify-items: start;
  }

  .portal-brand-copy,
  .portal-user-copy {
    display: grid;
  }
}

/* Desktop rebuild overrides */

.portal-shell {
  grid-template-columns: 156px minmax(0, 1fr);
}

.portal-sidebar {
  padding: 16px 10px 14px;
}

.portal-brand {
  grid-template-columns: 36px 1fr;
  gap: 10px;
}

.portal-brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.portal-brand-mark img {
  width: 22px;
  height: 22px;
}

.portal-brand-copy strong {
  font-size: 0.96rem;
}

.portal-brand-copy small {
  font-size: 0.72rem;
}

.portal-nav {
  gap: 6px;
}

.portal-nav-link {
  min-height: 36px;
  padding: 8px 10px;
  font-size: 0.8rem;
}

.portal-stage {
  padding: 18px 20px 22px;
}

.portal-commandbar,
.portal-content {
  width: min(1320px, 100%);
}

.portal-searchbar {
  max-width: 420px;
}

.portal-searchbar input {
  min-height: 40px;
}

.portal-page-header-compact {
  margin-bottom: 2px;
}

.desk-grid {
  display: grid;
  gap: 18px;
  align-items: start;
}

.desk-grid-dashboard {
  grid-template-columns: minmax(0, 1.8fr) 300px;
}

.desk-grid-issues {
  grid-template-columns: 210px minmax(0, 1fr) 286px;
}

.desk-grid-updates {
  grid-template-columns: 210px minmax(0, 1fr) 286px;
}

.desk-main,
.desk-side,
.desk-filter-rail {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.desk-panel {
  padding: 16px;
  border: 1px solid #d7e4ef;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(247,251,255,0.94) 100%);
  box-shadow: 0 16px 30px rgba(11,24,43,0.055);
  min-width: 0;
}

.desk-panel-main {
  padding: 14px 16px;
}

.desk-stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.desk-stat-card {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid #d8e4ef;
  background: #fff;
  color: var(--ink-940);
  text-decoration: none;
}

.desk-stat-card strong {
  font-size: 1.5rem;
  color: #2a7b69;
}

.desk-stat-card span {
  font-weight: 700;
  color: var(--ink-680);
}

.desk-scroll {
  overflow: auto;
  padding-right: 6px;
}

.desk-scroll-activity {
  max-height: 400px;
}

.desk-scroll-table {
  max-height: 360px;
}

.desk-scroll-issues {
  max-height: 520px;
}

.desk-scroll-updates {
  max-height: 300px;
}

.desk-activity-list,
.desk-action-list,
.desk-note-stack,
.desk-link-list,
.desk-status-stack,
.desk-update-list {
  display: grid;
  gap: 10px;
}

.desk-activity-row,
.desk-action-row,
.desk-note-card,
.desk-link-row,
.desk-update-row,
.desk-selected-card,
.desk-worktable-row {
  display: grid;
  gap: 6px;
  padding: 12px 13px;
  border: 1px solid #d8e4ef;
  border-radius: 16px;
  background: #fff;
  color: var(--ink-940);
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(11,24,43,0.04);
  min-width: 0;
}

.desk-activity-row:hover,
.desk-action-row:hover,
.desk-note-card-link:hover,
.desk-link-row:hover,
.desk-update-row:hover,
.desk-worktable-row:hover {
  border-color: #b8cbde;
  box-shadow: 0 14px 24px rgba(11,24,43,0.07);
}

.desk-activity-row {
  grid-template-columns: minmax(0, 1fr) 96px;
  align-items: start;
}

.desk-activity-main,
.desk-selected-main,
.desk-worktable-main,
.desk-update-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.desk-activity-main strong,
.desk-selected-main strong,
.desk-worktable-main strong,
.desk-update-main strong,
.desk-action-row strong,
.desk-note-card strong {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  -webkit-line-clamp: 2;
}

.desk-activity-main small,
.desk-selected-main span,
.desk-worktable-main small,
.desk-update-main small,
.desk-action-row span,
.desk-note-card p {
  color: var(--ink-680);
  margin: 0;
}

.desk-activity-side {
  display: grid;
  gap: 3px;
  justify-items: end;
  color: var(--ink-640);
  font-size: 0.8rem;
}

.desk-worktable-shell {
  display: grid;
  gap: 10px;
}

.desk-worktable-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.desk-inline-search {
  width: 100%;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #d8e4ef;
  border-radius: 999px;
  background: #fff;
}

.desk-worktable-head,
.desk-worktable-row {
  display: grid;
  gap: 12px;
  align-items: center;
}

.desk-worktable-head {
  padding: 0 6px;
  color: var(--ink-620);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.desk-worktable-head-issues,
.desk-worktable-row-issues {
  grid-template-columns: minmax(0, 1.8fr) 120px 150px 120px 120px 76px;
}

.desk-worktable-body {
  display: grid;
  gap: 10px;
}

.desk-worktable-row.is-active,
.desk-update-row.is-active,
.desk-link-row.is-active {
  border-color: #9fbfe1;
  background: linear-gradient(180deg, #f4f9ff 0%, #eaf3ff 100%);
  box-shadow: inset 0 0 0 1px #c2d9f1;
}

.desk-toolbar-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.desk-toolbar-left,
.desk-toolbar-right,
.desk-chip-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.desk-toolbar-tab,
.desk-chip-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #d8e4ef;
  background: #fff;
  color: var(--ink-780);
  text-decoration: none;
  font-weight: 700;
}

.desk-toolbar-tab.is-active,
.desk-chip-link.is-active {
  background: #eff7ff;
  border-color: #bdd2e9;
  color: var(--ink-940);
}

.desk-toolbar-pill,
.desk-toolbar-label {
  color: var(--ink-620);
  font-size: 0.84rem;
  text-decoration: none;
  font-weight: 700;
}

.desk-two-up {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.desk-two-up-wide {
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
}

.desk-note-stack-scroll {
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

.desk-status-card {
  display: grid;
  gap: 8px;
  padding: 13px 14px;
  border-radius: 16px;
  border: 1px solid #d8e4ef;
  background: #fff;
}

.desk-status-card.is-due {
  border-color: #b7dfcf;
  background: #f4fbf7;
}

.desk-status-card.is-overdue {
  border-color: #ebc3c3;
  background: #fff5f5;
}

.desk-status-card.is-stale {
  border-color: #ead8b8;
  background: #fffaf0;
}

.desk-note-stack,
.desk-note-card-link {
  min-width: 0;
}

.desk-note-card p {
  line-height: 1.5;
}

.desk-mini-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.desk-mini-stats > div {
  display: grid;
  gap: 4px;
  padding: 12px 13px;
  border-radius: 14px;
  border: 1px solid #d8e4ef;
  background: #fff;
}

.desk-mini-stats strong {
  color: var(--ink-620);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.desk-mini-stats span {
  font-weight: 700;
  color: var(--ink-940);
}

.desk-photo-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.desk-photo-thumb {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #d8e4ef;
  background: #fff;
}

.desk-photo-thumb img {
  display: block;
  width: 100%;
  height: 96px;
  object-fit: cover;
}

.desk-photo-thumb-large img {
  height: 360px;
}

.desk-filter-form {
  display: grid;
  gap: 12px;
}

.desk-link-row {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.desk-link-row strong {
  font-size: 0.84rem;
}

.desk-selected-card {
  gap: 10px;
}

.desk-copy-section {
  display: grid;
  gap: 10px;
  padding: 14px 15px;
  border: 1px solid #d8e4ef;
  border-radius: 16px;
  background: #fff;
}

.desk-copy-section p {
  margin: 0;
  line-height: 1.6;
}

.desk-note-editor {
  display: grid;
  gap: 14px;
}

.desk-update-row {
  grid-template-columns: minmax(0, 1fr) auto 88px;
  align-items: center;
}

.desk-update-date {
  justify-self: end;
  color: var(--ink-640);
  font-size: 0.83rem;
  font-weight: 700;
  white-space: nowrap;
}

.desk-note-stack .empty-state,
.desk-selected-card .empty-state {
  margin: 0;
}

@media (max-width: 1280px) {
  .desk-grid-dashboard,
  .desk-grid-issues,
  .desk-grid-updates,
  .desk-two-up,
  .desk-two-up-wide,
  .desk-stats-row {
    grid-template-columns: 1fr;
  }

  .desk-worktable-head-issues,
  .desk-worktable-row-issues,
  .desk-update-row,
  .desk-activity-row {
    grid-template-columns: 1fr;
  }
}

body {
  background:
    radial-gradient(960px 420px at -10% -10%, rgba(74, 114, 171, 0.14) 0%, transparent 58%),
    radial-gradient(860px 380px at 108% -4%, rgba(40, 142, 119, 0.1) 0%, transparent 56%),
    linear-gradient(180deg, #eef3f8 0%, #e9eff6 48%, #edf2f8 100%);
}

.portal-shell {
  grid-template-columns: 208px minmax(0, 1fr);
}

.portal-sidebar {
  gap: 24px;
  padding: 22px 14px 20px;
  background:
    linear-gradient(180deg, rgba(52, 88, 141, 0.18) 0%, transparent 16%),
    linear-gradient(180deg, #203148 0%, #18263a 100%);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.06);
}

.portal-brand {
  gap: 12px;
}

.portal-brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
}

.portal-nav {
  gap: 6px;
}

.portal-nav-link {
  position: relative;
  min-height: 42px;
  padding: 10px 12px 10px 14px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-size: 0.88rem;
  font-weight: 760;
}

.portal-nav-link::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  margin-right: 10px;
  flex: 0 0 auto;
}

.portal-nav-link:hover,
.portal-nav-link.is-active {
  border-color: rgba(173, 204, 229, 0.18);
  background: linear-gradient(180deg, rgba(92, 131, 190, 0.22) 0%, rgba(67, 109, 174, 0.14) 100%);
}

.portal-nav-link.is-active::before {
  background: #8dd5c0;
}

.portal-stage {
  gap: 20px;
  padding: 20px 26px 28px;
}

.portal-commandbar {
  position: sticky;
  top: 18px;
  z-index: 20;
  padding: 14px 16px;
  border: 1px solid rgba(211, 223, 235, 0.92);
  border-radius: 20px;
  background: rgba(248, 251, 255, 0.9);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 34px rgba(12, 26, 46, 0.08);
}

.portal-searchbar {
  max-width: 680px;
}

.portal-searchbar input {
  min-height: 46px;
  border-radius: 16px;
  border-color: #cad8e6;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.portal-command-actions {
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.portal-content {
  width: min(1560px, 100%);
  gap: 18px;
}

.portal-page {
  gap: 18px;
}

.portal-page-header {
  gap: 18px;
}

.portal-page-header h1 {
  margin: 2px 0 6px;
}

.portal-panel {
  border-radius: 22px;
  box-shadow: 0 20px 34px rgba(12, 26, 46, 0.06);
}

.issue-log-header {
  align-items: end;
  margin-bottom: 4px;
}

.issue-log-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  gap: 10px;
  min-width: min(100%, 360px);
}

.issue-overview-card {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid #d7e2ed;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(243, 248, 253, 0.95) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.issue-overview-card strong {
  color: var(--ink-980);
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: 1.6rem;
  line-height: 1;
}

.issue-overview-card span {
  color: var(--ink-620);
  font-size: 0.84rem;
  font-weight: 760;
}

.issue-workbench {
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: stretch;
  min-height: calc(100vh - 250px);
}

.issue-workbench-rail,
.issue-workbench-main,
.issue-workbench-inspector {
  display: grid;
  gap: 0;
  min-width: 0;
  min-height: 0;
}

.issue-rail-panel,
.issue-list-panel,
.issue-inspector-panel-single {
  min-height: calc(100vh - 250px);
}

.issue-rail-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  overflow: hidden;
}

.issue-rail-block {
  display: grid;
  gap: 10px;
  min-height: 0;
}

.issue-filter-panel .portal-filter-links,
.issue-rail-panel .portal-filter-links,
.issue-filter-links-stack {
  gap: 8px;
}

.issue-filter-panel .portal-filter-link,
.issue-rail-panel .portal-filter-link {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 52px;
}

.issue-filter-panel .portal-filter-link span,
.issue-filter-panel .portal-filter-link strong,
.issue-rail-panel .portal-filter-link span,
.issue-rail-panel .portal-filter-link strong {
  min-width: 0;
}

.issue-area-list {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.issue-list-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 16px 12px;
  overflow: hidden;
}

.issue-list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.issue-list-search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  margin: 0;
}

.issue-list-search label {
  flex: 1 1 auto;
}

.issue-list-search input {
  min-height: 44px;
}

.issue-list-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.issue-list-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.issue-table-shell {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.issue-table-head,
.issue-table-row {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) 128px 88px 180px;
  gap: 12px;
  align-items: center;
}

.issue-table-head {
  padding: 0 10px 4px;
  color: var(--ink-620);
  font-size: 0.78rem;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.issue-table-body {
  display: grid;
  gap: 8px;
  flex: 1 1 auto;
  overflow: auto;
  padding-right: 4px;
  min-height: 0;
}

.issue-table-row {
  padding: 12px 14px;
  border-radius: 16px;
}

.issue-table-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.issue-table-main strong {
  color: var(--ink-980);
  line-height: 1.35;
}

.issue-table-main small,
.issue-table-cell,
.issue-table-area {
  color: var(--ink-680);
  font-size: 0.86rem;
}

.issue-table-meta {
  color: var(--ink-540);
  font-size: 0.78rem;
}

.issue-table-status {
  min-width: 0;
  justify-content: flex-start;
}

.issue-inspector-panel {
  display: grid;
  gap: 14px;
}

.issue-inspector-panel-single {
  padding: 16px;
  overflow: auto;
}

.issue-inspector-summary {
  gap: 10px;
}

.issue-inspector-summary strong {
  font-size: 1.06rem;
}

.issue-inspector-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.issue-inspector-actions .btn {
  width: 100%;
}

.issue-inspector-section {
  display: grid;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(202, 216, 230, 0.8);
}

.issue-inspector-section h4 {
  margin: 0;
  color: var(--ink-980);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.issue-inspector-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.issue-inspector-notes {
  max-height: 220px;
  overflow: auto;
  padding-right: 4px;
}

.issue-inspector-links {
  display: grid;
  gap: 10px;
}

.detail-media-manager {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
  border: 1px solid #d7e2ed;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(249, 252, 255, 0.96) 0%, rgba(243, 248, 253, 0.92) 100%);
}

.detail-media-manager-copy {
  display: grid;
  gap: 4px;
}

.detail-media-manager-copy strong {
  color: var(--ink-980);
}

.detail-media-manager-copy span {
  color: var(--ink-620);
  font-size: 0.9rem;
  line-height: 1.45;
}

.detail-media-manager-actions {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-media-upload,
.detail-media-remove {
  margin: 0;
}

.detail-media-upload {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-media-upload label {
  flex: 1 1 260px;
  min-width: 220px;
}

.detail-media-upload input[type="file"] {
  min-height: 44px;
  padding: 8px 10px;
}

@media (max-width: 1480px) {
  .issue-workbench {
    grid-template-columns: 210px minmax(0, 1fr) 290px;
  }

  .issue-table-head,
  .issue-table-row {
    grid-template-columns: minmax(0, 1.7fr) 110px 84px 160px;
  }
}

@media (max-width: 1280px) {
  .portal-shell {
    grid-template-columns: 1fr;
  }

  .portal-sidebar {
    position: static;
    height: auto;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: none;
    align-items: center;
  }

  .portal-stage {
    padding-top: 10px;
  }

  .issue-workbench {
    grid-template-columns: 1fr;
  }

  .issue-log-overview,
  .issue-inspector-actions {
    grid-template-columns: 1fr;
  }

  .issue-list-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .issue-table-head,
  .issue-table-row {
    grid-template-columns: 1fr;
  }

  .issue-rail-panel,
  .issue-list-panel,
  .issue-inspector-panel-single,
  .issue-workbench {
    min-height: 0;
  }
}

.issue-log-rebuild {
  width: 100%;
  gap: 14px;
}

.issue-log-page.issue-log-rebuild {
  min-width: 0;
}

.issue-log-page.issue-log-rebuild .portal-page-header,
.issue-log-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.issue-log-title h1 {
  margin: 2px 0 6px;
}

.issue-log-stats {
  display: flex;
  align-items: stretch;
  gap: 10px;
  flex-wrap: wrap;
}

.issue-log-stat {
  min-width: 112px;
  padding: 13px 15px;
  border: 1px solid #d7e1eb;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 250, 254, 0.94) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.issue-log-stat strong {
  display: block;
  color: var(--ink-980);
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: 1.45rem;
  line-height: 1;
}

.issue-log-stat span {
  color: var(--ink-620);
  font-size: 0.82rem;
  font-weight: 760;
}

.issue-log-menubar {
  display: flex;
  gap: 10px;
  align-items: center;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(211, 223, 235, 0.92);
  border-radius: 20px;
  background: rgba(248, 251, 255, 0.9);
  box-shadow: 0 16px 28px rgba(12, 26, 46, 0.06);
}

.issue-log-menu-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--ink-820);
  font-size: 0.88rem;
  font-weight: 760;
  text-decoration: none;
  white-space: nowrap;
}

.issue-log-menu-link:hover,
.issue-log-menu-link.is-active {
  border-color: #bed1e3;
  background: linear-gradient(180deg, #f4f9ff 0%, #eaf3ff 100%);
  color: var(--ink-980);
}

.issue-log-frame {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 340px;
  min-height: calc(100vh - 230px);
  border: 1px solid #dbe4ee;
  border-radius: 28px;
  overflow: hidden;
  background: #fbfdff;
  box-shadow: 0 26px 46px rgba(12, 26, 46, 0.08);
}

.issue-log-filters,
.issue-log-inspector {
  background: linear-gradient(180deg, #f8fbfe 0%, #f4f8fc 100%);
}

.issue-log-filters {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px;
  border-right: 1px solid #e2e9f0;
  min-width: 0;
}

.issue-log-filter-group {
  display: grid;
  gap: 12px;
}

.issue-log-filter-group-fill {
  flex: 1 1 auto;
  min-height: 0;
}

.issue-log-filter-head,
.issue-log-inline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.issue-log-filter-head h3,
.issue-log-list-head h2,
.issue-log-inspector-head h3,
.issue-log-inspector-section h4 {
  margin: 0;
}

.issue-log-filter-summary {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #d9e3ed;
  border-radius: 16px;
  background: #ffffff;
}

.issue-log-filter-summary span {
  color: var(--ink-620);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.issue-log-filter-summary strong {
  color: var(--ink-960);
  font-size: 0.94rem;
}

.issue-log-area-list {
  display: grid;
  gap: 6px;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.issue-log-area-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--ink-780);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}

.issue-log-area-link:hover,
.issue-log-area-link.is-active {
  border-color: #c8d8e8;
  background: #ffffff;
  color: var(--ink-980);
}

.issue-log-center {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  min-height: 0;
  padding: 18px;
  background: #ffffff;
}

.issue-log-list-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.issue-log-list-head p {
  margin: 4px 0 0;
  color: var(--ink-620);
}

.issue-log-list-tags {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.issue-log-table {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.issue-log-table-head,
.issue-log-row {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) 120px 92px 190px;
  gap: 14px;
  align-items: center;
}

.issue-log-table-head {
  padding: 0 10px 8px;
  color: var(--ink-620);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.issue-log-table-body {
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.issue-log-row {
  padding: 13px 14px;
  border: 1px solid #dbe4ee;
  border-radius: 16px;
  color: var(--ink-940);
  text-decoration: none;
  background: #ffffff;
  box-shadow: 0 10px 18px rgba(11, 24, 43, 0.04);
}

.issue-log-row:hover,
.issue-log-row.is-active {
  border-color: #adc7e1;
  background: linear-gradient(180deg, #f7fbff 0%, #eef5fd 100%);
}

.issue-log-row-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.issue-log-row-main strong {
  color: var(--ink-980);
  line-height: 1.35;
}

.issue-log-row-main span,
.issue-log-row-cell {
  color: var(--ink-680);
  font-size: 0.86rem;
}

.issue-log-row-main small {
  color: var(--ink-540);
  font-size: 0.77rem;
}

.issue-log-row-status {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.issue-log-empty {
  display: grid;
  gap: 6px;
  padding: 22px;
  border: 1px dashed #c9d9e7;
  border-radius: 18px;
  background: #f9fbfe;
  color: var(--ink-680);
}

.issue-log-inspector {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  min-height: 0;
  padding: 18px;
  border-left: 1px solid #e2e9f0;
  overflow: auto;
}

.issue-log-inspector-head {
  display: grid;
  gap: 12px;
}

.issue-log-inspector-head p {
  margin: 4px 0 0;
  color: var(--ink-620);
}

.issue-log-inspector-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.issue-log-inspector-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.issue-log-inspector-actions .btn {
  width: 100%;
}

.issue-log-inspector-section {
  display: grid;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid #dfe7ef;
}

.issue-log-inspector-section h4 {
  color: var(--ink-960);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.issue-log-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.issue-log-facts div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #dbe4ee;
  border-radius: 14px;
  background: #ffffff;
}

.issue-log-facts span {
  color: var(--ink-620);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.issue-log-facts strong {
  color: var(--ink-980);
  font-size: 1rem;
}

.issue-log-note-list,
.issue-log-link-list {
  display: grid;
  gap: 10px;
}

.issue-log-placeholder {
  display: grid;
  gap: 10px;
  align-content: start;
}

@media (max-width: 1520px) {
  .issue-log-frame {
    grid-template-columns: 210px minmax(0, 1fr) 310px;
  }

  .issue-log-table-head,
  .issue-log-row {
    grid-template-columns: minmax(0, 1.8fr) 110px 84px 170px;
  }
}

@media (max-width: 1280px) {
  .issue-log-frame {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .issue-log-filters,
  .issue-log-center,
  .issue-log-inspector {
    min-height: 0;
  }

  .issue-log-inspector-actions,
  .issue-log-facts {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .issue-log-stats {
    width: 100%;
  }

  .issue-log-stat {
    flex: 1 1 0;
  }

  .issue-log-table-head,
  .issue-log-row {
    grid-template-columns: 1fr;
  }
}

.issue-studio {
  width: 100%;
  gap: 14px;
}

.issue-studio-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.issue-studio-title h1 {
  margin: 2px 0 6px;
}

.issue-studio-metrics {
  display: flex;
  gap: 10px;
  align-items: stretch;
  flex-wrap: wrap;
}

.issue-studio-metric {
  min-width: 112px;
  padding: 13px 15px;
  border: 1px solid #d7e1eb;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 250, 254, 0.94) 100%);
}

.issue-studio-metric strong {
  display: block;
  color: var(--ink-980);
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: 1.45rem;
  line-height: 1;
}

.issue-studio-metric span {
  color: var(--ink-620);
  font-size: 0.82rem;
  font-weight: 760;
}

.issue-studio-tabs {
  display: flex;
  gap: 8px;
  align-items: center;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(211, 223, 235, 0.92);
  border-radius: 20px;
  background: rgba(248, 251, 255, 0.9);
  box-shadow: 0 16px 28px rgba(12, 26, 46, 0.06);
}

.issue-studio-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--ink-820);
  font-size: 0.88rem;
  font-weight: 760;
  text-decoration: none;
  white-space: nowrap;
}

.issue-studio-tab:hover,
.issue-studio-tab.is-active {
  border-color: #bed1e3;
  background: linear-gradient(180deg, #f4f9ff 0%, #eaf3ff 100%);
  color: var(--ink-980);
}

.issue-studio-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  min-height: calc(100vh - 240px);
  border: 1px solid #dbe4ee;
  border-radius: 28px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 26px 46px rgba(12, 26, 46, 0.08);
}

.issue-studio-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  min-height: 0;
  padding: 20px 22px;
}

.issue-studio-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.issue-studio-filterbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0;
}

.issue-studio-search input,
.issue-studio-select select {
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid #cbd8e4;
  background: #f7fafc;
}

.issue-studio-search input {
  width: min(420px, 48vw);
}

.issue-studio-select select {
  min-width: 170px;
  padding: 0 40px 0 14px;
}

.issue-studio-scope {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.issue-studio-list-meta h2 {
  margin: 0;
}

.issue-studio-list-meta p {
  margin: 4px 0 0;
  color: var(--ink-620);
}

.issue-studio-table {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.issue-studio-table-head,
.issue-studio-row {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) 130px 100px 210px;
  gap: 16px;
  align-items: center;
}

.issue-studio-table-head {
  padding: 0 14px 8px;
  color: var(--ink-620);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.issue-studio-table-body {
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.issue-studio-row {
  padding: 14px 15px;
  border: 1px solid #dbe4ee;
  border-radius: 18px;
  color: var(--ink-940);
  text-decoration: none;
  background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
  box-shadow: 0 10px 18px rgba(11, 24, 43, 0.04);
}

.issue-studio-row:hover,
.issue-studio-row.is-active {
  border-color: #adc7e1;
  background: linear-gradient(180deg, #f7fbff 0%, #eef5fd 100%);
}

.issue-studio-row-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.issue-studio-row-main strong {
  color: var(--ink-980);
  line-height: 1.35;
}

.issue-studio-row-main span,
.issue-studio-row-cell {
  color: var(--ink-680);
  font-size: 0.88rem;
}

.issue-studio-row-main small {
  color: var(--ink-540);
  font-size: 0.77rem;
}

.issue-studio-row-status {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.issue-studio-empty {
  display: grid;
  gap: 6px;
  padding: 22px;
  border: 1px dashed #c9d9e7;
  border-radius: 18px;
  background: #f9fbfe;
  color: var(--ink-680);
}

.issue-studio-side {
  border-left: 1px solid #e2e9f0;
  background: linear-gradient(180deg, #f8fbfe 0%, #f4f8fc 100%);
  min-width: 0;
  min-height: 0;
}

.issue-studio-inspector {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 100%;
  padding: 20px;
  overflow: auto;
}

.issue-studio-inspector-head {
  display: grid;
  gap: 12px;
}

.issue-studio-inspector-head h3 {
  margin: 0;
}

.issue-studio-inspector-head p {
  margin: 4px 0 0;
  color: var(--ink-620);
}

.issue-studio-inspector-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.issue-studio-inspector-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.issue-studio-inspector-actions .btn {
  width: 100%;
}

.issue-studio-section {
  display: grid;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid #dfe7ef;
}

.issue-studio-section h4 {
  margin: 0;
  color: var(--ink-960);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.issue-studio-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.issue-studio-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.issue-studio-facts div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #dbe4ee;
  border-radius: 14px;
  background: #ffffff;
}

.issue-studio-facts span {
  color: var(--ink-620);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.issue-studio-facts strong {
  color: var(--ink-980);
  font-size: 1rem;
}

.issue-studio-note-list,
.issue-studio-link-list {
  display: grid;
  gap: 10px;
}

.issue-studio-placeholder {
  justify-content: center;
}

@media (max-width: 1520px) {
  .issue-studio-shell {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

  .issue-studio-table-head,
  .issue-studio-row {
    grid-template-columns: minmax(0, 1.8fr) 118px 90px 180px;
  }
}

@media (max-width: 1180px) {
  .issue-studio-shell {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .issue-studio-side {
    border-left: 0;
    border-top: 1px solid #e2e9f0;
  }

  .issue-studio-inspector-actions,
  .issue-studio-facts {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .issue-studio-metrics {
    width: 100%;
  }

  .issue-studio-metric {
    flex: 1 1 0;
  }

  .issue-studio-filterbar {
    width: 100%;
  }

  .issue-studio-search input {
    width: 100%;
  }

  .issue-studio-table-head,
  .issue-studio-row {
    grid-template-columns: 1fr;
  }
}

.issue-ledger {
  width: 100%;
  gap: 14px;
}

.issue-ledger-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.issue-ledger-header h1 {
  margin: 2px 0 6px;
}

.issue-ledger-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.issue-ledger-stats div {
  display: grid;
  gap: 4px;
  min-width: 110px;
  padding: 12px 14px;
  border: 1px solid #d7e1eb;
  border-radius: 16px;
  background: #fff;
}

.issue-ledger-stats strong {
  color: var(--ink-980);
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: 1.4rem;
  line-height: 1;
}

.issue-ledger-stats span {
  color: var(--ink-620);
  font-size: 0.8rem;
  font-weight: 760;
}

.issue-ledger-bar {
  display: grid;
  gap: 10px;
  padding: 10px 12px 12px;
  border: 1px solid #d9e3ec;
  border-radius: 22px;
  background: rgba(249, 252, 255, 0.96);
}

.issue-ledger-queues {
  display: flex;
  gap: 8px;
  overflow: auto;
}

.issue-ledger-queue {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 9px 13px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--ink-820);
  font-size: 0.88rem;
  font-weight: 760;
  text-decoration: none;
  white-space: nowrap;
}

.issue-ledger-queue:hover,
.issue-ledger-queue.is-active {
  border-color: #bfd2e4;
  background: #ffffff;
  color: var(--ink-980);
}

.issue-ledger-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0;
}

.issue-ledger-filters input,
.issue-ledger-filters select {
  min-height: 42px;
  border: 1px solid #cbd8e4;
  border-radius: 12px;
  background: #ffffff;
}

.issue-ledger-filters input {
  width: min(420px, 48vw);
}

.issue-ledger-filters select {
  min-width: 170px;
  padding: 0 38px 0 12px;
}

.issue-ledger-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  min-height: calc(100vh - 250px);
  border: 1px solid #dbe4ee;
  border-radius: 28px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 22px 40px rgba(12, 26, 46, 0.08);
}

.issue-ledger-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  min-height: 0;
  padding: 20px 22px;
}

.issue-ledger-list-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.issue-ledger-list-head h2 {
  margin: 0;
}

.issue-ledger-list-head p {
  margin: 4px 0 0;
  color: var(--ink-620);
}

.issue-ledger-context {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.issue-ledger-table {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.issue-ledger-table-head,
.issue-ledger-row {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) 120px 92px 190px;
  gap: 16px;
  align-items: center;
}

.issue-ledger-table-head {
  padding: 0 12px 8px;
  color: var(--ink-620);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.issue-ledger-table-body {
  display: grid;
  gap: 0;
  min-height: 0;
  overflow: auto;
  border-top: 1px solid #e4ebf2;
}

.issue-ledger-row {
  padding: 14px 12px;
  border-bottom: 1px solid #e8eef4;
  color: var(--ink-940);
  text-decoration: none;
  background: #ffffff;
}

.issue-ledger-row:hover,
.issue-ledger-row.is-active {
  background: #f5faff;
}

.issue-ledger-row-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.issue-ledger-row-main strong {
  color: var(--ink-980);
  line-height: 1.35;
}

.issue-ledger-row-main span,
.issue-ledger-cell {
  color: var(--ink-680);
  font-size: 0.88rem;
}

.issue-ledger-row-main small {
  color: var(--ink-540);
  font-size: 0.77rem;
}

.issue-ledger-status {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.issue-ledger-empty {
  display: grid;
  gap: 6px;
  padding: 24px;
  border: 1px dashed #c9d9e7;
  border-radius: 18px;
  background: #f9fbfe;
  color: var(--ink-680);
}

.issue-ledger-detail {
  min-width: 0;
  min-height: 0;
  border-left: 1px solid #e2e9f0;
  background: #f8fbfe;
}

.issue-ledger-detail-head {
  display: grid;
  gap: 12px;
}

.issue-ledger-detail-head h3 {
  margin: 0;
}

.issue-ledger-detail-head p {
  margin: 4px 0 0;
  color: var(--ink-620);
}

.issue-ledger-detail-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.issue-ledger-detail-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.issue-ledger-detail-actions .btn {
  width: 100%;
}

.issue-ledger-detail,
.issue-ledger-placeholder {
  padding: 20px;
}

.issue-ledger-placeholder,
.issue-ledger-detail {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  overflow: auto;
}

.issue-ledger-section {
  display: grid;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid #dde6ee;
}

.issue-ledger-section h4 {
  margin: 0;
  color: var(--ink-960);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.issue-ledger-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.issue-ledger-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.issue-ledger-facts div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #dbe4ee;
  border-radius: 14px;
  background: #ffffff;
}

.issue-ledger-facts span {
  color: var(--ink-620);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.issue-ledger-facts strong {
  color: var(--ink-980);
  font-size: 1rem;
}

.issue-ledger-note-list,
.issue-ledger-link-list,
.issue-ledger-related-list {
  display: grid;
  gap: 10px;
}

.issue-ledger-note {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #dbe4ee;
  border-radius: 14px;
  background: #ffffff;
}

.issue-ledger-note p,
.issue-ledger-note small {
  margin: 0;
}

.issue-ledger-related-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #dbe4ee;
  border-radius: 14px;
  background: #ffffff;
  color: var(--ink-940);
  text-decoration: none;
}

.issue-ledger-related-row strong,
.issue-ledger-related-row small {
  display: block;
}

.issue-ledger-related-row small {
  color: var(--ink-680);
}

.issue-ledger-link {
  display: block;
  padding: 11px 0;
  border-top: 1px solid #dde6ee;
  color: var(--ink-880);
  font-weight: 700;
  text-decoration: none;
}

.issue-ledger-link:first-child {
  border-top: 0;
}

@media (max-width: 1480px) {
  .issue-ledger-shell {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

  .issue-ledger-table-head,
  .issue-ledger-row {
    grid-template-columns: minmax(0, 1.8fr) 108px 84px 170px;
  }
}

@media (max-width: 1180px) {
  .issue-ledger-shell {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .issue-ledger-detail {
    border-left: 0;
    border-top: 1px solid #e2e9f0;
  }

  .issue-ledger-detail-actions,
  .issue-ledger-facts {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .issue-ledger-filters {
    width: 100%;
  }

  .issue-ledger-filters input {
    width: 100%;
  }

  .issue-ledger-table-head,
  .issue-ledger-row {
    grid-template-columns: 1fr;
  }
}

.issue-workspace-page {
  display: grid;
  gap: 12px;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: calc(100vh - 40px);
  height: calc(100vh - 40px);
}

.issue-workspace-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: 1px solid #d9e3ec;
  border-radius: 14px;
  background: #f6fafc;
}

.issue-workspace-toolbar-main,
.issue-workspace-toolbar-views,
.issue-workspace-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.issue-workspace-toolbar-main {
  min-width: 0;
  flex-wrap: nowrap;
  overflow: auto;
  padding-bottom: 2px;
}

.issue-workspace-toolbar input,
.issue-workspace-toolbar select {
  min-height: 32px !important;
  border: 1px solid #cbd8e4;
  border-radius: 999px;
  background: #ffffff;
  font-size: 0.84rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.issue-workspace-toolbar input {
  width: 240px !important;
  min-width: 240px;
  padding: 0 12px;
  flex: 0 0 auto;
}

.issue-workspace-toolbar select {
  width: auto !important;
  min-width: 0;
  padding: 0 30px 0 12px !important;
  flex: 0 0 auto;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #6d7f92 50%),
    linear-gradient(135deg, #6d7f92 50%, transparent 50%);
  background-position:
    calc(100% - 15px) 13px,
    calc(100% - 10px) 13px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.issue-workspace-toolbar select[name="parish_id"] {
  min-width: 132px;
}

.issue-workspace-toolbar select[name="feed"] {
  min-width: 118px;
}

.issue-workspace-toolbar-views {
  justify-content: flex-start;
  gap: 6px;
  margin-left: -6px;
  padding: 4px 10px;
  border: 1px solid #d9e3ec;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.issue-workspace-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr) 320px;
  gap: 0;
  min-height: 0;
  height: 100%;
  border: 1px solid #dbe4ee;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(90deg, #f7fbff 0 320px, #ffffff 320px calc(100% - 320px), #f7fbff calc(100% - 320px) 100%);
  box-shadow: 0 22px 42px rgba(12, 26, 46, 0.07);
}

.issue-workspace-list,
.issue-workspace-centre,
.issue-workspace-context {
  min-width: 0;
  min-height: 0;
}

.issue-workspace-list {
  display: flex;
  flex-direction: column;
  border-right: 1px solid #e3eaf1;
  background: linear-gradient(180deg, #f8fbff 0%, #f2f7fc 100%);
}

.issue-workspace-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #e3eaf1;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.issue-workspace-list-scroll {
  display: grid;
  min-height: 0;
  overflow: auto;
}

.issue-workspace-list-row {
  display: grid;
  gap: 8px;
  padding: 13px 15px;
  border-bottom: 1px solid #edf2f6;
  color: var(--ink-920);
  text-decoration: none;
}

.issue-workspace-list-row:hover,
.issue-workspace-list-row.is-active {
  background: linear-gradient(180deg, #f0f7ff 0%, #e7f2ff 100%);
  box-shadow: inset 3px 0 0 #2f7f96;
}

.issue-workspace-list-copy,
.issue-workspace-list-meta {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.issue-workspace-list-copy strong,
.issue-workspace-recordtitle h1 {
  margin: 0;
  color: var(--ink-980);
}

.issue-workspace-list-copy span,
.issue-workspace-list-meta small,
.issue-workspace-list-meta span {
  color: var(--ink-640);
  font-size: 0.82rem;
}

.issue-workspace-list-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.issue-workspace-list-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.issue-workspace-centre {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #ffffff;
  border-left: 1px solid #edf2f6;
  border-right: 1px solid #edf2f6;
}

.issue-workspace-recordhead {
  display: grid;
  gap: 12px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid #e3eaf1;
  background: #ffffff;
}

.issue-workspace-recordtitle {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.issue-workspace-recordmeta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.issue-workspace-recordmeta div {
  display: grid;
  gap: 2px;
  padding: 8px 0 0;
  border-top: 1px solid #edf2f6;
}

.issue-workspace-recordmeta span {
  color: var(--ink-620);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.issue-workspace-recordmeta strong {
  color: var(--ink-940);
  font-size: 0.9rem;
}

.issue-workspace-centre-scroll {
  display: grid;
  gap: 16px;
  min-height: 0;
  overflow: auto;
  padding: 18px;
}

.issue-workspace-section {
  display: grid;
  gap: 12px;
}

.issue-workspace-sectionhead {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.issue-workspace-sectionhead > div {
  display: grid;
  gap: 4px;
}

.issue-workspace-sectionhead h2,
.issue-workspace-contextsection h3 {
  margin: 0;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.issue-workspace-sectionhead p {
  margin: 0;
  color: var(--ink-620);
  font-size: 0.82rem;
}

.issue-workspace-lead,
.issue-workspace-note,
.issue-workspace-action-card,
.issue-workspace-contextcard,
.issue-workspace-mapcard {
  padding: 14px;
  border: 1px solid #dde6ee;
  border-radius: 14px;
  background: #fcfdff;
}

.issue-workspace-lead {
  display: grid;
  gap: 12px;
}

.issue-workspace-lead p,
.issue-workspace-note p,
.issue-workspace-contextcard p {
  margin: 0;
  color: var(--ink-760);
  line-height: 1.55;
}

.issue-workspace-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.issue-workspace-overview-card {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border: 1px solid #dde6ee;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
}

.issue-workspace-overview-card strong {
  color: var(--ink-940);
  font-size: 0.98rem;
}

.issue-workspace-overview-card p {
  margin: 0;
  color: var(--ink-700);
  line-height: 1.52;
}

.issue-workspace-overview-label {
  color: var(--ink-620);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.issue-workspace-overview-photo {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  min-height: 160px;
  background: #edf4fb;
}

.issue-workspace-overview-photo img {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.issue-workspace-note-list,
.issue-workspace-action-list,
.issue-workspace-related {
  display: grid;
  gap: 10px;
}

.issue-workspace-action-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.issue-workspace-action-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--ink-620);
  font-size: 0.8rem;
}

.issue-workspace-context {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 16px 16px 18px;
  border-left: 1px solid #e3eaf1;
  background: linear-gradient(180deg, #f8fbff 0%, #f2f7fc 100%);
  overflow: auto;
}

.issue-workspace-contextsection {
  display: grid;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e6edf3;
}

.issue-workspace-context-stack {
  display: grid;
  gap: 14px;
}

.issue-workspace-related a,
.issue-workspace-mapcard a {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #dde6ee;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink-940);
  text-decoration: none;
}

.issue-workspace-mapcard {
  display: grid;
  gap: 4px;
}

.issue-workspace-mapcard span {
  color: var(--ink-620);
}

.issue-workspace-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.issue-workspace-emptycentre,
.issue-workspace-emptycontext,
.issue-workspace-list-empty {
  display: grid;
  gap: 8px;
  padding: 24px;
  color: var(--ink-620);
}

@media (max-width: 1380px) {
  .issue-workspace-grid {
    grid-template-columns: 300px minmax(0, 1fr) 300px;
    background: linear-gradient(90deg, #f7fbff 0 300px, #ffffff 300px calc(100% - 300px), #f7fbff calc(100% - 300px) 100%);
  }

  .issue-workspace-recordmeta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .issue-workspace-overview-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1180px) {
  .issue-workspace-grid {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .issue-workspace-context {
    border-left: 0;
    border-top: 1px solid #e3eaf1;
  }
}

@media (max-width: 900px) {
  .issue-workspace-toolbar {
    grid-template-columns: 1fr;
  }

  .issue-workspace-toolbar-main,
  .issue-workspace-toolbar-actions {
    align-items: stretch;
  }

  .issue-workspace-toolbar-views {
    margin-left: 0;
    width: fit-content;
  }

  .issue-workspace-toolbar input {
    width: 100% !important;
    min-width: 0;
  }

  .issue-workspace-recordmeta,
  .issue-workspace-photo-grid {
    grid-template-columns: 1fr;
  }
}

.updates-workspace-page {
  display: grid;
  gap: 12px;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: calc(100vh - 40px);
  height: calc(100vh - 40px);
}

.workspace-shell {
  display: grid;
  gap: 14px;
  min-height: 100vh;
  padding: 20px 24px 28px;
}

.workspace-stage {
  display: grid;
  gap: 16px;
  min-width: 0;
  align-content: start;
}

.workspace-stage-standalone {
  min-height: 100vh;
  padding: 20px 24px 28px;
}

.workspace-shell .portal-content,
.workspace-stage-standalone .portal-content {
  width: min(1560px, 100%);
  margin: 0 auto;
}

.workspace-stage-standalone .portal-content {
  width: min(1800px, 100%);
}

.workspace-globalnav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  min-height: 66px;
  padding: 0 20px;
  border: 1px solid #d4e0ea;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(12, 26, 46, 0.06);
}

.workspace-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-980);
  font-weight: 800;
  text-decoration: none;
}

.workspace-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(180deg, #edf7f3 0%, #dcefe7 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.workspace-brand-mark img {
  width: 30px;
  height: 30px;
}

.workspace-brand-copy {
  display: grid;
  gap: 0;
  line-height: 1.1;
}

.workspace-brand-copy strong {
  font-size: 1.22rem;
}

.workspace-brand-copy small {
  color: var(--ink-620);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.workspace-navlinks,
.workspace-navmeta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.workspace-navlinks a,
.workspace-navmeta a {
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.workspace-navlinks a.is-active {
  color: var(--ink-980);
}

.workspace-navmeta a {
  color: var(--ink-620);
}

.workspace-access-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(45, 126, 108, 0.22);
  border-radius: 999px;
  background: rgba(232, 245, 238, 0.92);
  color: var(--accent);
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.workspace-access-badge-demo,
.workspace-access-badge-past_due,
.workspace-access-badge-canceled,
.workspace-access-badge-expired {
  border-color: rgba(145, 99, 2, 0.22);
  background: rgba(255, 246, 226, 0.92);
  color: #7d5b00;
}

.workspace-commandbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #d9e3ec;
  border-radius: 16px;
  background: rgba(246, 250, 252, 0.92);
  box-shadow: 0 12px 24px rgba(12, 26, 46, 0.05);
}

.workspace-searchbar {
  flex: 1 1 auto;
  max-width: 680px;
}

.workspace-searchbar input {
  min-height: 40px;
  border: 1px solid #cbd8e4;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.workspace-command-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.updates-workspace-globalnav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  min-height: 66px;
  padding: 0 20px;
  border: 1px solid #d4e0ea;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(12, 26, 46, 0.06);
}

.updates-workspace-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-980);
  font-weight: 800;
  text-decoration: none;
}

.updates-workspace-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(180deg, #edf7f3 0%, #dcefe7 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.updates-workspace-brand-mark img {
  width: 30px;
  height: 30px;
}

.updates-workspace-brand-copy {
  display: grid;
  gap: 0;
  line-height: 1.1;
}

.updates-workspace-brand-copy > span {
  font-size: 1.22rem;
}

.updates-workspace-brand-copy small {
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.updates-workspace-brand small,
.updates-workspace-navmeta a {
  color: var(--ink-620);
}

.updates-workspace-navlinks,
.updates-workspace-navmeta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.updates-workspace-navlinks a,
.updates-workspace-navmeta a {
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.updates-workspace-navlinks a.is-active {
  color: var(--ink-980);
}

.updates-workspace-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: 1px solid #d9e3ec;
  border-radius: 14px;
  background: #f6fafc;
}

.updates-workspace-toolbar-main,
.updates-workspace-toolbar-views,
.updates-workspace-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.updates-workspace-toolbar-main {
  min-width: 0;
  flex-wrap: nowrap;
  overflow: auto;
  padding-bottom: 2px;
}

.updates-workspace-toolbar-views {
  justify-content: flex-start;
  gap: 6px;
  margin-left: -6px;
  padding: 4px 10px;
  border: 1px solid #d9e3ec;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.updates-workspace-toolbar-views-label {
  color: var(--ink-620);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-right: 2px;
}

.updates-workspace-toolbar input,
.updates-workspace-toolbar select {
  min-height: 32px !important;
  border: 1px solid #cbd8e4;
  border-radius: 999px;
  background: #ffffff;
  font-size: 0.84rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.updates-workspace-toolbar input {
  width: 240px !important;
  min-width: 240px;
  padding: 0 12px;
  flex: 0 0 auto;
}

.updates-workspace-toolbar select {
  width: auto !important;
  min-width: 0;
  padding: 0 30px 0 12px !important;
  flex: 0 0 auto;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #6d7f92 50%),
    linear-gradient(135deg, #6d7f92 50%, transparent 50%);
  background-position:
    calc(100% - 15px) 13px,
    calc(100% - 10px) 13px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.updates-workspace-toolbar select[name="parish_id"] {
  min-width: 132px;
}

.updates-workspace-toolbar select[name="source"] {
  min-width: 116px;
}

.updates-workspace-toolbar select[name="visibility"] {
  min-width: 120px;
}

.updates-workspace-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr) 320px;
  gap: 0;
  min-height: 0;
  height: 100%;
  border: 1px solid #dbe4ee;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(90deg, #f7fbff 0 320px, #ffffff 320px calc(100% - 320px), #f7fbff calc(100% - 320px) 100%);
  box-shadow: 0 22px 42px rgba(12, 26, 46, 0.07);
}

.updates-workspace-list,
.updates-workspace-centre,
.updates-workspace-context {
  min-width: 0;
  min-height: 0;
}

.updates-workspace-list {
  display: flex;
  flex-direction: column;
  border-right: 1px solid #e3eaf1;
  background: linear-gradient(180deg, #f8fbff 0%, #f2f7fc 100%);
}

.updates-workspace-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #e3eaf1;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.updates-workspace-list-scroll {
  display: grid;
  min-height: 0;
  overflow: auto;
}

.updates-workspace-list-row {
  display: grid;
  gap: 8px;
  padding: 13px 15px;
  border-bottom: 1px solid #edf2f6;
  color: var(--ink-920);
  text-decoration: none;
}

.updates-workspace-list-row:hover,
.updates-workspace-list-row.is-active {
  background: linear-gradient(180deg, #f0f7ff 0%, #e7f2ff 100%);
  box-shadow: inset 3px 0 0 #2f7f96;
}

.updates-workspace-list-copy {
  display: grid;
  gap: 2px;
}

.updates-workspace-list-copy strong {
  color: var(--ink-980);
  font-size: 0.95rem;
  line-height: 1.3;
}

.updates-workspace-list-copy span,
.updates-workspace-list-meta small {
  color: var(--ink-640);
  font-size: 0.82rem;
}

.updates-workspace-list-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink-620);
  font-size: 0.78rem;
}

.updates-workspace-list-icons {
  display: flex;
  gap: 7px;
  color: var(--ink-620);
  font-size: 0.9rem;
}

.updates-workspace-list-empty {
  padding: 16px;
  color: var(--ink-620);
}

.updates-workspace-centre {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: #ffffff;
  border-left: 1px solid #edf2f6;
  border-right: 1px solid #edf2f6;
}

.updates-workspace-recordhead {
  display: grid;
  gap: 12px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid #e3eaf1;
  background: #ffffff;
}

.updates-workspace-recordtitle {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.updates-workspace-recordtitle h1 {
  margin: 0;
  font-size: 1.28rem;
}

.updates-workspace-recordmeta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.updates-workspace-recordmeta div {
  display: grid;
  gap: 2px;
  padding: 8px 0 0;
  border-top: 1px solid #edf2f6;
}

.updates-workspace-recordmeta span,
.updates-workspace-followup span {
  color: var(--ink-620);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.updates-workspace-recordmeta strong {
  color: var(--ink-940);
  font-size: 0.9rem;
}

.updates-workspace-centre-scroll {
  display: grid;
  gap: 0;
  min-height: 0;
  overflow: auto;
  padding: 18px 18px 16px;
}

.updates-workspace-paneltab {
  padding: 8px 13px;
  border: 1px solid #d4e0ea;
  border-radius: 999px;
  background: #f7fafc;
  color: var(--ink-760);
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1;
}

.updates-workspace-paneltab.is-active {
  border-color: #a9c4db;
  background: #ffffff;
  color: var(--ink-980);
  box-shadow: 0 6px 14px rgba(12, 26, 46, 0.06);
}

.updates-workspace-section {
  display: grid;
  gap: 12px;
  padding: 0 0 14px;
}

[data-workspace-panel][hidden] {
  display: none !important;
}

.updates-workspace-sectionhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.updates-workspace-sectionhead > div {
  display: grid;
  gap: 3px;
}

.updates-workspace-sectionhead h2 {
  margin: 0;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.updates-workspace-sectionhead p {
  margin: 0;
  color: var(--ink-620);
  font-size: 0.82rem;
}

.updates-workspace-sectionhead-soft {
  margin-bottom: -2px;
}

.updates-workspace-core,
.updates-workspace-item,
.updates-workspace-note,
.updates-workspace-contextcard,
.updates-workspace-mapcard {
  padding: 14px;
  border: 1px solid #dde6ee;
  border-radius: 14px;
  background: #fcfdff;
}

.updates-workspace-core {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 272px;
  padding: 18px 18px 20px;
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.updates-workspace-core-kicker {
  color: var(--ink-620);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.updates-workspace-core p,
.updates-workspace-contextcard p,
.updates-workspace-note p,
.updates-workspace-mapcard span {
  margin: 0;
}

.updates-workspace-core p {
  max-width: 54rem;
  color: var(--ink-920);
  font-size: 1.06rem;
  line-height: 1.75;
}

.updates-workspace-timeline {
  display: grid;
  gap: 8px;
}

.updates-workspace-event {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 14px;
  border-left: 4px solid #d6e1eb;
  background: #fafcfe;
  border-radius: 0 14px 14px 0;
}

.updates-workspace-event.is-note {
  border-left-color: #6f8fab;
}

.updates-workspace-event.is-update {
  border-left-color: #1b8f6c;
}

.updates-workspace-event.is-item {
  border-left-color: #d49a1d;
}

.updates-workspace-event.is-photo {
  border-left-color: #8b6fd1;
}

.updates-workspace-eventlabel {
  color: var(--ink-620);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.updates-workspace-eventbody {
  display: grid;
  gap: 4px;
}

.updates-workspace-eventbody p,
.updates-workspace-item p {
  margin: 0;
}

.updates-workspace-eventmeta,
.updates-workspace-itemmeta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--ink-620);
  font-size: 0.8rem;
}

.updates-workspace-items {
  display: grid;
  gap: 10px;
}

.updates-workspace-item {
  display: grid;
  gap: 8px;
  padding: 16px 16px 15px;
  border-left: 4px solid #d49a1d;
  border-radius: 0 14px 14px 0;
  background: linear-gradient(180deg, #fffdf8 0%, #ffffff 100%);
}

.updates-workspace-itemhead {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.updates-workspace-itemtag {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(212, 154, 29, 0.12);
  color: #9d6700;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.updates-workspace-itemtag.is-linked {
  background: rgba(47, 127, 150, 0.12);
  color: #1d6c81;
}

.updates-workspace-item strong {
  color: var(--ink-980);
  font-size: 1rem;
}

.updates-workspace-composer {
  display: grid;
  gap: 8px;
  padding: 9px 18px 10px;
  border-top: 1px solid #dde6ee;
  background: linear-gradient(180deg, rgba(250, 252, 249, 0.98) 0%, rgba(245, 249, 246, 0.98) 100%);
  backdrop-filter: blur(14px);
  box-shadow: 0 -6px 18px rgba(12, 26, 46, 0.04);
}

.updates-workspace-composer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.updates-workspace-composer-copy {
  display: grid;
  gap: 2px;
}

.updates-workspace-composer-head strong {
  color: var(--ink-980);
  font-size: 0.84rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.updates-workspace-composer-head span {
  color: var(--ink-620);
  font-size: 0.8rem;
}

.updates-workspace-composer-toggle {
  padding: 7px 13px;
  border: 1px solid #c7d6e4;
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink-920);
  font-size: 0.84rem;
  font-weight: 800;
  white-space: nowrap;
}

.updates-workspace-composer-body {
  display: grid;
  gap: 8px;
}

.updates-workspace-composer:not(.is-open) {
  gap: 0;
  padding-top: 8px;
  padding-bottom: 8px;
}

.updates-workspace-composer:not(.is-open) .updates-workspace-composer-head span {
  display: none;
}

.updates-workspace-composer-body[hidden] {
  display: none !important;
}

.updates-workspace-composer-main textarea {
  width: 100%;
  min-height: 64px;
  border: 1px solid #cbd8e4;
  border-radius: 14px;
  background: #ffffff;
}

.updates-workspace-composer-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.thread-entry-mode {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0, 28, 20, 0.35);
}

.thread-entry-mode-button {
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.74);
  font-weight: 700;
}

.thread-entry-mode-button.is-active {
  background: rgba(74, 222, 128, 0.18);
  color: #ffffff;
}

.updates-workspace-followup {
  display: flex;
  align-items: center;
  gap: 8px;
}

.updates-workspace-followup input {
  min-height: 38px;
  border: 1px solid #cbd8e4;
  border-radius: 12px;
  background: #ffffff;
}

.updates-workspace-emptycentre,
.updates-workspace-emptycontext {
  display: grid;
  gap: 8px;
  padding: 24px;
  color: var(--ink-620);
}

.updates-workspace-context {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 16px 16px 18px;
  border-left: 1px solid #e3eaf1;
  background: linear-gradient(180deg, #f8fbff 0%, #f2f7fc 100%);
  overflow: auto;
}

.updates-workspace-contextsection {
  display: grid;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e6edf3;
}

.updates-workspace-contextsection h3 {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.updates-workspace-contextcard strong,
.updates-workspace-mapcard strong {
  display: block;
  margin-bottom: 4px;
}

.updates-workspace-contextcard,
.updates-workspace-mapcard,
.updates-workspace-related a {
  border-radius: 12px;
  border-color: #e1e9f0;
  background: rgba(255, 255, 255, 0.78);
}

.updates-workspace-contextcard a,
.updates-workspace-mapcard a,
.updates-workspace-related a {
  color: var(--ink-880);
  font-weight: 700;
  text-decoration: none;
}

.updates-workspace-related,
.updates-workspace-facts {
  display: grid;
  gap: 8px;
}

.updates-workspace-related a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #dde6ee;
  border-radius: 12px;
  background: #ffffff;
}

.workspace-overview {
  display: grid;
  gap: 18px;
}

.workspace-page-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.workspace-page-header h1 {
  margin: 2px 0 6px;
}

.workspace-page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.workspace-stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.workspace-stat-card,
.workspace-card,
.workspace-mini-card {
  border: 1px solid #dbe5ee;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 32px rgba(12, 26, 46, 0.06);
}

.workspace-stat-card {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  color: var(--ink-940);
  text-decoration: none;
}

.workspace-stat-card strong {
  font-size: 1.6rem;
}

.workspace-stat-card span {
  color: var(--ink-620);
  font-weight: 700;
}

.workspace-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.95fr);
  gap: 18px;
}

.workspace-snapshot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.9fr);
  gap: 18px;
}

.workspace-snapshot-board {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.workspace-overview-main,
.workspace-overview-side {
  display: grid;
  gap: 18px;
  align-content: start;
}

.workspace-split-panels {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 18px;
}

.workspace-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.workspace-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.workspace-card-head > div {
  display: grid;
  gap: 4px;
}

.workspace-card-head h2 {
  margin: 0;
  font-size: 1rem;
}

.workspace-card-head p {
  margin: 0;
  color: var(--ink-620);
  font-size: 0.84rem;
}

.workspace-activity-list,
.workspace-record-list,
.workspace-action-stack,
.workspace-attention-stack {
  display: grid;
  gap: 10px;
}

.workspace-focus-card {
  gap: 18px;
  background:
    radial-gradient(circle at top right, rgba(53, 132, 109, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 252, 255, 0.96) 100%);
}

.workspace-focus-card-compact {
  padding-bottom: 16px;
}

.workspace-snapshot-focus {
  grid-column: 1 / span 2;
}

.workspace-snapshot-actions,
.workspace-snapshot-attention,
.workspace-snapshot-recurring {
  grid-column: 3;
}

.workspace-snapshot-activity {
  grid-column: 1 / span 2;
}

.workspace-focus-main {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 240px;
  gap: 18px;
}

.workspace-focus-copy {
  display: grid;
  gap: 10px;
}

.workspace-focus-copy h3 {
  margin: 0;
  font-size: 1.42rem;
  line-height: 1.2;
}

.workspace-focus-summary {
  margin: 0;
  color: var(--ink-720);
  font-size: 1rem;
  line-height: 1.55;
}

.workspace-focus-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.workspace-focus-facts div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #e1e9f0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
}

.workspace-focus-facts span {
  color: var(--ink-620);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workspace-focus-facts strong {
  color: var(--ink-960);
  font-size: 1rem;
}

.workspace-activity-row,
.workspace-record-row,
.workspace-action-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 15px;
  border: 1px solid #e1e9f0;
  border-radius: 16px;
  background: #fbfdff;
  color: var(--ink-940);
  text-decoration: none;
}

.workspace-activity-main,
.workspace-record-main {
  display: grid;
  gap: 4px;
}

.workspace-activity-main strong,
.workspace-record-main strong {
  font-size: 0.98rem;
}

.workspace-activity-main span,
.workspace-record-main span,
.workspace-record-main small,
.workspace-activity-side span {
  color: var(--ink-620);
}

.workspace-activity-main,
.workspace-record-main,
.workspace-activity-side,
.workspace-record-side {
  min-width: 0;
}

.workspace-activity-side,
.workspace-record-side {
  display: grid;
  gap: 4px;
  justify-items: end;
  text-align: right;
  flex: 0 0 132px;
}

.workspace-action-row {
  display: grid;
  gap: 4px;
}

.workspace-update-list,
.workspace-record-grid {
  display: grid;
  gap: 10px;
}

.workspace-update-row,
.workspace-issue-card {
  display: grid;
  gap: 6px;
  padding: 14px 15px;
  border: 1px solid #e1e9f0;
  border-radius: 16px;
  background: #fbfdff;
  color: var(--ink-940);
  text-decoration: none;
}

.workspace-attention-card {
  display: grid;
  gap: 8px;
  padding: 14px 15px;
  border: 1px solid #e1e9f0;
  border-radius: 16px;
  background: #fbfdff;
  color: var(--ink-940);
  text-decoration: none;
}

.workspace-attention-meter {
  display: flex;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9f0f6;
}

.workspace-attention-meter span {
  height: 100%;
}

.workspace-attention-meter .is-due {
  background: #7eb7ea;
}

.workspace-attention-meter .is-overdue {
  background: #ef9e8d;
}

.workspace-attention-meter .is-stale {
  background: #e7cb71;
}

.workspace-attention-meter .is-waiting {
  background: #7fbeb2;
}

.workspace-attention-card strong,
.workspace-mini-card strong {
  display: block;
}

.workspace-attention-columns {
  display: grid;
  gap: 10px;
}

.workspace-attention-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.workspace-attention-count {
  color: var(--ink-940);
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1;
}

.workspace-attention-card p {
  margin: 0;
  color: var(--ink-620);
}

.workspace-attention-card.is-due {
  background: linear-gradient(180deg, #f6fbff 0%, #f2f8ff 100%);
}

.workspace-attention-card.is-overdue {
  background: linear-gradient(180deg, #fff7f4 0%, #fff2ef 100%);
}

.workspace-attention-card.is-stale {
  background: linear-gradient(180deg, #fffdf3 0%, #fff9eb 100%);
}

.workspace-mini-grid {
  display: grid;
  gap: 10px;
}

.workspace-mini-grid-snapshot {
  gap: 12px;
}

.workspace-mini-card {
  padding: 14px;
}

.workspace-rank-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.workspace-rank-row {
  display: grid;
  gap: 6px;
  color: var(--ink-940);
  text-decoration: none;
}

.workspace-rank-copy {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.workspace-rank-copy small {
  color: var(--ink-620);
  font-weight: 800;
  flex: 0 0 auto;
}

.workspace-rank-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf3f8;
}

.workspace-rank-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2d8b7b 0%, #74c7b4 100%);
}

.workspace-feature-card .workspace-feature-main {
  display: grid;
  gap: 8px;
}

.workspace-issue-card-copy {
  display: grid;
  gap: 4px;
}

.workspace-update-row span,
.workspace-update-row small,
.workspace-issue-card span,
.workspace-issue-card small {
  color: var(--ink-620);
}

.workspace-clamp-1,
.workspace-clamp-2,
.workspace-clamp-3 {
  display: -webkit-box;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  overflow-wrap: anywhere;
}

.workspace-clamp-1 {
  -webkit-line-clamp: 1;
}

.workspace-clamp-2 {
  -webkit-line-clamp: 2;
}

.workspace-clamp-3 {
  -webkit-line-clamp: 3;
}

.compact-link-list-tight li {
  align-items: start;
}

.compact-link-list-tight a {
  min-width: 0;
}

.compact-link-list-tight span {
  flex: 0 0 auto;
}

@media (max-width: 1380px) {
  .updates-workspace-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "main main"
      "views actions";
    align-items: start;
  }

  .updates-workspace-toolbar-main {
    grid-area: main;
    flex-wrap: wrap;
    overflow: visible;
    padding-bottom: 0;
  }

  .updates-workspace-toolbar-views {
    grid-area: views;
    margin-left: 0;
  }

  .updates-workspace-toolbar-actions {
    grid-area: actions;
    justify-content: flex-end;
  }
}

@media (max-width: 1500px) {
  .updates-workspace-grid {
    grid-template-columns: 290px minmax(0, 1fr) 300px;
    background: linear-gradient(90deg, #f7fbff 0 290px, #ffffff 290px calc(100% - 300px), #f7fbff calc(100% - 300px) 100%);
  }
}

@media (max-width: 1240px) {
  .workspace-globalnav {
    grid-template-columns: 1fr;
  }

  .workspace-page-header {
    align-items: stretch;
  }

  .workspace-commandbar {
    flex-direction: column;
    align-items: stretch;
  }

  .workspace-overview-grid,
  .workspace-snapshot-grid,
  .workspace-snapshot-board,
  .workspace-attention-stack {
    grid-template-columns: 1fr;
  }

  .workspace-split-panels,
  .workspace-focus-main {
    grid-template-columns: 1fr;
  }

  .workspace-snapshot-focus,
  .workspace-snapshot-actions,
  .workspace-snapshot-activity,
  .workspace-snapshot-attention,
  .workspace-snapshot-recurring {
    grid-column: auto;
  }

  .workspace-navlinks,
  .workspace-navmeta,
  .workspace-page-actions,
  .workspace-command-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 1180px) {
  .updates-workspace-page {
    height: auto;
  }

  .updates-workspace-grid {
    grid-template-columns: 1fr;
    height: auto;
  }

  .updates-workspace-list,
  .updates-workspace-centre,
  .updates-workspace-context {
    min-height: 0;
  }

  .updates-workspace-context {
    border-left: 0;
    border-top: 1px solid #e3eaf1;
  }

  .updates-workspace-centre {
    grid-template-rows: auto auto auto;
  }
}

@media (max-width: 900px) {
  .workspace-shell {
    padding: 16px;
  }

  .workspace-stat-strip,
  .workspace-attention-stack,
  .workspace-snapshot-grid,
  .workspace-attention-mini-grid,
  .workspace-snapshot-board {
    grid-template-columns: 1fr;
  }

  .workspace-activity-row,
  .workspace-record-row {
    flex-direction: column;
    align-items: stretch;
  }

  .workspace-activity-side,
  .workspace-record-side {
    justify-items: start;
    text-align: left;
    flex-basis: auto;
  }

  .workspace-globalnav,
  .updates-workspace-globalnav,
  .updates-workspace-toolbar {
    grid-template-columns: 1fr;
  }

  .updates-workspace-toolbar,
  .updates-workspace-toolbar-main,
  .updates-workspace-toolbar-views,
  .updates-workspace-toolbar-actions {
    align-items: stretch;
  }

  .updates-workspace-toolbar-views {
    justify-content: flex-start;
    margin-left: 0;
  }

  .updates-workspace-toolbar input {
    width: 100%;
  }

  .updates-workspace-recordmeta,
  .updates-workspace-event {
    grid-template-columns: 1fr;
  }
}

/* Final portal reset override. Keep this at EOF so it wins over legacy portal CSS. */

body[data-authenticated="1"] {
  min-height: 100vh;
  padding-bottom: 0;
  color: rgba(255, 255, 255, 0.94);
  background:
    linear-gradient(135deg, rgba(2, 44, 34, 0.98), rgba(4, 78, 57, 0.96) 45%, rgba(2, 35, 30, 0.98)),
    #022c22;
}

body[data-authenticated="1"][data-party-theme="lib_dem"] {
  color: #111827;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 34%, rgba(0, 0, 0, 0.015) 100%),
    linear-gradient(135deg, #fff8ec 0%, #f7efe4 100%);
}

body[data-authenticated="1"]::before {
  display: none;
}

body[data-authenticated="1"] a {
  color: inherit;
}

.workspace-shell {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0;
  min-height: 100vh;
  padding: 0;
}

.workspace-stage {
  display: block;
  min-width: 0;
  padding: 0;
}

.workspace-shell .portal-content,
.workspace-stage-standalone .portal-content {
  width: 100%;
  max-width: none;
  margin: 0;
}

.workspace-globalnav {
  position: sticky;
  top: 0;
  z-index: 2000;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.25rem;
  min-height: 62px;
  padding: 0 1.75rem;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0;
  background: rgba(0, 48, 34, 0.86);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px);
}

.workspace-brand {
  gap: 0.85rem;
  color: #ffffff;
}

.workspace-brand:hover {
  color: #ffffff;
}

.workspace-brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.workspace-brand-mark img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.workspace-brand-copy strong {
  color: #ffffff;
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: 0;
}

.workspace-brand-copy small {
  display: none;
}

.workspace-navlinks,
.workspace-navmeta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: nowrap;
}

.workspace-navlinks {
  justify-content: center;
}

.workspace-navlinks a,
.workspace-navmeta a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 0.78rem;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.96rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.workspace-navlinks a:hover,
.workspace-navmeta a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.workspace-navlinks a.is-active,
.workspace-navmeta a.is-active {
  position: relative;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.workspace-navlinks a.is-active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -13px;
  height: 3px;
  border-radius: 999px;
  background: #4ade80;
}

.workspace-drafts-alert {
  border: 1px solid rgba(250, 204, 21, 0.38);
  background: rgba(113, 63, 18, 0.48);
  color: #fef3c7;
}

.workspace-drafts-alert:hover,
.workspace-drafts-alert.is-active {
  background: rgba(146, 64, 14, 0.72);
  color: #ffffff;
}

.workspace-drafts-alert span {
  display: inline-grid;
  place-items: center;
  min-width: 1.25rem;
  height: 1.25rem;
  margin-left: 0.42rem;
  padding: 0 0.32rem;
  border-radius: 999px;
  background: #facc15;
  color: #422006;
  font-size: 0.72rem;
  font-weight: 900;
}

.workspace-navmeta {
  justify-content: flex-end;
}

.workspace-account-menu {
  display: flex;
  align-items: center;
  align-self: center;
  min-height: 62px;
  position: relative;
}

.workspace-role-menu {
  position: relative;
}

.workspace-role-chip {
  display: inline-grid;
  grid-template-columns: auto;
  align-content: center;
  min-height: 38px;
  max-width: 260px;
  padding: 0.28rem 0.72rem;
  border: 1px solid rgba(134, 239, 172, 0.24);
  border-radius: 8px;
  background: rgba(8, 92, 61, 0.48);
  color: #ffffff;
  font: inherit;
  line-height: 1.05;
  text-align: left;
  cursor: pointer;
  appearance: none;
}

.workspace-role-chip:hover,
.workspace-role-menu.is-open .workspace-role-chip {
  border-color: rgba(134, 239, 172, 0.42);
  background: rgba(8, 92, 61, 0.72);
}

.workspace-role-chip-kicker {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workspace-role-chip strong {
  overflow: hidden;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-role-card {
  position: absolute;
  top: calc(100% + 0.7rem);
  right: 0;
  z-index: 2400;
  display: grid;
  gap: 0.65rem;
  width: min(440px, calc(100vw - 2rem));
  padding: 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(0, 42, 31, 0.98);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.34);
}

.workspace-role-card[hidden] {
  display: none;
}

.workspace-role-card-head {
  display: grid;
  gap: 0.12rem;
  padding: 0.2rem 0.25rem 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.workspace-role-card-head span,
.workspace-role-option small {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.74rem;
  font-weight: 750;
}

.workspace-role-card-head strong,
.workspace-role-option strong {
  color: #ffffff;
}

.workspace-role-list {
  display: grid;
  gap: 0.45rem;
}

.workspace-role-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.62rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.workspace-role-option.is-active {
  border-color: rgba(74, 222, 128, 0.5);
  background: rgba(22, 101, 52, 0.4);
}

.workspace-role-option > div:first-child {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.workspace-role-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.workspace-role-actions form {
  margin: 0;
}

.workspace-role-default {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 0.5rem;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.74rem;
  font-weight: 850;
}

.workspace-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.role-theme-form {
  margin: 0 0 18px;
}

@media (max-width: 720px) {
  .form-grid.two {
    grid-template-columns: 1fr;
  }
}

.workspace-info-item {
  border: 1px solid rgba(190, 231, 210, 0.18);
  border-radius: 8px;
  background: rgba(4, 38, 28, 0.4);
  padding: 12px 14px;
}

.workspace-info-item span {
  display: block;
  color: rgba(227, 244, 235, 0.62);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.workspace-info-item strong {
  display: block;
  margin-top: 4px;
  color: #f5fff9;
}

.thread-block-subhead {
  margin-top: 18px;
}

.thread-block-subhead h3 {
  margin: 0 0 4px;
  color: #f5fff9;
  font-size: 1rem;
}

.workspace-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 42px;
  padding: 0 0.48rem 0 0.22rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  appearance: none;
}

.workspace-account-menu.is-open .workspace-user-chip,
.workspace-account-menu.is-active .workspace-user-chip,
.workspace-user-chip:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
}

.workspace-avatar,
.workspace-user-chip > .workspace-avatar,
.workspace-account-head > span {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  overflow: hidden;
  border-radius: 50%;
  background: #166534;
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 850;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  flex: 0 0 auto;
}

.workspace-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.workspace-user-chip strong {
  font-size: 0.9rem;
}

.workspace-account-card {
  position: absolute;
  top: calc(100% + 0.7rem);
  right: 0;
  z-index: 2200;
  display: grid;
  gap: 0.25rem;
  width: min(280px, calc(100vw - 2rem));
  padding: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(0, 42, 31, 0.98);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.34);
}

.workspace-account-card[hidden] {
  display: none;
}

.workspace-account-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.65rem;
  align-items: center;
  min-width: 0;
  padding: 0.45rem 0.45rem 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 0.25rem;
}

.workspace-account-head div {
  display: grid;
  gap: 0.08rem;
  min-width: 0;
}

.workspace-account-head strong,
.workspace-account-head small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-account-head strong {
  color: #ffffff;
  font-size: 0.9rem;
}

.workspace-account-head small {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.76rem;
}

.workspace-account-card a {
  justify-content: flex-start;
  min-height: 36px;
  padding: 0 0.55rem;
}

.workspace-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.85rem 1.75rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 34, 25, 0.38);
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.78rem;
}

.workspace-footer nav {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.workspace-footer a {
  color: rgba(255, 255, 255, 0.74);
  font-weight: 700;
  text-decoration: none;
}

.workspace-footer a:hover {
  color: #ffffff;
}

.public-footer {
  margin-top: 1rem;
}

body[data-authenticated="0"] .legal-page {
  padding-top: clamp(2rem, 7vh, 4.2rem);
}

.legal-page {
  max-width: 920px;
  margin: 0 auto;
}

.legal-card {
  display: grid;
  gap: 1rem;
  padding: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(0, 42, 31, 0.32);
}

.legal-card h1 {
  margin: 0;
  color: #ffffff;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 1.45rem;
  line-height: 1.18;
  letter-spacing: 0;
}

.legal-lead {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.55;
}

.legal-copy {
  display: grid;
  gap: 0.85rem;
}

.legal-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.56;
}

.legal-copy strong {
  color: #ffffff;
}

.legal-copy a {
  color: #86efac;
  font-weight: 800;
}

.workspace-access-badge {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.portal-page-shell {
  display: grid;
  gap: 1rem;
  padding: 1rem 1.75rem 2rem;
}

.portal-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0 0.2rem;
}

.portal-page-header h1,
.portal-page-header h2,
.thread-header h1,
.thread-block h2,
.snapshot-card h2 {
  color: #ffffff;
  font-family: "Manrope", "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.page-kicker,
.support-text,
.thread-block-head p,
.empty-state {
  color: rgba(255, 255, 255, 0.66);
}

.thread-workspace {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  min-height: calc(100vh - 76px);
}

.thread-finder,
.thread-main,
.snapshot-card,
.thread-block,
.reference-main,
.reference-side,
.builder-main,
.builder-side {
  border-radius: 0;
  box-shadow: none;
}

.thread-finder {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  padding: 1.6rem 1.25rem;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 38, 28, 0.28);
  position: sticky;
  top: 0;
  max-height: calc(100vh - 76px);
}

.thread-finder-head {
  align-items: center;
  margin-bottom: 1rem;
}

.thread-finder-head h2 {
  margin: 0;
  color: #ffffff;
  font-size: 1.25rem;
}

.thread-finder-head span {
  color: rgba(255, 255, 255, 0.72);
}

.portal-finder-controls {
  display: grid;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.portal-finder-controls .portal-toolbar-search,
.portal-finder-controls .portal-toolbar-select,
.portal-toolbar-search,
.portal-toolbar-select,
.portal-toolbar label select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(0, 22, 16, 0.28);
  color: #ffffff;
  box-shadow: none;
}

.portal-finder-controls .portal-toolbar-search::placeholder {
  color: rgba(255, 255, 255, 0.58);
}

.portal-finder-actions,
.workspace-page-actions,
.thread-header-actions,
.portal-form-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.thread-finder-list {
  display: grid;
  gap: 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.thread-finder-row {
  display: grid;
  gap: 0.55rem;
  padding: 1rem;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #ffffff;
  text-decoration: none;
}

.thread-finder-row:hover,
.thread-finder-row.is-active {
  border-color: rgba(255, 255, 255, 0.1);
  border-left-color: #4ade80;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: none;
}

.thread-finder-row-main {
  display: grid;
  gap: 0.3rem;
}

.thread-finder-row-main strong,
.thread-link-row strong,
.thread-record-card strong,
.thread-mini-row strong {
  color: #ffffff;
  font-size: 0.98rem;
  line-height: 1.35;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.thread-finder-row-main span,
.thread-finder-row-meta small,
.thread-finder-row-meta span,
.thread-link-row span,
.thread-mini-row span,
.thread-record-card-meta span,
.thread-timeline-meta span,
.thread-media-copy span,
.thread-activity-card small {
  color: rgba(255, 255, 255, 0.66);
}

.thread-main {
  display: grid;
  gap: 1rem;
  align-content: start;
  min-width: 0;
  padding: 1.8rem 2.25rem 2.5rem;
  border: 0;
  background: transparent;
}

.thread-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
}

.thread-header-copy {
  min-width: 0;
}

.thread-header h1 {
  margin: 0.35rem 0 0;
  font-size: clamp(1.75rem, 2.2vw, 2.4rem);
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.thread-header .support-text {
  margin-top: 0.55rem;
  max-width: 76ch;
  color: rgba(255, 255, 255, 0.7);
  overflow-wrap: anywhere;
}

.portal-workspace-tabs {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  padding: 0 0 0.35rem;
}

.portal-tab-pill {
  min-height: 34px;
  padding: 0 0.9rem;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 800;
  box-shadow: none;
}

.portal-tab-pill:hover,
.portal-tab-pill.is-active {
  background: transparent;
  color: #ffffff;
  box-shadow: none;
}

.portal-tab-pill.is-active {
  border-bottom-color: #4ade80;
}

.thread-panel {
  display: grid;
  gap: 1rem;
}

.thread-panel[hidden],
[data-issue-panel][hidden] {
  display: none !important;
}

.thread-block,
.snapshot-card,
.reference-main .thread-block,
.reference-side .thread-block,
.builder-main .thread-block,
.builder-side .thread-block {
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(0, 49, 36, 0.34);
  box-shadow: none;
}

.thread-block-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.thread-block-head h2 {
  margin: 0;
  font-size: 1rem;
}

.thread-split-blocks,
.snapshot-grid,
.builder-layout,
.reference-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.thread-reading-surface,
.thread-status-banner,
.thread-activity-card,
.thread-record-card,
.thread-link-row,
.thread-mini-row,
.issue-workspace-lead,
.issue-workspace-note,
.issue-workspace-action-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(0, 20, 15, 0.2);
  color: #ffffff;
  box-shadow: none;
}

.thread-status-banner p,
.thread-reading-surface p,
.thread-activity-card p,
.thread-record-card p,
.thread-timeline-body p {
  color: rgba(255, 255, 255, 0.78);
}

.thread-link-row {
  text-decoration: none;
}

.thread-link-row.is-active {
  border-color: rgba(74, 222, 128, 0.48);
  background: rgba(74, 222, 128, 0.12);
}

.thread-detail-grid {
  display: grid;
  gap: 0.85rem;
}

.thread-detail-grid div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 1rem;
  padding: 0.72rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(0, 20, 15, 0.22);
}

.thread-detail-grid dt {
  color: rgba(255, 255, 255, 0.64);
}

.thread-detail-grid dd {
  margin: 0;
  color: #ffffff;
}

.thread-timeline-row {
  border-color: rgba(255, 255, 255, 0.12);
}

.thread-timeline-label {
  color: rgba(255, 255, 255, 0.66);
}

.thread-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}

.thread-media-card img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.45rem;
  padding: 0.18rem 0.55rem;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge.open {
  border-color: rgba(134, 239, 172, 0.38);
  background: rgba(22, 101, 52, 0.88);
}

.badge.waiting,
.badge.todo,
.badge.on_hold {
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(146, 64, 14, 0.88);
}

.badge.monitored,
.badge.neutral {
  border-color: rgba(125, 211, 252, 0.34);
  background: rgba(12, 74, 110, 0.86);
}

.badge.resolved,
.badge.done,
.badge.closed {
  border-color: rgba(187, 247, 208, 0.4);
  background: rgba(21, 128, 61, 0.78);
}

.badge.overdue,
.badge.sensitive {
  border-color: rgba(252, 165, 165, 0.45);
  background: rgba(153, 27, 27, 0.88);
}

.badge.pothole {
  border-color: rgba(254, 243, 199, 0.48);
  background: rgba(120, 53, 15, 0.92);
}

.issue-overview-hero {
  display: grid;
  gap: 0.95rem;
}

.issue-fact-grid,
.issue-compact-list {
  margin: 0;
}

.issue-fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.65rem;
}

.issue-fact-grid div,
.issue-compact-list div {
  min-width: 0;
  padding: 0.65rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.045);
}

.issue-fact-grid dt,
.issue-compact-list dt {
  margin: 0 0 0.18rem;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.issue-fact-grid dd,
.issue-compact-list dd {
  margin: 0;
  color: #ffffff;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.issue-compact-list {
  display: grid;
  gap: 0.55rem;
}

.issue-compact-list dd span {
  display: block;
  margin-top: 0.15rem;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.78rem;
}

.issue-detail-reading {
  white-space: pre-line;
}

.issue-detail-reading hr {
  width: 100%;
  margin: 0.4rem 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.btn,
.btn-small,
.btn-ghost {
  border-radius: 6px;
  border-color: rgba(255, 255, 255, 0.16);
  background: #166534;
  color: #ffffff;
  box-shadow: none;
}

.btn:hover,
.btn-small:hover {
  background: #15803d;
  color: #ffffff;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

.workspace-stat-strip,
.workspace-stat-strip-compact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.8rem;
}

.workspace-stat-card,
.workspace-stat-strip > div {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(0, 49, 36, 0.34);
  color: #ffffff;
}

.reference-form input,
.reference-form textarea,
.reference-form select,
.desktop-form-shell input,
.desktop-form-shell textarea,
.desktop-form-shell select,
.workspace-searchbar input {
  border-radius: 6px;
}

.portal-map-canvas,
.issue-map-canvas {
  min-height: 560px;
  border-radius: 8px;
}

.workspace-clamp-1,
.workspace-clamp-2 {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
  text-overflow: clip;
  white-space: normal;
}

.portal-scroll-region,
.portal-scroll-region-medium,
.portal-scroll-region-short,
.portal-scroll-region-tall,
.desk-scroll,
.desk-scroll-activity,
.desk-scroll-table,
.desk-scroll-issues,
.desk-scroll-updates,
.desk-note-stack-scroll {
  max-height: none;
  overflow: visible;
}

@media (max-width: 1180px) {
  .workspace-globalnav {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .workspace-navlinks,
  .workspace-navmeta {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .workspace-navlinks a.is-active::after {
    bottom: -4px;
  }

  .thread-workspace,
  .thread-split-blocks,
  .snapshot-grid,
  .builder-layout,
  .reference-layout {
    grid-template-columns: 1fr;
  }

  .thread-workspace {
    min-height: 0;
  }

  .thread-finder {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    position: static;
    max-height: none;
  }
}

@media (max-width: 720px) {
  .portal-page-shell,
  .thread-main,
  .thread-finder {
    padding: 1rem;
  }

  .thread-header,
  .portal-page-header {
    display: grid;
  }

  .thread-detail-grid div {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .workspace-user-chip strong {
    display: none;
  }
}

.thread-workspace > .thread-finder {
  order: 0 !important;
  grid-column: 1;
}

.thread-workspace > .thread-main {
  order: 0 !important;
  grid-column: 2;
}

@media (max-width: 1180px) {
  .thread-workspace > .thread-finder,
  .thread-workspace > .thread-main {
    grid-column: auto;
  }
}

/* Compact dashboard reset: desktop snapshot, not a touch-card feed. */

.dashboard-reset {
  gap: 0.7rem;
  padding-top: 0.95rem;
}

.dashboard-reset-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
}

.dashboard-reset-title {
  min-width: 0;
}

.dashboard-reset-title h1 {
  margin: 0.1rem 0 0.15rem;
  color: #ffffff;
  font-size: 1.72rem;
  line-height: 1.12;
  letter-spacing: 0;
}

.dashboard-reset-title .support-text {
  margin: 0;
}

.dashboard-reset-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem;
}

.dashboard-kpi {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
  min-height: 48px;
  padding: 0.58rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(0, 36, 27, 0.38);
  color: #ffffff;
  text-decoration: none;
}

.dashboard-kpi:hover {
  border-color: rgba(74, 222, 128, 0.5);
  background: rgba(0, 54, 38, 0.54);
}

.dashboard-kpi span {
  min-width: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.82rem;
  font-weight: 800;
}

.dashboard-kpi strong {
  color: #ffffff;
  font-size: 1.45rem;
  line-height: 1;
}

.dashboard-kpi.is-hot strong {
  color: #fde68a;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.82fr);
  gap: 0.7rem;
  align-items: start;
}

.dashboard-panel {
  min-width: 0;
  padding: 0.82rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(0, 42, 31, 0.32);
}

.dashboard-panel-signals {
  grid-column: 1;
}

.dashboard-panel-recent {
  grid-column: 2;
  grid-row: span 2;
}

.dashboard-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.55rem;
}

.dashboard-panel-head h2 {
  margin: 0;
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.2;
}

.dashboard-panel-head p {
  margin: 0.18rem 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.84rem;
}

.dashboard-text-link {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
}

.dashboard-text-link:hover {
  color: #ffffff;
}

.dashboard-priority-record {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 0.58fr);
  gap: 1rem;
  align-items: start;
}

.dashboard-priority-main {
  min-width: 0;
}

.dashboard-priority-main h3 {
  margin: 0.18rem 0 0.35rem;
  color: #ffffff;
  font-size: 1.18rem;
  line-height: 1.25;
}

.dashboard-priority-main p:not(.page-kicker) {
  margin: 0 0 0.5rem;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.45;
}

.dashboard-priority-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 0;
}

.dashboard-priority-facts div,
.dashboard-attention-strip a,
.dashboard-shortcuts a {
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 7px;
  background: rgba(0, 20, 15, 0.22);
}

.dashboard-priority-facts div {
  display: grid;
  gap: 0.2rem;
  padding: 0.55rem 0.65rem;
}

.dashboard-priority-facts dt {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.72rem;
  font-weight: 800;
}

.dashboard-priority-facts dd {
  margin: 0;
  color: #ffffff;
  font-weight: 850;
}

.dashboard-list {
  display: grid;
  gap: 0.45rem;
}

.dashboard-list-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(170px, auto);
  align-items: start;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.48rem 0.62rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  background: rgba(0, 20, 15, 0.2);
  color: #ffffff;
  text-decoration: none;
}

.dashboard-list-row:hover,
.dashboard-shortcuts a:hover,
.dashboard-attention-strip a:hover,
.dashboard-rank-row:hover {
  border-color: rgba(74, 222, 128, 0.44);
  background: rgba(0, 55, 38, 0.36);
}

.dashboard-list-row strong {
  min-width: 0;
  color: #ffffff;
  font-size: 0.88rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.dashboard-list-row small {
  min-width: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.78rem;
  text-align: right;
  white-space: nowrap;
}

.dashboard-row-kind {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  min-height: 22px;
  padding: 0 0.4rem;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.67rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-attention-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.dashboard-attention-strip a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.6rem 0.68rem;
  color: #ffffff;
  text-decoration: none;
}

.dashboard-attention-strip strong {
  font-size: 1.25rem;
}

.dashboard-attention-strip span {
  min-width: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.78rem;
  font-weight: 800;
}

.dashboard-shortcuts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.dashboard-shortcuts a {
  display: grid;
  gap: 0.16rem;
  min-width: 0;
  padding: 0.52rem 0.6rem;
  color: #ffffff;
  text-decoration: none;
}

.dashboard-shortcuts strong {
  font-size: 0.9rem;
}

.dashboard-shortcuts span {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-signals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.dashboard-signals > div {
  display: grid;
  gap: 0.42rem;
  min-width: 0;
}

.dashboard-signals > div > strong {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.86rem;
}

.dashboard-rank-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
  min-width: 0;
  padding: 0.36rem 0 0.48rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  color: #ffffff;
  text-decoration: none;
}

.dashboard-rank-row span,
.dashboard-rank-row small {
  position: relative;
  z-index: 1;
}

.dashboard-rank-row span {
  overflow: hidden;
  font-size: 0.86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-rank-row small {
  color: rgba(255, 255, 255, 0.64);
  font-weight: 800;
}

.dashboard-rank-row i {
  position: absolute;
  left: 0;
  bottom: 0.18rem;
  height: 3px;
  border-radius: 999px;
  background: rgba(74, 222, 128, 0.58);
}

.dashboard-empty {
  margin: 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.86rem;
}

.dashboard-reset .badge {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.dashboard-reset .badge.open {
  background: rgba(34, 197, 94, 0.18);
}

.dashboard-reset .badge.waiting {
  background: rgba(245, 158, 11, 0.22);
}

.dashboard-reset .badge.monitored,
.dashboard-reset .badge.neutral {
  background: rgba(59, 130, 246, 0.18);
}

.dashboard-reset .badge.pothole {
  background: rgba(250, 204, 21, 0.18);
}

@media (max-width: 1180px) {
  .dashboard-kpis,
  .dashboard-layout,
  .dashboard-signals {
    grid-template-columns: 1fr;
  }

  .dashboard-panel-signals,
  .dashboard-panel-recent {
    grid-column: auto;
  }
}

@media (max-width: 1400px) {
  .workspace-globalnav {
    gap: 0.65rem;
    min-height: 58px;
    padding: 0 1rem;
  }

  .workspace-brand {
    gap: 0.55rem;
  }

  .workspace-brand-mark,
  .workspace-brand-mark img {
    width: 34px;
    height: 34px;
  }

  .workspace-brand-copy strong {
    font-size: 1.15rem;
  }

  .workspace-navlinks,
  .workspace-navmeta {
    gap: 0.12rem;
  }

  .workspace-navlinks a,
  .workspace-navmeta a {
    min-height: 36px;
    padding: 0 0.55rem;
    font-size: 0.86rem;
  }

  .workspace-user-chip {
    gap: 0.45rem;
    min-height: 34px;
  }

  .workspace-avatar,
  .workspace-user-chip > .workspace-avatar,
  .workspace-account-head > span {
    width: 30px;
    height: 30px;
  }

  .workspace-navlinks a.is-active::after {
    bottom: -12px;
  }
}

@media (max-width: 760px) {
  .dashboard-reset-header,
  .dashboard-priority-record,
  .dashboard-list-row,
  .dashboard-attention-strip,
  .dashboard-shortcuts {
    grid-template-columns: 1fr;
  }

  .dashboard-reset-header {
    display: grid;
  }

  .dashboard-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-list-row small {
    max-width: none;
    text-align: left;
  }
}

/* Dashboard alignment with the native app home structure. */

.dashboard-home {
  max-width: 1680px;
  gap: 0.75rem;
  padding-top: 0.55rem;
}

.dashboard-home-grid {
  display: grid;
  grid-template-columns: minmax(285px, 0.42fr) minmax(0, 1.58fr);
  gap: 0.75rem;
  align-items: start;
}

.dashboard-contextbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.62rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(0, 42, 31, 0.28);
}

.dashboard-contextbar div {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  min-width: 0;
}

.dashboard-contextbar span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.78rem;
  font-weight: 850;
}

.dashboard-contextbar strong {
  overflow: hidden;
  color: #ffffff;
  font-size: 0.98rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-context-action {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0.32rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 850;
  text-decoration: none;
}

.dashboard-context-action:hover {
  background: rgba(255, 255, 255, 0.12);
}

.dashboard-primary-actions {
  grid-column: 1;
  display: grid;
  gap: 0.55rem;
}

.dashboard-action-tile {
  display: grid;
  gap: 0.15rem;
  min-height: 58px;
  padding: 0.68rem 0.82rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: #ffffff;
  text-decoration: none;
}

.dashboard-action-tile:hover {
  border-color: rgba(255, 255, 255, 0.28);
  filter: brightness(1.06);
}

.dashboard-action-tile.is-issue {
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.95), rgba(5, 150, 105, 0.78));
}

.dashboard-action-tile.is-enquiry {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.9), rgba(13, 148, 136, 0.68));
}

.dashboard-action-tile.is-activity {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.9), rgba(37, 99, 235, 0.66));
}

.dashboard-action-tile span {
  color: #ffffff;
  font-size: 0.96rem;
  font-weight: 900;
}

.dashboard-action-tile strong {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.78rem;
  font-weight: 750;
}

.dashboard-action-tile small {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.72rem;
  font-weight: 700;
}

.dashboard-panel-queue {
  grid-column: 1;
}

.dashboard-panel-recent {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.dashboard-workqueue-strip {
  display: grid;
  gap: 0.5rem;
}

.dashboard-workqueue-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-workqueue-strip a {
  display: grid;
  gap: 0.18rem;
  align-content: center;
  min-width: 0;
  min-height: 52px;
  padding: 0.52rem 0.64rem;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 7px;
  background: rgba(0, 20, 15, 0.22);
  color: #ffffff;
  text-decoration: none;
}

.dashboard-workqueue-strip a:hover {
  border-color: rgba(74, 222, 128, 0.44);
  background: rgba(0, 55, 38, 0.36);
}

.dashboard-workqueue-strip strong {
  font-size: 1.12rem;
  line-height: 1;
}

.dashboard-workqueue-strip span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.15;
}

@media (max-width: 1180px) {
  .dashboard-home-grid,
  .dashboard-primary-actions,
  .dashboard-panel-queue,
  .dashboard-panel-recent {
    grid-column: auto;
    grid-row: auto;
  }

  .dashboard-home-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .dashboard-workqueue-strip {
    grid-template-columns: 1fr;
  }

  .portal-form-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-contextbar,
  .dashboard-contextbar div {
    display: grid;
  }

  .dashboard-contextbar strong {
    white-space: normal;
  }
}

/* Public auth screens aligned with the native app entry screen. */

body[data-authenticated="0"] {
  min-height: 100vh;
  color: rgba(255, 255, 255, 0.92);
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.1), transparent 24rem),
    linear-gradient(155deg, rgba(13, 82, 65, 0.98), rgba(6, 54, 43, 0.98) 48%, rgba(2, 39, 32, 0.98)),
    #06362b;
}

body[data-authenticated="0"]::before {
  display: none;
}

body[data-authenticated="0"] .shell {
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 100vh;
  max-width: none;
  padding: 0;
}

body[data-public-auth="1"] {
  overflow: hidden;
}

body[data-public-auth="1"] .shell {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

body[data-authenticated="0"] .workspace-content {
  display: grid;
  align-items: center;
  width: 100%;
  min-height: 0;
  padding: 2rem 1rem 1rem;
}

body[data-public-auth="1"] .workspace-content {
  height: 100%;
  overflow: hidden;
  padding: clamp(0.65rem, 2vh, 1.2rem) 1rem clamp(0.45rem, 1.2vh, 0.75rem);
}

body[data-public-auth="1"] .public-footer {
  margin-top: 0;
  padding-top: 0.55rem;
  padding-bottom: 0.6rem;
  font-size: 0.72rem;
}

.auth-screen {
  display: grid;
  gap: clamp(0.48rem, 1.3vh, 0.85rem);
  align-content: center;
  width: min(420px, 100%);
  height: 100%;
  margin: 0 auto;
}

.auth-lockup {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.78rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.auth-mark {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.92);
}

.auth-mark img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.auth-lockup h1,
.auth-card h2 {
  margin: 0;
  color: #ffffff;
  font-family: "Manrope", "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.auth-lockup h1 {
  font-size: 1.28rem;
  line-height: 1.1;
}

.auth-lockup p,
.auth-copy {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.45;
}

.auth-card {
  display: grid;
  gap: 0.58rem;
  padding: 0.78rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(0, 42, 31, 0.3);
}

.auth-card h2 {
  font-size: 1.08rem;
}

.auth-form {
  display: grid;
  gap: 0.48rem;
}

.auth-form label {
  display: grid;
  gap: 0.22rem;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.82rem;
  font-weight: 800;
}

.auth-form input {
  width: 100%;
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(0, 20, 15, 0.24);
  color: #ffffff;
  box-shadow: none;
}

.auth-form input::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.auth-primary {
  min-height: 38px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.95), rgba(20, 184, 166, 0.86));
  color: #ffffff;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.auth-primary:hover {
  filter: brightness(1.06);
}

.auth-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.auth-links a {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 850;
  text-decoration: none;
}

.auth-links a:hover {
  color: #ffffff;
}

.auth-error {
  margin: 0;
  padding: 0.62rem 0.7rem;
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: 10px;
  background: rgba(127, 29, 29, 0.28);
  color: #fecaca;
  font-weight: 800;
}

.auth-network {
  display: grid;
  gap: 0.42rem;
  margin-top: clamp(0.3rem, 2.4vh, 1.1rem);
  text-align: center;
}

.auth-network > strong {
  color: rgba(255, 255, 255, 0.84);
}

.auth-network > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.auth-network span {
  display: grid;
  gap: 0.12rem;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.74rem;
  line-height: 1.2;
}

.auth-network b {
  color: #ffffff;
  font-size: 1rem;
}

.auth-network small {
  color: rgba(255, 255, 255, 0.48);
}

@media (max-width: 520px) {
  body[data-authenticated="0"] .workspace-content {
    align-items: start;
    padding-top: 1rem;
  }

  body[data-public-auth="1"] {
    overflow: auto;
  }

  body[data-public-auth="1"] .shell {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .auth-lockup {
    border-radius: 16px;
  }
}

/* Archive reference workspace.  It deliberately exposes only the existing
   individual archive operations; bulk rules and archive settings do not exist
   in the product contract. */
.archive-workspace {
  display: grid;
  grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr);
  min-height: calc(100vh - 62px);
}

.archive-finder {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 1rem;
  min-height: 0;
  padding: 1.5rem 1rem;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 28, 23, 0.3);
}

.archive-finder-heading,
.archive-page-header,
.archive-section-heading,
.archive-selected-heading,
.archive-record-actions,
.archive-confirm-form {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.archive-finder-heading {
  justify-content: space-between;
}

.archive-finder-heading h1,
.archive-page-header h1,
.archive-section-heading h2,
.archive-record-panel h2,
.archive-side-stack h2,
.archive-recent-panel h2 {
  margin: 0;
  color: rgba(255, 255, 255, 0.94);
}

.archive-finder-heading h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
}

.archive-finder-heading > span {
  display: inline-grid;
  min-width: 1.65rem;
  min-height: 1.65rem;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.76rem;
  font-weight: 850;
}

.archive-finder-filters {
  display: grid;
  gap: 0.65rem;
}

.archive-finder-filters input,
.archive-finder-filters select,
.archive-confirm-form input {
  width: 100%;
  min-height: 2.65rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.65rem;
  background: rgba(0, 18, 13, 0.28);
  color: rgba(255, 255, 255, 0.9);
  font: inherit;
}

.archive-finder-filters input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.archive-finder-list {
  display: grid;
  align-content: start;
  gap: 0.65rem;
  max-height: 29rem;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.archive-finder-record {
  display: grid;
  gap: 0.25rem;
  padding: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.85rem;
  background: rgba(0, 18, 13, 0.2);
  color: inherit;
  text-decoration: none;
}

.archive-finder-record:hover,
.archive-finder-record.is-active {
  border-color: rgba(106, 221, 180, 0.58);
  background: rgba(8, 89, 64, 0.42);
}

.archive-finder-record strong { color: rgba(255, 255, 255, 0.94); font-size: 0.92rem; line-height: 1.3; }
.archive-finder-record > span:not(.archive-record-type),
.archive-finder-record small,
.archive-finder-empty { color: rgba(255, 255, 255, 0.62); font-size: 0.8rem; line-height: 1.35; }

.archive-record-type {
  width: fit-content;
  padding: 0.18rem 0.38rem;
  border-radius: 0.3rem;
  background: rgba(121, 177, 255, 0.18);
  color: #b5d4ff;
  font-size: 0.67rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.archive-content {
  display: grid;
  align-content: start;
  gap: 1.3rem;
  min-width: 0;
  padding: 1.75rem clamp(1rem, 3vw, 3rem) 2.5rem;
}

.archive-page-header { justify-content: space-between; }
.archive-page-header h1 { font-size: clamp(2rem, 3.4vw, 3.1rem); }
.archive-page-header p:not(.page-kicker),
.archive-section-heading p,
.archive-review-panel p,
.archive-about-panel p,
.archive-empty-panel p,
.archive-empty-copy,
.archive-destructive-actions p { margin: 0.35rem 0 0; color: rgba(255, 255, 255, 0.65); }

.archive-overview,
.archive-record-panel,
.archive-review-panel,
.archive-about-panel,
.archive-recent-panel {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
  background: rgba(0, 34, 27, 0.48);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.14);
}

.archive-overview,
.archive-record-panel,
.archive-review-panel,
.archive-about-panel,
.archive-recent-panel { padding: 1.2rem; }

.archive-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 1rem;
}

.archive-summary-grid > div {
  display: grid;
  gap: 0.18rem;
  min-height: 5.2rem;
  align-content: center;
  padding: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  background: rgba(0, 18, 13, 0.2);
}

.archive-summary-grid strong { color: rgba(255, 255, 255, 0.96); font-size: 1.45rem; }
.archive-summary-grid span { color: rgba(255, 255, 255, 0.65); font-size: 0.8rem; }

.archive-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(15rem, 20rem); gap: 1.2rem; align-items: start; }
.archive-selected-heading { justify-content: space-between; align-items: flex-start; }
.archive-selected-heading h2 { margin-top: 0.35rem; font-size: 1.25rem; }
.archive-selected-heading p { max-width: 52rem; }

.archive-selected-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.7rem; margin: 1rem 0; }
.archive-selected-facts div,
.archive-review-panel dl div { display: grid; gap: 0.28rem; padding: 0.7rem; border-radius: 0.7rem; background: rgba(0, 18, 13, 0.2); }
.archive-selected-facts dt,
.archive-review-panel dt { color: rgba(255, 255, 255, 0.56); font-size: 0.67rem; font-weight: 850; letter-spacing: 0.06em; text-transform: uppercase; }
.archive-selected-facts dd,
.archive-review-panel dd { margin: 0; color: rgba(255, 255, 255, 0.94); font-size: 0.85rem; font-weight: 750; }

.archive-record-actions { flex-wrap: wrap; }
.archive-record-actions form,
.archive-confirm-form { margin: 0; }
.archive-destructive-actions { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.archive-destructive-actions summary { width: fit-content; color: rgba(255, 255, 255, 0.82); font-size: 0.86rem; font-weight: 800; cursor: pointer; }
.archive-destructive-actions[open] { display: grid; gap: 0.7rem; }
.archive-confirm-form { flex-wrap: wrap; }
.archive-confirm-form input { width: 11rem; min-height: 2.25rem; }

.archive-side-stack { display: grid; gap: 1.2rem; }
.archive-side-stack h2 { font-size: 1rem; }
.archive-review-panel dl { display: grid; gap: 0.65rem; margin: 1rem 0 0; }
.archive-review-panel dl div { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.archive-review-panel dd { font-size: 1.25rem; }
.archive-empty-panel { min-height: 12rem; display: grid; align-content: center; }

.archive-recent-list { display: grid; margin-top: 0.9rem; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.archive-recent-list a { display: grid; grid-template-columns: auto minmax(12rem, 1fr) minmax(10rem, 1fr) auto; align-items: center; gap: 0.8rem; padding: 0.75rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.1); color: inherit; text-decoration: none; }
.archive-recent-list a:hover strong { color: #91e3c7; }
.archive-recent-list strong { color: rgba(255, 255, 255, 0.94); font-size: 0.88rem; }
.archive-recent-list span:not(.archive-record-type), .archive-recent-list time { color: rgba(255, 255, 255, 0.62); font-size: 0.8rem; }

.workspace-shell[data-party-theme="lib_dem"] .archive-workspace { border-color: var(--ld-line); }
.workspace-shell[data-party-theme="lib_dem"] .archive-finder { border-color: var(--ld-line); background: rgba(255, 255, 255, 0.48); }
.workspace-shell[data-party-theme="lib_dem"] .archive-finder-heading h1,
.workspace-shell[data-party-theme="lib_dem"] .archive-page-header h1,
.workspace-shell[data-party-theme="lib_dem"] .archive-section-heading h2,
.workspace-shell[data-party-theme="lib_dem"] .archive-record-panel h2,
.workspace-shell[data-party-theme="lib_dem"] .archive-side-stack h2,
.workspace-shell[data-party-theme="lib_dem"] .archive-recent-panel h2,
.workspace-shell[data-party-theme="lib_dem"] .archive-finder-record strong,
.workspace-shell[data-party-theme="lib_dem"] .archive-summary-grid strong,
.workspace-shell[data-party-theme="lib_dem"] .archive-selected-facts dd,
.workspace-shell[data-party-theme="lib_dem"] .archive-review-panel dd,
.workspace-shell[data-party-theme="lib_dem"] .archive-recent-list strong { color: var(--ld-ink); }
.workspace-shell[data-party-theme="lib_dem"] .archive-finder-heading > span { background: #fff1cf; color: #7c2d12; }
.workspace-shell[data-party-theme="lib_dem"] .archive-finder-filters input,
.workspace-shell[data-party-theme="lib_dem"] .archive-finder-filters select,
.workspace-shell[data-party-theme="lib_dem"] .archive-confirm-form input { border-color: var(--ld-line); background: rgba(255,255,255,.86); color: var(--ld-ink); }
.workspace-shell[data-party-theme="lib_dem"] .archive-finder-filters input::placeholder { color: var(--ld-muted); }
.workspace-shell[data-party-theme="lib_dem"] .archive-finder-record,
.workspace-shell[data-party-theme="lib_dem"] .archive-summary-grid > div,
.workspace-shell[data-party-theme="lib_dem"] .archive-selected-facts div,
.workspace-shell[data-party-theme="lib_dem"] .archive-review-panel dl div { border-color: var(--ld-line); background: rgba(255,255,255,.76); }
.workspace-shell[data-party-theme="lib_dem"] .archive-finder-record:hover,
.workspace-shell[data-party-theme="lib_dem"] .archive-finder-record.is-active { border-color: rgba(255,178,26,.72); background: #fff1cf; }
.workspace-shell[data-party-theme="lib_dem"] .archive-finder-record > span:not(.archive-record-type),
.workspace-shell[data-party-theme="lib_dem"] .archive-finder-record small,
.workspace-shell[data-party-theme="lib_dem"] .archive-finder-empty,
.workspace-shell[data-party-theme="lib_dem"] .archive-page-header p:not(.page-kicker),
.workspace-shell[data-party-theme="lib_dem"] .archive-section-heading p,
.workspace-shell[data-party-theme="lib_dem"] .archive-review-panel p,
.workspace-shell[data-party-theme="lib_dem"] .archive-about-panel p,
.workspace-shell[data-party-theme="lib_dem"] .archive-empty-panel p,
.workspace-shell[data-party-theme="lib_dem"] .archive-empty-copy,
.workspace-shell[data-party-theme="lib_dem"] .archive-destructive-actions p,
.workspace-shell[data-party-theme="lib_dem"] .archive-summary-grid span,
.workspace-shell[data-party-theme="lib_dem"] .archive-recent-list span:not(.archive-record-type),
.workspace-shell[data-party-theme="lib_dem"] .archive-recent-list time { color: var(--ld-muted); }
.workspace-shell[data-party-theme="lib_dem"] .archive-overview,
.workspace-shell[data-party-theme="lib_dem"] .archive-record-panel,
.workspace-shell[data-party-theme="lib_dem"] .archive-review-panel,
.workspace-shell[data-party-theme="lib_dem"] .archive-about-panel,
.workspace-shell[data-party-theme="lib_dem"] .archive-recent-panel { border-color: var(--ld-line); background: var(--ld-surface); box-shadow: 0 16px 32px rgba(146,64,14,.08); }
.workspace-shell[data-party-theme="lib_dem"] .archive-record-type { background: #e8f1ff; color: #2160bd; }
.workspace-shell[data-party-theme="lib_dem"] .archive-selected-facts dt,
.workspace-shell[data-party-theme="lib_dem"] .archive-review-panel dt { color: #8a6d3b; }
.workspace-shell[data-party-theme="lib_dem"] .archive-destructive-actions,
.workspace-shell[data-party-theme="lib_dem"] .archive-recent-list,
.workspace-shell[data-party-theme="lib_dem"] .archive-recent-list a { border-color: var(--ld-line); }
.workspace-shell[data-party-theme="lib_dem"] .archive-destructive-actions summary { color: var(--ld-ink); }
.workspace-shell[data-party-theme="lib_dem"] .archive-recent-list a:hover strong { color: #9a4e00; }

@media (max-width: 1050px) {
  .archive-workspace { grid-template-columns: 15rem minmax(0, 1fr); }
  .archive-detail-grid { grid-template-columns: 1fr; }
  .archive-side-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .archive-workspace { grid-template-columns: 1fr; }
  .archive-finder { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.12); }
  .archive-finder-list { max-height: 19rem; }
  .archive-content { padding: 1.25rem 1rem 2rem; }
  .archive-summary-grid,
  .archive-selected-facts,
  .archive-side-stack { grid-template-columns: 1fr; }
  .archive-recent-list a { grid-template-columns: 1fr; gap: .3rem; }
}

/* Issue workspace density and app-aligned status colours. */

.issue-thread-workspace .thread-main {
  gap: 0.7rem;
  padding-top: 1.35rem;
}

.issue-thread-workspace .thread-block {
  padding: 0.82rem;
}

.issue-thread-workspace .thread-block-head {
  margin-bottom: 0.55rem;
}

.issue-thread-workspace .thread-block-head h2 {
  font-size: 0.98rem;
}

.issue-thread-workspace .thread-split-blocks {
  gap: 0.7rem;
}

.issue-overview-panel {
  padding: 0.72rem !important;
}

.issue-overview-hero {
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.28fr);
  gap: 0.75rem;
  align-items: stretch;
  padding: 0.72rem;
}

.issue-overview-summary {
  display: grid;
  align-content: start;
  gap: 0.55rem;
  min-width: 0;
}

.issue-overview-summary > p,
.issue-detail-reading p {
  margin: 0;
  line-height: 1.42;
  white-space: normal;
  overflow-wrap: normal;
}

.issue-fact-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
}

.issue-fact-grid div,
.issue-compact-list div {
  padding: 0.52rem 0.6rem;
}

.issue-fact-grid dt,
.issue-compact-list dt {
  font-size: 0.66rem;
  letter-spacing: 0.045em;
}

.issue-fact-grid dd,
.issue-compact-list dd {
  font-size: 0.92rem;
  line-height: 1.25;
  overflow-wrap: normal;
  word-break: normal;
}

.issue-contact-card .issue-compact-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.issue-contact-card dd,
.issue-contact-card small,
.issue-contact-card .thread-link-row span {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.issue-detail-reading {
  min-height: 0;
  padding: 0.72rem;
}

.issue-thread-workspace .thread-activity-card,
.issue-thread-workspace .thread-reading-surface,
.issue-thread-workspace .thread-status-banner {
  padding: 0.72rem;
}

.issue-thread-workspace .badge,
.thread-finder-row-tags .badge,
.meta-chip-row .badge {
  min-height: 1.35rem;
  border-width: 1px;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.035em;
  box-shadow: none;
}

.issue-thread-workspace .badge.open,
.thread-finder-row-tags .badge.open,
.meta-chip-row .badge.open {
  border-color: rgba(5, 150, 105, 0.38);
  background: #d1fae5;
  color: #064e3b;
}

.issue-thread-workspace .badge.waiting,
.issue-thread-workspace .badge.todo,
.issue-thread-workspace .badge.on_hold,
.thread-finder-row-tags .badge.waiting,
.thread-finder-row-tags .badge.todo,
.thread-finder-row-tags .badge.on_hold,
.meta-chip-row .badge.waiting,
.meta-chip-row .badge.todo,
.meta-chip-row .badge.on_hold {
  border-color: rgba(217, 119, 6, 0.38);
  background: #fde68a;
  color: #653a00;
}

.issue-thread-workspace .badge.pothole,
.thread-finder-row-tags .badge.pothole,
.meta-chip-row .badge.pothole {
  border-color: rgba(59, 130, 246, 0.3);
  background: #dbeafe;
  color: #1e3a8a;
}

.issue-thread-workspace .badge.neutral,
.issue-thread-workspace .badge.monitored,
.thread-finder-row-tags .badge.neutral,
.thread-finder-row-tags .badge.monitored,
.meta-chip-row .badge.neutral,
.meta-chip-row .badge.monitored {
  border-color: rgba(6, 182, 212, 0.32);
  background: #cffafe;
  color: #164e63;
}

.issue-thread-workspace .badge.resolved,
.issue-thread-workspace .badge.done,
.issue-thread-workspace .badge.closed,
.thread-finder-row-tags .badge.resolved,
.thread-finder-row-tags .badge.done,
.thread-finder-row-tags .badge.closed,
.meta-chip-row .badge.resolved,
.meta-chip-row .badge.done,
.meta-chip-row .badge.closed {
  border-color: rgba(16, 185, 129, 0.35);
  background: #dcfce7;
  color: #14532d;
}

.issue-thread-workspace .badge.sensitive,
.issue-thread-workspace .badge.overdue,
.thread-finder-row-tags .badge.sensitive,
.thread-finder-row-tags .badge.overdue,
.meta-chip-row .badge.sensitive,
.meta-chip-row .badge.overdue {
  border-color: rgba(239, 68, 68, 0.35);
  background: #fee2e2;
  color: #7f1d1d;
}

@media (max-width: 1480px) {
  .issue-overview-hero {
    grid-template-columns: 1fr;
  }

  .issue-fact-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1280px) {
  .issue-contact-card .issue-compact-list,
  .issue-fact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Issue record workbench: desktop-first layout inspired by the native detail model. */

.issue-thread-workspace {
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
}

.issue-thread-workspace .thread-finder {
  padding: 1.25rem 1rem;
}

.issue-thread-workspace .thread-finder-head {
  margin-bottom: 0.85rem;
}

.issue-thread-workspace .thread-finder-head .page-kicker {
  display: none;
}

.issue-thread-workspace .thread-finder-head h2 {
  font-size: 1.18rem;
}

.issue-thread-workspace .thread-finder-row {
  padding: 0.72rem 0.78rem;
}

.issue-thread-workspace .thread-finder-row-main strong {
  font-size: 0.86rem;
  line-height: 1.25;
}

.issue-thread-workspace .thread-finder-row-main span,
.issue-thread-workspace .thread-finder-row-meta {
  font-size: 0.78rem;
}

.issue-thread-workspace .thread-finder-row-tags {
  gap: 0.35rem;
}

.issue-thread-workspace .thread-main {
  gap: 0.82rem;
  padding: 1.15rem 1.75rem 1.8rem;
}

.issue-thread-workspace .thread-header {
  align-items: end;
}

.issue-thread-workspace .thread-header h1 {
  margin-top: 0.28rem;
  font-size: clamp(1.55rem, 2vw, 2.1rem);
}

.issue-header-chips {
  margin-bottom: 0.08rem;
}

.issue-header-area {
  margin-top: 0.12rem !important;
  font-size: 0.84rem;
}

.issue-inline-edit {
  position: relative;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.issue-inline-edit > summary {
  list-style: none;
}

.issue-inline-edit > summary::-webkit-details-marker {
  display: none;
}

.issue-inline-edit-panel {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  z-index: 40;
  width: min(820px, calc(100vw - 2rem));
  padding: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(0, 30, 22, 0.98);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

.issue-inline-edit-panel form {
  display: grid;
  gap: 0.75rem;
}

.issue-inline-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.issue-inline-edit-grid label,
.issue-inline-check,
.portal-fieldset {
  display: grid;
  gap: 0.3rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 800;
}

.portal-fieldset {
  margin: 0;
  padding: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  background: rgba(0, 18, 13, 0.28);
}

.portal-fieldset legend {
  padding: 0 0.25rem;
}

.portal-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 0.6rem;
}

.portal-check-row {
  display: flex !important;
  align-items: center;
  gap: 0.45rem !important;
  font-size: 0.82rem !important;
  font-weight: 750 !important;
}

.portal-check-row input[type="checkbox"] {
  accent-color: #67d391;
  width: 16px;
  height: 16px;
}

.issue-inline-check {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.issue-inline-check input[type="checkbox"] {
  appearance: none;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 4px;
  background: rgba(0, 18, 13, 0.65);
}

.issue-inline-check input[type="checkbox"]::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #67d391;
  transform: scale(0);
  transition: transform 120ms ease;
}

.issue-inline-check input[type="checkbox"]:checked::before {
  transform: scale(1);
}

.issue-inline-edit-grid input,
.issue-inline-edit-grid select,
.issue-inline-edit-grid textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  background: rgba(0, 18, 13, 0.46);
  color: #ffffff;
}

.issue-inline-edit-grid textarea {
  resize: vertical;
}

.issue-inline-edit-actions {
  display: flex;
  justify-content: flex-end;
}

.issue-record-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  margin: 0;
  padding: 0.68rem 0.78rem;
  gap: 0.35rem 0;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(0, 34, 25, 0.34);
}

.issue-record-strip div {
  min-width: 0;
  padding: 0 0.72rem;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.issue-record-strip div:first-child {
  border-left: 0;
  padding-left: 0;
}

.issue-record-strip dt {
  margin: 0 0 0.2rem;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.66rem;
  font-weight: 850;
  text-transform: uppercase;
}

.issue-record-strip dd {
  margin: 0;
  color: #ffffff;
  font-size: 0.83rem;
  font-weight: 780;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.issue-desktop-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(310px, 0.75fr);
  gap: 0.78rem;
  align-items: start;
}

.issue-desktop-main,
.issue-desktop-side {
  display: grid;
  gap: 0.78rem;
  min-width: 0;
}

.issue-thread-workspace .thread-block {
  padding: 0.86rem;
}

.issue-description-card > p {
  max-width: 82ch;
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.88rem;
  line-height: 1.48;
}

.issue-inline-photos {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.78rem;
}

.issue-inline-photos > strong {
  color: #ffffff;
  font-size: 0.82rem;
}

.issue-inline-photos > div {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.issue-inline-photo {
  display: block;
  width: 86px;
  height: 62px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  cursor: zoom-in;
}

.issue-inline-photo:hover,
.issue-inline-photo:focus-visible {
  border-color: rgba(125, 240, 160, 0.72);
  outline: none;
}

.issue-inline-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.issue-static-map-card {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(0, 18, 13, 0.34);
}

.issue-static-map-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
}

.issue-map-preview-button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: zoom-in;
}

.issue-map-preview-button:focus-visible {
  outline: 2px solid #7df0a0;
  outline-offset: -3px;
}

.issue-map-preview-button:hover img {
  filter: saturate(1.08) brightness(1.04);
}

.issue-static-map-card-large img,
.issue-static-map-card-large .issue-static-map-empty {
  aspect-ratio: 16 / 6;
}

.issue-static-map-empty {
  display: grid;
  place-items: center;
  min-height: 132px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 850;
  background:
    linear-gradient(135deg, rgba(134, 239, 172, 0.08) 25%, transparent 25%) 0 0 / 28px 28px,
    linear-gradient(315deg, rgba(125, 211, 252, 0.07) 25%, transparent 25%) 0 0 / 28px 28px,
    rgba(0, 18, 13, 0.52);
}

.issue-static-map-copy {
  display: grid;
  gap: 0.2rem;
  padding: 0.65rem 0.75rem;
}

.issue-static-map-copy strong,
.issue-static-map-copy span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.issue-static-map-copy span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.8rem;
}

.issue-map-viewer {
  position: fixed;
  inset: 0;
  z-index: 120;
}

.issue-map-viewer[hidden] {
  display: none;
}

.issue-map-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 12, 9, 0.78);
  backdrop-filter: blur(5px);
}

.issue-map-viewer-dialog {
  position: relative;
  z-index: 1;
  width: min(1040px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  margin: 1rem auto;
  padding: 0.85rem;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(10, 52, 37, 0.98), rgba(3, 35, 25, 0.98));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

.issue-map-viewer-dialog .section-head {
  margin-bottom: 0.75rem;
  color: #f4fff8;
}

.issue-map-viewer-image {
  display: block;
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(0, 18, 13, 0.56);
}

.issue-map-viewer-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.75rem;
}

.issue-attachment-manager {
  display: flex;
  align-items: end;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.issue-attachment-manager form {
  display: flex;
  align-items: end;
  gap: 0.55rem;
  margin: 0;
}

.issue-attachment-manager label {
  display: grid;
  gap: 0.25rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.76rem;
  font-weight: 800;
}

.issue-attachment-manager input[type="file"] {
  width: min(210px, 100%);
  min-height: 34px;
  padding: 0.28rem;
  border: 1px solid #c6d4e6;
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink-720);
  font: inherit;
  font-size: 0.8rem;
}

.issue-attachment-manager input[type="file"]::file-selector-button {
  min-height: 26px;
  margin-right: 0.58rem;
  padding: 0 0.7rem;
  border: 1px solid #d4b15d;
  border-radius: 5px;
  background: linear-gradient(180deg, #fff6dc 0%, #f3d98f 100%);
  color: #6b4d00;
  font-weight: 850;
  cursor: pointer;
}

.issue-thread-workspace .thread-media-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 260px));
  align-items: start;
}

.issue-thread-workspace .thread-media-card.issue-media-button {
  display: grid;
  grid-template-rows: 150px auto;
  gap: 0.55rem;
  width: 100%;
  height: auto;
  min-height: 0;
  padding: 0.55rem;
  border: 1px solid #d8e3ec;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  color: var(--ink-940);
  text-align: left;
  box-shadow: none;
}

.issue-thread-workspace .thread-media-card.issue-media-card {
  display: grid;
  grid-template-rows: 150px auto auto;
  gap: 0.55rem;
  width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0.55rem;
  border: 1px solid #d8e3ec;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  color: var(--ink-940);
  box-shadow: none;
}

.issue-media-preview {
  display: block;
  width: 100%;
  height: 150px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: zoom-in;
}

.thread-media-card .issue-contained-photo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f7fbff;
}

.issue-thread-workspace .thread-media-card.issue-media-button .issue-contained-photo,
.issue-thread-workspace .thread-media-card.issue-media-card .issue-contained-photo {
  padding: 0.2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
}

.issue-thread-workspace .thread-media-copy {
  min-width: 0;
  padding: 0 0.1rem 0.1rem;
  color: var(--ink-620);
}

.issue-thread-workspace .thread-media-copy strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink-940);
  font-size: 0.82rem;
  line-height: 1.25;
}

.issue-thread-workspace .thread-media-copy span {
  color: var(--ink-620);
  font-size: 0.76rem;
}

.issue-media-actions {
  display: grid;
  gap: 0.45rem;
}

.issue-media-actions form {
  display: flex;
  align-items: end;
  gap: 0.45rem;
  margin: 0;
  flex-wrap: wrap;
}

.issue-media-secondary-actions {
  display: grid;
  grid-template-columns: max-content max-content;
  align-items: center;
  column-gap: 0.45rem;
  justify-content: start;
  width: max-content;
}

.issue-media-secondary-actions form {
  display: block;
  width: auto;
  margin: 0;
}

.issue-media-actions .btn {
  min-height: 32px;
  padding: 0.34rem 0.65rem;
}

/* Compact document rows for workspace attachments. Images retain their existing preview cards. */
.issue-inline-files {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.72rem;
}

.issue-inline-files > strong {
  color: var(--ink-940);
  font-size: 0.82rem;
}

.issue-inline-file {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  width: fit-content;
  max-width: 100%;
  color: var(--ink-720);
  font-size: 0.8rem;
}

.issue-inline-file svg {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.issue-inline-file > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.issue-inline-file a {
  flex: 0 0 auto;
  color: var(--accent-strong);
  font-weight: 800;
  text-decoration: none;
}

.issue-inline-file a:hover,
.issue-inline-file a:focus-visible {
  text-decoration: underline;
}

.issue-thread-workspace .thread-media-card.issue-file-card {
  grid-template-rows: 150px auto auto;
}

.issue-thread-workspace .thread-media-grid {
  align-items: stretch;
}

.issue-file-preview {
  display: grid;
  width: 100%;
  height: 150px;
  place-items: center;
  gap: 0.48rem;
  border: 1px solid #dce8f5;
  border-radius: 6px;
  background: #f7fbff;
  color: #2758bf;
  text-decoration: none;
}

.issue-file-icon svg {
  width: 2.3rem;
  height: 2.3rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.issue-file-preview-label {
  color: #2758bf;
  font-size: 0.8rem;
  font-weight: 850;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.issue-file-preview:hover,
.issue-file-preview:focus-visible {
  border-color: #91b8e7;
  background: #eef6ff;
  outline: none;
}

.issue-file-copy {
  display: grid;
  min-width: 0;
  gap: 0.14rem;
}

.issue-file-copy strong,
.issue-file-copy span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.issue-file-copy strong {
  color: var(--ink-940);
  font-size: 0.84rem;
  line-height: 1.28;
}

.issue-file-copy span {
  color: var(--ink-620);
  font-size: 0.76rem;
}

.issue-file-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.issue-file-actions form {
  margin: 0;
}

.issue-compact-file {
  display: grid;
  gap: 0.22rem;
  width: min(210px, 100%);
  min-width: 0;
  color: var(--ink-620);
  font-size: 0.72rem;
  font-weight: 800;
}

.issue-compact-file input[type="file"] {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  padding: 0.22rem;
  border: 1px solid #c6d4e6;
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink-720);
  font: inherit;
  font-size: 0.74rem;
}

.issue-compact-file input[type="file"]::file-selector-button {
  min-height: 24px;
  margin-right: 0.45rem;
  padding: 0 0.56rem;
  border: 1px solid #d4b15d;
  border-radius: 5px;
  background: linear-gradient(180deg, #fff6dc 0%, #f3d98f 100%);
  color: #6b4d00;
  font-weight: 850;
  cursor: pointer;
}

.issue-thread-workspace .issue-compact-list {
  grid-template-columns: 1fr;
}

.issue-thread-workspace .issue-compact-list div {
  display: grid;
  grid-template-columns: minmax(92px, 0.42fr) minmax(0, 1fr);
  align-items: center;
  gap: 0.7rem;
  padding: 0.54rem 0.62rem;
}

.issue-thread-workspace .issue-compact-list dt {
  margin: 0;
}

.issue-thread-workspace .issue-compact-list dd {
  font-size: 0.84rem;
}

.contact-workspace .thread-header {
  align-items: center;
}

.contact-workspace .thread-header-actions {
  justify-content: flex-end;
}

.contact-workspace .contact-record-strip {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.contact-workspace .contact-record-strip a {
  color: #ffffff;
}

.contact-workspace .contact-record-strip dd {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}

.contact-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.75fr);
  gap: 0.9rem;
  align-items: start;
}

.contact-overview-grid .thread-block {
  min-width: 0;
}

.contact-linked-panel {
  grid-row: span 2;
}

.contact-linked-panel-compact {
  grid-row: auto;
}

.contact-data-rights {
  grid-column: 1 / -1;
}

.contact-detail-list {
  margin: 0;
}

.contact-detail-list .pre-line {
  white-space: pre-line;
}

.contact-workspace .thread-card-list {
  display: grid;
  gap: 0.55rem;
}

.contact-workspace .thread-link-row {
  border-radius: 7px;
  background: rgba(0, 18, 13, 0.34);
  border-color: rgba(255, 255, 255, 0.1);
}

.contact-workspace .thread-link-row strong {
  color: #ffffff;
}

.contact-workspace .thread-link-row span {
  color: rgba(255, 255, 255, 0.68);
}

.contact-guard-form {
  display: block;
  margin: 0;
}

.contact-guard-form + .contact-guard-form {
  margin-top: 0.85rem;
}

.contact-data-rights-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.contact-data-rights-actions .contact-guard-form {
  flex: 0 0 auto;
}

@media (max-width: 980px) {
  .contact-overview-grid,
  .contact-workspace .contact-record-strip {
    grid-template-columns: 1fr;
  }

  .contact-linked-panel,
  .contact-data-rights {
    grid-column: auto;
    grid-row: auto;
  }

  .contact-data-rights-actions .contact-guard-form {
    flex: 1 1 100%;
  }
}

.casework-map-workspace {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  min-height: calc(100vh - 62px);
}

.casework-map-sidebar {
  display: grid;
  align-content: start;
  gap: 1rem;
  padding: 1.6rem 1.25rem 2rem;
  border-right: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 38, 28, 0.28);
}

.casework-map-sidebar .thread-finder-head {
  margin-bottom: 0;
}

.casework-map-sidebar .thread-finder-head .page-kicker {
  display: none;
}

.casework-map-filters {
  display: grid;
  gap: 0.7rem;
}

.casework-map-filters label {
  display: grid;
  gap: 0.28rem;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.78rem;
  font-weight: 800;
}

.casework-map-filters select {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(0, 22, 16, 0.28);
  color: #ffffff;
  box-shadow: none;
}

.casework-map-sidebar-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.82rem;
}

.casework-map-list {
  display: grid;
  gap: 0;
}

.casework-map-list-row {
  display: grid;
  gap: 0.55rem;
  padding: 0.95rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 3px solid transparent;
  color: #ffffff;
  text-decoration: none;
}

.casework-map-list-row:hover,
.casework-map-list-row.is-active {
  border-left-color: #4ade80;
  background: rgba(255, 255, 255, 0.07);
}

.casework-map-list-main,
.casework-map-list-meta {
  display: grid;
  gap: 0.25rem;
}

.casework-map-list-main strong {
  color: #ffffff;
  font-size: 0.96rem;
  line-height: 1.3;
}

.casework-map-list-main span,
.casework-map-list-meta span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.82rem;
  line-height: 1.35;
}

.casework-map-list-meta {
  grid-template-columns: minmax(0, 1fr) auto;
}

.casework-map-list-row .meta-chip-row {
  gap: 0.35rem;
}

.casework-map-list-row[hidden] {
  display: none;
}

.casework-map-pager {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  padding-top: 0.35rem;
}

.casework-map-pager span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.78rem;
  text-align: center;
}

.casework-map-pager button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.casework-map-main {
  min-width: 0;
  padding: 1.25rem;
}

.casework-map-shell {
  position: relative;
  min-height: calc(100vh - 116px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(0, 28, 20, 0.35);
}

.casework-map-canvas {
  width: 100%;
  min-height: calc(100vh - 116px);
  background: rgba(0, 28, 20, 0.35);
}

.casework-map-mode {
  position: absolute;
  right: 1rem;
  top: 1rem;
  z-index: 500;
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(0, 42, 31, 0.94);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(12px);
}

.casework-map-mode button {
  min-height: 32px;
  padding: 0 0.7rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, 0.74);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 850;
  cursor: pointer;
}

.casework-map-mode button:hover,
.casework-map-mode button.is-active {
  background: rgba(74, 222, 128, 0.2);
  color: #ffffff;
}

.casework-map-heat-mode {
  position: absolute;
  right: 1rem;
  top: 4.25rem;
  z-index: 500;
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(0, 42, 31, 0.94);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(12px);
}

.casework-map-heat-mode[hidden] {
  display: none;
}

.casework-map-heat-mode button {
  min-height: 30px;
  padding: 0 0.7rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, 0.74);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 850;
  cursor: pointer;
}

.casework-map-heat-mode button:hover,
.casework-map-heat-mode button.is-active {
  background: rgba(74, 222, 128, 0.2);
  color: #ffffff;
}

.casework-map-heat-legend {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 34px;
  padding: 0 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.86);
  color: #064e3b;
  font-size: 0.76rem;
  font-weight: 850;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
}

.casework-map-heat-legend[hidden] {
  display: none;
}

.casework-map-heat-legend i {
  display: block;
  border-radius: 50%;
}

.casework-map-heat-legend .low {
  width: 8px;
  height: 8px;
  background: #60a5fa;
}

.casework-map-heat-legend .medium {
  width: 10px;
  height: 10px;
  background: #22c55e;
}

.casework-map-heat-legend .high {
  width: 12px;
  height: 12px;
  background: #ef4444;
}

.casework-heat-count-icon {
  display: grid;
  place-items: center;
  width: 42px !important;
  height: 42px !important;
  margin: 0 !important;
  border-radius: 999px;
  background: rgba(6, 78, 59, 0.92);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

.casework-heat-count-icon span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #16a34a;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 950;
}

.casework-heat-count-icon.is-risk {
  background: rgba(15, 23, 42, 0.88);
}

.casework-heat-count-icon.is-risk span {
  width: 34px;
  height: 34px;
}

.casework-heat-count-icon.is-risk.is-blue span {
  background: #2563eb;
}

.casework-heat-count-icon.is-risk.is-green span {
  background: #16a34a;
}

.casework-heat-count-icon.is-risk.is-amber span {
  background: #ea580c;
}

.casework-heat-count-icon.is-risk.is-red span {
  background: #dc2626;
}

.casework-heat-count-icon.is-risk.is-selected {
  transform: scale(1.06);
}

.casework-map-inspector {
  display: grid;
  gap: 0.8rem;
  padding: 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
}

.casework-map-inspector[hidden] {
  display: none;
}

.casework-map-inspector[data-risk-band="blue"] {
  border-color: rgba(96, 165, 250, 0.5);
}

.casework-map-inspector[data-risk-band="green"] {
  border-color: rgba(34, 197, 94, 0.5);
}

.casework-map-inspector[data-risk-band="amber"] {
  border-color: rgba(249, 115, 22, 0.54);
}

.casework-map-inspector[data-risk-band="red"] {
  border-color: rgba(239, 68, 68, 0.54);
}

.casework-map-inspector-kicker,
.casework-map-inspector-category,
.casework-map-inspector-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.casework-map-inspector-kicker,
.casework-map-inspector-category span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.76rem;
  font-weight: 800;
}

.casework-map-inspector h3,
.casework-map-inspector p {
  margin: 0;
}

.casework-map-inspector h3,
.casework-map-inspector-category strong {
  color: #ffffff;
}

.casework-map-inspector p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.84rem;
  line-height: 1.45;
}

.casework-map-inspector-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.casework-map-inspector-stats div {
  display: grid;
  gap: 0.2rem;
  padding: 0.55rem 0.45rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.12);
}

.casework-map-inspector-stats strong {
  color: #ffffff;
  font-size: 1rem;
}

.casework-map-inspector-stats span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.72rem;
  font-weight: 700;
}

.casework-map-inspector-records {
  display: grid;
  gap: 0.45rem;
}

.casework-map-inspector-record {
  display: grid;
  gap: 0.2rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  text-decoration: none;
}

.casework-map-inspector-record strong {
  font-size: 0.82rem;
}

.casework-map-inspector-record span {
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.76rem;
}

.casework-map-list-row.is-hotspot-match {
  background: rgba(249, 115, 22, 0.1);
}

.casework-map-empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.65rem;
  min-height: calc(100vh - 116px);
  padding: 2rem;
  text-align: center;
}

.casework-map-empty h1 {
  margin: 0;
  color: #ffffff;
  font-size: 1.5rem;
}

.casework-map-empty p {
  max-width: 34rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
}

.casework-map-workspace .leaflet-container {
  background: rgba(0, 28, 20, 0.35);
  color: #0f172a;
  font-family: "Manrope", "Segoe UI", sans-serif;
}

.casework-map-workspace .leaflet-control-zoom a {
  color: #0f172a;
}

.casework-map-workspace .leaflet-popup-content-wrapper,
.casework-map-workspace .leaflet-popup-tip {
  background: #f8fafc;
}

.casework-map-workspace .leaflet-popup-content {
  color: #0f172a;
  font-size: 0.82rem;
  line-height: 1.4;
}

.casework-map-workspace .leaflet-popup-content a {
  color: #047857;
  font-weight: 850;
}

@media (max-width: 980px) {
  .casework-map-workspace {
    grid-template-columns: 1fr;
  }

  .casework-map-sidebar {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  }

  .casework-map-mode {
    right: 0.75rem;
    top: 0.75rem;
  }

  .casework-map-heat-mode {
    right: 0.75rem;
    top: 4rem;
  }
}

.issue-activity-list {
  display: grid;
  gap: 0;
}

.issue-activity-list div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  padding: 0.46rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.issue-activity-list div:first-child {
  border-top: 0;
  padding-top: 0;
}

.issue-activity-list span {
  min-width: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.83rem;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.issue-activity-list .activity-kind {
  color: #ffffff;
  font-weight: 900;
}

.issue-activity-list time {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.78rem;
  white-space: nowrap;
}

.issue-activity-list-large span {
  white-space: normal;
}

.enquiry-pin-map-editor {
  gap: 0.72rem;
  margin-top: 0.85rem;
}

.enquiry-pin-map-editor .issue-map-canvas {
  height: min(44vh, 430px);
  min-height: 340px;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(0, 18, 13, 0.56);
}

.issue-thread-workspace .portal-workspace-tabs {
  padding-top: 0.12rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.issue-thread-workspace .portal-tab-pill {
  min-height: 32px;
  padding: 0 0.7rem;
  font-size: 0.82rem;
}

@media (max-width: 1460px) {
  .issue-record-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem 0;
  }

  .issue-record-strip div:nth-child(3n + 1) {
    border-left: 0;
    padding-left: 0;
  }
}

@media (max-width: 1220px) {
  .issue-desktop-grid {
    grid-template-columns: 1fr;
  }
}

/* Issue notes timeline. */

.issue-notes-workbench {
  padding: 1rem !important;
}

.issue-notes-workbench > .thread-block-head {
  align-items: center;
  margin-bottom: 0.85rem;
}

.issue-notes-timeline {
  position: relative;
  display: grid;
  gap: 0.65rem;
  padding-left: 3rem;
}

.issue-notes-timeline::before {
  content: "";
  position: absolute;
  top: 0.5rem;
  bottom: 0.5rem;
  left: 1.28rem;
  width: 2px;
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.22);
}

.issue-note-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}

.issue-note-avatar {
  position: absolute;
  left: -2.92rem;
  top: 0.55rem;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: #166534;
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 900;
}

.issue-note-row:nth-child(3n + 2) .issue-note-avatar {
  background: #075985;
}

.issue-note-row:nth-child(3n) .issue-note-avatar {
  background: #5b21b6;
}

.issue-note-card {
  display: grid;
  gap: 0.46rem;
  min-width: 0;
  padding: 0.72rem 0.84rem;
  border: 1px solid #d8e3ec;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.issue-note-card header,
.issue-note-meta {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.issue-note-card header {
  justify-content: space-between;
}

.issue-note-card-title,
.issue-note-card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.issue-note-card-actions form {
  margin: 0;
}

.issue-note-edit {
  position: relative;
  margin: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}

.issue-note-edit > summary {
  padding: 0;
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 850;
  list-style: none;
}

.issue-note-edit > summary::-webkit-details-marker {
  display: none;
}

.issue-note-edit form {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 30;
  display: grid;
  gap: 0.55rem;
  width: min(520px, calc(100vw - 3rem));
  padding: 0.75rem;
  border: 1px solid #d7e2ed;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.14);
}

.issue-note-edit label {
  display: grid;
  gap: 0.3rem;
  color: var(--ink-720);
  font-size: 0.78rem;
  font-weight: 800;
}

.issue-note-edit textarea {
  width: 100%;
  min-height: 96px;
  border: 1px solid #c6d4e6;
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink-940);
}

.issue-note-action-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--accent-strong);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 850;
  cursor: pointer;
}

.issue-note-delete {
  color: #b03a3a;
}

.issue-note-delete-locked {
  color: var(--ink-520);
  font-size: 0.75rem;
  font-weight: 800;
}

.issue-note-card time,
.issue-note-meta span {
  color: var(--ink-620);
  font-size: 0.78rem;
  font-weight: 700;
}

.issue-note-card p {
  margin: 0;
  color: var(--ink-940);
  font-size: 0.88rem;
  line-height: 1.48;
}

.issue-note-attachments {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.15rem;
}

.issue-note-attachments a,
.issue-note-attachments button,
.issue-media-button {
  width: 72px;
  height: 52px;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid #d8e3ec;
  background: #ffffff;
  padding: 0;
  cursor: pointer;
}

.issue-note-attachments img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.issue-note-composer {
  position: relative;
  display: block;
  margin-top: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.issue-note-composer > summary::-webkit-details-marker {
  display: none;
}

.issue-add-note-trigger {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  width: fit-content;
  padding: 0 0.78rem;
  border: 1px solid #d6e1eb;
  border-radius: 6px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  color: var(--ink-940);
  font-size: 0.82rem;
  font-weight: 850;
  list-style: none;
  cursor: pointer;
  user-select: none;
  appearance: none;
}

.issue-add-note-trigger::before {
  content: "+";
  margin-right: 0.42rem;
  color: var(--accent-strong);
  font-size: 1rem;
  line-height: 1;
}

.issue-note-composer[open] > .issue-add-note-trigger {
  border-color: #c3d8cd;
  background: linear-gradient(180deg, #f8fcfa 0%, #eef7f3 100%);
}

.issue-note-composer form {
  display: grid;
  gap: 0.65rem;
  width: min(720px, 100%);
  margin-top: 0.55rem;
  padding: 0.75rem;
  border: 1px solid #d7e2ed;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.issue-note-composer label {
  display: grid;
  gap: 0.28rem;
  color: var(--ink-720);
  font-size: 0.78rem;
  font-weight: 800;
}

.issue-note-composer textarea,
.issue-note-composer input,
.issue-note-composer select,
.issue-note-edit input,
.issue-note-edit select {
  width: 100%;
  border: 1px solid #c6d4e6;
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink-940);
}

.issue-note-composer textarea {
  resize: vertical;
}

.issue-note-composer-grid,
.issue-note-composer-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.issue-note-composer-checks .check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.issue-note-composer-bottom {
  width: min(720px, calc(100% - 3rem));
  margin: 0.75rem 0 0 3rem;
}

.issue-notes-empty {
  display: grid;
  gap: 0.75rem;
}

.issue-media-button {
  display: grid;
  grid-template-rows: minmax(120px, 1fr) auto;
  width: 100%;
  height: auto;
  text-align: left;
}

.issue-media-button img {
  width: 100%;
  height: 160px;
  object-fit: contain;
}

.archive-confirm-form {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.archive-confirm-form input[type="text"] {
  width: 9.5rem;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: rgba(0, 18, 13, 0.35);
  color: #ffffff;
  padding: 0 0.55rem;
  font-size: 0.82rem;
}

.reference-form .check,
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 30px;
}

.reference-form .check input[type="checkbox"],
.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  accent-color: #67d391;
}

.work-inline-edit .issue-inline-edit-panel,
.contact-inline-edit .issue-inline-edit-panel {
  z-index: 60;
}

/* Fast capture draft review workspace. */

.drafts-thread-workspace .thread-main {
  padding-top: 1.25rem;
  min-width: 0;
}

.drafts-finder-actions {
  margin-bottom: 0.8rem;
}

.drafts-thread-workspace .thread-finder-row {
  gap: 0.42rem;
  padding: 0.82rem 0.9rem;
}

.drafts-thread-workspace .thread-finder-row-meta span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.drafts-record-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 0.9rem;
  margin-bottom: 0.8rem;
}

.drafts-record-strip dd {
  white-space: normal;
  overflow-wrap: anywhere;
}

.drafts-thread-workspace .drafts-review-grid {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
  align-items: start;
  gap: 0.8rem;
}

.draft-edit-panel,
.draft-review-panel,
.draft-complete-panel,
.draft-context-panel {
  min-width: 0;
}

.drafts-thread-workspace .drafts-issue-grid {
  display: grid;
  grid-template-columns: minmax(420px, 0.92fr) minmax(360px, 1fr);
  align-items: start;
  gap: 0.8rem;
}

.draft-review-cards {
  display: grid;
  grid-template-columns: minmax(190px, 0.82fr) minmax(220px, 1fr);
  gap: 0.75rem;
  align-items: start;
}

.draft-review-card {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
  align-content: start;
}

.draft-photo-card {
  display: grid;
  gap: 0.45rem;
}

.draft-review-card h3 {
  margin: 0;
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 850;
}

.drafts-thread-workspace .draft-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.7rem;
  min-width: 0;
}

.drafts-thread-workspace .draft-photo-grid.is-single {
  max-width: none;
  grid-template-columns: minmax(0, 1fr);
}

.drafts-thread-workspace .draft-photo-tile {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(0, 25, 18, 0.42);
  color: #ffffff;
  text-align: left;
  cursor: zoom-in;
  overflow: hidden;
}

.drafts-thread-workspace .draft-photo-tile:hover {
  border-color: rgba(103, 211, 145, 0.44);
  background: rgba(16, 87, 51, 0.24);
}

.drafts-thread-workspace .draft-photo-frame {
  display: grid;
  place-items: center;
  width: 100%;
  height: 190px;
  max-height: none;
  overflow: hidden;
  border-radius: 0;
  border: 0;
  background: rgba(0, 18, 13, 0.72);
}

.drafts-thread-workspace .draft-photo-grid.is-single .draft-photo-frame {
  height: 190px;
}

.drafts-thread-workspace .draft-photo-frame img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.drafts-thread-workspace .draft-photo-tile-large .draft-photo-frame {
  height: 260px;
  max-height: 38vh;
}

.drafts-thread-workspace .draft-photo-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  gap: 0.12rem;
  min-width: 0;
  padding: 0.55rem 0.65rem 0.6rem;
  background: linear-gradient(180deg, rgba(0, 18, 13, 0) 0%, rgba(0, 18, 13, 0.72) 38%, rgba(0, 18, 13, 0.94) 100%);
}

.drafts-thread-workspace .draft-photo-meta strong {
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 820;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drafts-thread-workspace .draft-photo-meta small {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.75rem;
  font-weight: 760;
}

.draft-location-preview,
.draft-location-empty {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(0, 20, 15, 0.26);
  align-self: start;
}

.draft-location-preview img {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: cover;
  background: rgba(0, 18, 13, 0.62);
}

.draft-location-preview div,
.draft-location-empty {
  display: grid;
  align-content: start;
  gap: 0.18rem;
  padding: 0.65rem 0.75rem;
}

.draft-location-empty {
  min-height: 190px;
}

.draft-location-preview strong,
.draft-location-empty strong {
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 850;
}

.draft-location-preview span,
.draft-location-empty span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.8rem;
}

.draft-location-preview small {
  color: rgba(255, 255, 255, 0.54);
  font-size: 0.74rem;
  font-weight: 760;
}

.draft-location-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.draft-toolbox-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-top: 0.2rem;
}

.draft-toolbox-form {
  margin-top: 0.55rem;
}

.draft-inline-pin-editor {
  display: grid;
  gap: 0.55rem;
}

.drafts-thread-workspace .draft-inline-pin-editor[hidden],
.drafts-thread-workspace .draft-custom-category-fields[hidden],
.drafts-thread-workspace [data-inline-draft-photo-editor][hidden] {
  display: none !important;
}

.draft-location-preview .issue-map-preview-button {
  height: 190px;
  min-height: 0;
}

.draft-photo-preview {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 320px;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(0, 18, 13, 0.54);
  cursor: zoom-in;
}

.draft-photo-preview img {
  display: block;
  width: 100%;
  max-height: 460px;
  object-fit: contain;
}

.draft-file-meta {
  margin: 0.55rem 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.82rem;
  font-weight: 750;
}

.drafts-thread-workspace .draft-complete-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 0.62rem;
}

.drafts-thread-workspace .draft-complete-form .portal-form-wide {
  grid-column: 1 / -1;
}

.draft-custom-category-panel {
  display: grid;
  gap: 0.55rem;
  padding: 0.68rem 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(0, 18, 13, 0.22);
}

.draft-custom-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.draft-custom-category-head strong {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.84rem;
  font-weight: 850;
}

.draft-custom-category-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.62rem;
  align-items: start;
}

.draft-custom-category-fields .draft-sensitive-check {
  grid-column: 1 / -1;
}

.drafts-thread-workspace .draft-complete-form input:not([type="checkbox"]),
.drafts-thread-workspace .draft-complete-form textarea,
.drafts-thread-workspace .draft-complete-form select {
  min-width: 0;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  background: rgba(0, 18, 13, 0.46);
  color: #ffffff;
  padding: 0.52rem 0.62rem;
  font: inherit;
  font-size: 0.86rem;
}

.drafts-thread-workspace .draft-complete-form textarea {
  min-height: 136px;
  resize: vertical;
}

.drafts-thread-workspace .draft-complete-form select {
  color-scheme: dark;
}

.drafts-thread-workspace .draft-complete-form input::placeholder,
.drafts-thread-workspace .draft-complete-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.48);
}

.drafts-thread-workspace .draft-sensitive-check {
  display: inline-flex !important;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  width: fit-content;
  min-height: 30px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.82rem;
  font-weight: 800;
}

.drafts-thread-workspace .draft-sensitive-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin: 0;
  accent-color: #67d391;
}

.draft-action-row {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  padding-top: 0.15rem;
  flex-wrap: wrap;
}

.draft-review-card form {
  margin: 0;
}

.drafts-detail-grid div {
  grid-template-columns: 135px minmax(0, 1fr);
}

.draft-context-panel .drafts-detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.draft-technical-details {
  margin-top: 0.75rem;
}

.draft-technical-details summary {
  width: fit-content;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.draft-technical-details .thread-detail-grid {
  margin-top: 0.65rem;
}

.drafts-empty-state {
  max-width: 760px;
}

@media (max-width: 1120px) {
  .drafts-thread-workspace .drafts-issue-grid,
  .drafts-review-grid,
  .drafts-record-strip {
    grid-template-columns: 1fr;
  }

  .draft-review-cards {
    grid-template-columns: 1fr;
  }

  .draft-custom-category-fields {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .issue-notes-timeline {
    padding-left: 2.45rem;
  }

  .issue-note-avatar {
    left: -2.42rem;
    width: 30px;
    height: 30px;
  }

  .issue-note-composer-grid,
  .issue-note-composer-checks {
    grid-template-columns: 1fr;
  }

  .issue-inline-edit-panel {
    left: 0;
    right: auto;
    width: min(100%, calc(100vw - 1rem));
  }

  .issue-inline-edit-grid {
    grid-template-columns: 1fr;
  }

  .issue-attachment-manager,
  .issue-attachment-manager form {
    align-items: stretch;
    flex-direction: column;
  }

  .drafts-record-strip,
  .drafts-thread-workspace .drafts-issue-grid,
  .drafts-review-grid {
    grid-template-columns: 1fr;
  }

  .draft-photo-preview {
    min-height: 220px;
  }
}

/* Role theme: Liberal Democrats. Scoped so Casework default and other role themes keep the existing portal chrome. */

.workspace-shell[data-party-theme="lib_dem"] {
  --accent: #ffb21a;
  --accent-strong: #e28a00;
  --accent-soft: #fff1cf;
  --party-accent: #ff6400;
  --ld-ink: #111827;
  --ld-ink-soft: #4b5563;
  --ld-muted: #6b5a35;
  --ld-line: rgba(217, 119, 6, 0.22);
  --ld-line-strong: rgba(217, 119, 6, 0.36);
  --ld-surface: rgba(255, 255, 255, 0.91);
  --ld-surface-strong: rgba(255, 255, 255, 0.98);
  --ld-canvas: #fff8ec;
  --ld-canvas-warm: #f7efe4;
  min-height: 100vh;
  background:
    radial-gradient(circle at 84% 10%, rgba(255, 178, 26, 0.2), transparent 29rem),
    radial-gradient(circle at 8% 82%, rgba(255, 100, 0, 0.12), transparent 25rem),
    linear-gradient(180deg, var(--ld-canvas) 0%, var(--ld-canvas-warm) 100%);
  color: var(--ld-ink);
  color-scheme: light;
}

.workspace-shell[data-party-theme="lib_dem"] .workspace-globalnav {
  border-bottom: 1px solid var(--ld-line);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 16px 42px rgba(146, 64, 14, 0.12);
}

.workspace-shell[data-party-theme="lib_dem"] .workspace-brand,
.workspace-shell[data-party-theme="lib_dem"] .workspace-brand:hover,
.workspace-shell[data-party-theme="lib_dem"] .workspace-brand-copy strong,
.workspace-shell[data-party-theme="lib_dem"] .workspace-navlinks a,
.workspace-shell[data-party-theme="lib_dem"] .workspace-navmeta a,
.workspace-shell[data-party-theme="lib_dem"] .workspace-user-chip {
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .workspace-brand-mark {
  border-radius: 10px;
  background: #fff1cf;
  box-shadow: inset 0 0 0 1px rgba(226, 138, 0, 0.22);
}

.workspace-shell[data-party-theme="lib_dem"] .workspace-navlinks a:hover,
.workspace-shell[data-party-theme="lib_dem"] .workspace-navmeta a:hover,
.workspace-shell[data-party-theme="lib_dem"] .workspace-navlinks a.is-active,
.workspace-shell[data-party-theme="lib_dem"] .workspace-navmeta a.is-active,
.workspace-shell[data-party-theme="lib_dem"] .workspace-account-menu.is-open .workspace-user-chip,
.workspace-shell[data-party-theme="lib_dem"] .workspace-account-menu.is-active .workspace-user-chip,
.workspace-shell[data-party-theme="lib_dem"] .workspace-user-chip:hover {
  background: rgba(255, 178, 26, 0.2);
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .workspace-navlinks a.is-active::after {
  background: #ffb21a;
}

.workspace-shell[data-party-theme="lib_dem"] .workspace-drafts-alert {
  border-color: rgba(255, 100, 0, 0.34);
  background: #fff1cf;
  color: #7c2d12;
}

.workspace-shell[data-party-theme="lib_dem"] .workspace-drafts-alert span {
  background: #ff6400;
  color: #ffffff;
}

.workspace-shell[data-party-theme="lib_dem"] .workspace-role-chip {
  border-color: var(--ld-line);
  background: rgba(255, 241, 207, 0.86);
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .workspace-role-chip:hover,
.workspace-shell[data-party-theme="lib_dem"] .workspace-role-menu.is-open .workspace-role-chip {
  border-color: var(--ld-line-strong);
  background: #ffd35a;
}

.workspace-shell[data-party-theme="lib_dem"] .workspace-role-chip-kicker,
.workspace-shell[data-party-theme="lib_dem"] .workspace-account-head small,
.workspace-shell[data-party-theme="lib_dem"] .workspace-role-card-head span,
.workspace-shell[data-party-theme="lib_dem"] .workspace-role-option small {
  color: var(--ld-muted);
}

.workspace-shell[data-party-theme="lib_dem"] .workspace-role-chip strong,
.workspace-shell[data-party-theme="lib_dem"] .workspace-role-card-head strong,
.workspace-shell[data-party-theme="lib_dem"] .workspace-role-option strong,
.workspace-shell[data-party-theme="lib_dem"] .workspace-account-head strong {
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .workspace-role-card,
.workspace-shell[data-party-theme="lib_dem"] .workspace-account-card {
  border-color: var(--ld-line);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 55px rgba(146, 64, 14, 0.16);
}

.workspace-shell[data-party-theme="lib_dem"] .workspace-role-card-head,
.workspace-shell[data-party-theme="lib_dem"] .workspace-account-head {
  border-bottom-color: var(--ld-line);
}

.workspace-shell[data-party-theme="lib_dem"] .workspace-role-option {
  border-color: rgba(217, 119, 6, 0.18);
  background: rgba(255, 248, 236, 0.7);
}

.workspace-shell[data-party-theme="lib_dem"] .workspace-role-option.is-active {
  border-color: rgba(255, 178, 26, 0.68);
  background: #fff1cf;
}

.workspace-shell[data-party-theme="lib_dem"] .workspace-role-default,
.workspace-shell[data-party-theme="lib_dem"] .workspace-access-badge {
  background: #fff1cf;
  color: #7c2d12;
  border-color: var(--ld-line);
}

.workspace-shell[data-party-theme="lib_dem"] .workspace-avatar,
.workspace-shell[data-party-theme="lib_dem"] .workspace-user-chip > .workspace-avatar,
.workspace-shell[data-party-theme="lib_dem"] .workspace-account-head > span {
  background: #ffb21a;
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-header h1,
.workspace-shell[data-party-theme="lib_dem"] .portal-page-header h2,
.workspace-shell[data-party-theme="lib_dem"] .thread-header h1,
.workspace-shell[data-party-theme="lib_dem"] .thread-block h2,
.workspace-shell[data-party-theme="lib_dem"] .snapshot-card h2,
.workspace-shell[data-party-theme="lib_dem"] .thread-finder-head h2,
.workspace-shell[data-party-theme="lib_dem"] .dashboard-reset-title h1,
.workspace-shell[data-party-theme="lib_dem"] .thread-block-subhead h3 {
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .page-kicker,
.workspace-shell[data-party-theme="lib_dem"] .support-text,
.workspace-shell[data-party-theme="lib_dem"] .thread-block-head p,
.workspace-shell[data-party-theme="lib_dem"] .thread-header .support-text,
.workspace-shell[data-party-theme="lib_dem"] .empty-state,
.workspace-shell[data-party-theme="lib_dem"] .muted,
.workspace-shell[data-party-theme="lib_dem"] .dashboard-kpi span,
.workspace-shell[data-party-theme="lib_dem"] .thread-finder-head span,
.workspace-shell[data-party-theme="lib_dem"] .thread-finder-row-main span,
.workspace-shell[data-party-theme="lib_dem"] .thread-finder-row-meta small,
.workspace-shell[data-party-theme="lib_dem"] .thread-finder-row-meta span,
.workspace-shell[data-party-theme="lib_dem"] .thread-link-row span,
.workspace-shell[data-party-theme="lib_dem"] .thread-mini-row span,
.workspace-shell[data-party-theme="lib_dem"] .thread-record-card-meta span,
.workspace-shell[data-party-theme="lib_dem"] .thread-timeline-meta span,
.workspace-shell[data-party-theme="lib_dem"] .thread-media-copy span,
.workspace-shell[data-party-theme="lib_dem"] .thread-activity-card small {
  color: var(--ld-ink-soft);
}

.workspace-shell[data-party-theme="lib_dem"] .thread-finder,
.workspace-shell[data-party-theme="lib_dem"] .thread-main,
.workspace-shell[data-party-theme="lib_dem"] .snapshot-card,
.workspace-shell[data-party-theme="lib_dem"] .thread-block,
.workspace-shell[data-party-theme="lib_dem"] .reference-main,
.workspace-shell[data-party-theme="lib_dem"] .reference-side,
.workspace-shell[data-party-theme="lib_dem"] .builder-main,
.workspace-shell[data-party-theme="lib_dem"] .builder-side,
.workspace-shell[data-party-theme="lib_dem"] .workspace-stat-card,
.workspace-shell[data-party-theme="lib_dem"] .workspace-stat-strip > div,
.workspace-shell[data-party-theme="lib_dem"] .dashboard-kpi,
.workspace-shell[data-party-theme="lib_dem"] .dashboard-panel,
.workspace-shell[data-party-theme="lib_dem"] .portal-toolbar {
  border-color: var(--ld-line);
  background: var(--ld-surface);
  color: var(--ld-ink);
  box-shadow: 0 20px 46px rgba(146, 64, 14, 0.1);
}

.workspace-shell[data-party-theme="lib_dem"] .thread-finder {
  border-right-color: var(--ld-line);
}

.workspace-shell[data-party-theme="lib_dem"] .thread-finder-row,
.workspace-shell[data-party-theme="lib_dem"] .thread-link-row,
.workspace-shell[data-party-theme="lib_dem"] .thread-mini-row,
.workspace-shell[data-party-theme="lib_dem"] .thread-record-card,
.workspace-shell[data-party-theme="lib_dem"] .thread-reading-surface,
.workspace-shell[data-party-theme="lib_dem"] .thread-status-banner,
.workspace-shell[data-party-theme="lib_dem"] .thread-activity-card,
.workspace-shell[data-party-theme="lib_dem"] .issue-workspace-lead,
.workspace-shell[data-party-theme="lib_dem"] .issue-workspace-note,
.workspace-shell[data-party-theme="lib_dem"] .issue-workspace-action-card,
.workspace-shell[data-party-theme="lib_dem"] .issue-fact-grid div,
.workspace-shell[data-party-theme="lib_dem"] .issue-compact-list div,
.workspace-shell[data-party-theme="lib_dem"] .thread-detail-grid div,
.workspace-shell[data-party-theme="lib_dem"] .workspace-info-item {
  border-color: rgba(217, 119, 6, 0.18);
  background: rgba(255, 255, 255, 0.74);
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .thread-finder-row:hover,
.workspace-shell[data-party-theme="lib_dem"] .thread-finder-row.is-active,
.workspace-shell[data-party-theme="lib_dem"] .thread-link-row.is-active,
.workspace-shell[data-party-theme="lib_dem"] .dashboard-kpi:hover {
  border-color: rgba(255, 178, 26, 0.72);
  border-left-color: #ffb21a;
  background: #fff1cf;
}

.workspace-shell[data-party-theme="lib_dem"] .thread-finder-row-main strong,
.workspace-shell[data-party-theme="lib_dem"] .thread-link-row strong,
.workspace-shell[data-party-theme="lib_dem"] .thread-record-card strong,
.workspace-shell[data-party-theme="lib_dem"] .thread-mini-row strong,
.workspace-shell[data-party-theme="lib_dem"] .workspace-info-item strong,
.workspace-shell[data-party-theme="lib_dem"] .dashboard-kpi strong,
.workspace-shell[data-party-theme="lib_dem"] .issue-fact-grid dd,
.workspace-shell[data-party-theme="lib_dem"] .issue-compact-list dd,
.workspace-shell[data-party-theme="lib_dem"] .thread-detail-grid dd {
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .workspace-info-item span,
.workspace-shell[data-party-theme="lib_dem"] .issue-fact-grid dt,
.workspace-shell[data-party-theme="lib_dem"] .issue-compact-list dt,
.workspace-shell[data-party-theme="lib_dem"] .thread-detail-grid dt,
.workspace-shell[data-party-theme="lib_dem"] .thread-timeline-label {
  color: var(--ld-muted);
}

.workspace-shell[data-party-theme="lib_dem"] .portal-tab-pill {
  color: var(--ld-ink-soft);
}

.workspace-shell[data-party-theme="lib_dem"] .portal-tab-pill:hover,
.workspace-shell[data-party-theme="lib_dem"] .portal-tab-pill.is-active {
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .portal-tab-pill.is-active {
  border-bottom-color: #ffb21a;
}

.workspace-shell[data-party-theme="lib_dem"] .btn,
.workspace-shell[data-party-theme="lib_dem"] .btn-small {
  border-color: rgba(226, 138, 0, 0.28);
  background: linear-gradient(145deg, #ffb21a, #e28a00);
  color: var(--ld-ink);
  box-shadow: 0 12px 22px rgba(226, 138, 0, 0.22);
}

.workspace-shell[data-party-theme="lib_dem"] .btn:hover,
.workspace-shell[data-party-theme="lib_dem"] .btn-small:hover {
  background: linear-gradient(145deg, #ffc247, #f2a000);
  color: var(--ld-ink);
  box-shadow: 0 14px 28px rgba(226, 138, 0, 0.26);
}

.workspace-shell[data-party-theme="lib_dem"] .btn-ghost {
  border-color: rgba(217, 119, 6, 0.26);
  background: rgba(255, 255, 255, 0.78);
  color: #7c2d12;
  box-shadow: none;
}

.workspace-shell[data-party-theme="lib_dem"] .btn-ghost:hover {
  background: #fff1cf;
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .portal-finder-controls .portal-toolbar-search,
.workspace-shell[data-party-theme="lib_dem"] .portal-finder-controls .portal-toolbar-select,
.workspace-shell[data-party-theme="lib_dem"] .portal-toolbar-search,
.workspace-shell[data-party-theme="lib_dem"] .portal-toolbar-select,
.workspace-shell[data-party-theme="lib_dem"] .portal-toolbar label select,
.workspace-shell[data-party-theme="lib_dem"] .reference-form input,
.workspace-shell[data-party-theme="lib_dem"] .reference-form textarea,
.workspace-shell[data-party-theme="lib_dem"] .reference-form select,
.workspace-shell[data-party-theme="lib_dem"] .desktop-form-shell input,
.workspace-shell[data-party-theme="lib_dem"] .desktop-form-shell textarea,
.workspace-shell[data-party-theme="lib_dem"] .desktop-form-shell select,
.workspace-shell[data-party-theme="lib_dem"] .workspace-searchbar input,
.workspace-shell[data-party-theme="lib_dem"] .drafts-thread-workspace .draft-complete-form input:not([type="checkbox"]),
.workspace-shell[data-party-theme="lib_dem"] .drafts-thread-workspace .draft-complete-form textarea,
.workspace-shell[data-party-theme="lib_dem"] .drafts-thread-workspace .draft-complete-form select {
  border-color: rgba(217, 119, 6, 0.24);
  background: rgba(255, 255, 255, 0.94);
  color: var(--ld-ink);
  box-shadow: none;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-finder-controls .portal-toolbar-search::placeholder,
.workspace-shell[data-party-theme="lib_dem"] .desktop-form-shell input::placeholder,
.workspace-shell[data-party-theme="lib_dem"] .desktop-form-shell textarea::placeholder,
.workspace-shell[data-party-theme="lib_dem"] .drafts-thread-workspace .draft-complete-form input::placeholder,
.workspace-shell[data-party-theme="lib_dem"] .drafts-thread-workspace .draft-complete-form textarea::placeholder {
  color: #9a8454;
}


.workspace-shell[data-party-theme="lib_dem"] .desktop-form-shell label,
.workspace-shell[data-party-theme="lib_dem"] .desktop-form-shell .field-label,
.workspace-shell[data-party-theme="lib_dem"] .desktop-form-shell .app-accordion > summary,
.workspace-shell[data-party-theme="lib_dem"] .desktop-form-shell .section-head h2,
.workspace-shell[data-party-theme="lib_dem"] .drafts-thread-workspace .draft-sensitive-check {
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-builder .desktop-form-shell .thread-block,
.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-builder .desktop-form-shell .app-accordion,
.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-builder .desktop-form-shell .desktop-form-submit-card {
  border-color: var(--ld-line);
  background: var(--ld-surface-strong);
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .badge {
  border-color: rgba(217, 119, 6, 0.22);
  background: #fff1cf;
  color: #7c2d12;
}

.workspace-shell[data-party-theme="lib_dem"] .badge.open,
.workspace-shell[data-party-theme="lib_dem"] .badge.resolved,
.workspace-shell[data-party-theme="lib_dem"] .badge.done,
.workspace-shell[data-party-theme="lib_dem"] .badge.closed {
  border-color: rgba(21, 128, 61, 0.22);
  background: #eaf7ef;
  color: #166534;
}

.workspace-shell[data-party-theme="lib_dem"] .badge.waiting,
.workspace-shell[data-party-theme="lib_dem"] .badge.todo,
.workspace-shell[data-party-theme="lib_dem"] .badge.on_hold,
.workspace-shell[data-party-theme="lib_dem"] .badge.pothole {
  border-color: rgba(217, 119, 6, 0.28);
  background: #fff1cf;
  color: #92400e;
}

.workspace-shell[data-party-theme="lib_dem"] .badge.overdue,
.workspace-shell[data-party-theme="lib_dem"] .badge.sensitive {
  border-color: rgba(220, 38, 38, 0.25);
  background: #fee2e2;
  color: #991b1b;
}

.builder-layout-report {
  grid-template-columns: minmax(0, 0.98fr) minmax(36rem, 1.02fr);
  gap: 1.1rem;
  align-items: start;
}

.builder-layout-report.builder-layout-report-idle {
  grid-template-columns: minmax(0, 1fr) minmax(22rem, 0.44fr);
}

.report-builder-idle-side {
  align-content: start;
}

.report-builder-idle-side .thread-block {
  min-width: 0;
}

.report-builder-idle-side .thread-block-head {
  display: grid;
  gap: 0.62rem;
}

.report-builder-idle-side .thread-block-head .btn {
  justify-self: start;
}

.report-builder-idle-side .report-history-row {
  grid-template-columns: 1fr;
  gap: 0.58rem;
  padding: 0.68rem 0;
}

.report-builder-idle-side .report-history-actions {
  justify-content: flex-start;
}

.report-builder-idle-side .report-history-actions .btn {
  min-height: 2rem;
  padding: 0.34rem 0.58rem;
  font-size: 0.76rem;
}

.portal-page-shell-report-builder {
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  gap: 1rem;
}

.portal-page-shell-report-builder .portal-page-header {
  padding: 0.05rem 0 0;
}

.portal-page-shell-report-builder .portal-page-header h1 {
  font-size: clamp(2rem, 2.5vw, 2.45rem);
  line-height: 0.98;
}

.portal-page-shell-report-builder .support-text {
  max-width: 34rem;
  font-size: 0.9rem;
  line-height: 1.35;
}

.portal-page-shell-report-builder .builder-main,
.portal-page-shell-report-builder .builder-side {
  gap: 1rem;
}

.portal-page-shell-report-builder .thread-block {
  padding: 1rem 1.05rem;
  border-radius: 12px;
}

.portal-page-shell-report-builder .thread-block-head {
  gap: 0.7rem;
  margin-bottom: 0.6rem;
}

.portal-page-shell-report-builder .thread-block-head h2 {
  font-size: 1rem;
}

.portal-page-shell-report-builder .thread-block-head p {
  margin-top: 0.08rem;
  font-size: 0.88rem;
  line-height: 1.42;
}

.portal-page-shell-report-builder .builder-main .thread-reading-surface,
.portal-page-shell-report-builder .builder-side .thread-reading-surface {
  padding: 0.8rem 0.9rem;
}

.report-loaded-bar {
  padding: 0.9rem 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 32px rgba(20, 44, 78, 0.08);
}

.report-loaded-ribbon {
  display: grid;
  gap: 0.58rem;
}

.report-loaded-ribbon-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.8rem;
}

.report-loaded-bar-copy {
  display: grid;
  gap: 0.18rem;
}

.report-loaded-bar-copy strong {
  font-size: 1.15rem;
  line-height: 1.2;
}

.report-loaded-meta {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.26rem 0.44rem;
  font-size: 0.84rem;
  line-height: 1.32;
  color: rgba(32, 48, 72, 0.72);
}

.report-loaded-meta span {
  display: inline-flex;
  align-items: center;
  position: relative;
  min-height: 1.1rem;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: inherit;
  font-weight: 700;
  color: rgba(32, 48, 72, 0.78);
}

.report-loaded-meta-pill-wrap {
  display: inline-flex;
  align-items: center;
}

.report-loaded-meta-pill {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.8rem;
  padding: 0.22rem 0.68rem;
  border: 1px solid rgba(24, 48, 78, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: none;
  cursor: pointer;
  font: inherit;
  font-size: 0.79rem;
  font-weight: 780;
  line-height: 1.2;
  color: rgba(32, 48, 72, 0.76);
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.report-loaded-meta-pill:hover,
.report-loaded-meta-pill:focus-visible {
  border-color: rgba(217, 119, 6, 0.24);
  background: rgba(255, 247, 230, 0.98);
  color: rgba(23, 36, 56, 0.92);
}

.report-loaded-meta-pill.is-active {
  border-color: rgba(217, 119, 6, 0.24);
  background: rgba(255, 239, 204, 0.98);
  color: rgba(23, 36, 56, 0.96);
}

.report-loaded-meta span + span::before {
  content: "·";
  margin-right: 0.44rem;
  color: rgba(32, 48, 72, 0.4);
}

.report-loaded-bar-actions {
  display: flex;
  align-items: center;
}

.report-reset-link {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.8rem;
  padding: 0.44rem 0.74rem;
  border: 1px solid rgba(24, 48, 78, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: none;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
  color: rgba(32, 48, 72, 0.68);
  text-decoration: none;
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}

.report-reset-link:hover,
.report-reset-link:focus-visible {
  border-color: rgba(217, 119, 6, 0.22);
  background: rgba(255, 247, 230, 0.98);
  color: rgba(23, 36, 56, 0.92);
  text-decoration: none;
}

#report-writeup,
#report-evidence,
#report-facts {
  scroll-margin-top: 7rem;
}

.report-guide-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.report-guide-nav-ribbon {
  padding-top: 0.58rem;
  border-top: 1px solid rgba(24, 48, 78, 0.08);
}

.report-guide-button {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem;
  width: auto;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: 720;
  font-size: 0.8rem;
  line-height: 1.2;
  min-height: 0;
  padding: 0.46rem 0.8rem 0.46rem 0.6rem;
  text-align: left;
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}

.report-guide-button.is-active {
  border-color: rgba(255, 177, 26, 0.32);
  background: rgba(255, 177, 26, 0.18);
  color: rgba(23, 36, 56, 0.96);
}

.report-guide-button:hover,
.report-guide-button:focus-visible {
  border-color: rgba(24, 48, 78, 0.12);
  background: rgba(255, 255, 255, 0.8);
}

.report-guide-button-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  min-width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.68rem;
  font-weight: 800;
  color: rgba(32, 48, 72, 0.78);
}

.report-guide-button-copy {
  display: block;
  min-width: 0;
}

.report-guide-button-copy strong {
  display: block;
  font-size: 0.86rem;
  line-height: 1.18;
}

.report-guide-button-copy small {
  font-size: 0.66rem;
  line-height: 1.22;
  color: rgba(255, 255, 255, 0.66);
}

.report-writing-panel {
  position: sticky;
  top: 5.45rem;
  display: grid;
  gap: 1.15rem;
  align-self: start;
  padding: 1.3rem 1.35rem 1.4rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 253, 247, 0.94) 100%);
  box-shadow: 0 24px 54px rgba(20, 44, 78, 0.1);
}

.report-writing-head {
  display: grid;
  gap: 0.45rem;
  padding-bottom: 0.4rem;
}

.report-writing-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.report-writing-head h2 {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.1;
}

.report-parish-page-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.52rem;
  margin-left: auto;
}

.report-parish-page-controls[hidden] {
  display: none !important;
}

.report-parish-page-status {
  color: var(--portal-muted, rgba(24, 48, 78, 0.62));
  font-size: 0.76rem;
  font-weight: 760;
  white-space: nowrap;
}

.report-draft-message {
  display: block;
  margin: 0;
  padding: 0.72rem 0.86rem;
  border: 1px solid rgba(24, 48, 78, 0.12);
  border-radius: 14px;
  background: rgba(247, 249, 252, 0.92);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.35;
  color: rgba(53, 72, 102, 0.86);
}

.report-draft-message[hidden] {
  display: none !important;
}

.report-draft-message[data-state="saving"] {
  border-color: rgba(255, 177, 26, 0.28);
  background: rgba(255, 247, 227, 0.98);
  color: rgba(133, 82, 0, 0.92);
}

.report-draft-message[data-state="saved"] {
  border-color: rgba(54, 111, 78, 0.2);
  background: rgba(239, 250, 243, 0.98);
  color: rgba(28, 96, 62, 0.92);
}

.report-draft-message[data-state="error"] {
  border-color: rgba(180, 52, 52, 0.22);
  background: rgba(255, 242, 242, 0.98);
  color: rgba(143, 34, 34, 0.96);
}

.report-step-panel {
  display: none;
}

.report-step-panel.is-active {
  display: grid;
  gap: 0.95rem;
}

.report-step-surface {
  display: grid;
  gap: 0.32rem;
}

.report-brief-support-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.report-fact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.report-fact-grid > div {
  padding: 0.7rem 0.76rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(0, 20, 15, 0.18);
}

.report-support-cue-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.report-support-cue {
  display: grid;
  gap: 0.2rem;
  padding: 0.72rem 0.78rem;
  border: 1px solid rgba(24, 48, 78, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
}

.report-support-cue span {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(53, 72, 102, 0.56);
}

.report-support-cue strong {
  font-size: 0.95rem;
  line-height: 1.32;
}

.report-fact-grid span {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}

.report-fact-grid strong {
  display: block;
  margin-top: 0.16rem;
  font-size: 1.2rem;
  line-height: 1.08;
}

.report-support-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.8rem;
  align-items: center;
  padding-top: 0.05rem;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.74);
}

.report-support-inline span {
  display: inline-flex;
  align-items: baseline;
  gap: 0.28rem;
  line-height: 1.25;
}

.report-support-inline strong {
  font-size: 0.88rem;
  line-height: 1;
}

.report-overview-shell {
  display: grid;
  gap: 0.9rem;
}

.report-overview-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.report-overview-metric {
  display: grid;
  gap: 0.2rem;
  padding: 0.75rem 0.82rem;
  border: 1px solid rgba(24, 48, 78, 0.08);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(248, 250, 252, 0.9) 100%);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.report-overview-metric span {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(53, 72, 102, 0.58);
}

.report-overview-metric strong {
  font-size: 1.32rem;
  line-height: 1.1;
}

.report-overview-highlight {
  display: grid;
  gap: 0.3rem;
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
  border: 1px solid rgba(24, 48, 78, 0.08);
  background: linear-gradient(135deg, rgba(255, 245, 224, 0.92) 0%, rgba(255, 255, 255, 0.92) 100%);
}

.report-overview-highlight-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.report-overview-highlight strong {
  font-size: 1rem;
  line-height: 1.4;
}

.report-overview-meta {
  margin-top: -0.15rem;
}

.report-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.report-overview-block {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
}

.report-overview-block-wide {
  grid-column: 1 / -1;
}

.report-overview-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
}

.report-overview-block-title {
  display: block;
  font-size: 0.9rem;
  line-height: 1.25;
}

.report-overview-block-note {
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.report-overview-card-list {
  display: grid;
  gap: 0.5rem;
}

.report-overview-card {
  display: grid;
  gap: 0.48rem;
  padding: 0.72rem 0.82rem;
  border-radius: 14px;
  border: 1px solid rgba(24, 48, 78, 0.08);
  background: rgba(255, 255, 255, 0.72);
}

.report-overview-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.48rem;
}

.report-overview-card-head strong {
  min-width: 0;
  line-height: 1.3;
}

.report-overview-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  min-width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: rgba(255, 177, 26, 0.16);
  font-size: 0.68rem;
  font-weight: 800;
  color: rgba(53, 72, 102, 0.72);
}

.report-overview-total {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0.18rem 0.48rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1;
  background: rgba(24, 48, 78, 0.08);
}

.report-overview-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.report-overview-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1;
  border: 1px solid rgba(24, 48, 78, 0.08);
  background: rgba(248, 250, 252, 0.92);
}

.report-overview-note {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.35;
  color: rgba(53, 72, 102, 0.68);
}

.report-overview-note-card {
  gap: 0.4rem;
}

.report-note-list {
  gap: 0.55rem;
}

.report-note-row {
  gap: 0.18rem;
}

.report-note-row span {
  line-height: 1.45;
}

.report-note-row small {
  font-size: 0.74rem;
  color: rgba(53, 72, 102, 0.62);
}

.report-note-panel .report-record-detail p {
  white-space: pre-wrap;
}

.report-note-row-summary {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.report-record-badge-inline {
  margin-left: 0.45rem;
  vertical-align: middle;
}

.report-history-link-block .thread-block-head {
  margin-bottom: 0;
}

.report-history-surface {
  padding: 0.25rem 0;
  border: 1px solid rgba(136, 157, 184, 0.14);
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.94));
}

.report-history-list {
  display: grid;
}

.report-history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.95rem 1rem;
}

.report-history-row + .report-history-row {
  border-top: 1px solid rgba(136, 157, 184, 0.14);
}

.report-history-copy {
  display: grid;
  gap: 0.16rem;
  min-width: 0;
}

.report-history-copy strong {
  display: block;
  line-height: 1.22;
}

.report-history-copy span {
  display: block;
  font-size: 0.84rem;
  line-height: 1.3;
  color: rgba(53, 72, 102, 0.74);
}

.report-history-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.report-history-actions .btn,
.report-history-actions .btn-ghost,
.report-history-actions .btn-small {
  min-width: 0;
  justify-content: center;
  white-space: nowrap;
}

.report-history-actions form {
  margin: 0;
}

.report-history-empty {
  display: grid;
  gap: 0.25rem;
  padding: 1rem 1.05rem;
  border: 1px dashed rgba(136, 157, 184, 0.3);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.72);
}

.report-history-empty p {
  margin: 0;
  color: rgba(53, 72, 102, 0.74);
}

.report-archive-header {
  align-items: start;
}

.report-write-form {
  gap: 1rem;
}

.report-write-form-editorial {
  display: grid;
  align-content: start;
}

.report-write-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin-top: 0.3rem;
}

.report-step-nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18rem;
  width: 18rem;
  min-width: 18rem;
  max-width: 18rem;
  min-height: 2.35rem;
  padding: 0.55rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 780;
  white-space: nowrap;
}

.report-step-nav-button[hidden] {
  display: none !important;
}

.report-write-form label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.86rem;
  font-weight: 740;
}

.report-write-field {
  display: grid;
  gap: 0.4rem;
}

.report-write-field-label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.86rem;
  font-weight: 740;
}

.report-rich-editor {
  display: grid;
  border: 1px solid rgba(24, 48, 78, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 22px rgba(20, 44, 78, 0.035);
  overflow: hidden;
}

.report-rich-editor:focus-within {
  border-color: rgba(255, 177, 26, 0.38);
  box-shadow: 0 0 0 3px rgba(255, 177, 26, 0.12);
}

.report-rich-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.48rem;
  align-items: center;
  padding: 0.62rem 0.72rem;
  border-bottom: 1px solid rgba(24, 48, 78, 0.08);
  background: rgba(250, 247, 241, 0.96);
}

.report-rich-toolbar-group {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.18rem;
  border: 1px solid rgba(24, 48, 78, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
}

.report-rich-toolbar-spacer {
  flex: 1 1 auto;
  min-width: 0;
}

.report-rich-button {
  appearance: none;
  -webkit-appearance: none;
  min-width: 2.15rem;
  height: 2.1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-940);
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.report-rich-button-list {
  min-width: 4.7rem;
  padding: 0 0.8rem;
  font-size: 0.75rem;
}

.report-rich-button-save {
  min-width: 6.2rem;
  padding: 0 0.95rem;
  margin-left: auto;
  border-color: rgba(255, 177, 26, 0.22);
  background: rgba(255, 249, 236, 0.98);
}

.report-rich-button-save[data-save-state="saving"] {
  border-color: rgba(255, 177, 26, 0.36);
  background: rgba(255, 243, 212, 0.98);
  color: #7b5700;
}

.report-rich-button-save[data-save-state="saved"] {
  border-color: rgba(255, 177, 26, 0.42);
  background: rgba(255, 237, 194, 0.98);
  color: #734100;
}

.report-rich-button:hover {
  border-color: rgba(255, 177, 26, 0.34);
  background: rgba(255, 244, 220, 0.8);
}

.report-rich-button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
  border-color: transparent;
  background: transparent;
}

.report-rich-button:focus-visible {
  outline: 2px solid rgba(255, 177, 26, 0.42);
  outline-offset: 1px;
}

.report-rich-button.is-active {
  border-color: rgba(255, 177, 26, 0.56);
  background: rgba(255, 233, 188, 0.92);
  color: #6f3f00;
}

.report-write-textarea {
  min-height: 22rem;
  height: 22rem;
  padding: 1.15rem 1.25rem 1.2rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  resize: none;
  font-size: 1rem;
  font-weight: 450;
  line-height: 1.62;
}

.report-rich-surface {
  display: block;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.report-rich-surface p {
  margin: 0;
}

.report-rich-surface ul,
.report-rich-surface ol {
  margin: 0.35rem 0 0.35rem 1.35rem;
  padding: 0;
}

.report-rich-surface li {
  margin: 0.12rem 0;
}

.report-rich-surface li > p {
  margin: 0;
}

.report-rich-surface li > ul,
.report-rich-surface li > ol {
  margin-top: 0.22rem;
}

.report-rich-surface b,
.report-rich-surface strong,
.report-rich-surface span[style*="font-weight: bold"],
.report-rich-surface span[style*="font-weight:bold"] {
  font-weight: 780;
}

.report-rich-surface i,
.report-rich-surface em,
.report-rich-surface span[style*="font-style: italic"],
.report-rich-surface span[style*="font-style:italic"] {
  font-style: italic;
}

.report-rich-surface u,
.report-rich-surface span[style*="text-decoration: underline"],
.report-rich-surface span[style*="text-decoration:underline"] {
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.12em;
}

.report-rich-surface:focus {
  outline: none;
}

.report-rich-surface.is-empty::before {
  content: attr(data-placeholder);
  color: rgba(53, 72, 102, 0.46);
}

.report-write-textarea-source {
  display: none;
}

.report-write-textarea-overview {
  min-height: 24rem;
  height: 24rem;
}

.report-write-textarea-parish {
  min-height: 19rem;
  height: 19rem;
}

.report-write-form input[type="email"],
.report-write-form input[type="text"] {
  width: 100%;
}

.report-setup-form {
  gap: 0.8rem;
}

.report-setup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: end;
}

.report-setup-grid-primary > [hidden] {
  display: none !important;
}

.report-setup-field {
  display: grid;
  gap: 0.18rem;
  font-size: 0.8rem;
  font-weight: 760;
}

.report-setup-field select,
.report-setup-field input {
  min-height: 40px;
  padding: 0.45rem 0.7rem;
  margin-top: 0;
}

.report-setup-readonly-select {
  opacity: 1;
  color: var(--ink-940);
  -webkit-text-fill-color: var(--ink-940);
  cursor: default;
  background: #ffffff;
}

.report-date-grid {
  gap: 0.75rem;
}

.report-scope-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.report-scope-summary > div {
  display: grid;
  gap: 0.18rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(0, 20, 15, 0.16);
}

.report-scope-summary span {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}

.report-scope-summary strong {
  font-size: 0.95rem;
  line-height: 1.35;
}

.report-setup-details {
  margin-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 0.9rem;
}

.report-setup-details > summary {
  width: fit-content;
  cursor: pointer;
  color: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  list-style: none;
}

.report-setup-details > summary::-webkit-details-marker {
  display: none;
}

.report-setup-details > summary::after {
  content: "Show";
  margin-left: 0.45rem;
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.62);
}

.report-setup-details[open] > summary::after {
  content: "Hide";
}

.report-setup-details .report-setup-form {
  margin-top: 0.9rem;
}

.report-inline-check-group {
  display: grid;
  gap: 0.55rem;
}

.report-inline-check {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0;
}

.report-inline-check input[type="checkbox"] {
  appearance: auto;
  -webkit-appearance: checkbox;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  flex: 0 0 18px;
  margin: 0.1rem 0 0;
  accent-color: #67d391;
}

.report-inline-check span {
  min-width: 0;
  line-height: 1.35;
}

.report-table-wrap {
  overflow-x: auto;
}

.report-record-title-list {
  display: grid;
  gap: 0.22rem;
  margin-top: 0.35rem;
}

.report-record-trigger {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  max-width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 720;
  line-height: 1.35;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.3);
  text-underline-offset: 0.14em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.report-record-trigger:hover,
.report-record-trigger:focus-visible {
  text-decoration-color: currentColor;
}

.report-record-trigger-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.42rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.74rem;
  font-weight: 800;
  text-decoration: none;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.report-record-trigger-inline.is-active {
  border-color: rgba(74, 222, 128, 0.32);
  background: rgba(74, 222, 128, 0.16);
}

.report-record-more {
  font-size: 0.76rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.62);
}

.report-facts-table tr.is-selected td {
  background: rgba(255, 255, 255, 0.05);
}

.report-facts-action-cell {
  width: 1%;
  white-space: nowrap;
}

.report-record-workbench {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(0, 20, 15, 0.18);
}

.report-record-workbench-head {
  display: grid;
  gap: 0.16rem;
}

.report-record-workbench-head strong,
.report-record-sheet-head strong {
  display: block;
  font-size: 1rem;
  line-height: 1.22;
}

.report-record-workbench-head p,
.report-record-sheet-head p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.38;
  color: rgba(255, 255, 255, 0.74);
}

.report-record-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.report-record-switch {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 780;
  line-height: 1.2;
  padding: 0.46rem 0.8rem;
}

.report-record-switch.is-active {
  border-color: rgba(74, 222, 128, 0.32);
  background: rgba(74, 222, 128, 0.16);
}

.report-record-sheet {
  display: grid;
  gap: 0.85rem;
}

.report-record-sheet-head {
  display: grid;
  gap: 0.12rem;
}

.report-record-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.report-record-meta-grid > div {
  display: grid;
  gap: 0.18rem;
  padding: 0.75rem 0.82rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.report-record-meta-grid span {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}

.report-record-meta-grid strong {
  line-height: 1.4;
}

.report-record-detail {
  display: grid;
  gap: 0.35rem;
  padding: 0.68rem 0.78rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
}

.report-record-detail span {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}

.report-record-detail p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.46;
}

.report-record-history-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.report-record-history-section {
  display: grid;
  gap: 0.55rem;
}

.report-record-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.report-record-history-head strong {
  font-size: 0.9rem;
}

.report-record-history-list {
  display: grid;
  gap: 0.5rem;
}

.report-record-history-card {
  display: grid;
  gap: 0.18rem;
  padding: 0.72rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.report-record-history-card strong {
  line-height: 1.35;
}

.report-record-history-card span,
.report-record-empty {
  font-size: 0.78rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.7);
}

.report-record-empty {
  margin: 0;
}

.report-parish-support-head {
  display: grid;
  gap: 0.28rem;
}

.report-parish-support-head strong {
  font-size: 1rem;
  line-height: 1.2;
}

.report-record-panel {
  position: relative;
  display: grid;
  gap: 0.55rem;
}

.report-record-panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
  padding: 0.5rem 0.62rem;
  border: 1px solid rgba(24, 48, 78, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
}

.report-record-page-status {
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.35;
  color: rgba(53, 72, 102, 0.82);
}

.report-record-page-controls {
  display: flex;
  gap: 0.42rem;
}

.report-record-page-button {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(24, 48, 78, 0.1);
  border-radius: 999px;
  background: #ffffff;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 760;
  line-height: 1.2;
  padding: 0.34rem 0.7rem;
  transition: border-color 120ms ease, background 120ms ease, opacity 120ms ease;
}

.report-record-page-button:hover,
.report-record-page-button:focus-visible {
  border-color: rgba(217, 119, 6, 0.24);
  background: rgba(255, 247, 230, 0.98);
}

.report-record-page-button:disabled {
  opacity: 0.45;
  cursor: default;
}

.report-record-page-button[hidden] {
  display: none !important;
}

.report-record-popover {
  position: sticky;
  top: 0.15rem;
  z-index: 4;
  margin-bottom: 0.05rem;
}

.report-record-popover[hidden] {
  display: none !important;
}

.report-record-popover-card {
  display: grid;
  gap: 0.68rem;
  padding: 0.82rem 0.88rem;
  border: 1px solid rgba(24, 48, 78, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
}

.report-record-popover-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.55rem;
}

.report-record-popover-copy {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.report-record-popover-copy strong {
  display: block;
  font-size: 1rem;
  line-height: 1.24;
}

.report-record-popover-copy p {
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.34;
  color: rgba(53, 72, 102, 0.74);
}

.report-record-popover-close {
  appearance: none;
  -webkit-appearance: none;
  min-width: 1.8rem;
  min-height: 1.8rem;
  border: 1px solid rgba(24, 48, 78, 0.1);
  border-radius: 999px;
  background: #ffffff;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  transition: border-color 120ms ease, background 120ms ease;
}

.report-record-popover-close:hover,
.report-record-popover-close:focus-visible {
  border-color: rgba(217, 119, 6, 0.24);
  background: rgba(255, 247, 230, 0.98);
}

.report-record-popover-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.36rem;
}

.report-record-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.45rem;
  padding: 0.16rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(24, 48, 78, 0.1);
  background: #f8fafc;
  font-size: 0.7rem;
  font-weight: 760;
  line-height: 1;
}

.report-record-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
}

.report-record-summary-grid > div {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
  padding: 0.38rem 0.48rem;
  border: 1px solid rgba(24, 48, 78, 0.08);
  border-radius: 10px;
  background: #f8fafc;
}

.report-record-summary-grid span,
.report-record-timeline-head span {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.report-record-summary-grid strong {
  min-width: 0;
  font-size: 0.86rem;
  line-height: 1.35;
  color: rgba(23, 36, 56, 0.96);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.report-record-timeline-wrap {
  display: grid;
  gap: 0.42rem;
}

.report-record-timeline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.report-record-timeline-head strong {
  font-size: 0.84rem;
}

.report-record-timeline {
  display: grid;
  gap: 0.38rem;
}

.report-record-timeline-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.48rem;
  align-items: start;
  padding-top: 0.42rem;
  border-top: 1px solid rgba(24, 48, 78, 0.08);
}

.report-record-timeline-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.report-record-timeline-kind {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.2rem;
  min-height: 1.3rem;
  padding: 0.14rem 0.38rem;
  border-radius: 999px;
  background: rgba(255, 177, 26, 0.18);
  font-size: 0.64rem;
  font-weight: 800;
  line-height: 1;
}

.report-record-timeline-item div {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.report-record-timeline-item strong {
  min-width: 0;
  font-size: 0.84rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.report-record-timeline-item span {
  font-size: 0.72rem;
  line-height: 1.34;
  overflow-wrap: anywhere;
}

.report-record-list {
  display: grid;
  gap: 0.45rem;
}

.report-record-row {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  gap: 0.28rem;
  width: 100%;
  padding: 0.72rem 0.78rem;
  border: 1px solid rgba(24, 48, 78, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.report-record-row[hidden] {
  display: none !important;
}

.report-record-row.is-active {
  border-color: rgba(217, 119, 6, 0.3);
  background: rgba(255, 242, 214, 0.9);
}

.report-record-row-head,
.report-record-row-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.55rem;
}

.report-record-row-head strong {
  min-width: 0;
  line-height: 1.3;
}

.report-record-row-head span {
  flex: 0 0 auto;
  font-size: 0.74rem;
  white-space: nowrap;
}

.report-record-row-meta {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.report-record-row-meta span {
  font-size: 0.76rem;
  line-height: 1.32;
}

.report-facts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.report-facts-table th,
.report-facts-table td {
  padding: 0.52rem 0.56rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  text-align: left;
  vertical-align: top;
}

.report-facts-table th {
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}

.report-row-support,
.report-meta-surface p {
  margin-top: 0.18rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.72);
}

.report-form-persistent {
  margin-bottom: 0.12rem;
}

.report-meta-inline {
  display: grid;
  gap: 0.04rem;
  padding: 0.42rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(0, 20, 15, 0.14);
}

.report-meta-inline strong {
  font-size: 0.84rem;
  line-height: 1.15;
}

.report-meta-inline span {
  font-size: 0.75rem;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.72);
}

.report-wizard-stage {
  display: none;
  gap: 0.55rem;
}

.report-wizard-stage.is-active {
  display: grid;
}

.report-committee-manager {
  display: grid;
  gap: 0.75rem;
}

.report-committee-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 0.7rem;
}

.report-committee-toolbar-actions {
  display: flex;
  align-items: start;
  justify-content: flex-end;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.report-committee-switcher {
  display: flex;
  align-items: flex-start;
  align-content: flex-start;
  gap: 0.42rem;
  flex-wrap: wrap;
  min-width: 0;
}

.report-committee-switch-button {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(0, 20, 15, 0.14);
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 760;
  line-height: 1.25;
  padding: 0.34rem 0.62rem;
  white-space: nowrap;
}

.report-committee-switch-button.is-active {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 177, 26, 0.18);
}

.report-committee-add-button {
  min-height: 2.1rem;
  padding: 0.42rem 0.78rem;
  font-size: 0.78rem;
  white-space: nowrap;
}

.report-committee-remove-toolbar-button {
  min-height: 2.1rem;
  padding: 0.42rem 0.78rem;
  font-size: 0.78rem;
  white-space: nowrap;
}

.report-committee-remove-toolbar-button[hidden] {
  display: none !important;
}

.report-committee-entry-list {
  display: grid;
}

.report-committee-entry {
  display: none;
  gap: 0.68rem;
}

.report-committee-entry.is-active {
  display: grid;
}

.report-committee-field input {
  width: 100%;
}

.report-committee-entry .report-setup-field,
.report-committee-entry .report-write-field {
  gap: 0.28rem;
}

.report-committee-entry .report-write-field-label,
.report-committee-entry .report-setup-field {
  font-size: 0.8rem;
}

.report-committee-entry .report-rich-editor {
  border-radius: 14px;
  box-shadow: none;
}

.report-committee-entry .report-rich-toolbar {
  gap: 0.36rem;
  padding: 0.48rem 0.56rem;
}

.report-committee-entry .report-rich-toolbar-group {
  gap: 0.28rem;
  padding: 0.14rem;
}

.report-committee-entry .report-rich-button {
  min-width: 2rem;
  height: 1.9rem;
  font-size: 0.8rem;
}

.report-committee-entry .report-rich-button-list {
  min-width: 4.2rem;
  padding: 0 0.68rem;
  font-size: 0.72rem;
}

.report-committee-entry .report-write-textarea {
  min-height: 12.5rem;
  height: 12.5rem;
  padding: 0.85rem 0.95rem 0.9rem;
  font-size: 0.96rem;
  line-height: 1.56;
}

.report-meeting-reminder-list {
  display: grid;
  gap: 0.65rem;
}

.report-meeting-reminder-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(24, 48, 78, 0.08);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(250, 252, 255, 0.92) 100%);
  box-shadow: 0 10px 22px rgba(20, 44, 78, 0.05);
}

.report-meeting-reminder-copy {
  display: grid;
  gap: 0.26rem;
  min-width: 0;
}

.report-meeting-reminder-title {
  display: block;
  font-size: 0.98rem;
  font-weight: 780;
  line-height: 1.34;
  color: rgba(32, 48, 72, 0.9);
}

.report-meeting-reminder-meta {
  display: grid;
  gap: 0.14rem;
  justify-items: end;
  text-align: right;
  min-width: max-content;
  font-size: 0.8rem;
  line-height: 1.3;
  color: rgba(53, 72, 102, 0.68);
}

.report-meeting-reminder-meta span {
  position: relative;
}

.report-meeting-reminder-date {
  font-weight: 760;
  color: rgba(32, 48, 72, 0.82);
}

.report-meeting-reminder-place {
  color: rgba(53, 72, 102, 0.7);
}

@media (max-width: 720px) {
  .report-meeting-reminder-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.45rem;
  }

  .report-meeting-reminder-meta {
    justify-items: start;
    text-align: left;
    min-width: 0;
  }
}

.report-fact-grid-compact strong {
  font-size: 0.92rem;
}

.report-parish-summary-grid,
.report-final-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.42rem;
}

.report-export-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.report-export-summary-card {
  position: relative;
  display: grid;
  gap: 0.4rem;
  min-height: 9.2rem;
  padding: 0.95rem 1rem 0.95rem 1.05rem;
  border: 1px solid rgba(24, 48, 78, 0.08);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.94) 100%);
  box-shadow: 0 14px 30px rgba(24, 48, 78, 0.06);
  overflow: clip;
}

.report-export-summary-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: rgba(24, 48, 78, 0.1);
}

.report-export-summary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
}

.report-export-summary-card span {
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(53, 72, 102, 0.6);
}

.report-export-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.5rem;
  padding: 0.18rem 0.56rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  background: rgba(24, 48, 78, 0.08);
  color: rgba(32, 48, 72, 0.78);
}

.report-export-status-badge::before {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  margin-right: 0.34rem;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.85;
  flex: 0 0 auto;
}

.report-export-summary-card strong {
  display: block;
  max-width: 20ch;
  font-size: 1.14rem;
  line-height: 1.16;
  letter-spacing: -0.02em;
  color: rgba(18, 28, 45, 0.96);
}

.report-export-summary-card p {
  margin: 0;
  max-width: 32ch;
  font-size: 0.86rem;
  line-height: 1.45;
  color: rgba(53, 72, 102, 0.78);
}

.report-export-summary-card-warning {
  border-color: rgba(217, 119, 6, 0.24);
  background: linear-gradient(180deg, rgba(255, 248, 236, 0.96) 0%, rgba(255, 255, 255, 0.92) 100%);
}

.report-export-summary-card[data-state="ready"] {
  border-color: rgba(34, 197, 94, 0.24);
  background: linear-gradient(180deg, rgba(240, 253, 244, 0.96) 0%, rgba(255, 255, 255, 0.92) 100%);
}

.report-export-summary-card[data-state="ready"]::before {
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.95) 0%, rgba(22, 163, 74, 0.72) 100%);
}

.report-export-summary-card[data-state="ready"] .report-export-status-badge {
  background: rgba(34, 197, 94, 0.16);
  color: rgba(22, 101, 52, 0.92);
}

.report-export-summary-card[data-state="progress"] {
  border-color: rgba(59, 130, 246, 0.18);
}

.report-export-summary-card[data-state="progress"]::before {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.94) 0%, rgba(37, 99, 235, 0.72) 100%);
}

.report-export-summary-card[data-state="progress"] .report-export-status-badge {
  background: rgba(59, 130, 246, 0.12);
  color: rgba(30, 64, 175, 0.9);
}

.report-export-summary-card[data-state="warning"] {
  border-color: rgba(217, 119, 6, 0.24);
  background: linear-gradient(180deg, rgba(255, 248, 236, 0.96) 0%, rgba(255, 255, 255, 0.92) 100%);
}

.report-export-summary-card[data-state="warning"]::before {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.95) 0%, rgba(217, 119, 6, 0.74) 100%);
}

.report-export-summary-card[data-state="warning"] .report-export-status-badge {
  background: rgba(245, 158, 11, 0.16);
  color: rgba(146, 64, 14, 0.95);
}

.report-export-summary-card[data-state="included"]::before {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.92) 0%, rgba(5, 150, 105, 0.72) 100%);
}

.report-export-summary-card[data-state="included"] .report-export-status-badge {
  background: rgba(16, 185, 129, 0.14);
  color: rgba(6, 95, 70, 0.92);
}

.report-export-summary-card[data-state="off"]::before {
  background: linear-gradient(180deg, rgba(100, 116, 139, 0.62) 0%, rgba(71, 85, 105, 0.45) 100%);
}

.report-export-summary-card[data-state="off"] .report-export-status-badge {
  background: rgba(24, 48, 78, 0.08);
  color: rgba(53, 72, 102, 0.78);
}

.report-export-panel {
  display: grid;
  gap: 0.5rem;
}

.report-export-summary-stack {
  display: grid;
  gap: 0.56rem;
}

.report-export-summary-section {
  display: grid;
  gap: 0.38rem;
  padding: 0.68rem 0.78rem;
  border: 1px solid rgba(24, 48, 78, 0.08);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(249, 251, 253, 0.94) 100%);
  box-shadow: 0 12px 26px rgba(24, 48, 78, 0.05);
}

.report-export-summary-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
}

.report-export-summary-section-head > div {
  display: grid;
  gap: 0.08rem;
}

.report-export-summary-section-head span {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(53, 72, 102, 0.48);
}

.report-export-summary-section-head strong {
  font-size: 0.9rem;
  line-height: 1.18;
  color: rgba(18, 28, 45, 0.96);
}

.report-export-summary-section > p {
  margin: 0;
  font-size: 0.77rem;
  line-height: 1.34;
  color: rgba(53, 72, 102, 0.68);
}

.report-export-summary-rows {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.3rem;
}

.report-export-summary-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.44rem;
  padding: 0.38rem 0.46rem;
  border: 1px solid rgba(24, 48, 78, 0.06);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.54);
}

.report-export-summary-row span {
  min-width: 0;
  font-size: 0.79rem;
  line-height: 1.25;
  color: rgba(32, 48, 72, 0.72);
}

.report-export-summary-row strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.28rem;
  padding: 0.1rem 0.42rem;
  border-radius: 999px;
  background: rgba(24, 48, 78, 0.06);
  font-size: 0.69rem;
  font-weight: 800;
  line-height: 1;
  color: rgba(32, 48, 72, 0.74);
  white-space: nowrap;
}

.report-export-summary-row strong[data-state="ready"] {
  background: rgba(34, 197, 94, 0.14);
  color: rgba(22, 101, 52, 0.92);
}

.report-export-summary-row strong[data-state="warning"] {
  background: rgba(245, 158, 11, 0.16);
  color: rgba(146, 64, 14, 0.95);
}

.report-export-summary-row strong[data-state="off"],
.report-export-summary-row strong[data-state="neutral"] {
  background: rgba(24, 48, 78, 0.06);
  color: rgba(32, 48, 72, 0.74);
}

.report-export-summary-section[data-state="ready"] {
  border-color: rgba(34, 197, 94, 0.22);
  background: linear-gradient(180deg, rgba(240, 253, 244, 0.96) 0%, rgba(255, 255, 255, 0.94) 100%);
}

.report-export-summary-section[data-state="ready"] .report-export-status-badge {
  background: rgba(34, 197, 94, 0.14);
  color: rgba(22, 101, 52, 0.92);
}

.report-export-summary-section[data-state="progress"] {
  border-color: rgba(59, 130, 246, 0.18);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.96) 0%, rgba(255, 255, 255, 0.94) 100%);
}

.report-export-summary-section[data-state="progress"] .report-export-status-badge {
  background: rgba(59, 130, 246, 0.12);
  color: rgba(30, 64, 175, 0.9);
}

.report-export-summary-section[data-state="warning"] {
  border-color: rgba(245, 158, 11, 0.24);
  background: linear-gradient(180deg, rgba(255, 247, 237, 0.97) 0%, rgba(255, 255, 255, 0.94) 100%);
}

.report-export-summary-section[data-state="warning"] .report-export-status-badge {
  background: rgba(245, 158, 11, 0.16);
  color: rgba(146, 64, 14, 0.95);
}

.report-export-summary-section[data-state="neutral"] .report-export-status-badge {
  background: rgba(24, 48, 78, 0.08);
  color: rgba(53, 72, 102, 0.78);
}

.report-export-panel-head {
  display: grid;
  gap: 0.08rem;
}

.report-export-panel-head strong {
  font-size: 0.96rem;
  line-height: 1.2;
}

.report-export-panel-head p,
.report-export-primary p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.32;
  color: rgba(53, 72, 102, 0.78);
}

.report-export-readiness {
  display: grid;
  gap: 0;
  padding: 0.48rem 0.68rem;
  border: 1px solid rgba(24, 48, 78, 0.08);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.92);
}

.report-export-readiness strong {
  font-size: 0.86rem;
  line-height: 1.2;
}

.report-export-readiness p {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.3;
  color: rgba(53, 72, 102, 0.78);
}

.report-export-readiness[data-state="ready"] {
  border-color: rgba(34, 197, 94, 0.24);
  background: rgba(240, 253, 244, 0.96);
}

.report-export-readiness[data-state="progress"] {
  border-color: rgba(59, 130, 246, 0.18);
  background: rgba(239, 246, 255, 0.9);
}

.report-export-readiness[data-state="warning"] {
  border-color: rgba(217, 119, 6, 0.22);
  background: rgba(255, 248, 236, 0.96);
}

.report-export-reminder-box {
  padding: 0.02rem 0;
}

.report-export-reminder-box p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.32;
  color: rgba(53, 72, 102, 0.78);
}

.report-export-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.report-export-field {
  display: grid;
  gap: 0.38rem;
  padding: 0.58rem 0.62rem 0.62rem;
  border: 1px solid rgba(24, 48, 78, 0.14);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.94) 0%, rgba(255, 255, 255, 0.98) 100%);
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.report-export-field:focus-within {
  border-color: rgba(217, 119, 6, 0.28);
  box-shadow: 0 0 0 3px rgba(255, 177, 26, 0.14);
  background: #ffffff;
}

.report-export-field-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
  color: rgba(53, 72, 102, 0.68);
}

.report-export-input-wrap {
  display: flex;
  align-items: center;
  min-height: 2.8rem;
  padding: 0 0.72rem;
  border: 1px solid rgba(24, 48, 78, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.report-export-input {
  width: 100%;
  min-height: 2rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font: inherit;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.3;
  color: rgba(18, 28, 45, 0.96);
}

.report-export-input:focus {
  outline: none;
}

.report-export-input::placeholder {
  color: rgba(53, 72, 102, 0.46);
  font-weight: 600;
}

.report-export-primary {
  display: grid;
  gap: 0.28rem;
}

@media (max-width: 1100px) {
  .report-export-summary-rows {
    grid-template-columns: minmax(0, 1fr);
  }

  .report-export-field-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.report-parish-summary-card {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  gap: 0.18rem;
  width: 100%;
  text-align: left;
  padding: 0.48rem 0.56rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(0, 20, 15, 0.16);
  color: inherit;
  cursor: pointer;
}

.report-parish-summary-card span,
.report-parish-summary-card small {
  color: rgba(255, 255, 255, 0.68);
}

.report-parish-summary-card strong {
  font-size: 0.9rem;
  line-height: 1;
}

.report-parish-summary-card-static {
  cursor: default;
}

.report-parish-chooser {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.34rem;
}

.report-ward-chooser {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.report-ward-chooser .report-parish-tab {
  flex: 0 1 auto;
  min-width: 10rem;
  max-width: 100%;
}

.report-parish-tab {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(0, 20, 15, 0.14);
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: 760;
  font-size: 0.76rem;
  line-height: 1.25;
  padding: 0.28rem 0.42rem;
  text-align: center;
}

.report-parish-tab.is-active,
.report-parish-summary-card.is-active {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 177, 26, 0.18);
}

.report-parish-panel {
  display: none;
  gap: 1rem;
}

.report-parish-panel.is-active {
  display: grid;
}

.report-writing-panel > .thread-block-head {
  margin-bottom: 0.05rem;
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-loaded-bar,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-writing-panel,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-history-surface,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-history-empty,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-support-cue,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-rich-editor,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-rich-toolbar,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-rich-toolbar-group,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-committee-remove-toolbar-button {
  box-shadow: none;
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-loaded-bar {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(0, 20, 15, 0.18);
  color: #ffffff;
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-writing-panel {
  background: rgba(0, 20, 15, 0.18);
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-loaded-bar-copy strong {
  color: #ffffff;
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-loaded-meta,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-loaded-meta span,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-loaded-meta-pill,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-reset-link,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-note-row small {
  color: rgba(255, 255, 255, 0.72);
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-loaded-meta span + span::before {
  color: rgba(255, 255, 255, 0.34);
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-reset-link {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(0, 20, 15, 0.18);
  padding: 0.44rem 0.74rem;
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-reset-link:hover,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-reset-link:focus-visible {
  border-color: rgba(74, 222, 128, 0.34);
  background: rgba(74, 222, 128, 0.12);
  color: #ffffff;
  text-decoration: none;
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-guide-nav-ribbon {
  border-top-color: rgba(255, 255, 255, 0.1);
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-guide-button,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-committee-switch-button,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-meeting-reminder-row,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-export-summary-card,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-export-summary-section,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-export-readiness,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-parish-summary-card,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-parish-tab,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-support-cue,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-overview-highlight,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-overview-metric,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-overview-card,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-overview-chip,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-record-popover,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-record-popover-card,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-record-badge,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-record-row,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-record-workbench,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-record-trigger-inline,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-record-switch,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-record-meta-grid > div,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-record-detail,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-record-history-card,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-meta-inline,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-scope-summary > div {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(0, 20, 15, 0.16);
  color: #ffffff;
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-guide-button:hover,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-guide-button:focus-visible,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-committee-switch-button.is-active,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-parish-tab.is-active,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-parish-summary-card.is-active,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-record-row.is-active,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-record-trigger-inline.is-active,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-record-switch.is-active {
  border-color: rgba(74, 222, 128, 0.38);
  background: rgba(74, 222, 128, 0.14);
  color: #ffffff;
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-guide-button.is-active {
  border-color: rgba(74, 222, 128, 0.44);
  background: rgba(74, 222, 128, 0.16);
  color: #ffffff;
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-guide-button-index {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.74);
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-guide-button-copy strong,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-history-copy strong {
  color: #ffffff;
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-guide-button-copy small,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-history-copy span,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-history-empty p,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-meeting-reminder-copy,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-meeting-reminder-meta,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-export-summary-card span,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-export-summary-card p,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-export-summary-section-head span,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-export-summary-section > p,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-export-summary-row span,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-export-panel-head p,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-export-primary p,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-export-readiness p,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-overview-note,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-overview-block-note,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-support-cue span,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-overview-highlight-label,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-overview-metric span,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-record-popover-copy p,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-record-row-head span,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-record-row-meta span,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-record-summary-grid span,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-record-timeline-head span,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-record-timeline-item span,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-record-workbench-head p,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-record-sheet-head p,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-record-history-card span,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-record-empty,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-record-meta-grid span,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-record-detail span,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-meta-inline span,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-scope-summary span,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-parish-summary-card span,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-parish-summary-card small {
  color: rgba(255, 255, 255, 0.7);
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-support-cue strong,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-overview-block-title,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-overview-highlight strong,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-overview-metric strong,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-overview-card-head strong,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-export-summary-card strong,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-export-summary-section-head strong,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-export-summary-row strong,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-export-panel-head strong,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-export-readiness strong,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-meeting-reminder-title,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-parish-support-head strong,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-record-popover-copy strong,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-record-summary-grid strong,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-record-timeline-item strong,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-record-row-head strong,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-record-workbench-head strong,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-record-sheet-head strong,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-record-history-card strong,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-record-meta-grid strong,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-meta-inline strong,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-scope-summary strong {
  color: #ffffff;
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-loaded-meta-pill {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(0, 20, 15, 0.18);
  color: #ffffff;
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-loaded-meta-pill:hover,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-loaded-meta-pill:focus-visible,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-loaded-meta-pill.is-active {
  border-color: rgba(74, 222, 128, 0.36);
  background: rgba(74, 222, 128, 0.16);
  color: #ffffff;
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-export-summary-row {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-export-summary-row strong[data-state="ready"] {
  background: rgba(74, 222, 128, 0.18);
  color: #ffffff;
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-export-summary-row strong[data-state="warning"] {
  background: rgba(251, 191, 36, 0.18);
  color: #ffffff;
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-export-summary-row strong[data-state="off"],
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-export-summary-row strong[data-state="neutral"] {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.84);
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-export-summary-section[data-state="ready"] {
  border-color: rgba(74, 222, 128, 0.34);
  background: linear-gradient(180deg, rgba(17, 65, 39, 0.66) 0%, rgba(0, 20, 15, 0.24) 100%);
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-export-summary-section[data-state="progress"] {
  border-color: rgba(96, 165, 250, 0.32);
  background: linear-gradient(180deg, rgba(17, 52, 92, 0.62) 0%, rgba(0, 20, 15, 0.24) 100%);
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-export-summary-section[data-state="warning"] {
  border-color: rgba(251, 191, 36, 0.34);
  background: linear-gradient(180deg, rgba(104, 57, 8, 0.64) 0%, rgba(0, 20, 15, 0.24) 100%);
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-overview-rank {
  background: rgba(74, 222, 128, 0.18);
  color: rgba(255, 255, 255, 0.82);
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-record-timeline-kind,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-record-badge,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-overview-total {
  background: rgba(74, 222, 128, 0.16);
  color: #ffffff;
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-facts-table tr.is-selected td {
  background: rgba(74, 222, 128, 0.08);
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-history-surface {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(0, 20, 15, 0.16);
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-history-row + .report-history-row {
  border-top-color: rgba(255, 255, 255, 0.1);
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-history-empty {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(0, 20, 15, 0.16);
  color: #ffffff;
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-history-actions .btn-ghost {
  border-color: rgba(74, 222, 128, 0.34);
  background: rgba(74, 222, 128, 0.12);
  color: #ffffff;
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-history-actions .btn-ghost:hover {
  border-color: rgba(74, 222, 128, 0.48);
  background: rgba(74, 222, 128, 0.18);
  color: #ffffff;
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-write-form label,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-write-field-label,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-setup-field,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-inline-check span {
  color: rgba(255, 255, 255, 0.72);
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-export-field-grid label {
  color: inherit;
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-export-field {
  border-color: rgba(255, 255, 255, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.05) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-export-field:focus-within {
  border-color: rgba(74, 222, 128, 0.38);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.14);
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-export-field-label {
  color: rgba(255, 255, 255, 0.6);
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-export-input-wrap {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-export-input {
  color: #ffffff;
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-export-input::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-setup-details {
  border-top-color: rgba(255, 255, 255, 0.1);
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-setup-details > summary::after {
  color: rgba(255, 255, 255, 0.62);
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-rich-editor {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(0, 20, 15, 0.18);
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-rich-editor:focus-within {
  border-color: rgba(74, 222, 128, 0.38);
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.14);
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-rich-toolbar {
  border-bottom-color: rgba(255, 255, 255, 0.1);
  background: rgba(0, 20, 15, 0.22);
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-rich-toolbar-group {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-rich-button {
  color: #ffffff;
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-rich-button:hover {
  border-color: rgba(74, 222, 128, 0.3);
  background: rgba(74, 222, 128, 0.12);
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-rich-button:focus-visible {
  outline-color: rgba(74, 222, 128, 0.42);
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-rich-button.is-active {
  border-color: rgba(74, 222, 128, 0.46);
  background: rgba(74, 222, 128, 0.18);
  color: #ffffff;
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-rich-surface {
  color: #ffffff;
  caret-color: #ffffff;
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-rich-surface.is-empty::before {
  color: rgba(255, 255, 255, 0.34);
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-committee-remove-toolbar-button {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-committee-remove-toolbar-button:hover,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-committee-remove-toolbar-button:focus-visible {
  border-color: rgba(74, 222, 128, 0.3);
  background: rgba(74, 222, 128, 0.14);
  color: #ffffff;
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-export-summary-card {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 18px 30px rgba(0, 0, 0, 0.14);
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-export-summary-card[data-state="ready"] {
  border-color: rgba(74, 222, 128, 0.34);
  background: linear-gradient(180deg, rgba(17, 65, 39, 0.66) 0%, rgba(0, 20, 15, 0.22) 100%);
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-export-summary-card[data-state="progress"] {
  border-color: rgba(96, 165, 250, 0.34);
  background: linear-gradient(180deg, rgba(17, 52, 92, 0.62) 0%, rgba(0, 20, 15, 0.22) 100%);
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-export-summary-card[data-state="warning"] {
  border-color: rgba(251, 191, 36, 0.34);
  background: linear-gradient(180deg, rgba(104, 57, 8, 0.64) 0%, rgba(0, 20, 15, 0.22) 100%);
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-export-summary-card[data-state="included"] {
  border-color: rgba(45, 212, 191, 0.32);
  background: linear-gradient(180deg, rgba(9, 74, 65, 0.62) 0%, rgba(0, 20, 15, 0.22) 100%);
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-export-summary-card[data-state="off"] {
  border-color: rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(0, 20, 15, 0.18) 100%);
}

.workspace-shell[data-party-theme="lib_dem"] .report-guide-button,
.workspace-shell[data-party-theme="lib_dem"] .report-meeting-reminder-row,
.workspace-shell[data-party-theme="lib_dem"] .report-export-summary-card,
.workspace-shell[data-party-theme="lib_dem"] .report-export-summary-section,
.workspace-shell[data-party-theme="lib_dem"] .report-export-readiness,
.workspace-shell[data-party-theme="lib_dem"] .report-parish-summary-card,
.workspace-shell[data-party-theme="lib_dem"] .report-parish-tab,
.workspace-shell[data-party-theme="lib_dem"] .report-fact-grid > div,
.workspace-shell[data-party-theme="lib_dem"] .report-meta-inline,
.workspace-shell[data-party-theme="lib_dem"] .report-loaded-bar {
  border-color: rgba(217, 119, 6, 0.18);
  background: rgba(255, 255, 255, 0.74);
}

.workspace-shell[data-party-theme="lib_dem"] .report-guide-button.is-active,
.workspace-shell[data-party-theme="lib_dem"] .report-parish-summary-card.is-active,
.workspace-shell[data-party-theme="lib_dem"] .report-parish-tab.is-active {
  background: rgba(255, 178, 26, 0.22);
}

.workspace-shell[data-party-theme="lib_dem"] .report-record-trigger {
  color: var(--ld-ink);
  text-decoration-color: rgba(217, 119, 6, 0.3);
}

.workspace-shell[data-party-theme="lib_dem"] .report-record-trigger:hover,
.workspace-shell[data-party-theme="lib_dem"] .report-record-trigger:focus-visible {
  text-decoration-color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .report-record-more {
  color: var(--ld-ink-soft);
}

.workspace-shell[data-party-theme="lib_dem"] .report-record-trigger-inline,
.workspace-shell[data-party-theme="lib_dem"] .report-record-switch,
.workspace-shell[data-party-theme="lib_dem"] .report-record-workbench {
  border-color: rgba(217, 119, 6, 0.18);
  background: rgba(255, 255, 255, 0.74);
}

.workspace-shell[data-party-theme="lib_dem"] .report-record-popover,
.workspace-shell[data-party-theme="lib_dem"] .report-record-popover-card,
.workspace-shell[data-party-theme="lib_dem"] .report-record-row,
.workspace-shell[data-party-theme="lib_dem"] .report-record-badge {
  border-color: rgba(217, 119, 6, 0.18);
  background: rgba(255, 255, 255, 0.9);
}

.workspace-shell[data-party-theme="lib_dem"] .report-record-trigger-inline.is-active,
.workspace-shell[data-party-theme="lib_dem"] .report-record-switch.is-active,
.workspace-shell[data-party-theme="lib_dem"] .report-record-row.is-active,
.workspace-shell[data-party-theme="lib_dem"] .report-facts-table tr.is-selected td {
  background: rgba(255, 178, 26, 0.16);
}

.workspace-shell[data-party-theme="lib_dem"] .report-record-meta-grid > div,
.workspace-shell[data-party-theme="lib_dem"] .report-record-detail,
.workspace-shell[data-party-theme="lib_dem"] .report-record-history-card {
  border-color: rgba(217, 119, 6, 0.18);
  background: rgba(255, 248, 236, 0.86);
}

.workspace-shell[data-party-theme="lib_dem"] .report-record-workbench-head p,
.workspace-shell[data-party-theme="lib_dem"] .report-record-sheet-head p,
.workspace-shell[data-party-theme="lib_dem"] .report-record-history-card span,
.workspace-shell[data-party-theme="lib_dem"] .report-record-empty,
.workspace-shell[data-party-theme="lib_dem"] .report-meeting-reminder-copy,
.workspace-shell[data-party-theme="lib_dem"] .report-meeting-reminder-meta,
.workspace-shell[data-party-theme="lib_dem"] .report-export-summary-card span,
.workspace-shell[data-party-theme="lib_dem"] .report-export-summary-card p,
.workspace-shell[data-party-theme="lib_dem"] .report-export-summary-section-head span,
.workspace-shell[data-party-theme="lib_dem"] .report-export-summary-section > p,
.workspace-shell[data-party-theme="lib_dem"] .report-export-summary-row span,
.workspace-shell[data-party-theme="lib_dem"] .report-export-panel-head p,
.workspace-shell[data-party-theme="lib_dem"] .report-export-primary p,
.workspace-shell[data-party-theme="lib_dem"] .report-export-readiness p,
.workspace-shell[data-party-theme="lib_dem"] .report-overview-note,
.workspace-shell[data-party-theme="lib_dem"] .report-overview-block-note,
.workspace-shell[data-party-theme="lib_dem"] .report-overview-highlight-label,
.workspace-shell[data-party-theme="lib_dem"] .report-overview-metric span,
.workspace-shell[data-party-theme="lib_dem"] .report-record-popover-copy p,
.workspace-shell[data-party-theme="lib_dem"] .report-record-row-head span,
.workspace-shell[data-party-theme="lib_dem"] .report-record-row-meta span,
.workspace-shell[data-party-theme="lib_dem"] .report-record-summary-grid span,
.workspace-shell[data-party-theme="lib_dem"] .report-record-timeline-head span,
.workspace-shell[data-party-theme="lib_dem"] .report-record-timeline-item span,
.workspace-shell[data-party-theme="lib_dem"] .report-record-meta-grid span,
.workspace-shell[data-party-theme="lib_dem"] .report-record-detail span {
  color: var(--ld-ink-soft);
}

.workspace-shell[data-party-theme="lib_dem"] .report-record-workbench,
.workspace-shell[data-party-theme="lib_dem"] .report-record-trigger-inline,
.workspace-shell[data-party-theme="lib_dem"] .report-record-switch {
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .report-loaded-meta-pill {
  border-color: rgba(217, 119, 6, 0.18);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .report-loaded-meta-pill:hover,
.workspace-shell[data-party-theme="lib_dem"] .report-loaded-meta-pill:focus-visible,
.workspace-shell[data-party-theme="lib_dem"] .report-loaded-meta-pill.is-active {
  border-color: rgba(217, 119, 6, 0.26);
  background: rgba(255, 233, 186, 0.95);
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .report-export-summary-section-head strong {
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .report-export-summary-row strong {
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .report-export-summary-row strong[data-state="ready"] {
  background: rgba(34, 197, 94, 0.14);
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .report-export-summary-row strong[data-state="warning"] {
  background: rgba(245, 158, 11, 0.18);
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .report-export-summary-row strong[data-state="off"],
.workspace-shell[data-party-theme="lib_dem"] .report-export-summary-row strong[data-state="neutral"] {
  background: rgba(24, 48, 78, 0.06);
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .report-export-summary-card {
  box-shadow: 0 14px 30px rgba(110, 82, 20, 0.08);
}

.workspace-shell[data-party-theme="lib_dem"] .report-export-summary-card strong {
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .report-export-summary-card[data-state="ready"] {
  border-color: rgba(34, 197, 94, 0.28);
  background: linear-gradient(180deg, rgba(240, 253, 244, 0.98) 0%, rgba(255, 255, 255, 0.94) 100%);
}

.workspace-shell[data-party-theme="lib_dem"] .report-export-summary-card[data-state="progress"] {
  border-color: rgba(59, 130, 246, 0.24);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.98) 0%, rgba(255, 255, 255, 0.94) 100%);
}

.workspace-shell[data-party-theme="lib_dem"] .report-export-summary-card[data-state="warning"] {
  border-color: rgba(245, 158, 11, 0.32);
  background: linear-gradient(180deg, rgba(255, 247, 237, 0.98) 0%, rgba(255, 255, 255, 0.94) 100%);
}

.workspace-shell[data-party-theme="lib_dem"] .report-export-summary-card[data-state="included"] {
  border-color: rgba(16, 185, 129, 0.26);
  background: linear-gradient(180deg, rgba(236, 253, 245, 0.98) 0%, rgba(255, 255, 255, 0.94) 100%);
}

.workspace-shell[data-party-theme="lib_dem"] .report-export-summary-card[data-state="off"] {
  border-color: rgba(148, 163, 184, 0.22);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.96) 0%, rgba(255, 255, 255, 0.94) 100%);
}

.workspace-shell[data-party-theme="lib_dem"] .report-overview-highlight,
.workspace-shell[data-party-theme="lib_dem"] .report-overview-metric,
.workspace-shell[data-party-theme="lib_dem"] .report-overview-card,
.workspace-shell[data-party-theme="lib_dem"] .report-overview-chip,
.workspace-shell[data-party-theme="lib_dem"] .report-record-timeline-kind {
  border-color: rgba(217, 119, 6, 0.18);
}

.workspace-shell[data-party-theme="lib_dem"] .report-overview-total {
  background: rgba(255, 178, 26, 0.18);
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .report-fact-grid span,
.workspace-shell[data-party-theme="lib_dem"] .report-facts-table th,
.workspace-shell[data-party-theme="lib_dem"] .report-parish-summary-card span,
.workspace-shell[data-party-theme="lib_dem"] .report-parish-summary-card small,
.workspace-shell[data-party-theme="lib_dem"] .report-support-inline,
.workspace-shell[data-party-theme="lib_dem"] .report-guide-button-copy small,
.workspace-shell[data-party-theme="lib_dem"] .report-setup-static span,
.workspace-shell[data-party-theme="lib_dem"] .report-scope-summary span,
.workspace-shell[data-party-theme="lib_dem"] .report-loaded-bar-copy span {
  color: var(--ld-ink-soft);
}

.workspace-shell[data-party-theme="lib_dem"] .report-facts-table th,
.workspace-shell[data-party-theme="lib_dem"] .report-facts-table td {
  border-bottom-color: var(--ld-line);
}

.workspace-shell[data-party-theme="lib_dem"] .report-row-support,
.workspace-shell[data-party-theme="lib_dem"] .report-meta-surface p,
.workspace-shell[data-party-theme="lib_dem"] .report-meta-inline span,
.workspace-shell[data-party-theme="lib_dem"] .report-loaded-bar-copy p {
  color: var(--ld-ink-soft);
}

.workspace-shell[data-party-theme="lib_dem"] .report-scope-summary > div {
  border-color: rgba(217, 119, 6, 0.18);
  background: rgba(255, 255, 255, 0.74);
}

.workspace-shell[data-party-theme="lib_dem"] .report-setup-details {
  border-top-color: var(--ld-line);
}

.workspace-shell[data-party-theme="lib_dem"] .report-setup-details > summary::after {
  color: var(--ld-ink-soft);
}

@media (max-width: 1180px) {
  .builder-layout-report {
    grid-template-columns: 1fr;
  }

  .report-writing-panel {
    position: static;
  }

  .report-scope-summary,
  .report-brief-facts,
  .report-fact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-setup-grid,
  .report-guide-nav {
    grid-template-columns: 1fr;
  }

  .report-loaded-bar {
    padding: 0.64rem 0.74rem;
  }

  .report-loaded-ribbon-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .builder-layout-report {
    grid-template-columns: 1fr;
  }

  .report-support-cue-grid {
    grid-template-columns: 1fr;
  }

  .report-overview-strip,
  .report-overview-grid,
  .report-record-meta-grid,
  .report-record-history-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .report-writing-head-row {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .report-parish-page-controls {
    width: 100%;
    justify-content: space-between;
    margin-left: 0;
  }

  .report-scope-summary,
  .report-fact-grid,
  .report-final-check-grid,
  .report-parish-summary-grid,
  .report-parish-chooser {
    grid-template-columns: 1fr;
  }

  .report-committee-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .report-committee-toolbar-actions {
    justify-content: flex-start;
  }

  .report-write-footer {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .report-step-nav-button {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .report-history-row {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 0.75rem;
  }

  .report-history-actions {
    justify-content: flex-start;
  }
}

.workspace-shell[data-party-theme="lib_dem"] .badge.monitored,
.workspace-shell[data-party-theme="lib_dem"] .badge.neutral {
  border-color: rgba(37, 99, 235, 0.18);
  background: #e4eefc;
  color: #1d4ed8;
}

.workspace-shell[data-party-theme="lib_dem"] .issue-detail-reading hr,
.workspace-shell[data-party-theme="lib_dem"] .thread-timeline-row {
  border-color: var(--ld-line);
}

.workspace-shell[data-party-theme="lib_dem"] .workspace-footer {
  border-top-color: var(--ld-line);
  background: rgba(255, 255, 255, 0.74);
  color: var(--ld-ink-soft);
}

.workspace-shell[data-party-theme="lib_dem"] .workspace-footer a {
  color: #92400e;
}

.workspace-shell[data-party-theme="lib_dem"] .workspace-footer a:hover {
  color: var(--ld-ink);
}

@media (max-width: 1180px) {
  .workspace-shell[data-party-theme="lib_dem"] .thread-finder {
    border-bottom-color: var(--ld-line);
  }
}

/* Lib Dem theme refinement: match the native warm canvas, white cards, yellow accents, and flight watermark. */

.workspace-shell[data-party-theme="lib_dem"] {
  --ld-ink: #111827;
  --ld-ink-soft: #4b5563;
  --ld-muted: #6b5a35;
  --ld-line: rgba(230, 174, 61, 0.22);
  --ld-line-strong: rgba(242, 160, 0, 0.42);
  --ld-surface: rgba(255, 255, 255, 0.9);
  --ld-surface-strong: rgba(255, 255, 255, 0.96);
  --ld-soft: #fff1cf;
  --ld-yellow: #ffb21a;
  --ld-yellow-strong: #f2a000;
  --ld-orange: #e28a00;
  --ld-canvas: #fff8ec;
  --ld-canvas-warm: #f7efe4;
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 34%, rgba(0, 0, 0, 0.015) 100%),
    linear-gradient(135deg, var(--ld-canvas) 0%, var(--ld-canvas-warm) 100%);
}

.workspace-shell[data-party-theme="lib_dem"]::before {
  content: "";
  position: fixed;
  top: -6rem;
  right: -9rem;
  z-index: 0;
  width: min(38rem, 42vw);
  height: min(76rem, 110vh);
  pointer-events: none;
  background-color: rgba(255, 178, 26, 0.15);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 430 860' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M77.4 8.6C64.5 86 137.6 154.8 219.3 189.2C292.4 223.6 361.2 249.4 387 283.8C313.9 309.6 215 283.8 150.5 240.8C94.6 197.8 68.8 103.2 77.4 8.6ZM129 326.8C215 412.8 344 412.8 421.4 473C361.2 559 270.9 567.6 215 524.6C163.4 473 124.7 404.2 129 326.8ZM236.5 68.8C283.8 86 335.4 103.2 378.4 137.6C335.4 180.6 283.8 197.8 249.4 172C227.9 137.6 223.6 103.2 236.5 68.8Z' fill='%23FFB21A'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: top right;
  background-size: contain;
  mask-image: linear-gradient(180deg, #000 0%, #000 74%, transparent 100%);
  opacity: 1;
}

.workspace-shell[data-party-theme="lib_dem"] .workspace-globalnav,
.workspace-shell[data-party-theme="lib_dem"] .workspace-stage,
.workspace-shell[data-party-theme="lib_dem"] .workspace-footer {
  position: relative;
  z-index: 1;
}

.workspace-shell[data-party-theme="lib_dem"] .workspace-globalnav {
  background: rgba(255, 255, 255, 0.72);
  border-bottom-color: rgba(255, 255, 255, 0.62);
  box-shadow: 0 12px 34px rgba(146, 100, 20, 0.08);
}

.workspace-shell[data-party-theme="lib_dem"] .workspace-brand-mark,
.workspace-shell[data-party-theme="lib_dem"] .workspace-role-chip,
.workspace-shell[data-party-theme="lib_dem"] .workspace-account-menu.is-open .workspace-user-chip,
.workspace-shell[data-party-theme="lib_dem"] .workspace-account-menu.is-active .workspace-user-chip,
.workspace-shell[data-party-theme="lib_dem"] .workspace-user-chip:hover {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(255, 255, 255, 0.68);
  box-shadow: 0 8px 20px rgba(146, 100, 20, 0.08);
}

.workspace-shell[data-party-theme="lib_dem"] .workspace-navlinks a:hover,
.workspace-shell[data-party-theme="lib_dem"] .workspace-navmeta a:hover,
.workspace-shell[data-party-theme="lib_dem"] .workspace-navlinks a.is-active,
.workspace-shell[data-party-theme="lib_dem"] .workspace-navmeta a.is-active {
  background: rgba(255, 241, 207, 0.74);
}

.workspace-shell[data-party-theme="lib_dem"] .workspace-navlinks a.is-active::after,
.workspace-shell[data-party-theme="lib_dem"] .portal-tab-pill.is-active {
  border-bottom-color: #ffd35a;
}

.workspace-shell[data-party-theme="lib_dem"] .workspace-navlinks a.is-active::after {
  background: #ffd35a;
}

.workspace-shell[data-party-theme="lib_dem"] .thread-finder,
.workspace-shell[data-party-theme="lib_dem"] .thread-main,
.workspace-shell[data-party-theme="lib_dem"] .snapshot-card,
.workspace-shell[data-party-theme="lib_dem"] .thread-block,
.workspace-shell[data-party-theme="lib_dem"] .reference-main,
.workspace-shell[data-party-theme="lib_dem"] .reference-side,
.workspace-shell[data-party-theme="lib_dem"] .builder-main,
.workspace-shell[data-party-theme="lib_dem"] .builder-side,
.workspace-shell[data-party-theme="lib_dem"] .workspace-stat-card,
.workspace-shell[data-party-theme="lib_dem"] .workspace-stat-strip > div,
.workspace-shell[data-party-theme="lib_dem"] .dashboard-contextbar,
.workspace-shell[data-party-theme="lib_dem"] .dashboard-kpi,
.workspace-shell[data-party-theme="lib_dem"] .dashboard-panel,
.workspace-shell[data-party-theme="lib_dem"] .portal-toolbar {
  border-color: rgba(255, 255, 255, 0.64);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.34), rgba(255, 241, 207, 0.22)),
    rgba(255, 255, 255, 0.88);
  color: var(--ld-ink);
  box-shadow: 0 16px 34px rgba(146, 100, 20, 0.08);
}

.workspace-shell[data-party-theme="lib_dem"] .thread-finder-row,
.workspace-shell[data-party-theme="lib_dem"] .thread-link-row,
.workspace-shell[data-party-theme="lib_dem"] .thread-mini-row,
.workspace-shell[data-party-theme="lib_dem"] .thread-record-card,
.workspace-shell[data-party-theme="lib_dem"] .thread-reading-surface,
.workspace-shell[data-party-theme="lib_dem"] .thread-status-banner,
.workspace-shell[data-party-theme="lib_dem"] .thread-activity-card,
.workspace-shell[data-party-theme="lib_dem"] .issue-workspace-lead,
.workspace-shell[data-party-theme="lib_dem"] .issue-workspace-note,
.workspace-shell[data-party-theme="lib_dem"] .issue-workspace-action-card,
.workspace-shell[data-party-theme="lib_dem"] .issue-fact-grid div,
.workspace-shell[data-party-theme="lib_dem"] .issue-compact-list div,
.workspace-shell[data-party-theme="lib_dem"] .thread-detail-grid div,
.workspace-shell[data-party-theme="lib_dem"] .workspace-info-item,
.workspace-shell[data-party-theme="lib_dem"] .dashboard-list-row,
.workspace-shell[data-party-theme="lib_dem"] .dashboard-workqueue-strip a,
.workspace-shell[data-party-theme="lib_dem"] .dashboard-priority-facts div,
.workspace-shell[data-party-theme="lib_dem"] .dashboard-attention-strip a,
.workspace-shell[data-party-theme="lib_dem"] .dashboard-shortcuts a,
.workspace-shell[data-party-theme="lib_dem"] .dashboard-rank-row {
  border-color: rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .dashboard-primary-actions {
  gap: 0.72rem;
}

.workspace-shell[data-party-theme="lib_dem"] .dashboard-action-tile {
  min-height: 64px;
  border-color: rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(255, 241, 207, 0.16)),
    rgba(255, 255, 255, 0.9);
  color: var(--ld-ink);
  box-shadow: 0 12px 24px rgba(146, 100, 20, 0.08);
}

.workspace-shell[data-party-theme="lib_dem"] .dashboard-action-tile.is-issue {
  background: linear-gradient(135deg, #ffd35a, #ffb21a);
}

.workspace-shell[data-party-theme="lib_dem"] .dashboard-action-tile.is-enquiry,
.workspace-shell[data-party-theme="lib_dem"] .dashboard-action-tile.is-activity {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.36), rgba(255, 241, 207, 0.18)),
    rgba(255, 255, 255, 0.92);
}

.workspace-shell[data-party-theme="lib_dem"] .dashboard-action-tile:hover,
.workspace-shell[data-party-theme="lib_dem"] .dashboard-list-row:hover,
.workspace-shell[data-party-theme="lib_dem"] .dashboard-workqueue-strip a:hover,
.workspace-shell[data-party-theme="lib_dem"] .thread-finder-row:hover,
.workspace-shell[data-party-theme="lib_dem"] .thread-finder-row.is-active,
.workspace-shell[data-party-theme="lib_dem"] .thread-link-row.is-active {
  border-color: rgba(255, 211, 90, 0.82);
  background: rgba(255, 241, 207, 0.82);
  filter: none;
}

.workspace-shell[data-party-theme="lib_dem"] .dashboard-action-tile span,
.workspace-shell[data-party-theme="lib_dem"] .dashboard-action-tile strong,
.workspace-shell[data-party-theme="lib_dem"] .dashboard-action-tile small,
.workspace-shell[data-party-theme="lib_dem"] .dashboard-list-row strong,
.workspace-shell[data-party-theme="lib_dem"] .dashboard-list-row small,
.workspace-shell[data-party-theme="lib_dem"] .dashboard-row-kind,
.workspace-shell[data-party-theme="lib_dem"] .dashboard-workqueue-strip span,
.workspace-shell[data-party-theme="lib_dem"] .dashboard-workqueue-strip strong,
.workspace-shell[data-party-theme="lib_dem"] .dashboard-panel-head h2,
.workspace-shell[data-party-theme="lib_dem"] .dashboard-panel-head p,
.workspace-shell[data-party-theme="lib_dem"] .dashboard-text-link {
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .dashboard-action-tile strong,
.workspace-shell[data-party-theme="lib_dem"] .dashboard-action-tile small,
.workspace-shell[data-party-theme="lib_dem"] .dashboard-list-row small,
.workspace-shell[data-party-theme="lib_dem"] .dashboard-workqueue-strip span,
.workspace-shell[data-party-theme="lib_dem"] .dashboard-panel-head p {
  color: var(--ld-ink-soft);
}

.workspace-shell[data-party-theme="lib_dem"] .dashboard-row-kind,
.workspace-shell[data-party-theme="lib_dem"] .badge {
  border-color: rgba(125, 211, 252, 0.28);
  background: #e7f5ff;
  color: #0f5f8f;
}

.workspace-shell[data-party-theme="lib_dem"] .btn,
.workspace-shell[data-party-theme="lib_dem"] .btn-small {
  background: #ffb21a;
  color: var(--ld-ink);
  box-shadow: 0 10px 20px rgba(242, 160, 0, 0.18);
}

.workspace-shell[data-party-theme="lib_dem"] .btn:hover,
.workspace-shell[data-party-theme="lib_dem"] .btn-small:hover {
  background: #ffd35a;
}

.workspace-shell[data-party-theme="lib_dem"] .btn-ghost,
.workspace-shell[data-party-theme="lib_dem"] .dashboard-context-action,
.workspace-shell[data-party-theme="lib_dem"] .portal-tab-pill,
.workspace-shell[data-party-theme="lib_dem"] .portal-finder-controls .portal-toolbar-search,
.workspace-shell[data-party-theme="lib_dem"] .portal-finder-controls .portal-toolbar-select,
.workspace-shell[data-party-theme="lib_dem"] .portal-toolbar-search,
.workspace-shell[data-party-theme="lib_dem"] .portal-toolbar-select,
.workspace-shell[data-party-theme="lib_dem"] .portal-toolbar label select,
.workspace-shell[data-party-theme="lib_dem"] .reference-form input,
.workspace-shell[data-party-theme="lib_dem"] .reference-form textarea,
.workspace-shell[data-party-theme="lib_dem"] .reference-form select,
.workspace-shell[data-party-theme="lib_dem"] .desktop-form-shell input,
.workspace-shell[data-party-theme="lib_dem"] .desktop-form-shell textarea,
.workspace-shell[data-party-theme="lib_dem"] .desktop-form-shell select,
.workspace-shell[data-party-theme="lib_dem"] .workspace-searchbar input {
  border-color: rgba(255, 255, 255, 0.68);
  background: rgba(255, 255, 255, 0.86);
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .portal-tab-pill.is-active {
  background: #fff1cf;
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .workspace-footer {
  background: rgba(255, 255, 255, 0.46);
}

.workspace-shell[data-party-theme="lib_dem"] .issue-record-strip {
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 0.35rem 0;
  border-color: rgba(255, 255, 255, 0.72);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.36), rgba(255, 241, 207, 0.18)),
    rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 24px rgba(146, 100, 20, 0.08);
}

.workspace-shell[data-party-theme="lib_dem"] .issue-record-strip div,
.workspace-shell[data-party-theme="lib_dem"] .issue-record-strip div:nth-child(3n + 1) {
  border-left-color: rgba(230, 174, 61, 0.2);
  padding-left: 0.72rem;
}

.workspace-shell[data-party-theme="lib_dem"] .issue-record-strip div:first-child {
  border-left: 0;
  padding-left: 0;
}

.workspace-shell[data-party-theme="lib_dem"] .issue-record-strip dt {
  color: var(--ld-muted);
}

.workspace-shell[data-party-theme="lib_dem"] .issue-record-strip dd {
  color: var(--ld-ink);
  white-space: normal;
}

.workspace-shell[data-party-theme="lib_dem"] .issue-static-map-copy {
  background: rgba(255, 255, 255, 0.88);
}

.workspace-shell[data-party-theme="lib_dem"] .issue-static-map-copy strong,
.workspace-shell[data-party-theme="lib_dem"] .issue-static-map-copy span {
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .issue-static-map-copy span {
  color: var(--ld-ink-soft);
}

.workspace-shell[data-party-theme="lib_dem"] .workspace-account-card a,
.workspace-shell[data-party-theme="lib_dem"] .workspace-role-card a,
.workspace-shell[data-party-theme="lib_dem"] .workspace-role-card button,
.workspace-shell[data-party-theme="lib_dem"] .workspace-account-card button,
.workspace-shell[data-party-theme="lib_dem"] .workspace-role-actions .btn,
.workspace-shell[data-party-theme="lib_dem"] .workspace-role-actions .btn-ghost {
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .workspace-account-card a:hover,
.workspace-shell[data-party-theme="lib_dem"] .workspace-account-card a.is-active {
  background: #fff1cf;
  color: var(--ld-ink);
}

.activity-thread-workspace .thread-split-blocks {
  grid-template-columns: minmax(0, 1.25fr) minmax(310px, 0.75fr);
}

.activity-thread-workspace .thread-finder {
  position: sticky;
  top: 0;
  align-self: start;
  height: calc(100vh - 76px);
  max-height: calc(100vh - 76px);
  min-height: 0;
}

.issue-thread-workspace:not(.activity-thread-workspace) .thread-finder {
  position: sticky;
  top: 0;
  align-self: stretch;
  height: auto;
  max-height: none;
  min-height: 0;
}

.issue-thread-workspace.enquiry-thread-workspace .thread-finder {
  align-self: start;
  height: calc(100vh - 76px);
  max-height: calc(100vh - 76px);
}

.notebook-workspace .thread-finder {
  position: sticky;
  top: 0;
  align-self: start;
  height: calc(100vh - 76px);
  max-height: calc(100vh - 76px);
  min-height: 0;
}

.notebook-workspace .thread-main {
  gap: 1.1rem;
}

.notebook-finder {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 0.75rem;
}

.notebook-finder-head {
  margin-bottom: 0;
}

.notebook-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 1.25rem;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink-620) !important;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: none;
}

.notebook-finder-controls {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 0;
}

.notebook-role-filter {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 2.75rem;
  padding: 0 0.82rem;
  border: 1px solid rgba(191, 204, 222, 0.72);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.98);
  color: var(--ink-940);
  font: inherit;
}

.contact-finder-controls > .portal-toolbar-select {
  grid-column: 1 / -1;
}

.notebook-finder-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding-right: 0.15rem;
  align-content: start;
  align-items: stretch;
  overflow-x: hidden;
  overflow-y: auto;
}

.notebook-finder-row {
  gap: 0.55rem;
  min-height: 0;
  padding: 0.72rem 0.78rem 0.76rem;
  border: 1px solid rgba(191, 204, 222, 0.46);
  border-left: 4px solid transparent;
  border-radius: 0.95rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 251, 255, 0.98) 100%);
  color: var(--ink-940);
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.notebook-finder-row:hover,
.notebook-finder-row.is-active {
  border-color: rgba(15, 118, 104, 0.26);
  border-left-color: #f0be44;
  background: linear-gradient(180deg, #fff8e9 0%, #fff2cb 100%);
  box-shadow: 0 16px 28px rgba(15, 51, 78, 0.08);
  transform: none;
}

.notebook-finder-row-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.55rem;
}

.notebook-finder-row-head strong {
  color: var(--ink-940);
  font-size: 0.91rem;
  line-height: 1.2;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.notebook-finder-date {
  flex: 0 0 auto;
  color: var(--ink-620);
  font-size: 0.74rem;
  font-weight: 700;
}

.notebook-finder-snippet {
  margin: 0;
  color: var(--ink-760);
  font-size: 0.85rem;
  line-height: 1.38;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.notebook-finder-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.notebook-finder-role {
  padding-top: 0.08rem;
}

.notebook-finder-role-value {
  color: var(--ink-760);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.28;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.notebook-row-meta-pill,
.notebook-tag,
.notebook-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 1.7rem;
  padding: 0 0.68rem;
  border-radius: 999px;
  border: 1px solid rgba(138, 158, 184, 0.28);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink-760);
  font-size: 0.74rem;
  font-weight: 800;
}

.notebook-row-meta-pill {
  min-height: 1.65rem;
  padding: 0 0.62rem;
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.96);
}

.notebook-tag-impact,
.notebook-meta-pill-impact {
  border-color: rgba(240, 190, 68, 0.4);
  background: linear-gradient(180deg, #fff7df 0%, #ffeab5 100%);
  color: #7b5700;
}

.notebook-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.85rem 1rem;
  align-items: start;
}

.notebook-header-copy .page-kicker {
  margin-bottom: 0.3rem;
}

.notebook-header-copy h1 {
  margin-top: 0;
  margin-bottom: 0;
  font-size: clamp(1.95rem, 3.4vw, 2.45rem);
}

.notebook-header-actions {
  justify-content: flex-end;
  align-items: flex-start;
}

.notebook-action-group {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.notebook-action-group > form {
  margin: 0;
}

.notebook-action-group details {
  margin: 0;
}

.notebook-action-group details > summary {
  list-style: none;
}

.notebook-action-group details > summary::-webkit-details-marker {
  display: none;
}

.notebook-action-group details[open] > summary.btn {
  border-color: rgba(240, 190, 68, 0.42);
  background: #fff8e6;
}

.notebook-action-group .btn {
  min-height: 2.7rem;
  white-space: nowrap;
}

.notebook-inline-edit .issue-inline-edit-panel {
  width: min(760px, calc(100vw - 2rem));
  max-height: min(78vh, 860px);
  overflow-y: auto;
  border-color: rgba(190, 206, 226, 0.92);
  background: rgba(255, 252, 244, 0.99);
  color: var(--ink-940);
  box-shadow: 0 22px 44px rgba(15, 51, 78, 0.16);
}

.notebook-inline-edit .issue-inline-edit-grid label,
.notebook-inline-edit .issue-inline-check span {
  color: var(--ink-940);
}

.notebook-inline-edit .issue-inline-edit-grid :where(input, textarea, select) {
  border-color: rgba(211, 182, 112, 0.42);
  background: rgba(255, 255, 255, 0.98);
  color: var(--ink-940);
}

.notebook-inline-edit .issue-inline-edit-grid textarea {
  resize: none !important;
}

.notebook-inline-edit .issue-inline-edit-grid :where(input, textarea)::placeholder {
  color: rgba(94, 76, 34, 0.58);
}

.notebook-main > .alert,
.notebook-page-notice {
  margin-bottom: 0;
}

.notebook-page-notice {
  display: flex;
  align-items: center;
  min-height: 3.15rem;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(240, 190, 68, 0.28);
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(255, 250, 237, 0.98) 0%, rgba(255, 244, 214, 0.96) 100%);
  color: var(--ink-940);
  font-weight: 780;
}

.notebook-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  margin-top: 0.55rem;
}

.notebook-note-block {
  padding: 1rem;
}

.notebook-note-block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 0.5rem;
}

.notebook-note-block-head h2,
.notebook-note-block-head p {
  margin: 0;
}

.notebook-sections-grid {
  display: grid;
  gap: 0.9rem;
}

.notebook-section-card {
  display: grid;
  gap: 0.7rem;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(136, 157, 184, 0.18);
  border-radius: 0.9rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 251, 255, 0.94) 100%);
  box-shadow: 0 8px 18px rgba(15, 51, 78, 0.05);
}

.notebook-section-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.7rem;
}

.notebook-section-kicker {
  display: inline-block;
  margin-bottom: 0.25rem;
  color: var(--ink-620);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.notebook-section-card-head h3 {
  margin: 0;
  color: var(--ink-940);
  font-size: 0.94rem;
  line-height: 1.18;
}

.notebook-reading-surface {
  padding: 0;
  border: 0;
  background: transparent;
}

.notebook-reading-surface p {
  margin: 0;
  color: var(--ink-860);
  font-size: 0.94rem;
  line-height: 1.54;
}

.notebook-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 0.36fr);
  gap: 1rem;
  align-items: start;
}

.notebook-detail-side {
  display: grid;
  gap: 0.9rem;
}

.notebook-fact-card {
  padding: 1rem !important;
}

.notebook-fact-card .thread-block-head {
  margin-bottom: 0.72rem;
}

.notebook-fact-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.notebook-fact-list div {
  display: grid;
  grid-template-columns: minmax(78px, 0.45fr) minmax(0, 1fr);
  gap: 0.65rem;
  padding: 0.68rem 0;
  border-top: 1px solid rgba(136, 157, 184, 0.18);
}

.notebook-fact-list div:first-child {
  border-top: 0;
  padding-top: 0;
}

.notebook-fact-list div:last-child {
  padding-bottom: 0;
}

.notebook-fact-list dt {
  color: var(--ink-620);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.notebook-fact-list dd {
  min-width: 0;
  margin: 0;
  color: var(--ink-940);
  font-size: 0.82rem;
  font-weight: 740;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.notebook-note-footer {
  margin-top: 0.9rem;
  padding-top: 0.78rem;
  border-top: 1px solid rgba(136, 157, 184, 0.18);
  color: var(--ink-620);
  font-size: 0.76rem;
  font-weight: 680;
}

.notebook-editor-panel {
  border-radius: 1rem;
}

.notebook-editor-grid {
  gap: 0.9rem;
}

.issue-inline-edit-wide {
  grid-column: 1 / -1;
}

.notebook-editor-sections-shell {
  display: grid;
  gap: 0.75rem;
}

.notebook-editor-sections-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.notebook-editor-sections {
  display: grid;
  gap: 0.85rem;
}

.notebook-editor-section {
  display: grid;
  gap: 0.7rem;
  padding: 0.95rem;
  border: 1px solid rgba(191, 204, 222, 0.62);
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.96);
}

.notebook-editor-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.notebook-editor-section-head strong {
  color: var(--ink-940);
  font-size: 0.88rem;
}

.notebook-inline-check {
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.notebook-inline-check span {
  font-size: 0.84rem;
  font-weight: 750;
}

/* The section flag is a compact, labelled choice in both the saved-note and
   create-note editors. It must not inherit the large generic checkbox shape. */
.notebook-inline-edit .notebook-editor-section .notebook-inline-check {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  min-height: 2.4rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(191, 204, 222, 0.62);
  border-radius: 0.6rem;
  background: rgba(248, 251, 255, 0.8);
}

.notebook-inline-edit .notebook-editor-section .notebook-impact-copy {
  display: grid;
  gap: 0.08rem;
  color: var(--ink-940);
}

.notebook-inline-edit .notebook-editor-section .notebook-impact-copy strong {
  font-size: 0.8rem;
}

.notebook-inline-edit .notebook-editor-section .notebook-impact-copy small {
  color: var(--ink-620);
  font-size: 0.71rem;
  font-weight: 600;
}

.notebook-inline-edit .notebook-editor-section .notebook-inline-check input[type="checkbox"] {
  width: 2.25rem !important;
  height: 1.3rem !important;
  min-width: 2.25rem !important;
  min-height: 1.3rem !important;
  margin: 0 !important;
}

.notebook-inline-edit .notebook-editor-section .notebook-inline-check input[type="checkbox"]::before {
  width: 0.92rem !important;
  height: 0.92rem !important;
}

.notebook-inline-edit .notebook-editor-section .notebook-inline-check input[type="checkbox"]:checked::before {
  transform: translate(0.8rem, -50%) !important;
}

.notebook-inline-edit .notebook-inline-check input[type="checkbox"] {
  appearance: none !important;
  -webkit-appearance: none !important;
  position: relative;
  width: 2.6rem;
  height: 1.5rem;
  min-width: 2.6rem;
  min-height: 1.5rem;
  border-radius: 999px;
  border: 1px solid rgba(191, 204, 222, 0.9) !important;
  background: rgba(226, 232, 240, 0.95) !important;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.notebook-inline-edit .notebook-inline-check input[type="checkbox"]::before {
  content: "" !important;
  display: block;
  position: absolute;
  top: 50%;
  left: 0.14rem;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 999px;
  background: #ffffff !important;
  box-shadow: 0 2px 6px rgba(15, 51, 78, 0.18);
  transform: translateY(-50%);
  transition: transform 140ms ease, background-color 140ms ease;
}

.notebook-inline-edit .notebook-inline-check input[type="checkbox"]:checked {
  border-color: rgba(15, 118, 104, 0.44) !important;
  background: rgba(15, 118, 104, 0.9) !important;
}

.notebook-inline-edit .notebook-inline-check input[type="checkbox"]:checked::before {
  transform: translate(0.96rem, -50%);
}

.notebook-editor-actions {
  justify-content: space-between;
}

.notebook-delete-panel {
  width: min(400px, calc(100vw - 2rem)) !important;
}

.notebook-delete-panel p {
  margin: 0;
  color: var(--ink-760);
  line-height: 1.5;
}

.notebook-empty-block .thread-reading-surface {
  padding: 1.1rem 1.15rem;
}

@media (max-width: 1120px) {
  .notebook-header {
    grid-template-columns: 1fr;
  }

  .notebook-action-group {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .notebook-detail-layout {
    grid-template-columns: 1fr;
  }
}

.issue-thread-workspace .thread-finder-list,
.activity-thread-workspace .thread-finder-list {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.notebook-workspace .notebook-finder-list {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.workspace-shell[data-party-theme="lib_dem"] .issue-add-note-trigger {
  border-color: rgba(255, 255, 255, 0.68);
  background: #ffb21a;
  color: var(--ld-ink);
  box-shadow: 0 10px 20px rgba(242, 160, 0, 0.16);
}

.workspace-shell[data-party-theme="lib_dem"] .issue-add-note-trigger::before {
  color: #166534;
}

.workspace-shell[data-party-theme="lib_dem"] .issue-note-composer[open] > .issue-add-note-trigger {
  border-color: rgba(255, 211, 90, 0.82);
  background: #ffd35a;
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .issue-note-composer form {
  border-color: rgba(255, 255, 255, 0.68);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ld-ink);
  box-shadow: 0 18px 40px rgba(146, 100, 20, 0.12);
}

.workspace-shell[data-party-theme="lib_dem"] .issue-note-composer label {
  color: var(--ld-ink);
}

  .workspace-shell[data-party-theme="lib_dem"] .contact-inline-edit .issue-inline-edit-panel {
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 252, 243, 0.98);
  color: var(--ld-ink);
  box-shadow: 0 22px 44px rgba(146, 100, 20, 0.18);
}

.workspace-shell[data-party-theme="lib_dem"] .contact-inline-edit .issue-inline-edit-grid label,
.workspace-shell[data-party-theme="lib_dem"] .contact-inline-edit .issue-inline-check span {
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .contact-inline-edit .issue-inline-edit-grid :where(input, textarea, select) {
  border-color: rgba(230, 182, 64, 0.32);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .contact-inline-edit .issue-inline-edit-grid :where(input, textarea)::placeholder {
  color: rgba(84, 63, 14, 0.58);
}

.workspace-shell[data-party-theme="lib_dem"] .contact-inline-edit .issue-inline-edit-actions {
  border-top-color: rgba(230, 182, 64, 0.28);
}

.workspace-shell[data-party-theme="lib_dem"] :where(
  .portal-page-header,
  .dashboard-home,
  .dashboard-contextbar,
  .dashboard-panel,
  .dashboard-list-row,
  .dashboard-action-tile,
  .dashboard-workqueue-strip,
  .thread-finder,
  .thread-main,
  .thread-block,
  .snapshot-card,
  .thread-reading-surface,
  .thread-status-banner,
  .thread-activity-card,
  .thread-record-card,
  .thread-link-row,
  .thread-mini-row,
  .reference-main,
  .reference-side,
  .builder-main,
  .builder-side,
  .desktop-form-shell,
  .portal-toolbar,
  .workspace-role-card,
  .workspace-account-card,
  .workspace-info-item
) :where(h1, h2, h3, h4, p, span, strong, small, dt, dd, label, summary, li, td, th, a, button) {
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] :where(
  .support-text,
  .muted,
  .page-kicker,
  .empty-state,
  .thread-block-head p,
  .thread-header .support-text,
  .dashboard-panel-head p,
  .dashboard-action-tile strong,
  .dashboard-action-tile small,
  .dashboard-list-row small,
  .dashboard-workqueue-strip span,
  .thread-finder-row-main span,
  .thread-finder-row-meta small,
  .thread-finder-row-meta span,
  .thread-link-row span,
  .thread-mini-row span,
  .thread-record-card-meta span,
  .thread-timeline-meta span,
  .thread-media-copy span,
  .thread-activity-card small,
  .workspace-role-chip-kicker,
  .workspace-role-card-head span,
  .workspace-role-option small,
  .workspace-account-head small,
  .workspace-info-item span,
  .issue-fact-grid dt,
  .issue-compact-list dt,
  .thread-detail-grid dt,
  .thread-timeline-label
) {
  color: var(--ld-ink-soft);
}

.workspace-shell[data-party-theme="lib_dem"] :where(
  .badge,
  .dashboard-row-kind,
  .workspace-drafts-alert span,
  .workspace-access-badge,
  .workspace-role-default
) {
  color: inherit;
}

.workspace-shell[data-party-theme="lib_dem"] .badge,
.workspace-shell[data-party-theme="lib_dem"] .dashboard-row-kind {
  color: #0f5f8f;
}

.workspace-shell[data-party-theme="lib_dem"] .badge.open,
.workspace-shell[data-party-theme="lib_dem"] .badge.resolved,
.workspace-shell[data-party-theme="lib_dem"] .badge.done,
.workspace-shell[data-party-theme="lib_dem"] .badge.closed {
  color: #166534;
}

.workspace-shell[data-party-theme="lib_dem"] .badge.waiting,
.workspace-shell[data-party-theme="lib_dem"] .badge.todo,
.workspace-shell[data-party-theme="lib_dem"] .badge.on_hold,
.workspace-shell[data-party-theme="lib_dem"] .badge.pothole,
.workspace-shell[data-party-theme="lib_dem"] .workspace-access-badge,
.workspace-shell[data-party-theme="lib_dem"] .workspace-role-default {
  color: #92400e;
}

.workspace-shell[data-party-theme="lib_dem"] .badge.overdue,
.workspace-shell[data-party-theme="lib_dem"] .badge.sensitive {
  color: #991b1b;
}

@media (max-width: 1180px) {
  .workspace-shell[data-party-theme="lib_dem"]::before {
    width: 30rem;
    right: -13rem;
  }

  .activity-thread-workspace .thread-split-blocks {
    grid-template-columns: 1fr;
  }
}

/* Keep header popovers above workspace content and give them their own text colours.
   The account and role cards sit inside the nav meta area, so they must not inherit
   the top-nav link colour rules. */
.workspace-globalnav {
  overflow: visible;
  z-index: 7000;
}

.workspace-account-menu,
.workspace-role-menu {
  z-index: 7010;
}

.workspace-account-menu.is-open,
.workspace-role-menu.is-open {
  z-index: 7050;
}

.workspace-account-card,
.workspace-role-card {
  z-index: 7060;
  pointer-events: auto;
}

.workspace-account-card,
.workspace-account-card :where(strong, small, span, a, button),
.workspace-role-card,
.workspace-role-card :where(strong, small, span, a, button) {
  color: #f5fff9;
}

.workspace-account-head small,
.workspace-role-card-head span,
.workspace-role-option small {
  color: rgba(245, 255, 249, 0.68);
}

.workspace-account-card a:hover,
.workspace-account-card a.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.workspace-shell[data-party-theme="lib_dem"] .workspace-account-card,
.workspace-shell[data-party-theme="lib_dem"] .workspace-account-card :where(strong, small, span, a, button),
.workspace-shell[data-party-theme="lib_dem"] .workspace-role-card,
.workspace-shell[data-party-theme="lib_dem"] .workspace-role-card :where(strong, small, span, a, button) {
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .workspace-account-head small,
.workspace-shell[data-party-theme="lib_dem"] .workspace-role-card-head span,
.workspace-shell[data-party-theme="lib_dem"] .workspace-role-option small {
  color: var(--ld-ink-soft);
}

.workspace-shell[data-party-theme="lib_dem"] .workspace-account-card a:hover,
.workspace-shell[data-party-theme="lib_dem"] .workspace-account-card a.is-active,
.workspace-shell[data-party-theme="lib_dem"] .workspace-role-card a:hover {
  background: #fff1cf;
  color: var(--ld-ink);
}

.workspace-popover-root {
  position: fixed;
  inset: 0;
  z-index: 12000;
  pointer-events: none;
}

.workspace-popover-root[hidden] {
  display: none;
}

.workspace-popover-root .workspace-account-card,
.workspace-popover-root .workspace-role-card {
  position: fixed;
  top: 0;
  left: 0;
  right: auto;
  max-height: min(70vh, 540px);
  overflow-y: auto;
  overscroll-behavior: contain;
  pointer-events: auto;
}

/* Header popovers are moved into workspace-popover-root so that they can sit
   above every workspace. Carry the active role theme onto that root as the
   cards are no longer descendants of workspace-shell after opening. */
.workspace-popover-root[data-party-theme="lib_dem"] :is(.workspace-role-card, .workspace-account-card) {
  border-color: rgba(217, 119, 6, 0.22);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 55px rgba(146, 64, 14, 0.16);
  color: #111827;
}

.workspace-popover-root[data-party-theme="lib_dem"] :is(.workspace-role-card, .workspace-account-card) :where(strong, small, span, a, button) {
  color: #111827;
}

.workspace-popover-root[data-party-theme="lib_dem"] :is(.workspace-role-card-head, .workspace-account-head) {
  border-bottom-color: rgba(217, 119, 6, 0.22);
}

.workspace-popover-root[data-party-theme="lib_dem"] :is(.workspace-role-card-head span, .workspace-role-option small, .workspace-account-head small) {
  color: #4b5563;
}

.workspace-popover-root[data-party-theme="lib_dem"] .workspace-role-option {
  border-color: rgba(217, 119, 6, 0.18);
  background: rgba(255, 248, 236, 0.7);
}

.workspace-popover-root[data-party-theme="lib_dem"] .workspace-role-option.is-active {
  border-color: rgba(255, 178, 26, 0.68);
  background: #fff1cf;
}

.workspace-popover-root[data-party-theme="lib_dem"] .workspace-role-actions .btn {
  border-color: rgba(226, 138, 0, 0.28);
  background: #ffb21a;
  color: #111827;
  box-shadow: 0 10px 20px rgba(242, 160, 0, 0.18);
}

.workspace-popover-root[data-party-theme="lib_dem"] .workspace-role-actions .btn:hover {
  background: #ffd35a;
  color: #111827;
}

.workspace-popover-root[data-party-theme="lib_dem"] .workspace-role-actions .btn-ghost {
  border-color: rgba(217, 119, 6, 0.26);
  background: rgba(255, 255, 255, 0.78);
  color: #7c2d12;
  box-shadow: none;
}

.workspace-popover-root[data-party-theme="lib_dem"] .workspace-role-default {
  border-color: rgba(217, 119, 6, 0.22);
  background: #fff1cf;
  color: #7c2d12;
}

@media (max-width: 720px) {
  .workspace-popover-root .workspace-account-card,
  .workspace-popover-root .workspace-role-card {
    left: 1rem !important;
    right: 1rem !important;
    width: auto !important;
  }
}

/* Compact issue composer: one focused capture surface, with optional work kept out of the way. */
.workspace-shell .issue-capture-page {
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  gap: 0.55rem;
}

.workspace-shell .issue-capture-header {
  margin-bottom: 0;
  padding: 0.05rem 0;
}

.workspace-shell .issue-capture-header h1 {
  font-size: clamp(2rem, 2.3vw, 2.35rem);
  line-height: 1;
}

.workspace-shell .issue-capture-form {
  gap: 0.5rem;
}

.workspace-shell .issue-capture-source,
.workspace-shell .issue-capture-card,
.workspace-shell .issue-capture-options {
  border-color: rgba(255, 255, 255, 0.64);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 24px rgba(146, 100, 20, 0.06);
}

.workspace-shell .issue-capture-source {
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
}

.workspace-shell .issue-capture-main-card {
  padding: 0.7rem 0.8rem 0.8rem;
  border-radius: 12px;
}

.workspace-shell .issue-capture-layout {
  grid-template-columns: minmax(0, 1.35fr) minmax(20rem, 0.85fr);
  gap: 1rem;
}

.workspace-shell .issue-capture-side {
  align-content: start;
}

.workspace-shell .issue-capture-card-head {
  margin-bottom: 0.45rem;
}

.workspace-shell .issue-capture-card-head h2 {
  font-size: 1rem;
}

.workspace-shell .issue-capture-fields {
  gap: 0.5rem;
}

.workspace-shell .issue-capture-core {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.workspace-shell .issue-capture-fields label {
  gap: 0.2rem;
  font-size: 0.8rem;
  font-weight: 800;
}

.workspace-shell .issue-capture-fields label[hidden],
.workspace-shell #custom_category_wrap[hidden],
.workspace-shell #action_contact_wrap[hidden] {
  display: none !important;
}

.workspace-shell .issue-capture-span-full,
.workspace-shell .issue-capture-location-field,
.workspace-shell .issue-capture-location-field + .location-suggestions,
.workspace-shell .issue-capture-options-body > .issue-capture-span-full {
  grid-column: 1 / -1;
}

/* Enquiry/activity capture keeps the iPhone field order, without making an optional map dominate the page. */
.workspace-shell .enquiry-capture-page {
  width: 100%;
  max-width: 1260px;
  margin: 0 auto;
  gap: 0.55rem;
}

.workspace-shell .enquiry-capture-page .portal-page-header {
  margin-bottom: 0;
  padding: 0.05rem 0;
}

.workspace-shell .enquiry-capture-page .portal-page-header h1 {
  font-size: clamp(2rem, 2.3vw, 2.35rem);
  line-height: 1;
}

.workspace-shell .enquiry-capture-form {
  gap: 0.55rem;
}

.workspace-shell .enquiry-capture-layout {
  grid-template-columns: minmax(0, 1.38fr) minmax(18rem, 0.72fr);
  gap: 0.75rem;
}

.workspace-shell .enquiry-capture-card,
.workspace-shell .enquiry-capture-options,
.workspace-shell .enquiry-capture-save-card {
  border-color: rgba(255, 255, 255, 0.64);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 24px rgba(146, 100, 20, 0.06);
}

.workspace-shell .enquiry-capture-card,
.workspace-shell .enquiry-capture-save-card {
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
}

.workspace-shell .enquiry-capture-card-head {
  margin-bottom: 0.45rem;
}

.workspace-shell .enquiry-capture-card-head h2 {
  font-size: 1rem;
}

.workspace-shell .enquiry-capture-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 0.7rem;
}

.workspace-shell .enquiry-capture-fields label,
.workspace-shell .enquiry-capture-location-card label,
.workspace-shell .enquiry-capture-more-options label {
  display: grid;
  gap: 0.2rem;
  color: var(--ink-940);
  font-size: 0.8rem;
  font-weight: 800;
}

.workspace-shell .enquiry-capture-fields label[hidden],
.workspace-shell #update_source_detail_wrap[hidden],
.workspace-shell #update_area_picker[hidden] {
  display: none !important;
}

.workspace-shell .enquiry-capture-span-full {
  grid-column: 1 / -1;
}

.workspace-shell .enquiry-capture-fields :where(input, textarea, select),
.workspace-shell .enquiry-capture-location-card :where(input, textarea, select),
.workspace-shell .enquiry-capture-more-options :where(input, textarea, select) {
  min-height: 38px;
  padding: 0.48rem 0.65rem;
  border-radius: 8px;
  font-size: 0.92rem;
}

.workspace-shell .enquiry-capture-fields textarea {
  min-height: 102px;
  resize: none;
}

.workspace-shell .enquiry-capture-options {
  overflow: hidden;
  border-radius: 12px;
}

.workspace-shell .enquiry-capture-options > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.85rem;
  color: var(--ink-940);
  font-size: 0.92rem;
  font-weight: 800;
}

.workspace-shell .enquiry-capture-options > summary span {
  color: var(--ink-620);
  font-size: 0.78rem;
  font-weight: 700;
}

.workspace-shell .enquiry-capture-options[open] > summary {
  border-bottom: 1px solid rgba(136, 157, 184, 0.2);
}

.workspace-shell .enquiry-capture-option-body {
  padding: 0.7rem 0.85rem 0.8rem;
}

.workspace-shell .enquiry-capture-option-body > .support-text:first-child {
  margin-top: 0;
}

.workspace-shell .enquiry-capture-check {
  display: flex !important;
  align-items: center;
  gap: 0.45rem !important;
  align-self: end;
  min-height: 38px;
}

.workspace-shell .enquiry-capture-check input {
  width: 16px;
  min-height: 16px;
  height: 16px;
  margin: 0;
}

.workspace-shell .enquiry-capture-save-card {
  position: sticky;
  top: 0.8rem;
}

.workspace-shell .enquiry-capture-save-card .btn {
  min-height: 40px;
}

.workspace-shell .enquiry-capture-location-card .support-text {
  margin: 0;
}

.workspace-shell .enquiry-capture-more-options .app-accordion {
  margin: 0;
  border-color: rgba(136, 157, 184, 0.2);
  border-radius: 8px;
  box-shadow: none;
}

.workspace-shell .enquiry-capture-more-options .app-accordion > summary {
  padding: 0.6rem 0.65rem;
  font-size: 0.84rem;
}

.enquiry-capture-location-dialog {
  width: min(760px, calc(100vw - 2rem));
  max-width: none;
  border: 1px solid rgba(136, 157, 184, 0.28);
  border-radius: 14px;
  background: var(--surface, #ffffff);
  color: var(--ink-940);
  padding: 1rem;
  box-shadow: 0 24px 60px rgba(18, 36, 58, 0.28);
}

.enquiry-capture-location-dialog::backdrop {
  background: rgba(18, 36, 58, 0.5);
}

.enquiry-capture-dialog-head,
.enquiry-capture-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.enquiry-capture-dialog-head {
  margin-bottom: 0.3rem;
}

.enquiry-capture-dialog-head .page-kicker {
  margin-bottom: 0.1rem;
}

.enquiry-capture-dialog-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.enquiry-capture-location-dialog > .support-text {
  margin: 0 0 0.65rem;
}

.enquiry-capture-location-dialog .update-capture-map {
  min-height: 360px;
  height: min(54vh, 470px);
  border-radius: 10px;
}

.enquiry-capture-dialog-actions {
  margin-top: 0.7rem;
}

.enquiry-capture-dialog-actions .muted {
  margin: 0;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-capture-card,
.workspace-shell[data-party-theme="lib_dem"] .enquiry-capture-options,
.workspace-shell[data-party-theme="lib_dem"] .enquiry-capture-save-card {
  border-color: var(--ld-line);
  background: var(--ld-surface-strong);
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-capture-fields label,
.workspace-shell[data-party-theme="lib_dem"] .enquiry-capture-location-card label,
.workspace-shell[data-party-theme="lib_dem"] .enquiry-capture-more-options label,
.workspace-shell[data-party-theme="lib_dem"] .enquiry-capture-options > summary,
.workspace-shell[data-party-theme="lib_dem"] .enquiry-capture-location-dialog {
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-capture-options > summary span {
  color: var(--ld-ink-soft);
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-capture-options[open] > summary,
.workspace-shell[data-party-theme="lib_dem"] .enquiry-capture-more-options .app-accordion {
  border-color: var(--ld-line);
}

@media (max-width: 900px) {
  .workspace-shell .enquiry-capture-layout {
    grid-template-columns: 1fr;
  }

  .workspace-shell .enquiry-capture-save-card {
    position: static;
    order: -1;
  }
}

@media (max-width: 640px) {
  .workspace-shell .enquiry-capture-fields {
    grid-template-columns: 1fr;
  }

  .workspace-shell .enquiry-capture-span-full {
    grid-column: auto;
  }

  .enquiry-capture-location-dialog {
    width: calc(100vw - 1rem);
    padding: 0.75rem;
  }

  .enquiry-capture-dialog-actions {
    align-items: flex-start;
    flex-direction: column;
  }
}

.workspace-shell .issue-capture-fields input:not([type="checkbox"]),
.workspace-shell .issue-capture-fields textarea,
.workspace-shell .issue-capture-fields select {
  min-height: 40px;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  font-weight: 550;
}

.workspace-shell .issue-capture-fields input::placeholder,
.workspace-shell .issue-capture-fields textarea::placeholder {
  color: var(--ink-500);
  font-weight: 500;
  opacity: 1;
}

.workspace-shell .issue-capture-fields textarea {
  min-height: 5.5rem;
}

.workspace-shell .location-suggestions {
  min-height: 0;
}

.workspace-shell .location-suggestions:empty {
  display: none;
}

.workspace-shell .issue-capture-support {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 0.65rem;
  padding: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 24px rgba(146, 100, 20, 0.06);
}

.workspace-shell .issue-capture-support-head {
  margin: 0;
}

.workspace-shell .issue-capture-support-head h2 {
  font-size: 1rem;
}

.workspace-shell .issue-capture-actioner-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 34px;
  color: var(--ink-940);
  font-size: 0.78rem;
  font-weight: 780;
  justify-content: flex-start;
  white-space: nowrap;
}

.workspace-shell .issue-capture-actioner-toggle input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin: 0;
}

.workspace-shell .issue-capture-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  align-items: center;
}

.workspace-shell .issue-capture-option-toggle,
.workspace-shell .issue-capture-option-date {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 34px;
  color: var(--ink-940);
  font-size: 0.78rem;
  font-weight: 780;
  white-space: nowrap;
}

.workspace-shell .issue-capture-option-toggle input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin: 0;
}

.workspace-shell .issue-capture-option-date input[type="date"] {
  width: 9.4rem;
  min-height: 34px;
  padding: 0.3rem 0.5rem;
  border: 1px solid #c6d4e6;
  border-radius: 8px;
  background: #fff;
  color: var(--ink-940);
  font: inherit;
  font-weight: 550;
}

.workspace-shell .issue-capture-upload {
  display: inline-flex !important;
  align-items: center;
  justify-content: center !important;
  width: fit-content;
  min-width: 10.4rem;
  padding: 0 0.7rem;
  border: 1px solid rgba(146, 100, 20, 0.2);
  border-radius: 8px;
  background: rgba(255, 249, 236, 0.92);
  color: #754300 !important;
  cursor: pointer;
}

.workspace-shell .issue-capture-upload input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.workspace-shell .issue-capture-upload-list {
  display: grid;
  min-width: 0;
  gap: 0.35rem;
  margin: 0;
  overflow: hidden;
  color: var(--ink-620);
  font-size: 0.78rem;
  line-height: 1.25;
  list-style: none;
}

.workspace-shell .issue-capture-upload-list:empty {
  display: none;
}

.workspace-shell .issue-capture-upload-list li {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-shell .issue-capture-actioner-fields {
  display: grid;
  gap: 0.55rem;
}

.workspace-shell .issue-capture-actioner-fields[hidden] {
  display: none !important;
}

.workspace-shell .issue-capture-actioner-fields label {
  display: grid;
  gap: 0.3rem;
  color: var(--ink-940);
  font-size: 0.78rem;
  font-weight: 760;
}

.workspace-shell .issue-capture-actioner-fields label[hidden] {
  display: none !important;
}

.workspace-shell .issue-capture-actioner-fields .issue-capture-actioner-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  justify-content: flex-start;
}

.workspace-shell .issue-capture-actioner-fields input:not([type="checkbox"]),
.workspace-shell .issue-capture-actioner-fields select {
  width: 100%;
  min-height: 38px;
  padding: 0.35rem 0.55rem;
  border: 1px solid #c6d4e6;
  border-radius: 8px;
  background: #fff;
  color: var(--ink-940);
  font: inherit;
  font-weight: 550;
}

.workspace-shell .issue-capture-actioner-fields input[type="date"] {
  width: 9.4rem;
}

.workspace-shell .issue-capture-actioner {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
}

.workspace-shell .issue-capture-submit-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.workspace-shell .issue-capture-submit-actions .btn {
  width: 100%;
  justify-content: center;
}

.workspace-shell .issue-capture-upload-list {
  grid-column: 1 / -1;
}

.workspace-shell .issue-capture-submit {
  position: static;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.9);
}

.workspace-shell .issue-capture-submit .btn {
  width: 100%;
  justify-content: center;
}

.workspace-shell .issue-capture-page-actions {
  justify-content: flex-end;
}

.workspace-shell .issue-capture-options-panel {
  display: grid;
  gap: 0;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 24px rgba(146, 100, 20, 0.06);
}

.workspace-shell .issue-capture-options-panel-head {
  padding: 0.05rem 0 0.85rem;
}

.workspace-shell .issue-capture-options-panel-head h2 {
  margin: 0;
  color: var(--ink-940);
  font-size: 1.08rem;
}

.workspace-shell .issue-capture-option-section {
  display: grid;
  gap: 0.5rem;
  padding: 0.9rem 0;
  border-top: 1px solid rgba(146, 100, 20, 0.14);
}

.workspace-shell .issue-capture-option-copy {
  display: grid;
  gap: 0.55rem;
}

.workspace-shell .issue-capture-option-copy h3 {
  margin: 0;
  color: var(--ink-940);
  font-size: 0.84rem;
  font-weight: 800;
}

.workspace-shell .issue-capture-check-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 1.4rem;
  color: var(--ink-940);
  font-size: 0.82rem;
  font-weight: 650;
}

.workspace-shell .issue-capture-check-row input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin: 0;
  flex: 0 0 auto;
}

.workspace-shell .issue-capture-follow-up-field {
  display: grid;
  gap: 0.3rem;
  padding-top: 0.1rem;
  color: var(--ink-620);
  font-size: 0.76rem;
  font-weight: 760;
}

.workspace-shell .issue-capture-follow-up-field[hidden] {
  display: none !important;
}

.workspace-shell .issue-capture-follow-up-field input[type="date"] {
  width: 100%;
  min-height: 40px;
  padding: 0.4rem 0.55rem;
  border: 1px solid #c6d4e6;
  border-radius: 8px;
  background: #fff;
  color: var(--ink-940);
  font: inherit;
  font-weight: 550;
}

.workspace-shell .issue-capture-options-panel .issue-capture-upload {
  min-height: 38px;
  min-width: 0;
}

.workspace-shell .issue-capture-options-panel .issue-capture-actioner-fields {
  margin-top: 0.15rem;
}

.workspace-shell .issue-capture-options-panel .issue-capture-actioner-fields .issue-capture-check-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.workspace-shell .issue-capture-layout {
  grid-template-columns: minmax(0, 1.6fr) minmax(24rem, 0.8fr);
}

.workspace-shell .issue-capture-main-card,
.workspace-shell .issue-capture-options-panel {
  border-color: rgba(255, 255, 255, 0.84);
  background: #fff;
  box-shadow: 0 16px 30px rgba(146, 100, 20, 0.08);
}

.workspace-shell .issue-capture-main-card {
  padding: 1.25rem 1.35rem 1.35rem;
  border-radius: 16px;
}

.workspace-shell .issue-capture-card-head {
  margin-bottom: 1.1rem;
}

.workspace-shell .issue-capture-heading {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.workspace-shell .issue-capture-heading h2 {
  margin: 0;
}

.workspace-shell .issue-capture-heading-icon {
  display: inline-grid;
  width: 2.45rem;
  height: 2.45rem;
  place-items: center;
  border-radius: 0.7rem;
  background: #fff1cf;
  color: #b36a00;
}

.workspace-shell .issue-capture-heading-icon svg,
.workspace-shell .issue-capture-option-icon svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.workspace-shell .issue-capture-heading-icon-options {
  background: #fff1cf;
}

.workspace-shell .issue-capture-fields {
  gap: 0.85rem;
}

.workspace-shell .issue-capture-fields label {
  gap: 0.35rem;
}

.workspace-shell .issue-capture-fields textarea {
  min-height: 12.5rem;
  padding-bottom: 2rem;
}

.workspace-shell .issue-capture-summary-wrap {
  position: relative;
  display: block;
}

.workspace-shell .issue-capture-summary-count {
  position: absolute;
  right: 0.75rem;
  bottom: 0.65rem;
  color: var(--ink-500);
  font-size: 0.72rem;
  font-weight: 650;
  pointer-events: none;
}

.workspace-shell .issue-capture-options-panel {
  padding: 1.35rem 1.45rem;
  border-radius: 16px;
}

.workspace-shell .issue-capture-options-panel-head {
  padding: 0 0 0.85rem;
}

.workspace-shell .issue-capture-options-panel-head h2 {
  font-size: 1.08rem;
}

.workspace-shell .issue-capture-option-section {
  grid-template-columns: 2.75rem minmax(0, 1fr);
  gap: 0.75rem;
  padding: 1.2rem 0;
}

.workspace-shell .issue-capture-option-icon {
  display: inline-grid;
  width: 2.55rem;
  height: 2.55rem;
  place-items: center;
  border-radius: 50%;
  background: #fff4db;
  color: #a75c00;
}

.workspace-shell .issue-capture-option-icon-privacy {
  background: #e6f5f0;
  color: #17745f;
}

.workspace-shell .issue-capture-option-icon-follow-up {
  background: #e9f3ff;
  color: #286cb5;
}

.workspace-shell .issue-capture-option-icon-attachments {
  background: #f1ecff;
  color: #6d58b5;
}

.workspace-shell .issue-capture-option-icon-actioners {
  background: #fff0e4;
  color: #c55a00;
}

.workspace-shell .issue-capture-option-copy {
  gap: 0.45rem;
}

.workspace-shell .issue-capture-option-copy h3 {
  font-size: 0.86rem;
}

.workspace-shell .issue-capture-option-copy p {
  margin: 0;
  color: var(--ink-620);
  font-size: 0.76rem;
  line-height: 1.4;
}

.workspace-shell .issue-capture-follow-up-field {
  margin-top: 0.25rem;
}

.workspace-shell .issue-capture-page-actions .btn {
  min-height: 42px;
}

/* Issues workspace finder: keep the left rail compact and page through results. */
.portal-page-shell-issues .issue-finder {
  grid-template-rows: auto auto auto auto;
}

.portal-page-shell-issues .issue-finder .portal-finder-controls {
  gap: 0.5rem;
  margin-bottom: 0.7rem;
}

.portal-page-shell-issues .issue-finder .portal-toolbar-search,
.portal-page-shell-issues .issue-finder .portal-toolbar-select {
  min-height: 2.25rem;
  font-size: 0.78rem;
}

.portal-page-shell-issues .issue-finder .portal-finder-actions {
  gap: 0.45rem;
}

.portal-page-shell-issues .issue-finder .portal-finder-actions .btn {
  min-height: 2.1rem;
  padding: 0.4rem 0.65rem;
  font-size: 0.76rem;
}

.issue-finder-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  color: var(--ink-620);
  font-size: 0.72rem;
  font-weight: 700;
}

.issue-finder-page-actions {
  display: flex;
  gap: 0.35rem;
}

.issue-finder-page-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.9rem;
  min-height: 2rem;
  padding: 0.35rem 0.55rem;
  font-size: 0.72rem;
  text-decoration: none;
}

.issue-finder-page-button.is-disabled {
  pointer-events: none;
  opacity: 0.48;
}

/* Issues workspace: desktop reference layout. */
.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues {
  padding: 0;
  max-width: none;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-thread-workspace {
  grid-template-columns: 264px minmax(0, 1fr);
  min-height: calc(100vh - 76px);
  background: rgba(255, 255, 255, 0.7);
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .thread-finder {
  position: static;
  align-self: stretch;
  max-height: none;
  padding: 2rem 0.75rem 1rem;
  border: 0;
  border-right: 1px solid rgba(24, 43, 68, 0.09);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: none;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .thread-finder-head {
  margin: 0 0 1.15rem;
  padding: 0 0.3rem;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .thread-finder-head h2 {
  font-size: 0.96rem;
  font-weight: 800;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .thread-finder-head span {
  color: var(--ld-muted);
  font-size: 0.78rem;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-finder .portal-finder-controls {
  gap: 0.8rem;
  margin: 0 0 1rem;
}

.issue-finder-search {
  position: relative;
  display: block;
}

.issue-finder-search .portal-toolbar-search {
  padding-right: 2.5rem !important;
}

.issue-finder-search svg {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  width: 1rem;
  height: 1rem;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--ink-620);
  stroke-linecap: round;
  stroke-width: 2;
  pointer-events: none;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-finder .portal-toolbar-search,
.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-finder .portal-toolbar-select {
  min-height: 2.7rem;
  border-color: rgba(30, 50, 75, 0.12);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ld-ink);
  font-size: 0.78rem;
  font-weight: 700;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-finder .portal-toolbar-search::placeholder {
  color: var(--ld-muted);
  font-weight: 600;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-finder .portal-finder-actions {
  gap: 0.7rem;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-finder .portal-finder-actions .btn {
  min-height: 2.45rem;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 800;
}

/* Match the rendered primary finder action width used by Enquiries and Activity. */
.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-finder .issue-finder-primary-action {
  inline-size: 6.3rem;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-finder-pagination {
  margin: -0.25rem 0 0.7rem;
  padding: 0 0.15rem;
  font-size: 0.68rem;
}

/* Finder pages are capped at four records. Keep the footer in normal flow so
   it cannot overlap the last result when the browser viewport is shortened. */
.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .thread-finder,
.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .thread-finder {
  display: flex;
  flex-direction: column;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .thread-finder-list,
.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .thread-finder-list {
  flex: 0 0 auto;
  min-height: auto;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-finder-pagination,
.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .enquiry-finder-pagination {
  flex: 0 0 auto;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-finder-page-button {
  min-height: 1.85rem;
  min-width: 3.5rem;
  border-radius: 5px;
  font-size: 0.68rem;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .thread-finder-list {
  gap: 0;
  overflow: visible;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .thread-finder-row {
  gap: 0.55rem;
  padding: 0.85rem 0.65rem;
  border: 0;
  border-bottom: 1px solid rgba(24, 43, 68, 0.08);
  border-left: 3px solid transparent;
  border-radius: 0;
  background: transparent;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .thread-finder-row.is-active {
  border-left-color: #f0ae22;
  background: linear-gradient(90deg, rgba(255, 248, 226, 0.94), rgba(255, 243, 206, 0.72));
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .thread-finder-row:hover {
  border-left-color: #f0ae22;
  background: rgba(255, 247, 225, 0.62);
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .thread-finder-row-main strong {
  color: var(--ld-ink);
  font-size: 0.76rem;
  font-weight: 800;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .thread-finder-row-main span,
.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .thread-finder-row-meta,
.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .thread-finder-row-meta small,
.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .thread-finder-row-meta span {
  color: var(--ld-muted);
  font-size: 0.68rem;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .thread-finder-row-tags .badge {
  min-height: 1.2rem;
  padding: 0.08rem 0.4rem;
  border-radius: 4px;
  font-size: 0.58rem;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .thread-main {
  gap: 1.2rem;
  padding: 1.1rem 2rem 2rem;
  background: rgba(255, 255, 255, 0.56);
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .thread-header {
  align-items: start;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .thread-header h1 {
  margin: 0;
  color: var(--ld-ink);
  font-size: clamp(1.35rem, 1.8vw, 1.7rem);
  line-height: 1.2;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .thread-header .support-text {
  margin: 0.45rem 0 0;
  color: var(--ld-muted);
  font-size: 0.78rem;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .thread-header-actions .btn {
  min-height: 2.4rem;
  border-radius: 6px;
  font-size: 0.78rem;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-record-strip {
  grid-template-columns: 1.1fr 1.1fr 0.9fr 1.25fr 0.85fr 0.7fr;
  gap: 0;
  padding: 1rem;
  border: 1px solid rgba(31, 53, 79, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 26px rgba(32, 50, 78, 0.05);
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-record-strip div,
.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-record-strip div:nth-child(3n + 1) {
  padding: 0 0.85rem;
  border-left-color: rgba(31, 53, 79, 0.1);
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-record-strip div:first-child {
  padding-left: 0;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-record-strip dt {
  margin-bottom: 0.4rem;
  color: #806f4a;
  font-size: 0.58rem;
  letter-spacing: 0.04em;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-record-strip dd {
  color: var(--ld-ink);
  font-size: 0.72rem;
  font-weight: 800;
}

.issue-record-date,
.issue-record-status {
  display: flex;
  align-items: start;
  gap: 0.4rem;
}

.issue-record-date svg {
  width: 0.9rem;
  height: 0.9rem;
  margin-top: 0.05rem;
  flex: 0 0 auto;
  fill: none;
  stroke: #37495f;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.issue-record-date span {
  display: grid;
  gap: 0.1rem;
}

.issue-record-date small {
  color: var(--ld-ink);
  font: inherit;
}

.issue-record-status > span {
  width: 0.55rem;
  height: 0.55rem;
  margin-top: 0.18rem;
  border-radius: 50%;
  background: #0e9f6e;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .portal-workspace-tabs {
  gap: 0.3rem;
  border-bottom-color: rgba(31, 53, 79, 0.1);
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .portal-tab-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  min-height: 2.85rem;
  padding: 0 0.72rem;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--ld-ink);
  font-size: 0.72rem;
  font-weight: 750;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .portal-tab-pill.is-active {
  border-bottom-color: #f0ae22;
  background: transparent;
}

.portal-page-shell-issues .portal-tab-pill svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-desktop-grid {
  grid-template-columns: minmax(0, 1.55fr) minmax(250px, 0.9fr);
  gap: 1.2rem;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-desktop-main,
.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-desktop-side {
  gap: 1rem;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .thread-block {
  padding: 1rem;
  border: 1px solid rgba(31, 53, 79, 0.07);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 11px 24px rgba(32, 50, 78, 0.045);
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .thread-block-head {
  margin-bottom: 0.8rem;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .thread-block-head h2 {
  color: var(--ld-ink);
  font-size: 0.86rem;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-description-card > p {
  color: var(--ld-ink);
  font-size: 0.76rem;
  line-height: 1.5;
}

.issue-activity-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: start;
}

.issue-activity-summary-icon {
  display: grid;
  width: 1.9rem;
  height: 1.9rem;
  place-items: center;
  border-radius: 50%;
  background: #fff0d7;
  color: #d97706;
}

.issue-activity-summary-icon svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.issue-activity-summary-copy {
  min-width: 0;
}

.issue-activity-summary-copy strong {
  display: block;
  color: var(--ld-ink);
  font-size: 0.72rem;
}

.issue-activity-summary-copy p {
  margin: 0.38rem 0 0;
  color: var(--ld-muted);
  font-size: 0.7rem;
  line-height: 1.45;
}

.issue-activity-summary-meta {
  display: grid;
  gap: 0.28rem;
  justify-items: end;
  color: var(--ld-muted);
  font-size: 0.64rem;
  white-space: nowrap;
}

.issue-activity-summary-meta time {
  color: var(--ld-muted);
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-contact-card {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-contact-card .issue-compact-list {
  grid-template-columns: 1fr;
  gap: 0.45rem;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-contact-card .issue-compact-list div {
  grid-template-columns: minmax(8.2rem, 0.9fr) minmax(0, 1.1fr);
  padding: 0.55rem 0.6rem;
  border: 1px solid rgba(31, 53, 79, 0.06);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.76);
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-contact-card dt {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  color: #806f4a;
  font-size: 0.58rem;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-contact-card dd {
  color: var(--ld-ink);
  font-size: 0.67rem;
  font-weight: 800;
}

.issue-contact-icon {
  display: grid;
  width: 1.15rem;
  height: 1.15rem;
  place-items: center;
  border-radius: 50%;
  background: #fff3df;
  color: #c85f05;
  font-size: 0.8rem;
  font-weight: 900;
}

.issue-contact-icon svg {
  width: 0.7rem;
  height: 0.7rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.issue-contact-icon-casework {
  background: #fff8e8;
  color: #d97706;
}

.issue-contact-icon-reference {
  background: #fff3df;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-static-map-card {
  border-color: rgba(31, 53, 79, 0.14);
  border-radius: 6px;
  background: #f7f7f6;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-static-map-card img {
  aspect-ratio: 16 / 8;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-static-map-copy {
  padding: 0.7rem;
  background: rgba(255, 255, 255, 0.9);
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-static-map-copy strong {
  font-size: 0.72rem;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-static-map-copy span {
  font-size: 0.66rem;
}

/* The issue workspace is a light surface, including its in-place editor. */
.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-inline-edit-panel {
  max-height: min(78vh, 46rem);
  overflow-y: auto;
  padding: 1rem;
  border-color: rgba(31, 53, 79, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--ld-ink);
  box-shadow: 0 22px 46px rgba(32, 50, 78, 0.16);
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-inline-edit-panel form {
  gap: 0.72rem;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-inline-edit-grid {
  gap: 0.62rem;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-inline-edit-grid label,
.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-inline-check {
  color: var(--ld-ink);
  font-size: 0.72rem;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-inline-edit-grid input,
.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-inline-edit-grid select,
.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-inline-edit-grid textarea {
  min-height: 2.35rem;
  border-color: rgba(31, 53, 79, 0.16);
  background: #ffffff;
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-inline-edit-grid textarea {
  min-height: 5rem;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-inline-edit-grid input::placeholder,
.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-inline-edit-grid textarea::placeholder {
  color: var(--ld-muted);
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-inline-edit-grid select {
  color-scheme: light;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-inline-check input[type="checkbox"] {
  border-color: rgba(31, 53, 79, 0.35);
  background: #ffffff;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-inline-check input[type="checkbox"]::before {
  background: #0e9f6e;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-inline-edit-actions {
  margin-top: 0.15rem;
  padding-top: 0.7rem;
  border-top: 1px solid rgba(31, 53, 79, 0.1);
}

/* Enquiries workspace: the same light, compact working surface as Issues. */
.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-work .enquiry-thread-workspace {
  grid-template-columns: 264px minmax(0, 1fr);
  min-height: calc(100vh - 76px);
  margin: -1rem -1.75rem -2rem;
  background: rgba(255, 255, 255, 0.7);
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .thread-finder {
  position: static;
  align-self: start;
  height: auto;
  max-height: none;
  grid-template-rows: auto auto auto;
  padding: 2rem 0.75rem 1rem;
  border: 0;
  border-right: 1px solid rgba(24, 43, 68, 0.09);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: none;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .thread-finder-head {
  margin: 0 0 1.15rem;
  padding: 0 0.3rem;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .thread-finder-head h2 {
  font-size: 0.96rem;
  font-weight: 800;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .thread-finder-head span {
  color: var(--ld-muted);
  font-size: 0.78rem;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-finder .portal-finder-controls {
  gap: 0.8rem;
  margin: 0 0 1rem;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-finder .portal-toolbar-search,
.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-finder .portal-toolbar-select {
  min-height: 2.7rem;
  border-color: rgba(30, 50, 75, 0.12);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ld-ink);
  font-size: 0.78rem;
  font-weight: 700;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-finder .portal-toolbar-search::placeholder {
  color: var(--ld-muted);
  font-weight: 600;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-finder .portal-finder-actions {
  gap: 0.7rem;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-finder .portal-finder-actions .btn {
  min-height: 2.45rem;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 800;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .thread-finder-list {
  gap: 0;
  overflow: visible;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .thread-finder-row {
  gap: 0.55rem;
  padding: 0.85rem 0.65rem;
  border: 0;
  border-bottom: 1px solid rgba(24, 43, 68, 0.08);
  border-left: 3px solid transparent;
  border-radius: 0;
  background: transparent;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .thread-finder-row.is-active {
  border-left-color: #f0ae22;
  background: linear-gradient(90deg, rgba(255, 248, 226, 0.94), rgba(255, 243, 206, 0.72));
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .thread-finder-row:hover {
  border-left-color: #f0ae22;
  background: rgba(255, 247, 225, 0.62);
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .thread-finder-row-main strong {
  color: var(--ld-ink);
  font-size: 0.76rem;
  font-weight: 800;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .thread-finder-row-main span,
.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .thread-finder-row-meta,
.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .thread-finder-row-meta small,
.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .thread-finder-row-meta span {
  color: var(--ld-muted);
  font-size: 0.68rem;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .thread-finder-row-tags .badge {
  min-height: 1.2rem;
  padding: 0.08rem 0.4rem;
  border-radius: 4px;
  font-size: 0.58rem;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .thread-main {
  gap: 1.2rem;
  padding: 1.1rem 2rem 2rem;
  background: rgba(255, 255, 255, 0.56);
}

.enquiry-finder-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.65rem;
  padding: 0 0.15rem;
}

.enquiry-finder-page-actions {
  display: flex;
  gap: 0.35rem;
}

.enquiry-finder-page-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.5rem;
  min-height: 1.85rem;
  padding: 0.32rem 0.55rem;
  border-radius: 5px;
  font-size: 0.68rem;
  text-decoration: none;
}

.enquiry-finder-page-button.is-disabled {
  visibility: hidden;
  pointer-events: none;
}

.enquiry-record-position {
  color: var(--ld-ink);
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .thread-header {
  align-items: start;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .thread-header h1 {
  margin: 0;
  color: var(--ld-ink);
  font-size: clamp(1.35rem, 1.8vw, 1.7rem);
  line-height: 1.2;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .thread-header .support-text {
  margin: 0.45rem 0 0;
  color: var(--ld-muted);
  font-size: 0.78rem;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .thread-header-actions .btn {
  min-height: 2.4rem;
  border-radius: 6px;
  font-size: 0.78rem;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-record-strip {
  grid-template-columns: 1.1fr 1.1fr 0.9fr 1.25fr 0.85fr 0.7fr;
  gap: 0;
  padding: 1rem;
  border: 1px solid rgba(31, 53, 79, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 26px rgba(32, 50, 78, 0.05);
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-record-strip div,
.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-record-strip div:nth-child(3n + 1) {
  padding: 0 0.85rem;
  border-left-color: rgba(31, 53, 79, 0.1);
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-record-strip div:first-child {
  padding-left: 0;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-record-strip dt {
  margin-bottom: 0.4rem;
  color: #806f4a;
  font-size: 0.58rem;
  letter-spacing: 0.04em;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-record-strip dd {
  color: var(--ld-ink);
  font-size: 0.72rem;
  font-weight: 800;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .portal-workspace-tabs {
  gap: 0.3rem;
  border-bottom-color: rgba(31, 53, 79, 0.1);
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .portal-tab-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  min-height: 2.85rem;
  padding: 0 0.72rem;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--ld-ink);
  font-size: 0.72rem;
  font-weight: 750;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .portal-tab-pill.is-active {
  border-bottom-color: #f0ae22;
  background: transparent;
}

.enquiry-thread-workspace .portal-tab-pill svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-desktop-grid {
  grid-template-columns: minmax(0, 1.55fr) minmax(250px, 0.9fr);
  gap: 1.2rem;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-desktop-main,
.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-desktop-side {
  gap: 1rem;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .thread-block {
  padding: 1rem;
  border: 1px solid rgba(31, 53, 79, 0.07);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 11px 24px rgba(32, 50, 78, 0.045);
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .thread-block-head {
  margin-bottom: 0.8rem;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .thread-block-head h2 {
  color: var(--ld-ink);
  font-size: 0.86rem;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .thread-block-head p,
.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .empty-state,
.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-description-card > p {
  color: var(--ld-muted);
  font-size: 0.74rem;
  line-height: 1.5;
}

.enquiry-overview-footer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .enquiry-overview-footer {
  margin-top: 1.2rem;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .enquiry-overview-summary-card {
  padding: 0.85rem 1rem;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .enquiry-overview-summary-card .thread-block-head {
  align-items: center;
  margin-bottom: 0.55rem;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .enquiry-overview-summary-card .thread-block-head h2 {
  font-size: 0.8rem;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .enquiry-overview-summary-action {
  padding: 0;
  border: 0;
  background: transparent;
  color: #8a590f;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .enquiry-overview-summary-action:hover {
  color: #553606;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .enquiry-overview-summary-action:focus-visible {
  outline: 2px solid rgba(222, 151, 21, 0.62);
  outline-offset: 2px;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .enquiry-overview-preview-list {
  display: grid;
  gap: 0;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .enquiry-overview-concern-preview,
.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .enquiry-overview-activity-preview {
  min-width: 0;
  padding: 0.6rem 0;
  border-top: 1px solid rgba(31, 53, 79, 0.08);
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .enquiry-overview-preview-list > :first-child {
  padding-top: 0;
  border-top: 0;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .enquiry-overview-preview-list > :last-child {
  padding-bottom: 0;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .enquiry-overview-concern-preview h3 {
  margin: 0;
  color: var(--ld-ink);
  font-size: 0.78rem;
  line-height: 1.35;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .enquiry-overview-concern-preview p,
.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .enquiry-overview-activity-preview p {
  display: -webkit-box;
  margin: 0.24rem 0 0;
  overflow: hidden;
  color: var(--ld-ink-soft);
  font-size: 0.72rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .enquiry-overview-preview-meta,
.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .enquiry-overview-activity-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.5rem;
  align-items: center;
  margin-top: 0.35rem;
  color: var(--ld-muted);
  font-size: 0.64rem;
  font-weight: 700;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .enquiry-overview-activity-head {
  justify-content: space-between;
  margin-top: 0;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .enquiry-overview-activity-head span {
  display: inline;
  overflow: visible;
  color: #8a590f;
  font-size: 0.64rem;
  font-weight: 800;
  line-height: 1.2;
  -webkit-box-orient: initial;
  -webkit-line-clamp: unset;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .enquiry-overview-activity-head time,
.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .enquiry-overview-activity-preview small {
  color: var(--ld-muted);
  font-size: 0.64rem;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .enquiry-overview-activity-preview small {
  display: block;
  margin-top: 0.28rem;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .enquiry-overview-footer .empty-state {
  margin: 0;
  font-size: 0.72rem;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .enquiry-overview-footer .thread-record-card p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .enquiry-recent-activity-list div {
  border-top-color: rgba(31, 53, 79, 0.08);
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .enquiry-recent-activity-list span {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ld-ink);
  font-size: 0.74rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .enquiry-recent-activity-list .activity-kind,
.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .enquiry-recent-activity-list time {
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .enquiry-recent-activity-list time {
  color: var(--ld-muted);
  font-size: 0.66rem;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-contact-card {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-contact-card .issue-compact-list {
  grid-template-columns: 1fr;
  gap: 0.45rem;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-contact-card .issue-compact-list div {
  grid-template-columns: minmax(8.2rem, 0.9fr) minmax(0, 1.1fr);
  padding: 0.55rem 0.6rem;
  border: 1px solid rgba(31, 53, 79, 0.06);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.76);
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-contact-card dt {
  color: #806f4a;
  font-size: 0.58rem;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-contact-card dd {
  color: var(--ld-ink);
  font-size: 0.67rem;
  font-weight: 800;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-contact-card .issue-compact-list .enquiry-linked-contact-row {
  grid-template-columns: minmax(8.2rem, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-contact-card .enquiry-linked-contact-value {
  display: flex;
  align-items: center;
  justify-self: start;
  width: fit-content;
  max-width: 100%;
  flex-wrap: wrap;
  gap: 0.22rem 0.5rem;
  min-width: 0;
  margin: 0;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .enquiry-linked-contact-item {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  margin: 0;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .enquiry-linked-contact-value > span:not(.enquiry-linked-contact-item),
.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .enquiry-linked-contact-name {
  display: inline;
  margin: 0;
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .enquiry-unlink-contact-control {
  display: inline-flex;
  margin: 0;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .enquiry-link-contact-trigger {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  min-height: 0;
  flex: 0 0 auto;
  margin-left: 0.45rem;
  padding: 0 0.08rem;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #a85f00;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .enquiry-link-contact-trigger:hover,
.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .enquiry-link-contact-trigger[aria-expanded="true"] {
  background: transparent;
  color: #784300;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .enquiry-link-contact-trigger:focus-visible {
  outline: 2px solid rgba(222, 151, 21, 0.62);
  outline-offset: 2px;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .enquiry-unlink-contact-trigger {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  margin-left: 0.34rem;
  padding: 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #a85f00;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .enquiry-unlink-contact-trigger:hover {
  color: #9b3131;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .enquiry-unlink-contact-trigger:focus-visible {
  outline: 2px solid rgba(155, 49, 49, 0.55);
  outline-offset: 2px;
}

.enquiry-link-contact-panel {
  width: 100%;
  max-width: 100%;
  margin-top: 0.5rem;
  padding: 0.6rem;
  border: 1px solid rgba(31, 53, 79, 0.14);
  border-radius: 7px;
  background: #ffffff;
  box-sizing: border-box;
  box-shadow: 0 14px 30px rgba(32, 50, 78, 0.16);
}

.enquiry-link-contact-panel[hidden] {
  display: none !important;
}

.enquiry-link-contact-panel form {
  display: grid;
  gap: 0.5rem;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.enquiry-link-contact-panel form label {
  display: grid;
  gap: 0.22rem;
  color: var(--ld-ink);
  font-size: 0.65rem;
  font-weight: 800;
}

.enquiry-link-contact-panel form select {
  width: 100%;
  min-height: 2rem;
  border: 1px solid rgba(31, 53, 79, 0.16);
  border-radius: 5px;
  background: #ffffff;
  color: var(--ld-ink);
}

.enquiry-link-contact-panel .checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.38rem;
}

.enquiry-link-contact-panel .btn {
  justify-self: start;
  min-height: 2rem;
  padding: 0.3rem 0.55rem;
  font-size: 0.68rem;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-static-map-card {
  border-color: rgba(31, 53, 79, 0.14);
  border-radius: 6px;
  background: #f7f7f6;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-static-map-card img {
  aspect-ratio: 16 / 8;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-static-map-copy {
  padding: 0.7rem;
  background: rgba(255, 255, 255, 0.9);
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-static-map-copy strong {
  font-size: 0.72rem;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-static-map-copy span {
  font-size: 0.66rem;
}

/* Enquiries inherits the portal light theme inside its in-place editor. */
.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-inline-edit-panel {
  max-height: min(78vh, 46rem);
  overflow-y: auto;
  padding: 1rem;
  border-color: rgba(31, 53, 79, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--ld-ink);
  box-shadow: 0 22px 46px rgba(32, 50, 78, 0.16);
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-inline-edit-panel form {
  gap: 0.72rem;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-inline-edit-grid {
  gap: 0.62rem;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-inline-edit-grid label,
.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-inline-check,
.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .portal-fieldset,
.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .portal-check-row {
  color: var(--ld-ink);
  font-size: 0.72rem;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-inline-edit-grid input,
.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-inline-edit-grid select,
.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-inline-edit-grid textarea {
  min-height: 2.35rem;
  border-color: rgba(31, 53, 79, 0.16);
  background: #ffffff;
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-inline-edit-grid textarea {
  min-height: 5rem;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-inline-edit-grid input::placeholder,
.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-inline-edit-grid textarea::placeholder {
  color: var(--ld-muted);
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-inline-edit-grid select {
  color-scheme: light;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .portal-fieldset {
  border-color: rgba(31, 53, 79, 0.14);
  background: rgba(247, 248, 250, 0.74);
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .portal-check-row input[type="checkbox"] {
  accent-color: #0e9f6e;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-inline-check input[type="checkbox"] {
  border-color: rgba(31, 53, 79, 0.35);
  background: #ffffff;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-inline-check input[type="checkbox"]::before {
  background: #0e9f6e;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-inline-edit-actions {
  margin-top: 0.15rem;
  padding-top: 0.7rem;
  border-top: 1px solid rgba(31, 53, 79, 0.1);
}

@media (max-width: 980px) {
  .workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-thread-workspace,
  .workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-desktop-grid {
    grid-template-columns: 1fr;
  }

  .workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .thread-finder {
    border-right: 0;
    border-bottom: 1px solid rgba(24, 43, 68, 0.09);
  }

  .workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-record-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-work .enquiry-thread-workspace,
  .workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-desktop-grid,
  .enquiry-overview-footer {
    grid-template-columns: 1fr;
  }

  .workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .thread-finder {
    border-right: 0;
    border-bottom: 1px solid rgba(24, 43, 68, 0.09);
  }

  .workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-record-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .workspace-shell .issue-capture-page {
    max-width: none;
  }

  .workspace-shell .issue-capture-core,
  .workspace-shell .issue-capture-support {
    grid-template-columns: 1fr;
  }

  .workspace-shell .issue-capture-settings-grid,
  .workspace-shell .issue-capture-submit-actions,
  .workspace-shell .issue-capture-submit {
    grid-template-columns: 1fr;
  }
}

/* Issue workspace: notes.  This follows the native note-thread hierarchy while
   keeping the desktop workspace calm enough for one long working record. */
.issue-notes-workbench {
  padding: 1rem !important;
  border-color: rgba(31, 53, 79, 0.1);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 28px rgba(46, 38, 20, 0.04);
}

.issue-notes-workbench > .issue-notes-heading {
  margin-bottom: 0.85rem;
}

.issue-notes-heading h2 {
  margin: 0;
  font-size: 1rem;
}

.issue-notes-heading p {
  margin: 0.38rem 0 0;
  color: var(--ink-620);
  font-size: 0.79rem;
  line-height: 1.4;
}

.issue-notes-heading > .record-add-menu {
  margin-left: auto;
}

.record-email-activity-dialog-card {
  width: min(560px, 100%);
}

.record-email-activity-forwarding > p,
.record-email-activity-detail,
.record-email-activity-sender {
  margin: 0;
  color: var(--ink-620);
  font-size: 0.8rem;
  line-height: 1.5;
}

.record-email-activity-forwarding > p + .record-email-activity-address {
  margin-top: 0.85rem;
}

.record-email-activity-forwarding .record-email-activity-detail {
  margin-top: 0.7rem;
}

.record-email-activity-status {
  margin: 0 0 0.18rem;
  color: #9a5b00;
  font-size: 0.67rem;
  font-weight: 850;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.record-email-activity-address {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.record-email-activity-address code {
  flex: 1 1 auto;
  min-width: 0;
  overflow: auto;
  padding: 0.6rem 0.65rem;
  border: 1px solid #d5e3dc;
  border-radius: 7px;
  background: #f1fbf6;
  color: #0d7656;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.74rem;
  font-weight: 750;
  white-space: nowrap;
}

.record-email-activity-address .btn {
  flex: 0 0 auto;
}

.record-email-activity-review-form {
  display: grid;
  gap: 0.72rem;
}

.record-email-activity-review-form textarea {
  min-height: 250px;
  resize: vertical;
}

.record-email-activity-review-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.record-email-activity-review-details label:first-child {
  grid-column: 1 / -1;
}

.record-email-activity-review-details label {
  min-width: 0;
}

.record-email-activity-edit-details {
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: var(--surface-soft);
}

.record-email-activity-edit-details summary {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  align-items: center;
  gap: 0.58rem;
  padding: 0.66rem 0.72rem;
  color: var(--ink-940);
  cursor: pointer;
  list-style: none;
}

.record-email-activity-edit-details summary::-webkit-details-marker {
  display: none;
}

.record-email-activity-edit-details summary:hover {
  background: color-mix(in srgb, var(--accent-soft) 48%, var(--surface-soft));
}

.record-email-activity-edit-icon {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.record-email-activity-edit-icon svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.record-email-activity-edit-copy {
  display: grid;
  min-width: 0;
  gap: 0.08rem;
}

.record-email-activity-edit-copy strong {
  color: var(--ink-940);
  font-size: 0.75rem;
}

.record-email-activity-edit-details[open] {
  background: var(--surface);
}

.record-email-activity-edit-details[open] .record-email-activity-review-details {
  margin: 0;
  padding: 0.72rem;
  border-top: 1px solid var(--line-soft);
}

.record-email-activity-review-form fieldset {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0.7rem;
  border: 1px solid #e7dfd1;
  border-radius: 7px;
}

.record-email-activity-review-form legend {
  padding: 0 0.2rem;
  color: var(--ink-720);
  font-size: 0.76rem;
  font-weight: 800;
}

.record-email-activity-review-form fieldset label {
  color: var(--ink-760);
  font-size: 0.76rem;
}

.record-email-activity-attachment-option {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem;
  min-height: 2.65rem;
}

.record-email-activity-attachment-option img {
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid var(--line-200);
  border-radius: 5px;
  object-fit: cover;
}

.record-email-activity-attachment-option span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.record-email-activity-embedded-attachments {
  padding: 0.72rem 0.78rem;
  border: 1px solid var(--line-200);
  border-radius: 7px;
  background: var(--surface-soft);
}

.record-email-activity-embedded-attachments summary {
  color: var(--ink-720);
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
}

.record-email-activity-embedded-attachments p {
  margin: 0.5rem 0;
  color: var(--ink-620);
  font-size: 0.74rem;
  line-height: 1.45;
}

.record-email-activity-embedded-attachments .record-email-activity-attachment-option + .record-email-activity-attachment-option {
  margin-top: 0.38rem;
}

@media (max-width: 620px) {
  .record-email-activity-review-details {
    grid-template-columns: 1fr;
  }

  .record-email-activity-review-details label:first-child {
    grid-column: auto;
  }

  .record-email-activity-address {
    align-items: stretch;
    flex-direction: column;
  }

  .record-email-activity-address code {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

.issue-notes-timeline {
  gap: 0.72rem;
  padding-left: 0;
}

.issue-notes-timeline::before {
  display: none;
}

.issue-note-avatar {
  left: 1rem;
  top: 1rem;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #fff1d6;
  color: #c27000;
}

.issue-note-row:nth-child(3n + 2) .issue-note-avatar,
.issue-note-row:nth-child(3n) .issue-note-avatar {
  background: #fff1d6;
  color: #c27000;
}

.issue-note-avatar svg {
  width: 19px;
  height: 19px;
}

.issue-note-avatar.issue-note-avatar-feedback,
.issue-note-row:nth-child(3n + 2) .issue-note-avatar.issue-note-avatar-feedback,
.issue-note-row:nth-child(3n) .issue-note-avatar.issue-note-avatar-feedback {
  background: #e7f6ef;
  color: #14845b;
}

.issue-note-card {
  gap: 0.56rem;
  padding: 1rem 1rem 1rem 5.15rem;
  border-color: #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

.issue-note-card-title {
  gap: 0.55rem;
}

.issue-note-card time {
  color: var(--ink-940);
  font-size: 0.77rem;
  font-weight: 800;
}

.issue-note-card .badge.neutral {
  border-color: #d7e3ff;
  background: #eef4ff;
  color: #2758bf;
  font-size: 0.63rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.issue-note-avatar.issue-note-avatar-email,
.issue-note-row:nth-child(3n + 2) .issue-note-avatar.issue-note-avatar-email,
.issue-note-row:nth-child(3n) .issue-note-avatar.issue-note-avatar-email {
  top: 0.72rem;
  background: #eaf2ff;
  color: #2468c5;
}

.issue-email-card {
  gap: 0.22rem;
  padding: 0.66rem 0.9rem 0.66rem 4.25rem;
  border-color: #d9e4f1;
  background: #ffffff;
}

.issue-note-card .issue-email-badge {
  border: 1px solid #c9ddfb;
  border-radius: 4px;
  padding: 0.18rem 0.42rem;
  background: #eef5ff;
  color: #2468c5;
  font-size: 0.63rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.issue-email-preview {
  display: grid;
  gap: 0.12rem;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.issue-email-preview strong {
  overflow: hidden;
  color: var(--ink-940);
  font-size: 0.88rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.issue-email-preview > span {
  overflow: hidden;
  color: var(--ink-620);
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.issue-email-preview:hover strong,
.issue-email-preview:focus-visible strong {
  color: var(--accent-strong);
}

.issue-email-dialog-card {
  width: min(780px, 100%);
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.issue-email-dialog-sheet {
  position: relative;
  overflow: hidden;
  border: 1px solid #eadcc5;
  border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(255, 250, 239, 0.98) 0%, rgba(255, 253, 248, 0.98) 57%, rgba(249, 252, 255, 0.98) 100%);
  box-shadow: 0 28px 70px rgba(34, 30, 20, 0.24);
}

.issue-email-dialog-sheet::before,
.issue-email-dialog-sheet::after {
  position: absolute;
  z-index: 0;
  width: 13rem;
  height: 13rem;
  border-radius: 50%;
  background: rgba(255, 181, 29, 0.13);
  content: "";
  pointer-events: none;
}

.issue-email-dialog-sheet::before {
  top: -9rem;
  right: -6rem;
}

.issue-email-dialog-sheet::after {
  bottom: -11rem;
  left: -7rem;
}

.issue-email-dialog-card .issue-email-dialog-header {
  margin: 0;
  padding: 1.25rem 1.3rem 1rem;
  border-bottom: 0;
  background: transparent;
}

.issue-email-dialog-title {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 0.65rem;
}

.issue-email-dialog-sheet > * {
  position: relative;
  z-index: 1;
}

.issue-email-dialog-icon {
  display: grid;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: #eef5ff;
  color: #2468c5;
}

.issue-email-dialog-icon svg {
  width: 19px;
  height: 19px;
}

.issue-email-dialog-kicker {
  margin: 0 0 0.16rem;
  color: var(--ink-620);
  font-size: 0.67rem;
  font-weight: 850;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.issue-email-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0 1.3rem;
  padding: 0.78rem 0.95rem;
  overflow: hidden;
  border: 1px solid #e3e9f0;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.9);
}

.issue-email-details div {
  min-width: 0;
  padding: 0 0.85rem;
}

.issue-email-details div:first-child {
  padding-left: 0;
  border-right: 1px solid #e3e9f0;
}

.issue-email-details div:last-child {
  padding-right: 0;
}

.issue-email-details dt {
  color: var(--ink-620);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.issue-email-details dd {
  overflow-wrap: anywhere;
  margin: 0.16rem 0 0;
  color: var(--ink-860);
  font-size: 0.8rem;
  line-height: 1.4;
}

.issue-email-message {
  margin: 0.9rem 1.3rem 1.15rem;
  padding: 0.9rem 1rem 1rem;
  border: 1px solid #e3e9f0;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.9);
}

.issue-email-message h4 {
  margin: 0 0 0.45rem;
  color: var(--ink-720);
  font-size: 0.76rem;
}

.issue-email-body {
  max-height: min(46vh, 500px);
  overflow: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink-860);
  font-size: 0.85rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

.issue-email-attachments {
  display: grid;
  gap: 0.38rem;
  margin: -0.3rem 1.3rem 1.15rem;
  padding: 0.78rem 1rem;
  border: 1px solid #e3e9f0;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.9);
}

.issue-email-attachments h4 {
  margin: 0;
  color: var(--ink-860);
  font-size: 0.78rem;
}

.issue-email-attachments a {
  overflow-wrap: anywhere;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 750;
}

@media (max-width: 620px) {
  .issue-email-dialog-card {
    width: min(100%, 780px);
  }

  .issue-email-dialog-card .issue-email-dialog-header,
  .issue-email-details,
  .issue-email-message,
  .issue-email-attachments {
    margin-right: 0.85rem;
    margin-left: 0.85rem;
  }

  .issue-email-dialog-card .issue-email-dialog-header {
    padding-right: 0.85rem;
    padding-left: 0.85rem;
  }

  .issue-email-details {
    grid-template-columns: 1fr;
  }
}

.issue-note-card p {
  font-size: 0.84rem;
  line-height: 1.55;
}

.issue-note-facts {
  gap: 0.42rem;
}

.issue-note-facts span {
  color: var(--ink-620);
  font-size: 0.72rem;
  font-weight: 700;
}

.issue-note-tags {
  display: flex;
  gap: 0.38rem;
  flex-wrap: wrap;
}

.issue-note-tags span {
  padding: 0.22rem 0.45rem;
  border-radius: 4px;
  background: #f4f6f9;
  color: #526176;
  font-size: 0.67rem;
  font-weight: 800;
}

.issue-note-menu {
  position: relative;
  flex: 0 0 auto;
}

.issue-note-menu-trigger {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  padding: 0;
  border: 1px solid #dfe6ee;
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink-720);
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.issue-note-thread-summary > summary::-webkit-details-marker {
  display: none;
}

.issue-note-menu.is-open .issue-note-menu-trigger {
  border-color: #f1bf69;
  background: #fffaf0;
  color: #a95f00;
}

.issue-note-menu-panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 40;
  display: grid;
  min-width: 150px;
  padding: 0.35rem;
  border: 1px solid #dfe6ee;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.14);
}

.issue-note-menu-panel[hidden] {
  display: none;
}

.issue-note-menu-panel .issue-note-edit > summary,
.issue-note-menu-panel > form .issue-note-action-link {
  display: block;
  width: 100%;
  padding: 0.48rem 0.55rem;
  border-radius: 5px;
  color: var(--ink-940);
  font-size: 0.78rem;
  font-weight: 750;
  text-align: left;
}

.issue-note-menu-action {
  display: block;
  width: 100%;
  padding: 0.48rem 0.55rem;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--ink-940);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 750;
  text-align: left;
  cursor: pointer;
}

.issue-note-menu-panel .issue-note-edit > summary:hover,
.issue-note-menu-panel > form .issue-note-action-link:hover,
.issue-note-menu-action:hover {
  background: #f6f8fb;
}

.issue-note-menu-panel > form {
  margin: 0;
}

.issue-note-menu-panel > form .issue-note-delete {
  color: #aa3434;
}

.issue-note-edit form {
  top: -0.35rem;
  right: calc(100% + 0.45rem);
  width: min(520px, calc(100vw - 3rem));
}

.issue-note-dialog {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.issue-note-dialog[hidden] {
  display: none;
}

.issue-note-dialog-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(21, 29, 41, 0.28);
  cursor: default;
}

.issue-note-dialog-card {
  position: relative;
  z-index: 1;
  width: min(620px, 100%);
  max-height: calc(100vh - 3rem);
  overflow: auto;
  padding: 1rem;
  border: 1px solid #dbe5ef;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 24px 58px rgba(15, 23, 42, 0.22);
}

.issue-note-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e7edf4;
}

.issue-note-dialog-header h3 {
  margin: 0;
  color: var(--ink-940);
  font-size: 1rem;
}

.issue-note-dialog-card form {
  display: grid;
  gap: 0.72rem;
  margin: 0;
}

.issue-note-dialog-card label {
  display: grid;
  gap: 0.32rem;
  color: var(--ink-720);
  font-size: 0.78rem;
  font-weight: 800;
}

.issue-note-dialog-card textarea {
  min-height: 128px;
  resize: none;
}

.issue-note-dialog-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.72rem;
}

.issue-note-dialog-fields[hidden] {
  display: none;
}

.issue-note-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  margin-top: 0.2rem;
  padding-top: 0.8rem;
  border-top: 1px solid #e7edf4;
}

.record-add-menu {
  position: relative;
  flex: 0 0 auto;
}

.record-add-menu-trigger::after {
  content: "▾";
  margin-left: 0.12rem;
  font-size: 0.7rem;
  line-height: 1;
}

.record-add-menu.is-open > .record-add-menu-trigger {
  filter: brightness(1.05);
}

.record-add-menu-panel {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  z-index: 50;
  display: grid;
  width: min(248px, calc(100vw - 2rem));
  gap: 0.18rem;
  padding: 0.45rem;
  border: 1px solid rgba(226, 138, 0, 0.25);
  border-radius: 10px;
  background: #fffdf8;
  box-shadow: 0 16px 32px rgba(104, 68, 16, 0.18);
}

.record-add-menu-panel[hidden] {
  display: none;
}

.record-add-menu--up .record-add-menu-panel {
  top: auto;
  bottom: calc(100% + 0.4rem);
}

.record-add-menu-panel > form {
  margin: 0;
}

.record-add-menu-heading {
  margin: 0.12rem 0.38rem 0.28rem;
  color: var(--ink-620);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.record-add-menu-choice {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  align-items: center;
  gap: 0.58rem;
  width: 100%;
  min-height: 3.15rem;
  padding: 0.45rem 0.5rem;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-940);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.record-add-menu-choice:hover,
.record-add-menu-choice:focus-visible {
  outline: none;
  background: #fff1cf;
}

.record-add-menu-choice > span:last-child {
  display: grid;
  gap: 0.05rem;
}

.record-add-menu-choice strong {
  font-size: 0.8rem;
  font-weight: 850;
}

.record-add-menu-choice small {
  color: var(--ink-620);
  font-size: 0.7rem;
  font-weight: 650;
  line-height: 1.25;
}

.record-add-menu-icon {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 6px;
  background: #fff0cb;
  color: #b86200;
}

.record-add-menu-icon-email {
  background: #e8f5ef;
  color: #0d7656;
}

.record-add-menu-icon svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.portal-record-share-button {
  flex: 0 0 auto;
  min-width: 84px;
  margin-left: auto;
  align-self: center;
}

.record-share-dialog-card {
  width: min(720px, 100%);
}

.record-share-dialog-context {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid #e4ebf2;
  border-radius: 8px;
  background: #f8fbff;
  color: var(--ink-940);
}

.record-share-dialog-context strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.record-share-dialog-context span {
  flex: 0 0 auto;
  color: var(--ink-620);
  font-size: 0.78rem;
  font-weight: 800;
}

.record-share-dialog-note {
  margin: 0.7rem 0 0.85rem;
  color: var(--ink-620);
  font-size: 0.82rem;
  line-height: 1.45;
}

.record-share-content-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.record-share-content-options legend {
  grid-column: 1 / -1;
  margin-bottom: 0.05rem;
  color: var(--ink-760);
  font-size: 0.78rem;
  font-weight: 800;
}

.issue-note-dialog-card .record-share-content-option,
.issue-note-dialog-card .record-share-confirmation {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.58rem 0.65rem;
  border: 1px solid #e4ebf2;
  border-radius: 8px;
  background: #ffffff;
}

.issue-note-dialog-card .record-share-content-option input[type="checkbox"],
.issue-note-dialog-card .record-share-confirmation input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-height: 0;
  flex: 0 0 auto;
  margin: 0.1rem 0 0;
  padding: 0;
}

.record-share-content-option > span {
  display: grid;
  gap: 0.12rem;
  width: 100%;
}

.record-share-content-option small {
  color: var(--ink-620);
  font-size: 0.68rem;
  font-weight: 700;
}

.record-share-content-option.is-unavailable {
  background: #f4f7fa;
  color: var(--ink-500);
}

.issue-note-dialog-card .record-share-confirmation {
  align-items: center;
  background: #fff9ec;
  border-color: #f3d99f;
}

.record-share-dialog-card textarea {
  min-height: 82px;
}

.record-share-form-error {
  margin: 0;
}

.record-share-success {
  display: grid;
  gap: 0.5rem;
  color: var(--ink-940);
}

.record-share-success[hidden] {
  display: none;
}

.record-share-success > p {
  margin: 0;
  color: var(--ink-620);
}

@media (max-width: 700px) {
  .record-share-dialog-context {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.25rem;
  }

  .record-share-content-options {
    grid-template-columns: 1fr;
  }
}

.issue-note-status-options {
  border: 1px solid #e4ebf2;
  border-radius: 7px;
  background: #fafcff;
}

.issue-note-status-options > summary {
  padding: 0.58rem 0.68rem;
  color: var(--ink-720);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.issue-note-status-options > div {
  display: grid;
  gap: 0.5rem;
  padding: 0 0.68rem 0.68rem;
}

.issue-note-status-options .check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.issue-note-status-options .check input {
  width: auto;
}

@media (max-width: 560px) {
  .issue-note-dialog {
    padding: 0.75rem;
  }

  .issue-note-dialog-fields {
    grid-template-columns: 1fr;
  }
}

.issue-note-thread-summary {
  margin-top: 0.1rem;
  border: 1px solid #e1e9f3;
  border-radius: 7px;
  background: #f8fbff;
}

.issue-note-thread-summary > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.55rem 0.65rem;
  color: #3564aa;
  font-size: 0.78rem;
  font-weight: 800;
  list-style: none;
  cursor: pointer;
}

.issue-note-thread-summary > summary span:last-child {
  color: var(--ink-620);
  font-size: 0.74rem;
}

.issue-note-thread-list {
  display: grid;
  gap: 0.55rem;
  padding: 0 0.65rem 0.65rem 1rem;
}

.issue-note-thread-list article {
  display: grid;
  gap: 0.24rem;
  padding-left: 0.65rem;
  border-left: 2px solid #dce8f6;
}

.issue-note-thread-list time {
  color: var(--ink-620);
  font-size: 0.72rem;
  font-weight: 800;
}

.issue-note-thread-list p {
  font-size: 0.78rem;
  line-height: 1.45;
}

.issue-note-composer-bottom {
  width: auto;
  margin: 0.9rem 0 0;
}

.issue-notes-workbench > .issue-add-note-trigger {
  margin-top: 0.9rem;
}

.issue-add-note-trigger,
.workspace-shell[data-party-theme="lib_dem"] .issue-add-note-trigger {
  min-height: 36px;
  padding: 0 0.78rem;
  border-color: #efb54d;
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink-940);
  box-shadow: none;
}

.issue-add-note-trigger::before,
.workspace-shell[data-party-theme="lib_dem"] .issue-add-note-trigger::before {
  color: #bd6900;
}

.issue-note-composer[open] > .issue-add-note-trigger,
.workspace-shell[data-party-theme="lib_dem"] .issue-note-composer[open] > .issue-add-note-trigger {
  border-color: #e0a33d;
  background: #fff8e8;
  color: var(--ink-940);
}

@media (max-width: 760px) {
  .issue-notes-timeline {
    padding-left: 0;
  }

  .issue-note-avatar {
    left: 0.9rem;
    width: 32px;
    height: 32px;
  }

  .issue-note-composer-bottom {
    margin-left: 0;
  }

  .issue-note-edit form {
    right: auto;
    left: calc(-100vw + 4.5rem);
  }
}

/* Native-style record finder used by Issues, Enquiries, and Activity.  The
   controls stay fixed while exactly four compact records are visible; further
   filtered results scroll inside the list instead of becoming another page. */
@media (min-width: 981px) {
  .workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .thread-finder,
  .workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .thread-finder {
    align-self: start;
    height: auto;
    overflow: visible;
  }

  .workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-finder .portal-finder-controls,
  .workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-finder .portal-finder-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }

  .workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-finder-search,
  .workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .issue-finder .portal-finder-actions,
  .workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-finder-search,
  .workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .issue-finder .portal-finder-actions {
    grid-column: 1 / -1;
  }

  .workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues .thread-finder-list,
  .workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .thread-finder-list {
    display: grid;
    grid-auto-rows: 6.75rem;
    align-content: start;
    gap: 0.45rem;
    max-height: 28.35rem;
    padding: 0.1rem 0.2rem 0.1rem 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
}

.workspace-shell[data-party-theme="lib_dem"] .finder-record-card {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  min-height: 0;
  padding: 0.55rem;
  border: 1px solid rgba(30, 50, 75, 0.1);
  border-left: 3px solid transparent;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 6px 14px rgba(32, 50, 78, 0.035);
}

.workspace-shell[data-party-theme="lib_dem"] .finder-record-card:hover,
.workspace-shell[data-party-theme="lib_dem"] .finder-record-card.is-active {
  border-color: rgba(229, 157, 27, 0.6);
  border-left-color: #e59d1b;
  background: linear-gradient(90deg, #fffaf0, #ffffff);
  box-shadow: 0 7px 16px rgba(175, 112, 12, 0.08);
}

.workspace-shell[data-party-theme="lib_dem"] .finder-record-visual {
  display: grid;
  width: 4rem;
  height: 4rem;
  place-items: center;
  border-radius: 11px;
  background: #eef5ff;
  color: #1f73dc;
}

.workspace-shell[data-party-theme="lib_dem"] .finder-record-visual-issue { background: #edf5ff; color: #1672d8; }
.workspace-shell[data-party-theme="lib_dem"] .finder-record-visual-enquiry { background: #fff2df; color: #c87509; }
.workspace-shell[data-party-theme="lib_dem"] .finder-record-visual-activity { background: #f0edff; color: #6756bb; }

.workspace-shell[data-party-theme="lib_dem"] .finder-record-visual svg,
.workspace-shell[data-party-theme="lib_dem"] .finder-record-chevron {
  width: 1.45rem;
  height: 1.45rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.workspace-shell[data-party-theme="lib_dem"] .finder-record-copy {
  display: grid;
  min-width: 0;
  gap: 0.12rem;
}

.workspace-shell[data-party-theme="lib_dem"] .finder-record-copy strong,
.workspace-shell[data-party-theme="lib_dem"] .finder-record-location,
.workspace-shell[data-party-theme="lib_dem"] .finder-record-meta {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.workspace-shell[data-party-theme="lib_dem"] .finder-record-copy strong {
  color: var(--ld-ink);
  font-size: 0.76rem;
  line-height: 1.25;
  -webkit-line-clamp: 2;
}

.workspace-shell[data-party-theme="lib_dem"] .finder-record-location {
  color: var(--ld-muted);
  font-size: 0.66rem;
  line-height: 1.25;
  -webkit-line-clamp: 1;
}

.workspace-shell[data-party-theme="lib_dem"] .finder-record-meta {
  color: #806f4a;
  font-size: 0.61rem;
  font-weight: 700;
  line-height: 1.2;
  -webkit-line-clamp: 1;
}

.workspace-shell[data-party-theme="lib_dem"] .finder-record-status {
  justify-self: start;
  min-height: 1.12rem;
  padding: 0.06rem 0.34rem;
  border-radius: 4px;
  font-size: 0.56rem;
  line-height: 1;
}

.workspace-shell[data-party-theme="lib_dem"] .finder-record-chevron {
  width: 1rem;
  height: 1rem;
  color: var(--ld-muted);
}

@media (max-width: 980px) {
  .workspace-shell[data-party-theme="lib_dem"] .finder-record-card { grid-template-columns: 3.4rem minmax(0, 1fr) auto; }
  .workspace-shell[data-party-theme="lib_dem"] .finder-record-visual { width: 3.4rem; height: 3.4rem; }
}

/* Issue finder rows and controls share the Enquiries/Activity sizing above.
   Keep the following readability adjustments limited to the issue overview. */

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues [data-issue-panel="overview"] .thread-block-head h2 {
  font-size: 0.9rem;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues [data-issue-panel="overview"] .issue-description-card > p {
  font-size: 0.82rem;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues [data-issue-panel="overview"] .issue-activity-summary-copy strong {
  font-size: 0.78rem;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues [data-issue-panel="overview"] .issue-activity-summary-copy p {
  font-size: 0.76rem;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues [data-issue-panel="overview"] .issue-activity-summary-meta {
  font-size: 0.7rem;
}

/* Finder media and four-record sizing are shared by every role theme.  The
   Liberal Democrat palette above remains light; other roles retain the
   established Casework dark workspace palette rather than inheriting old,
   unbounded finder rows. */
.finder-record-visual {
  display: grid;
  overflow: hidden;
  place-items: center;
}

.finder-record-thumbnail {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.finder-record-visual svg,
.finder-record-chevron {
  width: 1.45rem;
  height: 1.45rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

@media (min-width: 981px) {
  .workspace-shell:not([data-party-theme="lib_dem"]) .portal-page-shell-issues .thread-finder,
  .workspace-shell:not([data-party-theme="lib_dem"]) .enquiry-thread-workspace .thread-finder {
    align-self: start;
    height: auto;
    overflow: visible;
  }

  .workspace-shell:not([data-party-theme="lib_dem"]) .portal-page-shell-issues .issue-finder .portal-finder-controls,
  .workspace-shell:not([data-party-theme="lib_dem"]) .enquiry-thread-workspace .issue-finder .portal-finder-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }

  .workspace-shell:not([data-party-theme="lib_dem"]) .portal-page-shell-issues .issue-finder-search,
  .workspace-shell:not([data-party-theme="lib_dem"]) .portal-page-shell-issues .issue-finder .portal-finder-actions,
  .workspace-shell:not([data-party-theme="lib_dem"]) .enquiry-thread-workspace .issue-finder-search,
  .workspace-shell:not([data-party-theme="lib_dem"]) .enquiry-thread-workspace .issue-finder .portal-finder-actions {
    grid-column: 1 / -1;
  }

  .workspace-shell:not([data-party-theme="lib_dem"]) .portal-page-shell-issues .thread-finder-list,
  .workspace-shell:not([data-party-theme="lib_dem"]) .enquiry-thread-workspace .thread-finder-list {
    display: grid;
    grid-auto-rows: 6.75rem;
    align-content: start;
    gap: 0.45rem;
    max-height: 28.35rem;
    padding: 0.1rem 0.2rem 0.1rem 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
}

.workspace-shell:not([data-party-theme="lib_dem"]) .finder-record-card {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  min-height: 0;
  padding: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-left: 3px solid transparent;
  border-radius: 9px;
  background: rgba(0, 22, 16, 0.28);
  box-shadow: none;
  color: rgba(255, 255, 255, 0.94);
}

.workspace-shell:not([data-party-theme="lib_dem"]) .finder-record-card:hover,
.workspace-shell:not([data-party-theme="lib_dem"]) .finder-record-card.is-active {
  border-color: rgba(74, 222, 128, 0.42);
  border-left-color: #4ade80;
  background: rgba(255, 255, 255, 0.08);
}

.workspace-shell:not([data-party-theme="lib_dem"]) .finder-record-visual {
  width: 4rem;
  height: 4rem;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.08);
  color: #86efac;
}

.workspace-shell:not([data-party-theme="lib_dem"]) .finder-record-visual-enquiry { color: #93c5fd; }
.workspace-shell:not([data-party-theme="lib_dem"]) .finder-record-visual-activity { color: #c4b5fd; }

.workspace-shell:not([data-party-theme="lib_dem"]) .finder-record-copy {
  display: grid;
  min-width: 0;
  gap: 0.12rem;
}

.workspace-shell:not([data-party-theme="lib_dem"]) .finder-record-copy strong,
.workspace-shell:not([data-party-theme="lib_dem"]) .finder-record-location,
.workspace-shell:not([data-party-theme="lib_dem"]) .finder-record-meta {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.workspace-shell:not([data-party-theme="lib_dem"]) .finder-record-copy strong {
  color: rgba(255, 255, 255, 0.96);
  font-size: 0.76rem;
  line-height: 1.25;
  -webkit-line-clamp: 2;
}

.workspace-shell:not([data-party-theme="lib_dem"]) .finder-record-location {
  color: rgba(225, 246, 236, 0.78);
  font-size: 0.66rem;
  line-height: 1.25;
  -webkit-line-clamp: 1;
}

.workspace-shell:not([data-party-theme="lib_dem"]) .finder-record-meta {
  color: rgba(201, 236, 215, 0.72);
  font-size: 0.61rem;
  font-weight: 700;
  line-height: 1.2;
  -webkit-line-clamp: 1;
}

.workspace-shell:not([data-party-theme="lib_dem"]) .finder-record-status {
  justify-self: start;
  min-height: 1.12rem;
  padding: 0.06rem 0.34rem;
  border-radius: 4px;
  font-size: 0.56rem;
  line-height: 1;
}

.workspace-shell:not([data-party-theme="lib_dem"]) .finder-record-chevron {
  width: 1rem;
  height: 1rem;
  color: rgba(225, 246, 236, 0.72);
}

@media (max-width: 980px) {
  .workspace-shell:not([data-party-theme="lib_dem"]) .finder-record-card { grid-template-columns: 3.4rem minmax(0, 1fr) auto; }
  .workspace-shell:not([data-party-theme="lib_dem"]) .finder-record-visual { width: 3.4rem; height: 3.4rem; }
}

/* Issue actions uses the same compact record language as Notes, while its
   create and edit forms remain bounded dialogs rather than inline panels. */
.issue-actions-workbench {
  display: grid;
  gap: 0.78rem;
}

.issue-actions-workbench > .issue-actions-heading {
  margin-bottom: 0;
}

.issue-actions-list {
  display: grid;
  gap: 0.65rem;
}

.issue-action-card {
  gap: 0.52rem;
}

.issue-actions-list .issue-action-timeline-row .issue-note-avatar {
  background: #fff1e7;
  color: #c45b08;
}

.issue-action-card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex-wrap: wrap;
}

.issue-action-card-title strong {
  color: var(--ink-940);
  font-size: 0.86rem;
  line-height: 1.35;
}

.issue-action-facts {
  margin: 0;
}

.issue-actions-empty {
  margin: 0;
}

.issue-actions-workbench > .issue-add-action-trigger {
  justify-self: start;
  margin-top: 0.1rem;
}

/* Enquiry concerns and actions share the compact record language used by the
   Issue Notes and Actions tabs.  The records remain separate because the
   stored enquiry model does not attach an action to a particular concern. */
.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .enquiry-items-workbench {
  display: grid;
  gap: 1rem;
}

.enquiry-items-section {
  display: grid;
  gap: 0.65rem;
}

.enquiry-items-section + .enquiry-items-section {
  padding-top: 0.9rem;
  border-top: 1px solid rgba(31, 53, 79, 0.09);
}

.enquiry-items-section-head h2 {
  margin: 0;
  color: var(--ink-940);
  font-size: 0.88rem;
}

.enquiry-item-list,
.enquiry-linked-issues-list {
  display: grid;
  gap: 0.58rem;
}

.enquiry-linked-issue-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
}

.enquiry-item-card {
  display: grid;
  gap: 0.46rem;
  padding: 0.82rem 0.9rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
}

.enquiry-item-card-head,
.enquiry-item-card-title,
.enquiry-item-facts,
.enquiry-items-section-actions {
  display: flex;
  align-items: center;
}

.enquiry-item-card-head {
  justify-content: space-between;
  gap: 0.7rem;
}

.enquiry-item-card-title {
  min-width: 0;
  gap: 0.48rem;
  flex-wrap: wrap;
}

.enquiry-item-card-title strong {
  color: var(--ink-940);
  font-size: 0.86rem;
  line-height: 1.35;
}

.enquiry-item-card > p {
  margin: 0;
  color: var(--ink-720);
  font-size: 0.8rem;
  line-height: 1.48;
}

.enquiry-item-facts {
  gap: 0.28rem 0.58rem;
  flex-wrap: wrap;
  color: var(--ink-620);
  font-size: 0.72rem;
  font-weight: 700;
}

.enquiry-item-facts a {
  color: #3564aa;
  text-decoration: none;
}

.enquiry-item-facts a:hover {
  text-decoration: underline;
}

.enquiry-action-status {
  font-size: 0.6rem;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.enquiry-action-status-todo {
  border-color: #d7e3ff;
  background: #eef4ff;
  color: #2758bf;
}

.enquiry-action-status-waiting {
  border-color: #f6d9a7;
  background: #fff7e9;
  color: #a95f00;
}

.enquiry-action-status-done {
  border-color: #b9e3ce;
  background: #eaf8f0;
  color: #14734e;
}

.enquiry-items-section > .issue-add-note-trigger {
  justify-self: start;
  margin-top: 0.08rem;
}

.enquiry-items-section-actions {
  gap: 0.5rem;
  flex-wrap: wrap;
}

.enquiry-linked-issues-list .thread-link-row {
  display: grid;
  gap: 0.2rem;
  padding: 0.62rem 0.72rem;
  border-color: #e2e8f0;
  background: #fbfcfe;
}

.enquiry-linked-issue-row form {
  margin: 0;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .enquiry-linked-issues-list .thread-link-row strong {
  color: var(--ink-940);
  font-size: 0.78rem;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-thread-workspace .enquiry-linked-issues-list .thread-link-row span {
  color: var(--ink-620);
  font-size: 0.7rem;
}

.issue-note-menu-action {
  text-decoration: none;
}

@media (max-width: 620px) {
  .enquiry-item-card-head {
    align-items: flex-start;
  }
}

/* The Activity tab is a factual record timeline.  It uses the same restrained
   cards and icon treatment as Notes, with no decorative controls that do not
   have a corresponding activity action. */
.issue-activity-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.34fr) minmax(290px, 0.66fr);
  gap: 0.9rem;
  align-items: start;
}

.issue-activity-workbench {
  display: grid;
  gap: 0.85rem;
}

.issue-activity-heading {
  margin: 0;
}

.issue-activity-heading-actions,
.issue-timeline-page-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.issue-timeline-page-status {
  color: var(--ink-620);
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.issue-activity-heading p {
  margin: 0.28rem 0 0;
  color: var(--ink-620);
  font-size: 0.8rem;
  line-height: 1.42;
}

.issue-activity-timeline {
  position: relative;
  display: grid;
  gap: 0.66rem;
}

.issue-activity-row {
  display: grid;
  grid-template-columns: 5.8rem 2.5rem minmax(0, 1fr);
  gap: 0.58rem;
  align-items: start;
}

.issue-activity-row > time {
  display: grid;
  gap: 0.08rem;
  padding-top: 0.82rem;
  color: var(--ink-620);
  font-size: 0.68rem;
  font-weight: 760;
  line-height: 1.25;
}

.issue-activity-row > time span,
.issue-activity-row > time small {
  display: block;
}

.issue-activity-row > time small {
  color: var(--ink-520);
  font-size: 0.66rem;
  font-weight: 700;
}

.issue-activity-avatar {
  position: relative;
  z-index: 1;
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  margin-top: 0.62rem;
  place-items: center;
  border-radius: 50%;
  background: #fff1d6;
  color: #c27000;
}

.issue-activity-row:not(.is-page-last) .issue-activity-avatar::after {
  position: absolute;
  z-index: -1;
  top: 2.25rem;
  bottom: -1.35rem;
  left: calc(50% - 0.5px);
  width: 1px;
  background: #e7eaf0;
  content: "";
}

.issue-activity-avatar svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.issue-activity-avatar-status {
  background: #e7f6ef;
  color: #14845b;
}

.issue-activity-avatar-note,
.issue-activity-avatar-details {
  background: #eef4ff;
  color: #2758bf;
}

.issue-activity-avatar-action {
  background: #fff1e7;
  color: #c45b08;
}

.issue-activity-avatar-attachment {
  background: #f1edff;
  color: #6952c5;
}

.issue-activity-avatar-location {
  background: #e7f6ef;
  color: #14845b;
}

.issue-activity-event-card {
  display: grid;
  gap: 0.34rem;
  min-width: 0;
  padding: 0.78rem 0.88rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
}

.issue-activity-kind {
  justify-self: start;
  font-size: 0.6rem;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.issue-activity-event-card strong {
  color: var(--ink-940);
  font-size: 0.84rem;
  line-height: 1.34;
}

.issue-activity-event-card p {
  margin: 0;
  color: var(--ink-720);
  font-size: 0.8rem;
  line-height: 1.48;
}

.issue-activity-side {
  gap: 0.78rem;
}

.issue-activity-side .thread-block {
  padding: 0.86rem;
}

@media (max-width: 980px) {
  .issue-activity-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .issue-activity-heading-actions {
    justify-content: flex-start;
  }

  .issue-activity-row {
    grid-template-columns: 2.15rem minmax(0, 1fr);
  }

  .issue-activity-row > time {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    gap: 0.35rem;
    padding: 0;
  }

  .issue-activity-avatar {
    grid-column: 1;
    grid-row: 1 / span 2;
    margin-top: 0;
  }

  .issue-activity-event-card {
    grid-column: 2;
    grid-row: 2;
  }
}

/* Contacts reference workspace: compact finder cards with the shared, four-row scroll treatment. */
.contact-workspace .thread-finder {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.contact-workspace .thread-finder-head,
.contact-workspace .portal-finder-controls,
.contact-workspace .contact-finder-actions {
  margin: 0;
}

.contact-workspace .thread-finder-list {
  overflow: hidden;
  scrollbar-gutter: auto;
}

.contact-search-field {
  position: relative;
  display: block;
}

.contact-search-field .portal-toolbar-search {
  padding-right: 2.45rem;
}

.contact-search-field svg {
  position: absolute;
  top: 50%;
  right: 0.8rem;
  width: 1rem;
  height: 1rem;
  color: #6c819f;
  fill: none;
  pointer-events: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
  transform: translateY(-50%);
}

.contact-main {
  gap: 1rem;
}

.contact-header {
  align-items: center;
}

.contact-header h1 {
  margin-top: 0;
}

.contact-header-email {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  margin-top: 0.48rem;
  color: var(--ink-720);
  font-size: 0.9rem;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.contact-header-email svg {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.contact-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(18rem, 0.74fr);
  gap: 0.9rem;
  align-items: start;
}

.contact-workspace-primary,
.contact-workspace-secondary {
  display: grid;
  gap: 0.9rem;
  min-width: 0;
}

.contact-workspace .thread-block {
  padding: 1rem;
}

.contact-workspace .thread-block-head {
  align-items: center;
  margin-bottom: 0.68rem;
}

.contact-workspace .thread-block-head h2 {
  color: var(--ink-940);
  font-size: 1rem;
}

.contact-link-count {
  color: var(--ink-620);
  font-size: 0.69rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-detail-list,
.contact-count-list {
  display: grid;
  margin: 0;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.contact-detail-list > div,
.contact-count-list > div {
  display: grid;
  align-items: center;
  min-width: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.contact-detail-list > div {
  grid-template-columns: minmax(9rem, 0.44fr) minmax(0, 1fr);
  gap: 0.9rem;
  padding: 0.64rem 0.1rem;
}

.contact-detail-list dt,
.contact-count-list dt {
  display: flex;
  align-items: center;
  gap: 0.52rem;
  min-width: 0;
  color: var(--ink-720);
  font-size: 0.82rem;
  font-weight: 700;
}

.contact-detail-list dd,
.contact-count-list dd {
  min-width: 0;
  margin: 0;
  color: var(--ink-940);
  font-size: 0.84rem;
  font-weight: 780;
  overflow-wrap: anywhere;
}

.contact-detail-list a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(184, 127, 14, 0.35);
  text-underline-offset: 0.16em;
}

.contact-detail-list .pre-line {
  white-space: pre-line;
}

.contact-field-icon {
  display: inline-flex;
  width: 1rem;
  justify-content: center;
  color: #8d6f35;
  font-size: 0.92rem;
  line-height: 1;
}

.contact-count-list > div {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  padding: 0.7rem 0.1rem;
}

.contact-count-list dd {
  text-align: right;
}

.contact-other-card .contact-detail-list > div {
  grid-template-columns: minmax(7rem, 0.48fr) minmax(0, 1fr);
}

.contact-created-card p {
  margin: 0;
  color: var(--ink-720);
  font-size: 0.84rem;
  font-weight: 700;
}

.contact-workspace .contact-data-rights-card {
  padding: 0.78rem 0.84rem;
}

.contact-data-rights-card .thread-block-head {
  margin-bottom: 0.45rem;
}

.contact-data-rights-card .thread-block-head h2 {
  font-size: 0.84rem;
}

.contact-data-rights-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.58rem;
}

.contact-data-rights-actions-compact {
  gap: 0.38rem;
}

.contact-data-rights-actions-compact .contact-guard-form {
  flex: 0 0 auto;
}

.contact-guard-form {
  margin: 0;
}

.contact-data-rights-actions-compact .contact-guard-form + .contact-guard-form {
  margin-top: 0;
}

.contact-data-rights-actions-compact .btn {
  min-height: 1.95rem;
  padding: 0.28rem 0.54rem;
  border-radius: 0.5rem;
  font-size: 0.72rem;
  font-weight: 760;
}

.contact-related-list {
  display: grid;
  gap: 0.5rem;
}

.contact-related-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.18rem 0.62rem;
  align-items: baseline;
  padding: 0.7rem 0.76rem;
  border: 1px solid rgba(191, 204, 222, 0.58);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink-940);
  text-decoration: none;
}

.contact-related-row:hover {
  border-color: rgba(242, 160, 0, 0.38);
  background: #fffaf0;
}

.contact-related-kind {
  grid-row: span 2;
  align-self: center;
  padding: 0.18rem 0.42rem;
  border-radius: 0.38rem;
  background: #eff6ff;
  color: #2758bf;
  font-size: 0.61rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.contact-related-row strong {
  min-width: 0;
  color: var(--ink-940);
  font-size: 0.84rem;
  line-height: 1.3;
}

.contact-related-row > span:not(.contact-related-kind) {
  grid-column: 2;
  color: var(--ink-720);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.contact-related-row time {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--ink-620);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.contact-all-links-trigger {
  margin-top: 0.62rem;
}

.contact-dialog {
  width: min(46rem, calc(100vw - 2rem));
  max-height: min(88vh, 48rem);
  margin: auto;
  padding: 0;
  border: 1px solid rgba(191, 204, 222, 0.88);
  border-radius: 1rem;
  background: #fffdf8;
  box-shadow: 0 26px 64px rgba(15, 51, 78, 0.25);
  color: var(--ink-940);
}

.contact-dialog::backdrop {
  background: rgba(19, 34, 55, 0.26);
}

.contact-dialog > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1rem;
  border-bottom: 1px solid rgba(191, 204, 222, 0.54);
}

.contact-dialog > header h2 {
  margin: 0;
  color: var(--ink-940);
  font-size: 1.05rem;
}

.contact-dialog-close {
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--ink-720);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.contact-dialog-close:hover {
  background: #fff1cf;
  color: var(--ink-940);
}

.contact-dialog-form {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
}

.contact-dialog-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.72rem;
}

.contact-dialog-fields label {
  display: grid;
  gap: 0.32rem;
  color: var(--ink-940);
  font-size: 0.8rem;
  font-weight: 750;
}

.contact-dialog-fields input,
.contact-dialog-fields textarea {
  width: 100%;
  border: 1px solid rgba(191, 204, 222, 0.9);
  border-radius: 0.65rem;
  background: #ffffff;
  color: var(--ink-940);
  font: inherit;
}

.contact-dialog-fields textarea {
  resize: vertical;
}

.contact-dialog-wide {
  grid-column: 1 / -1;
}

.contact-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(191, 204, 222, 0.5);
}

/* Contact history stays a bounded lookup surface even where a contact has a
   substantial record history.  These use the normal contact dialog mechanics
   rather than growing the reference workspace with raw document links. */
.contact-linked-records-dialog {
  width: min(54rem, calc(100vw - 2rem));
  height: min(48rem, calc(100dvh - 2rem));
  max-height: calc(100dvh - 2rem);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
}

/* This dialog has an author-level grid layout, so retain the native closed
   dialog behaviour explicitly rather than allowing it into the page flow. */
.contact-linked-records-dialog:not([open]) {
  display: none;
}

.contact-linked-records-dialog-heading {
  min-width: 0;
}

.contact-linked-records-dialog-heading p {
  margin: 0.22rem 0 0;
  color: var(--ink-620);
  font-size: 0.78rem;
  font-weight: 650;
}

.contact-linked-record-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  padding: 0.78rem 1rem;
  border-bottom: 1px solid rgba(191, 204, 222, 0.5);
}

.contact-linked-record-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  min-height: 2rem;
  padding: 0.3rem 0.62rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-720);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 760;
  cursor: pointer;
}

.contact-linked-record-filter span {
  min-width: 1.25rem;
  padding: 0.07rem 0.32rem;
  border-radius: 999px;
  background: var(--surface-tint);
  color: var(--ink-620);
  font-size: 0.68rem;
  text-align: center;
}

.contact-linked-record-filter:hover,
.contact-linked-record-filter:focus-visible,
.contact-linked-record-filter.is-active {
  border-color: color-mix(in srgb, var(--party-accent) 36%, var(--line));
  background: color-mix(in srgb, var(--party-accent) 10%, var(--surface));
  color: var(--ink-940);
  outline: none;
}

.contact-linked-record-filter.is-active span {
  background: color-mix(in srgb, var(--party-accent) 18%, var(--surface));
  color: var(--ink-940);
}

.contact-linked-records-scroll {
  display: grid;
  align-content: start;
  gap: 0.48rem;
  min-height: 0;
  overflow: auto;
  padding: 0.9rem 1rem 1rem;
  scrollbar-gutter: stable;
}

.contact-linked-record-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 0.2rem 0.65rem;
  align-items: center;
  min-width: 0;
  padding: 0.7rem 0.76rem;
  border: 1px solid rgba(191, 204, 222, 0.68);
  border-radius: 0.72rem;
  background: var(--surface);
  color: var(--ink-940);
  text-decoration: none;
}

.contact-linked-record-row:hover,
.contact-linked-record-row:focus-visible {
  border-color: color-mix(in srgb, var(--party-accent) 34%, var(--line));
  background: color-mix(in srgb, var(--party-accent) 5%, var(--surface));
  outline: none;
}

/* The row uses grid, which otherwise overrides the browser's default
   `[hidden] { display: none; }` rule when a record-type filter is selected. */
.contact-linked-record-row[hidden] {
  display: none !important;
}

.contact-linked-record-copy {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.contact-linked-record-copy strong {
  color: var(--ink-940);
  font-size: 0.84rem;
  line-height: 1.3;
}

.contact-linked-record-copy span {
  color: var(--ink-620);
  font-size: 0.76rem;
  overflow-wrap: anywhere;
}

.contact-linked-record-row time {
  color: var(--ink-620);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.contact-linked-record-chevron {
  width: 1rem;
  height: 1rem;
  color: var(--ink-620);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

@media (max-width: 1120px) {
  .contact-workspace-grid {
    grid-template-columns: 1fr;
  }

  .contact-workspace-secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-created-card {
    grid-column: 1 / -1;
  }

  .contact-data-rights-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .contact-workspace .thread-finder {
    height: auto;
    max-height: none;
  }

  .contact-workspace .thread-finder-list {
    overflow: visible;
  }

  .contact-workspace-secondary,
  .contact-dialog-fields {
    grid-template-columns: 1fr;
  }

  .contact-created-card {
    grid-column: auto;
  }

  .contact-data-rights-card {
    grid-column: auto;
  }

  .contact-detail-list > div {
    grid-template-columns: 1fr;
    gap: 0.24rem;
  }

  .contact-related-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .contact-related-row time {
    grid-column: 2;
    grid-row: auto;
    justify-self: start;
  }

  .contact-linked-record-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .contact-linked-record-row time {
    grid-column: 2;
    justify-self: start;
  }

  .contact-linked-record-chevron {
    grid-column: 3;
    grid-row: 1 / span 2;
  }
}

/* Keep the Map workspace after the legacy map rules in the cascade. */
.casework-map-workspace {
  grid-template-columns: 270px minmax(0, 1fr) 320px;
  min-height: calc(100vh - 76px);
  background: rgba(255, 255, 255, 0.62);
}

.casework-map-sidebar {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  align-self: stretch;
  gap: 0.78rem;
  min-height: 0;
  padding: 1.25rem 0.75rem 0.9rem;
  border: 0;
  border-right: 1px solid rgba(24, 43, 68, 0.09);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: none;
}

.casework-map-sidebar .thread-finder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 0 0.3rem;
}

.casework-map-sidebar .thread-finder-head h2,
.casework-map-list-main strong {
  color: var(--ink-940);
}

.casework-map-sidebar .thread-finder-head h2 {
  font-size: 0.96rem;
  font-weight: 800;
}

.casework-map-sidebar .thread-finder-head span,
.casework-map-list-main span,
.casework-map-list-meta span {
  color: var(--ink-620);
}

.casework-map-sidebar .thread-finder-head span {
  font-size: 0.72rem;
  font-weight: 750;
}

.casework-map-filters {
  gap: 0.5rem;
}

.casework-map-filters label {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  align-items: center;
  gap: 0.55rem;
  min-height: 2.35rem;
  padding: 0 0.7rem;
  border: 1px solid rgba(30, 50, 75, 0.12);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink-820);
  font-size: 0.72rem;
  font-weight: 800;
}

.casework-map-filters select {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink-940);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 750;
  text-align: right;
  box-shadow: none;
}

.casework-map-filters .portal-finder-actions {
  justify-content: flex-start;
  margin-top: 0.05rem;
}

.casework-map-list {
  align-content: start;
  min-height: 0;
  overflow: hidden;
  border-top: 1px solid rgba(24, 43, 68, 0.08);
}

.casework-map-list-row {
  gap: 0.38rem;
  min-height: 0;
  padding: 0.68rem 0.7rem;
  border: 0;
  border-bottom: 1px solid rgba(24, 43, 68, 0.08);
  border-left: 3px solid transparent;
  background: transparent;
  color: var(--ink-940);
}

.casework-map-list-row:hover,
.casework-map-list-row.is-active {
  border-left-color: #12a66c;
  background: linear-gradient(90deg, rgba(236, 252, 244, 0.94), rgba(255, 249, 230, 0.74));
}

.casework-map-list-main,
.casework-map-list-meta {
  gap: 0.18rem;
}

.casework-map-list-main strong {
  font-size: 0.73rem;
  line-height: 1.28;
}

.casework-map-list-main span,
.casework-map-list-meta span {
  font-size: 0.66rem;
  line-height: 1.3;
}

.casework-map-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.1rem;
  padding: 0;
  color: var(--ink-620);
  font-size: 0.72rem;
  font-weight: 700;
}

.casework-map-pager > div {
  display: flex;
  gap: 0.35rem;
}

.casework-map-page-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.9rem;
  min-height: 2rem;
  padding: 0.35rem 0.55rem;
  font-size: 0.72rem;
}

.casework-map-main {
  min-width: 0;
  padding: 0.7rem;
}

.casework-map-shell,
.casework-map-canvas {
  min-height: calc(100vh - 90px);
  background: #eef2f4;
}

.casework-map-shell {
  border: 1px solid rgba(24, 43, 68, 0.1);
  border-radius: 0.7rem;
  box-shadow: 0 16px 34px rgba(25, 44, 72, 0.07);
}

.casework-map-mode,
.casework-map-heat-mode {
  border-color: rgba(24, 43, 68, 0.1);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(25, 44, 72, 0.12);
}

.casework-map-mode button,
.casework-map-heat-mode button {
  color: var(--ink-720);
}

.casework-map-mode button:hover,
.casework-map-mode button.is-active,
.casework-map-heat-mode button:hover,
.casework-map-heat-mode button.is-active {
  background: #fff5d7;
  color: var(--ink-940);
}

.casework-map-heat-legend {
  border-color: rgba(24, 43, 68, 0.1);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink-820);
}

.casework-map-detail {
  display: grid;
  align-content: start;
  gap: 0.85rem;
  min-width: 0;
  padding: 0.7rem 0.85rem 0.85rem 0.15rem;
  border-left: 1px solid rgba(24, 43, 68, 0.07);
  background: rgba(255, 255, 255, 0.54);
}

.casework-map-selected,
.casework-map-nearby,
.casework-map-inspector {
  gap: 0.72rem;
  padding: 1rem;
  border: 1px solid rgba(24, 43, 68, 0.1);
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 30px rgba(25, 44, 72, 0.06);
}

.casework-map-nearby[hidden],
.casework-map-inspector[hidden] {
  display: none;
}

.casework-map-selected-head h2,
.casework-map-nearby h3,
.casework-map-inspector h3,
.casework-map-inspector-category strong,
.casework-map-inspector-stats strong {
  color: var(--ink-940);
}

.casework-map-selected-location,
.casework-map-selected-reference,
.casework-map-inspector p,
.casework-map-inspector-kicker,
.casework-map-inspector-category span,
.casework-map-inspector-stats span,
.casework-map-inspector-record span {
  color: var(--ink-620);
}

.casework-map-inspector-stats div,
.casework-map-inspector-record {
  background: #f7f9fc;
}

.casework-map-inspector-record {
  color: var(--ink-940);
}

.casework-map-workspace .leaflet-container {
  background: #eef2f4;
}

.casework-map-workspace .leaflet-popup-content-wrapper,
.casework-map-workspace .leaflet-popup-tip {
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(25, 44, 72, 0.16);
}

@media (max-width: 1240px) {
  .casework-map-workspace {
    grid-template-columns: 248px minmax(0, 1fr) 286px;
  }
}

@media (max-width: 980px) {
  .casework-map-workspace {
    grid-template-columns: 1fr;
  }

  .casework-map-sidebar,
  .casework-map-detail {
    border: 0;
    border-bottom: 1px solid rgba(24, 43, 68, 0.09);
  }

  .casework-map-sidebar {
    grid-template-rows: auto auto auto auto;
  }

  .casework-map-list {
    max-height: 32rem;
  }

  .casework-map-main,
  .casework-map-detail {
    padding: 0.75rem;
  }

  .casework-map-shell,
  .casework-map-canvas {
    min-height: 34rem;
  }
}

/* Settings uses the same restrained workspace language as Issues and Enquiries.
   Only real settings routes are shown: the contextual rail deliberately avoids
   mock-only navigation destinations. */
.settings-workspace {
  display: grid;
  grid-template-columns: minmax(12rem, 15rem) minmax(0, 1fr);
  min-height: calc(100vh - 8.5rem);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-context-rail {
  display: grid;
  align-content: start;
  gap: 1rem;
  padding: 2rem 1.15rem;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 31, 23, 0.18);
}

.settings-context-rail h2,
.settings-page-header h1,
.settings-card h2,
.settings-area-copy strong {
  color: #f5fff9;
}

.settings-context-rail h2 {
  margin: 0;
  font-size: 1.05rem;
}

.settings-context-link,
.settings-context-current {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.8rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.08);
  color: #f5fff9;
  font-size: 0.88rem;
  font-weight: 760;
  text-decoration: none;
}

.settings-context-link svg,
.settings-context-current svg,
.settings-back-link svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  flex: 0 0 auto;
}

.settings-context-link:hover,
.settings-context-link.is-active {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
}

.settings-context-divider {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.settings-content {
  display: grid;
  align-content: start;
  gap: 1.25rem;
  width: min(100%, 49rem);
  padding: 1.75rem 1.75rem 3.5rem;
}

.settings-back-link {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 0.4rem;
  min-height: 2.25rem;
  padding: 0 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.45rem;
  color: #f5fff9;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.82rem;
  font-weight: 760;
}

.settings-back-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.settings-page-header {
  display: grid;
  gap: 0.45rem;
}

.settings-page-header h1 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.15rem);
  letter-spacing: -0.035em;
}

.settings-page-header p,
.settings-card-head p,
.settings-empty-copy,
.settings-form-actions p,
.settings-area-copy small {
  margin: 0;
  color: rgba(245, 255, 249, 0.68);
  font-size: 0.86rem;
  line-height: 1.5;
}

.settings-card {
  display: grid;
  gap: 1rem;
  padding: 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 0.75rem;
  background: rgba(0, 42, 31, 0.58);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.11);
}

.settings-card h2 {
  margin: 0;
  font-size: 1rem;
}

.settings-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.settings-card-head > div {
  display: grid;
  gap: 0.25rem;
}

.settings-role-facts {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.95fr);
  margin: 0;
}

.settings-role-facts > div {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
  padding: 0.65rem 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.settings-role-facts > div:last-child {
  grid-column: 1 / -1;
}

.settings-role-facts dt {
  color: rgba(245, 255, 249, 0.63);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.settings-role-facts dd {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  color: #f5fff9;
  font-size: 0.88rem;
  font-weight: 730;
  line-height: 1.45;
}

.settings-theme-swatch {
  width: 0.66rem;
  height: 0.66rem;
  border-radius: 50%;
  background: var(--accent, #ffb21a);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #ffb21a) 20%, transparent);
}

.settings-theme-form {
  gap: 0.9rem;
}

.settings-theme-form label,
.settings-add-names-card label,
.settings-legacy-list label {
  display: grid;
  gap: 0.38rem;
  color: #f5fff9;
  font-size: 0.78rem;
  font-weight: 760;
}

.settings-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(10rem, 0.65fr);
  gap: 0.85rem;
}

.settings-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.settings-form-actions p {
  max-width: 34rem;
}

.settings-area-list,
.settings-legacy-list {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.settings-area-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  min-height: 2.8rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.045);
}

.settings-area-disclosure,
.settings-role-coverage {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.035);
}

.settings-area-disclosure summary,
.settings-role-coverage summary {
  padding: 0.72rem 0.8rem;
  color: #f5fff9;
  font-size: 0.85rem;
  font-weight: 760;
  cursor: pointer;
}

.settings-area-disclosure .settings-area-list {
  padding: 0 0.65rem 0.65rem;
}

.settings-role-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.settings-role-item {
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.6rem;
  background: rgba(255, 255, 255, 0.045);
}

.settings-role-item.is-current {
  border-color: color-mix(in srgb, var(--accent, #ffb21a) 54%, rgba(255, 255, 255, 0.15));
}

.settings-role-item-head,
.settings-role-badges,
.settings-role-actions,
.settings-role-theme-row,
.settings-role-picker,
.settings-add-role-submit {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.settings-role-item-head {
  justify-content: space-between;
}

.settings-role-item-head > div:first-child {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.settings-role-item h3 {
  margin: 0;
  color: #f5fff9;
  font-size: 0.92rem;
}

.settings-role-item p,
.settings-role-coverage p {
  margin: 0;
  color: rgba(245, 255, 249, 0.68);
  font-size: 0.82rem;
  line-height: 1.45;
}

.settings-role-badge {
  display: inline-flex;
  min-height: 1.45rem;
  align-items: center;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent, #ffb21a) 30%, transparent);
  color: #f5fff9;
  font-size: 0.68rem;
  font-weight: 850;
}

.settings-role-badge.is-muted {
  background: rgba(255, 255, 255, 0.11);
}

.settings-role-coverage p {
  padding: 0 0.8rem 0.75rem;
}

.settings-role-theme-row {
  justify-content: space-between;
}

.settings-role-theme-row label,
.settings-role-picker label {
  display: grid;
  flex: 1 1 12rem;
  gap: 0.35rem;
  color: #f5fff9;
  font-size: 0.76rem;
  font-weight: 760;
}

.settings-role-theme-row select,
.settings-role-picker select {
  width: 100%;
}

.settings-role-picker {
  align-items: end;
  flex-wrap: wrap;
}

.settings-add-role-submit {
  justify-content: space-between;
  padding-top: 0.15rem;
}

/* Roles is an account subpage: keep ordinary role switching visible while
   reserving the less frequent editor controls for a compact disclosure. */
.settings-role-content { width:min(100%,68rem); }
.settings-role-page-header { display:flex; align-items:start; justify-content:space-between; gap:1rem; }
.settings-role-page-header .page-kicker { margin:0 0 .28rem; color:rgba(245,255,249,.62); }
.settings-role-page-header .account-return-link { flex:0 0 auto; margin-top:.1rem; }
.settings-roles-card { gap:.75rem; }
.settings-role-compact .settings-role-list { gap:.5rem; }
.settings-role-compact .settings-role-item { gap:.5rem; padding:.7rem .75rem; }
.settings-role-compact .settings-role-item h3 { font-size:.86rem; }
.settings-role-compact .settings-role-item p { font-size:.76rem; }
.settings-role-compact .settings-role-coverage summary,.settings-role-compact .settings-role-options summary { padding:.48rem .6rem; font-size:.74rem; }
.settings-role-compact .settings-role-coverage p { padding:0 .6rem .55rem; font-size:.74rem; }
.settings-role-options { border:1px solid rgba(255,255,255,.12); border-radius:.45rem; background:rgba(255,255,255,.025); }
.settings-role-options summary { color:#f5fff9; cursor:pointer; font-weight:760; }
.settings-role-options .settings-role-theme-row { padding:.55rem .6rem .6rem; border-top:1px solid rgba(255,255,255,.1); }
.settings-role-compact .settings-role-theme-row label { font-size:.73rem; }
.settings-role-compact .settings-role-actions { gap:.45rem; }
.settings-role-item-footer { display:flex; align-items:center; justify-content:space-between; gap:.75rem; }
.settings-role-disclosures { display:flex; align-items:flex-start; gap:.7rem; min-width:0; }
.settings-role-compact .settings-role-disclosures > details { position:relative; border:0; border-radius:0; background:transparent; }
.settings-role-compact .settings-role-disclosures > details > summary { padding:0; color:rgba(245,255,249,.72); font-size:.72rem; font-weight:760; cursor:pointer; }
.settings-role-compact .settings-role-disclosures > details[open] > p,
.settings-role-compact .settings-role-disclosures > details[open] > .settings-role-covered-area-list,
.settings-role-compact .settings-role-disclosures > details[open] > .settings-role-theme-row { position:static; z-index:auto; width:max-content; max-width:min(28rem,calc(100vw - 3rem)); margin:.45rem 0 0; padding:.65rem .7rem; border:1px solid rgba(255,255,255,.18); border-radius:.45rem; background:#062b20; box-shadow:0 14px 28px rgba(0,0,0,.2); }
.settings-role-compact .settings-role-disclosures > details[open] > p,
.settings-role-compact .settings-role-disclosures > details[open] > .settings-role-covered-area-list { margin:0; color:rgba(245,255,249,.78); font-size:.74rem; line-height:1.4; }
.settings-role-compact .settings-role-disclosures > details[open] > .settings-role-covered-area-list { box-shadow:none; }
.settings-role-compact .settings-role-disclosures > details[open] > .settings-role-theme-row { display:flex; align-items:end; gap:.55rem; }
.settings-role-compact .settings-role-disclosures > details[open] > .settings-role-theme-row label { min-width:12rem; }
.settings-role-inline-action { min-height:0; margin:.38rem 0 0; padding:0; border:0; background:transparent; box-shadow:none; color:var(--accent,#ffb21a); cursor:pointer; font:inherit; font-size:.72rem; font-weight:800; line-height:1.2; }
.settings-role-inline-action:hover { text-decoration:underline; }
.settings-coverage-editor-modal { width:min(100% - 2rem,42rem); }
.settings-coverage-editor-body { max-height:min(68vh,34rem); overflow:auto; }
.settings-coverage-editor-modal .settings-role-coverage-editor { display:grid; grid-template-columns:minmax(9rem,1fr) minmax(11rem,1.2fr) auto; align-items:end; gap:.55rem; padding:.65rem 0; border-top:1px solid rgba(255,255,255,.1); }
.settings-coverage-editor-modal .settings-role-coverage-editor:first-child { padding-top:0; border-top:0; }
.settings-role-coverage-copy { display:grid; gap:.08rem; min-width:0; }
.settings-role-coverage-copy strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.76rem; }
.settings-role-coverage-copy small,.settings-role-coverage-editor label span { color:rgba(245,255,249,.64); font-size:.67rem; }
.settings-role-coverage-editor label { display:grid; gap:.18rem; min-width:0; }
.settings-role-coverage-editor input { min-height:1.9rem; padding:.32rem .45rem; font-size:.75rem; }
.settings-role-coverage-actions { display:flex; gap:.35rem; }
@media (max-width: 42rem) { .settings-coverage-editor-modal .settings-role-coverage-editor { grid-template-columns:1fr; } }
.settings-add-role-disclosure { gap:0; padding:0; }
.settings-add-role-disclosure > summary { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:.75rem .9rem; color:#f5fff9; cursor:pointer; list-style:none; }
.settings-add-role-disclosure > summary::-webkit-details-marker { display:none; }
.settings-add-role-disclosure > summary span { display:grid; gap:.15rem; }.settings-add-role-disclosure > summary strong { font-size:.9rem; }.settings-add-role-disclosure > summary small { color:rgba(245,255,249,.66); font-size:.74rem; }.settings-add-role-disclosure > summary b { font-size:1.25rem; transition:transform .16s ease; }.settings-add-role-disclosure[open] > summary b { transform:rotate(90deg); }
.settings-add-role-body { display:grid; gap:.75rem; padding:.75rem .9rem .9rem; border-top:1px solid rgba(255,255,255,.12); }
.settings-add-role-modal { width:min(100% - 2rem,48rem); max-height:calc(100vh - 2rem); overflow:auto; padding:0; border:1px solid rgba(255,255,255,.2); border-radius:.7rem; background:#062b20; color:#f5fff9; box-shadow:0 26px 70px rgba(0,0,0,.42); }
.settings-add-role-modal::backdrop { background:rgba(0,12,8,.68); backdrop-filter:blur(3px); }
.settings-add-role-modal header { display:flex; align-items:start; justify-content:space-between; gap:1rem; padding:.9rem 1rem .75rem; border-bottom:1px solid rgba(255,255,255,.13); }
.settings-add-role-modal header .page-kicker { margin:0 0 .2rem; color:rgba(245,255,249,.62); }.settings-add-role-modal header h2 { margin:0; font-size:1.05rem; }.settings-add-role-modal header p:last-child { margin:.2rem 0 0; color:rgba(245,255,249,.7); font-size:.78rem; }
.settings-dialog-close { display:grid; place-items:center; width:1.9rem; height:1.9rem; padding:0; border:1px solid rgba(255,255,255,.2); border-radius:50%; background:rgba(255,255,255,.06); color:inherit; cursor:pointer; font-size:1.2rem; }
.settings-add-role-modal .settings-add-role-body { padding:.9rem 1rem 1rem; border:0; }

.settings-check-row {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #f5fff9;
  font-size: 0.82rem;
  font-weight: 700;
}

/* Global form controls are intentionally generous. A settings checkbox is a
   compact choice control, so it must opt out of that full-width input rule. */
.settings-check-row input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  min-height: 1.05rem;
  margin: 0;
  padding: 0;
  flex: 0 0 1.05rem;
  accent-color: var(--accent, #ffb21a);
}

.settings-area-handle {
  width: 0.6rem;
  height: 1rem;
  opacity: 0.64;
  background-image: radial-gradient(circle, currentColor 1.2px, transparent 1.3px);
  background-position: 0 0, 0.3rem 0.3rem;
  background-size: 0.3rem 0.3rem;
  color: rgba(245, 255, 249, 0.8);
}

.settings-area-check {
  display: inline-grid;
  place-items: center;
  width: 1rem;
  height: 1rem;
  border-radius: 0.22rem;
  background: var(--accent, #ffb21a);
  color: #0c281e;
  font-size: 0.74rem;
  font-weight: 900;
}

.settings-area-copy {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.settings-legacy-card {
  gap: 0.8rem;
}

.settings-legacy-list li {
  padding: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.045);
}

/* Account popover: a real profile menu, with the active role theme carried
   onto workspace-popover-root by the existing positioning script. */
.workspace-popover-root .workspace-account-card {
  display: grid;
  gap: 0.15rem;
  width: min(17rem, calc(100vw - 2rem));
  padding: 0.65rem;
}

.workspace-popover-root .workspace-account-card[hidden] {
  display: none !important;
}

.workspace-popover-root .workspace-account-head {
  gap: 0.75rem;
  padding: 0.45rem 0.45rem 0.85rem;
  margin-bottom: 0.35rem;
}

.workspace-popover-root .workspace-account-head > .workspace-avatar {
  width: 3rem;
  height: 3rem;
  font-size: 1rem;
}

.workspace-popover-root .workspace-account-head strong {
  font-size: 0.95rem;
}

.workspace-popover-root .workspace-account-head small {
  font-size: 0.78rem;
}

.workspace-popover-root .workspace-account-link {
  display: grid;
  grid-template-columns: 1.15rem minmax(0, 1fr);
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  min-height: 2.45rem;
  padding: 0 0.55rem;
  border-radius: 0.4rem;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
}

.workspace-popover-root .workspace-account-link-icon {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.workspace-popover-root[data-party-theme="lib_dem"] .workspace-account-card {
  border-color: rgba(217, 119, 6, 0.22);
  background: rgba(255, 255, 255, 0.99);
  box-shadow: 0 22px 55px rgba(146, 64, 14, 0.18);
}

.workspace-popover-root[data-party-theme="lib_dem"] .workspace-account-head {
  border-bottom-color: rgba(217, 119, 6, 0.18);
}

.workspace-popover-root[data-party-theme="lib_dem"] .workspace-account-head > .workspace-avatar {
  background: #fff1cf;
  box-shadow: 0 8px 18px rgba(146, 64, 14, 0.13);
}

.workspace-popover-root[data-party-theme="lib_dem"] .workspace-account-link {
  color: #1f2937;
}

.workspace-popover-root[data-party-theme="lib_dem"] .workspace-account-link:hover,
.workspace-popover-root[data-party-theme="lib_dem"] .workspace-account-link.is-active {
  background: #fff1cf;
  color: #7c2d12;
}

.workspace-popover-root[data-party-theme="lib_dem"] .workspace-account-link-logout {
  margin-top: 0.25rem;
  border-top: 1px solid rgba(217, 119, 6, 0.16);
  border-radius: 0.35rem;
}

/* Account profile is an account overview, not another generic settings form.
   Use the role theme variables so party and custom roles carry their colour
   into this account surface. */
.account-profile-page {
  display: grid;
  gap: 1.45rem;
  width: min(100%, 94rem);
  margin: 0 auto;
  padding: 2.15rem 0 3.2rem;
  color: #f5fff9;
}

.account-profile-header {
  display: grid;
  gap: 0.35rem;
}

.account-profile-header .page-kicker {
  margin: 0;
  color: rgba(245, 255, 249, 0.65);
}

.account-profile-header h1,
.account-profile-card h2,
.account-profile-card h3 {
  margin: 0;
  color: inherit;
}

.account-profile-header h1 {
  font-size: clamp(2.1rem, 3vw, 2.8rem);
}

.account-profile-header > p:last-child,
.account-profile-card p,
.account-profile-card small {
  margin: 0;
  color: rgba(245, 255, 249, 0.7);
}

.account-profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(17rem, 0.74fr);
  gap: 1.25rem;
  align-items: start;
}

.account-profile-main,
.account-profile-aside {
  display: grid;
  gap: 1.25rem;
}

.account-profile-card {
  display: grid;
  gap: 1.1rem;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.8rem;
  background: rgba(1, 41, 30, 0.5);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.13);
}

.account-profile-identity {
  display: flex;
  align-items: center;
  gap: 1.15rem;
}

.account-profile-avatar {
  display: grid;
  place-items: center;
  width: 5.65rem;
  height: 5.65rem;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 2rem;
  font-weight: 850;
  flex: 0 0 auto;
}

.account-profile-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 72%;
}

.account-profile-identity h2 {
  font-size: 1.45rem;
}

.account-profile-identity p {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  margin-top: 0.35rem;
}

.account-profile-identity small {
  display: block;
  margin-top: 0.28rem;
}

.account-profile-status {
  display: inline-flex;
  align-items: center;
  min-height: 1.65rem;
  padding: 0 0.48rem;
  border: 1px solid rgba(134, 239, 172, 0.35);
  border-radius: 0.35rem;
  background: rgba(34, 197, 94, 0.16);
  color: #bbf7d0;
  font-size: 0.76rem;
  font-weight: 800;
}

.account-profile-status-trial,
.account-profile-status-demo {
  border-color: rgba(250, 204, 21, 0.42);
  background: rgba(250, 204, 21, 0.14);
  color: #fef08a;
}

.account-profile-status-expired,
.account-profile-status-past_due,
.account-profile-status-canceled {
  border-color: rgba(252, 165, 165, 0.42);
  background: rgba(239, 68, 68, 0.15);
  color: #fecaca;
}

.account-profile-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.14);
}

.account-profile-photo-heading,
.account-profile-section-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.account-profile-photo-heading h3,
.account-profile-section-heading h2,
.account-profile-callout h2,
.account-profile-tools-card h2,
.account-profile-owner-card h2 {
  font-size: 1rem;
}

.account-profile-photo-heading p,
.account-profile-section-heading p {
  margin-top: 0.28rem;
}

.account-profile-photo-hint {
  max-width: 12rem;
  text-align: right;
  font-size: 0.78rem;
}

.account-profile-photo-form {
  display: grid;
  gap: 0.8rem;
}

.account-profile-upload {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: center;
  min-height: 6.6rem;
  padding: 1rem 1.1rem;
  border: 1px dashed rgba(255, 255, 255, 0.3);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.account-profile-upload:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent-soft) 13%, transparent);
}

.account-profile-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.account-profile-upload svg,
.account-profile-facts dt svg,
.account-profile-callout-icon svg {
  width: 1.45rem;
  height: 1.45rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.account-profile-upload > span {
  display: grid;
  gap: 0.2rem;
}

.account-profile-upload strong {
  font-size: 0.92rem;
}

.account-profile-upload small {
  font-size: 0.78rem;
}

.account-profile-upload b {
  padding: 0.48rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0.42rem;
  background: rgba(255, 255, 255, 0.09);
  font-size: 0.82rem;
}

.account-profile-photo-actions,
.account-profile-secondary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: flex-end;
}

.account-profile-remove {
  color: #fecaca;
}

.account-profile-information-card {
  gap: 1.25rem;
}

.account-profile-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
}

.account-profile-facts > div {
  display: grid;
  gap: 0.34rem;
  min-width: 0;
  padding: 0 1rem;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.account-profile-facts > div:first-child {
  padding-left: 0;
  border-left: 0;
}

.account-profile-facts > div:last-child {
  padding-right: 0;
}

.account-profile-facts dt {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  color: rgba(245, 255, 249, 0.68);
  font-size: 0.74rem;
  font-weight: 750;
}

.account-profile-facts dt svg {
  width: 1rem;
  height: 1rem;
}

.account-profile-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 0.82rem;
  font-weight: 760;
}

.account-profile-callout {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
}

.account-profile-callout > .btn {
  grid-column: 2;
  justify-content: space-between;
}

.account-profile-callout-icon {
  display: grid;
  place-items: center;
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent-soft) 55%, transparent);
  color: var(--accent);
}

.account-profile-callout p,
.account-profile-tools-card p,
.account-profile-owner-card p {
  margin-top: 0.28rem;
}

.account-profile-tools-card,
.account-profile-owner-card {
  gap: 0.85rem;
}

.account-profile-tool-links {
  display: grid;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.account-profile-tool-links a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.55rem;
  align-items: center;
  min-height: 2.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  color: inherit;
  font-size: 0.88rem;
  font-weight: 760;
  text-decoration: none;
}

.account-profile-tool-links a:hover {
  color: var(--accent-soft);
}

.account-profile-tool-links b {
  display: grid;
  place-items: center;
  min-width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.7rem;
}

.account-profile-tool-links i {
  font-size: 1.25rem;
  font-style: normal;
}

.account-profile-support-card {
  grid-template-columns: auto minmax(0, 1fr);
}

.account-profile-support-card .account-profile-secondary-actions {
  grid-column: 2;
  justify-content: start;
}

.workspace-shell[data-party-theme="lib_dem"] .account-profile-page {
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .account-profile-header .page-kicker,
.workspace-shell[data-party-theme="lib_dem"] .account-profile-header > p:last-child,
.workspace-shell[data-party-theme="lib_dem"] .account-profile-card p,
.workspace-shell[data-party-theme="lib_dem"] .account-profile-card small,
.workspace-shell[data-party-theme="lib_dem"] .account-profile-facts dt {
  color: var(--ld-ink-soft);
}

.workspace-shell[data-party-theme="lib_dem"] .account-profile-card {
  border-color: var(--ld-line);
  background: var(--ld-surface);
  box-shadow: 0 16px 32px rgba(146, 64, 14, 0.08);
}

.workspace-shell[data-party-theme="lib_dem"] .account-profile-avatar {
  border-color: rgba(217, 119, 6, 0.22);
  color: var(--accent-strong);
}

.workspace-shell[data-party-theme="lib_dem"] .account-profile-divider,
.workspace-shell[data-party-theme="lib_dem"] .account-profile-facts > div,
.workspace-shell[data-party-theme="lib_dem"] .account-profile-tool-links,
.workspace-shell[data-party-theme="lib_dem"] .account-profile-tool-links a {
  border-color: var(--ld-line);
}

.workspace-shell[data-party-theme="lib_dem"] .account-profile-upload {
  border-color: rgba(217, 119, 6, 0.26);
  background: rgba(255, 253, 248, 0.7);
}

.workspace-shell[data-party-theme="lib_dem"] .account-profile-upload b {
  border-color: var(--ld-line);
  background: rgba(255, 255, 255, 0.8);
}

.workspace-shell[data-party-theme="lib_dem"] .account-profile-status {
  border-color: rgba(22, 163, 74, 0.24);
  background: #ecfdf3;
  color: #166534;
}

.workspace-shell[data-party-theme="lib_dem"] .account-profile-status-trial,
.workspace-shell[data-party-theme="lib_dem"] .account-profile-status-demo {
  border-color: rgba(217, 119, 6, 0.25);
  background: #fff8dc;
  color: #92400e;
}

.workspace-shell[data-party-theme="lib_dem"] .account-profile-status-expired,
.workspace-shell[data-party-theme="lib_dem"] .account-profile-status-past_due,
.workspace-shell[data-party-theme="lib_dem"] .account-profile-status-canceled {
  border-color: rgba(220, 38, 38, 0.22);
  background: #fef2f2;
  color: #b91c1c;
}

.workspace-shell[data-party-theme="lib_dem"] .account-profile-callout-icon {
  background: color-mix(in srgb, var(--accent-soft) 75%, white);
  color: var(--accent-strong);
}

.workspace-shell[data-party-theme="lib_dem"] .account-profile-tool-links a:hover {
  color: var(--accent-strong);
}

.workspace-shell[data-party-theme="lib_dem"] .account-profile-remove {
  color: #b91c1c;
}

@media (max-width: 980px) {
  .account-profile-layout { grid-template-columns: 1fr; }
  .account-profile-aside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .account-profile-page { padding-top: 1.25rem; }
  .account-profile-card { padding: 1.1rem; }
  .account-profile-aside,
  .account-profile-facts { grid-template-columns: 1fr; }
  .account-profile-facts > div,
  .account-profile-facts > div:first-child,
  .account-profile-facts > div:last-child { padding: 0.75rem 0; border-top: 1px solid rgba(255, 255, 255, 0.14); border-left: 0; }
  .account-profile-facts > div:first-child { padding-top: 0; border-top: 0; }
  .workspace-shell[data-party-theme="lib_dem"] .account-profile-facts > div { border-color: var(--ld-line); }
}

@media (max-width: 460px) {
  .account-profile-identity { align-items: start; }
  .account-profile-avatar { width: 4.5rem; height: 4.5rem; }
  .account-profile-photo-heading,
  .account-profile-section-heading { display: grid; }
  .account-profile-photo-hint { max-width: none; text-align: left; }
  .account-profile-upload { grid-template-columns: auto minmax(0, 1fr); }
  .account-profile-upload b { grid-column: 2; justify-self: start; }
  .account-profile-photo-actions { justify-content: stretch; }
  .account-profile-photo-actions .btn { flex: 1; }
}

/* Keep the account overview compact enough to read as one portal page on a
   normal desktop screen. The right column is one concise list, not a second
   stack of dashboard cards. */
.account-profile-page {
  gap: 0.9rem;
  width: min(calc(100% - 3rem), 100rem);
  padding: 1.3rem 0 2rem;
}

.account-profile-header { gap: 0.18rem; }
.account-profile-header h1 { font-size: clamp(1.85rem, 2.4vw, 2.35rem); }
.account-profile-layout { grid-template-columns: minmax(0, 1.75fr) minmax(18rem, 0.7fr); gap: 0.9rem; }
.account-profile-main,
.account-profile-aside { gap: 0.9rem; }
.account-profile-card { gap: 0.8rem; padding: 1.05rem 1.15rem; border-radius: 0.65rem; }
.account-profile-identity { gap: 0.85rem; }
.account-profile-avatar { width: 4.2rem; height: 4.2rem; font-size: 1.5rem; }
.account-profile-identity h2 { font-size: 1.2rem; }
.account-profile-identity p { margin-top: 0.18rem; }
.account-profile-identity small { margin-top: 0.14rem; }
.account-profile-divider { background: transparent; height: 0; }
.account-profile-photo-heading { align-items: center; }
.account-profile-photo-heading p { display: none; }
.account-profile-photo-form { grid-template-columns: minmax(0, 1fr) auto; gap: 0.65rem; align-items: center; }
.account-profile-upload { min-height: 4.1rem; padding: 0.65rem 0.8rem; gap: 0.65rem; }
.account-profile-upload small { display: none; }
.account-profile-upload b { padding: 0.38rem 0.55rem; }
.account-profile-photo-actions { justify-content: flex-end; }
.account-profile-photo-actions .btn { min-height: 2.45rem; white-space: nowrap; }
.account-profile-information-card { gap: 0.75rem; }
.account-profile-section-heading p { display: none; }
.account-profile-facts > div { padding: 0 0.7rem; }
.account-profile-facts dt { font-size: 0.7rem; }
.account-profile-facts dd { font-size: 0.77rem; }
.account-profile-callout { grid-template-columns: auto minmax(0, 1fr); gap: 0.7rem; }
.account-profile-callout > .btn { grid-column: 1 / -1; min-height: 2.45rem; }
.account-profile-callout-icon { width: 2.8rem; height: 2.8rem; }
.account-profile-tools-card { gap: 0.55rem; }
.account-profile-tool-links a { min-height: 2.2rem; font-size: 0.82rem; }

/* Recorded time is a compact account fact, not another dashboard. */
.account-profile-time-card,
.account-profile-month-card { gap: 0.62rem; }
.account-profile-month-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding-top: 0.62rem; border-top: 1px solid rgba(255,255,255,0.14); }
.account-profile-month-facts > div { min-width: 0; padding: 0 0.7rem; border-left: 1px solid rgba(255,255,255,0.14); }
.account-profile-month-facts > div:first-child { padding-left: 0; border-left: 0; }
.account-profile-month-facts dt { color: rgba(245,255,249,0.68); font-size: 0.69rem; font-weight: 800; }
.account-profile-month-facts dd { margin: 0.18rem 0 0; font-size: 1.05rem; font-weight: 850; }
.account-profile-time-heading { display: flex; align-items: center; justify-content: space-between; gap: 0.85rem; }
.account-profile-time-heading h2 { margin: 0; font-family: "Fraunces", Georgia, serif; font-size: 1.02rem; }
.account-profile-time-heading p,
.account-profile-time-choice span,
.account-profile-time-off { margin: 0.14rem 0 0; font-size: 0.76rem; }
.account-profile-time-choice { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.8rem; padding-top: 0.6rem; border-top: 1px solid rgba(255,255,255,0.14); }
.account-profile-time-choice > div:first-child { min-width: 0; }
.account-profile-time-choice strong,
.account-profile-time-choice span { display: block; }
.account-profile-time-choice > div:last-child { display: flex; align-items: center; gap: 0.45rem; white-space: nowrap; }
.account-profile-time-choice .btn { min-height: 2.2rem; padding: 0.38rem 0.65rem; }
.account-profile-time-facts { display: grid; grid-template-columns: 0.7fr 0.95fr 1.35fr; margin: 0; padding-top: 0.65rem; border-top: 1px solid rgba(255,255,255,0.14); }
.account-profile-time-facts > div { min-width: 0; padding: 0 0.7rem; border-left: 1px solid rgba(255,255,255,0.14); }
.account-profile-time-facts > div:first-child { padding-left: 0; border-left: 0; }
.account-profile-time-facts dt { color: rgba(245,255,249,0.68); font-size: 0.69rem; font-weight: 800; }
.account-profile-time-facts dd { margin: 0.2rem 0 0; font-size: 0.78rem; font-weight: 760; }
.workspace-shell[data-party-theme="lib_dem"] .account-profile-time-choice,
.workspace-shell[data-party-theme="lib_dem"] .account-profile-time-facts,
.workspace-shell[data-party-theme="lib_dem"] .account-profile-time-facts > div,
.workspace-shell[data-party-theme="lib_dem"] .account-profile-month-facts,
.workspace-shell[data-party-theme="lib_dem"] .account-profile-month-facts > div { border-color: var(--ld-line); }
.workspace-shell[data-party-theme="lib_dem"] .account-profile-month-facts dt { color: var(--ld-ink-soft); }
.workspace-shell[data-party-theme="lib_dem"] .account-profile-time-facts dt { color: var(--ld-ink-soft); }

@media (max-width: 980px) {
  .account-profile-layout { grid-template-columns: 1fr; }
  .account-profile-aside { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .account-profile-page { width: min(calc(100% - 2rem), 100rem); }
  .account-profile-photo-form { grid-template-columns: 1fr; }
  .account-profile-photo-actions { justify-content: flex-start; }
  .account-profile-time-heading,
  .account-profile-time-choice { display: grid; align-items: start; }
  .account-profile-time-choice > div:last-child { white-space: normal; }
  .account-profile-time-facts { grid-template-columns: 1fr; gap: 0.55rem; }
  .account-profile-month-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem 0; }
  .account-profile-time-facts > div { padding: 0.45rem 0 0; border: 0; }
  .account-profile-month-facts > div { padding: 0.35rem 0.55rem; }
  .account-profile-month-facts > div:nth-child(odd) { padding-left: 0; border-left: 0; }
}

/* Final density pass: account content follows the Issues workspace's compact
   record-and-action rhythm, with no separate presentation band for photo or
   access controls. */
.account-profile-identity-card { gap: 0.65rem; }
.account-profile-photo-form {
  grid-template-columns: 5.8rem minmax(0, 1fr) auto;
  gap: 0.5rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.account-profile-photo-label {
  color: rgba(245, 255, 249, 0.68);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.account-profile-upload {
  min-height: 2.4rem;
  padding: 0.3rem 0.5rem;
  border-style: solid;
  border-radius: 0.42rem;
}
.account-profile-upload svg { width: 1.12rem; height: 1.12rem; }
.account-profile-upload strong { font-size: 0.78rem; }
.account-profile-upload b { padding: 0.26rem 0.45rem; font-size: 0.72rem; }
.account-profile-photo-actions { gap: 0.45rem; }
.account-profile-photo-actions .btn {
  min-height: 2.4rem;
  padding: 0.35rem 0.6rem;
  font-size: 0.78rem;
}
.account-profile-access-callout {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
}
.account-profile-access-callout > .btn {
  grid-column: auto;
  min-height: 2.4rem;
  padding: 0.35rem 0.6rem;
  font-size: 0.78rem;
  white-space: nowrap;
}
.account-profile-access-callout p { margin-top: 0.1rem; font-size: 0.8rem; }
.account-profile-tools-card { gap: 0.25rem; }
.account-profile-tool-links a { min-height: 2rem; font-size: 0.78rem; }
.workspace-shell[data-party-theme="lib_dem"] .account-profile-photo-form { border-color: var(--ld-line); }
.workspace-shell[data-party-theme="lib_dem"] .account-profile-photo-label { color: var(--ld-muted); }

/* Imported mail is a compact review desk: the draft list, source email and
   record fields stay together without turning account work into dashboard
   cards. */
.imported-mail-page {
  width: min(calc(100% - 3rem), 100rem);
  margin: 0 auto;
  padding: 1.3rem 0 2rem;
}

.imported-mail-header { margin-bottom: 0.85rem; }
.imported-mail-header h1 { font-size: clamp(1.85rem, 2.4vw, 2.35rem); }
.imported-mail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 0.34fr);
  gap: 0.9rem;
  align-items: start;
}
.imported-mail-main { display: grid; gap: 0.9rem; min-width: 0; }
.imported-mail-address,
.imported-mail-workbench,
.imported-mail-aside > section,
.imported-mail-empty {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.65rem;
  background: rgba(1, 41, 30, 0.5);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.1);
}
.imported-mail-address {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(22rem, 1.18fr);
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 1rem;
}
.imported-mail-address-copy { display: flex; gap: 0.7rem; align-items: center; }
.imported-mail-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent-soft) 65%, transparent);
  color: var(--accent);
  font-size: 1.15rem;
}
.imported-mail-address h2,
.imported-mail-workbench h2,
.imported-mail-review h2,
.imported-mail-aside h2,
.imported-mail-empty h2 { margin: 0; font-size: 1rem; }
.imported-mail-address p,
.imported-mail-aside p,
.imported-mail-empty p,
.imported-mail-review-heading > div > p:last-child,
.imported-mail-no-drafts p,
.imported-mail-review-empty p { margin: 0.2rem 0 0; color: rgba(245, 255, 249, 0.7); font-size: 0.8rem; }
.imported-mail-address-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; justify-content: flex-end; }
.imported-mail-address-actions code {
  flex: 1 1 13rem;
  min-width: 0;
  overflow: hidden;
  padding: 0.55rem 0.65rem;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent);
  border-radius: 0.42rem;
  background: color-mix(in srgb, var(--accent-soft) 22%, transparent);
  color: var(--accent-soft);
  font-size: 0.78rem;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.imported-mail-address-actions form { display: contents; }
.imported-mail-address-actions .btn { min-height: 2.25rem; padding: 0.35rem 0.6rem; font-size: 0.76rem; white-space: nowrap; }
.imported-mail-workbench { display: grid; grid-template-columns: minmax(14rem, 0.5fr) minmax(0, 1.5fr); min-height: 31rem; overflow: hidden; }
.imported-mail-draft-list { display: grid; grid-template-rows: auto minmax(0, 1fr); border-right: 1px solid rgba(255, 255, 255, 0.14); }
.imported-mail-pane-heading { padding: 0.8rem 0.9rem; border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.imported-mail-pane-heading h2 { display: flex; gap: 0.4rem; align-items: center; }
.imported-mail-pane-heading h2 span { display: grid; place-items: center; min-width: 1.2rem; height: 1.2rem; border-radius: 50%; background: var(--accent); color: #fff; font-size: 0.68rem; }
.imported-mail-pane-heading p { margin: 0.15rem 0 0; color: rgba(245, 255, 249, 0.64); font-size: 0.75rem; }
.imported-mail-draft-rows { min-width: 0; }
.imported-mail-draft-row {
  display: grid;
  gap: 0.18rem;
  padding: 0.72rem 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: inherit;
  text-decoration: none;
}
.imported-mail-draft-row:hover { background: rgba(255, 255, 255, 0.055); }
.imported-mail-draft-row.is-active { background: color-mix(in srgb, var(--accent-soft) 17%, transparent); box-shadow: inset 0.2rem 0 var(--accent); }
.imported-mail-draft-row strong,
.imported-mail-draft-row span,
.imported-mail-draft-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imported-mail-draft-row strong { font-size: 0.82rem; }
.imported-mail-draft-row span { color: rgba(245, 255, 249, 0.72); font-size: 0.76rem; }
.imported-mail-draft-row small { color: rgba(245, 255, 249, 0.55); font-size: 0.69rem; }
.imported-mail-no-drafts { padding: 1.1rem 0.9rem; }
.imported-mail-no-drafts strong { font-size: 0.84rem; }
.imported-mail-review { min-width: 0; padding: 0.9rem 1rem; }
.imported-mail-review-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: start; padding-bottom: 0.75rem; border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.imported-mail-review-heading .page-kicker { margin: 0 0 0.1rem; color: rgba(245, 255, 249, 0.58); font-size: 0.67rem; }
.imported-mail-parse-note { max-width: 15rem; margin: 0; color: rgba(245, 255, 249, 0.62); font-size: 0.72rem; text-align: right; }
.imported-mail-review-form { display: grid; gap: 0.8rem; padding-top: 0.85rem; }
.imported-mail-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; }
.imported-mail-field-wide { grid-column: 1 / -1; }
.imported-mail-review-form label { display: grid; gap: 0.28rem; color: rgba(245, 255, 249, 0.72); font-size: 0.72rem; font-weight: 760; }
.imported-mail-review-form input,
.imported-mail-review-form select,
.imported-mail-review-form textarea {
  width: 100%;
  min-height: 2.28rem;
  padding: 0.42rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.4rem;
  background: rgba(0, 0, 0, 0.15);
  color: inherit;
  font: inherit;
}
.imported-mail-review-form textarea { min-height: 5.1rem; resize: vertical; }
.imported-mail-review-form select { appearance: auto; }
.imported-mail-details { padding-top: 0.75rem; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.imported-mail-details summary { cursor: pointer; color: inherit; font-size: 0.82rem; font-weight: 800; }
.imported-mail-details summary span { margin-left: 0.35rem; color: rgba(245, 255, 249, 0.55); font-size: 0.7rem; font-weight: 650; }
.imported-mail-details .imported-mail-field-grid { margin-top: 0.75rem; }
.imported-mail-source-section { display: grid; gap: 0.45rem; padding-top: 0.75rem; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.imported-mail-source-section h3 { margin: 0; font-size: 0.82rem; }
.imported-mail-message { display: grid; gap: 0.35rem; padding: 0.58rem 0.68rem; border-left: 2px solid rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.035); }
.imported-mail-message.is-parent { border-left-color: var(--accent); }
.imported-mail-message > div { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.imported-mail-message strong { font-size: 0.78rem; }
.imported-mail-message p { max-height: 5.3rem; margin: 0; overflow: auto; color: rgba(245, 255, 249, 0.68); font-size: 0.75rem; line-height: 1.45; white-space: pre-wrap; }
.imported-mail-message-label { color: var(--accent-soft); font-size: 0.67rem; font-weight: 850; letter-spacing: 0.04em; text-transform: uppercase; }
.imported-mail-review-form .imported-mail-message-include { display: flex; gap: 0.3rem; align-items: center; color: rgba(245, 255, 249, 0.78); font-size: 0.7rem; }
.imported-mail-review-form .imported-mail-message-include input { width: auto; min-height: 0; padding: 0; }
.imported-mail-attachments ul { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0; padding: 0; list-style: none; }
.imported-mail-attachments a { color: var(--accent-soft); font-size: 0.76rem; }
.imported-mail-attachments li span { color: rgba(245, 255, 249, 0.52); font-size: 0.68rem; }
.imported-mail-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.45rem; padding-top: 0.1rem; }
.imported-mail-actions .btn { min-height: 2.3rem; padding: 0.35rem 0.65rem; font-size: 0.78rem; }
.imported-mail-discard { margin-top: 0.55rem; }
.imported-mail-discard .btn { min-height: auto; padding: 0.2rem 0; border: 0; color: #fecaca; background: transparent; font-size: 0.73rem; }
.imported-mail-review-empty { padding: 3rem 1rem; text-align: center; }
.imported-mail-aside { display: grid; gap: 0.7rem; }
.imported-mail-aside > section { padding: 0.9rem; }
.imported-mail-aside ol,
.imported-mail-aside ul { display: grid; gap: 0.55rem; margin: 0.7rem 0 0; padding-left: 1.1rem; color: rgba(245, 255, 249, 0.72); font-size: 0.78rem; line-height: 1.4; }
.imported-mail-aside li::marker { color: var(--accent); font-weight: 850; }
.imported-mail-help { display: grid; gap: 0.25rem; }
.imported-mail-help a { display: flex; justify-content: space-between; align-items: center; margin-top: 0.45rem; padding-top: 0.65rem; border-top: 1px solid rgba(255, 255, 255, 0.14); color: var(--accent-soft); font-size: 0.78rem; font-weight: 800; text-decoration: none; }
.imported-mail-help a span { font-size: 1.1rem; }
.imported-mail-empty { padding: 1rem; }

.workspace-shell[data-party-theme="lib_dem"] .imported-mail-address,
.workspace-shell[data-party-theme="lib_dem"] .imported-mail-workbench,
.workspace-shell[data-party-theme="lib_dem"] .imported-mail-aside > section,
.workspace-shell[data-party-theme="lib_dem"] .imported-mail-empty { border-color: var(--ld-line); background: var(--ld-surface); box-shadow: 0 12px 26px rgba(146, 64, 14, 0.07); }
.workspace-shell[data-party-theme="lib_dem"] .imported-mail-address p,
.workspace-shell[data-party-theme="lib_dem"] .imported-mail-aside p,
.workspace-shell[data-party-theme="lib_dem"] .imported-mail-empty p,
.workspace-shell[data-party-theme="lib_dem"] .imported-mail-review-heading > div > p:last-child,
.workspace-shell[data-party-theme="lib_dem"] .imported-mail-no-drafts p,
.workspace-shell[data-party-theme="lib_dem"] .imported-mail-review-empty p,
.workspace-shell[data-party-theme="lib_dem"] .imported-mail-pane-heading p,
.workspace-shell[data-party-theme="lib_dem"] .imported-mail-draft-row span,
.workspace-shell[data-party-theme="lib_dem"] .imported-mail-draft-row small,
.workspace-shell[data-party-theme="lib_dem"] .imported-mail-review-form label,
.workspace-shell[data-party-theme="lib_dem"] .imported-mail-message p,
.workspace-shell[data-party-theme="lib_dem"] .imported-mail-aside ol,
.workspace-shell[data-party-theme="lib_dem"] .imported-mail-aside ul { color: var(--ld-ink-soft); }
.workspace-shell[data-party-theme="lib_dem"] .imported-mail-draft-list,
.workspace-shell[data-party-theme="lib_dem"] .imported-mail-pane-heading,
.workspace-shell[data-party-theme="lib_dem"] .imported-mail-draft-row,
.workspace-shell[data-party-theme="lib_dem"] .imported-mail-review-heading,
.workspace-shell[data-party-theme="lib_dem"] .imported-mail-details,
.workspace-shell[data-party-theme="lib_dem"] .imported-mail-source-section,
.workspace-shell[data-party-theme="lib_dem"] .imported-mail-help a { border-color: var(--ld-line); }
.workspace-shell[data-party-theme="lib_dem"] .imported-mail-draft-row:hover { background: #fff9ef; }
.workspace-shell[data-party-theme="lib_dem"] .imported-mail-draft-row.is-active { background: #fff3d6; }
.workspace-shell[data-party-theme="lib_dem"] .imported-mail-address-actions code { border-color: rgba(5, 150, 105, 0.25); background: #effcf7; color: #065f46; }
.workspace-shell[data-party-theme="lib_dem"] .imported-mail-review-form input,
.workspace-shell[data-party-theme="lib_dem"] .imported-mail-review-form select,
.workspace-shell[data-party-theme="lib_dem"] .imported-mail-review-form textarea { border-color: var(--ld-line); background: #fffdfa; color: var(--ld-ink); }
.workspace-shell[data-party-theme="lib_dem"] .imported-mail-message { border-left-color: rgba(146, 64, 14, 0.25); background: #fffaf1; }
.workspace-shell[data-party-theme="lib_dem"] .imported-mail-message.is-parent { border-left-color: var(--accent); }
.workspace-shell[data-party-theme="lib_dem"] .imported-mail-parse-note,
.workspace-shell[data-party-theme="lib_dem"] .imported-mail-details summary span,
.workspace-shell[data-party-theme="lib_dem"] .imported-mail-message p,
.workspace-shell[data-party-theme="lib_dem"] .imported-mail-attachments li span { color: var(--ld-muted); }
.workspace-shell[data-party-theme="lib_dem"] .imported-mail-message-label,
.workspace-shell[data-party-theme="lib_dem"] .imported-mail-attachments a,
.workspace-shell[data-party-theme="lib_dem"] .imported-mail-help a { color: var(--accent-strong); }
.workspace-shell[data-party-theme="lib_dem"] .imported-mail-discard .btn { color: #b91c1c; }

@media (max-width: 980px) {
  .imported-mail-layout { grid-template-columns: 1fr; }
  .imported-mail-aside { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .imported-mail-page { width: min(calc(100% - 2rem), 100rem); }
  .imported-mail-address { grid-template-columns: 1fr; }
  .imported-mail-address-actions { justify-content: start; }
  .imported-mail-workbench { grid-template-columns: 1fr; }
  .imported-mail-draft-list { border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
  .imported-mail-draft-rows { max-height: 17rem; overflow: auto; }
  .imported-mail-aside { grid-template-columns: 1fr; }
  .workspace-shell[data-party-theme="lib_dem"] .imported-mail-draft-list { border-color: var(--ld-line); }
}
@media (max-width: 480px) {
  .imported-mail-field-grid { grid-template-columns: 1fr; }
  .imported-mail-field-wide { grid-column: auto; }
  .imported-mail-review-heading { display: grid; }
  .imported-mail-parse-note { max-width: none; text-align: left; }
}

/* Member Funds follows the compact record-and-action pattern used in the
   portal workspaces. Financial data stays legible without a stack of large
   generic cards. */
.member-funds-page {
  width: min(calc(100% - 3rem), 100rem);
  margin: 0 auto;
  padding: 1.3rem 0 2rem;
}
.member-funds-header {
  display: flex;
  justify-content: space-between;
  gap: 1.2rem;
  align-items: start;
  margin-bottom: 0.85rem;
}
.member-funds-header h1 { font-size: clamp(1.85rem, 2.4vw, 2.35rem); }
.member-funds-header-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.2rem 0.6rem;
  width: min(100%, 21rem);
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.6rem;
  background: rgba(1, 41, 30, 0.42);
}
.member-funds-header-note > span { grid-row: span 2; color: var(--accent); font-size: 1.35rem; font-weight: 850; }
.member-funds-header-note p { margin: 0; color: rgba(245, 255, 249, 0.76); font-size: 0.75rem; line-height: 1.4; }
.member-funds-header-note a,
.member-funds-aside a:not(.btn) { color: var(--accent-soft); font-size: 0.74rem; font-weight: 800; text-decoration: none; }
.member-funds-header-note b,
.member-funds-aside a:not(.btn) b { float: right; font-size: 1rem; }
.member-funds-totals {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0 0 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.65rem;
  background: rgba(1, 41, 30, 0.5);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.1);
}
.member-funds-totals > div { display: grid; gap: 0.22rem; padding: 0.75rem 0.9rem; border-left: 1px solid rgba(255, 255, 255, 0.14); }
.member-funds-totals > div:first-child { border-left: 0; }
.member-funds-totals dt { color: rgba(245, 255, 249, 0.62); font-size: 0.68rem; font-weight: 820; letter-spacing: 0.04em; text-transform: uppercase; }
.member-funds-totals dd { margin: 0; font-size: 0.95rem; font-weight: 850; }
.member-funds-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(15rem, 0.34fr); gap: 0.9rem; align-items: start; }
.member-funds-main { display: grid; gap: 0.9rem; min-width: 0; }
.member-funds-panel,
.member-funds-aside > section {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.65rem;
  background: rgba(1, 41, 30, 0.5);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.1);
}
.member-funds-panel { padding: 0.9rem 1rem; }
.member-funds-panel-heading { display: flex; justify-content: space-between; gap: 0.8rem; align-items: center; margin-bottom: 0.75rem; }
.member-funds-panel-heading h2,
.member-funds-aside h2 { margin: 0; font-size: 1rem; }
.member-funds-panel-heading p,
.member-funds-aside p,
.member-funds-empty p { margin: 0.18rem 0 0; color: rgba(245, 255, 249, 0.68); font-size: 0.78rem; }
.member-funds-panel-heading .btn { min-height: 2.15rem; padding: 0.3rem 0.55rem; font-size: 0.72rem; white-space: nowrap; }
.member-funds-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
.member-funds-form-grid label { display: grid; gap: 0.27rem; color: rgba(245, 255, 249, 0.72); font-size: 0.7rem; font-weight: 780; }
.member-funds-form-grid label > span { color: rgba(245, 255, 249, 0.5); font-weight: 650; }
.member-funds-form-grid input,
.member-funds-form-grid select,
.member-funds-form-grid textarea {
  width: 100%;
  min-height: 2.25rem;
  padding: 0.4rem 0.52rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.4rem;
  background: rgba(0, 0, 0, 0.15);
  color: inherit;
  font: inherit;
}
.member-funds-form-grid textarea { resize: vertical; }
.member-funds-form-grid select { appearance: auto; }
.member-funds-wide { grid-column: 1 / -1; }
.member-funds-form-actions { display: flex; justify-content: flex-end; padding-top: 0.1rem; }
.member-funds-form-actions .btn { min-height: 2.3rem; padding: 0.35rem 0.7rem; font-size: 0.77rem; }
.member-funds-record-list { display: grid; gap: 0.65rem; }
.member-fund-record { padding: 0.78rem; border: 1px solid rgba(255, 255, 255, 0.13); border-radius: 0.52rem; background: rgba(255, 255, 255, 0.035); }
.member-fund-record.is-archived { opacity: 0.72; }
.member-fund-record-heading { display: flex; justify-content: space-between; gap: 0.7rem; align-items: start; }
.member-fund-record-heading h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; margin: 0; font-size: 0.92rem; }
.member-fund-record-heading p { margin: 0.18rem 0 0; color: rgba(245, 255, 249, 0.66); font-size: 0.74rem; }
.member-funds-status { padding: 0.12rem 0.32rem; border: 1px solid rgba(250, 204, 21, 0.35); border-radius: 0.28rem; color: #fef08a; font-size: 0.62rem; font-weight: 840; letter-spacing: 0.04em; text-transform: uppercase; }
.member-funds-status.is-active { border-color: rgba(134, 239, 172, 0.35); color: #bbf7d0; }
.member-funds-anchor { color: var(--accent-soft); font-size: 0.74rem; font-weight: 800; text-decoration: none; }
.member-funds-details { margin-top: 0.65rem; padding-top: 0.6rem; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.member-funds-details summary { cursor: pointer; color: inherit; font-size: 0.78rem; font-weight: 800; }
.member-funds-details .member-funds-form-grid { margin-top: 0.65rem; }
.member-fund-allocations { display: grid; gap: 0.45rem; margin-top: 0.7rem; padding-top: 0.65rem; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.member-fund-allocations-heading h4 { display: flex; gap: 0.35rem; align-items: center; margin: 0; font-size: 0.8rem; }
.member-fund-allocations-heading span { display: grid; place-items: center; min-width: 1.15rem; height: 1.15rem; border-radius: 50%; background: rgba(255, 255, 255, 0.1); color: rgba(245, 255, 249, 0.8); font-size: 0.66rem; }
.member-fund-allocation-list { display: grid; }
.member-fund-allocation { position: relative; padding: 0.5rem 0; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.member-fund-allocation:first-child { border-top: 0; }
.member-fund-allocation-summary { display: flex; justify-content: space-between; gap: 0.7rem; }
.member-fund-allocation-summary > div { display: grid; gap: 0.13rem; min-width: 0; }
.member-fund-allocation-summary > div:last-child { justify-items: end; text-align: right; }
.member-fund-allocation-summary strong,
.member-fund-allocation-summary b { font-size: 0.77rem; }
.member-fund-allocation-summary span,
.member-fund-allocation-summary small { overflow: hidden; color: rgba(245, 255, 249, 0.64); font-size: 0.7rem; text-overflow: ellipsis; white-space: nowrap; }
.member-funds-allocation-details { margin-right: 3.7rem; }
.member-fund-delete { position: absolute; right: 0; bottom: 0.45rem; }
.member-fund-delete button { padding: 0; border: 0; background: transparent; color: #fecaca; cursor: pointer; font: inherit; font-size: 0.68rem; font-weight: 760; }
.member-funds-add-allocation { margin-top: 0.2rem; }
.member-fund-no-allocations { margin: 0; color: rgba(245, 255, 249, 0.58); font-size: 0.74rem; }
.member-fund-archive { margin-top: 0.7rem; padding-top: 0.6rem; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.member-fund-archive .btn { min-height: 2rem; padding: 0.25rem 0.5rem; color: #fecaca; font-size: 0.7rem; }
.member-funds-empty { padding: 1rem 0.1rem; }
.member-funds-empty strong { font-size: 0.82rem; }
.member-funds-aside { display: grid; gap: 0.7rem; }
.member-funds-aside > section { padding: 0.9rem; }
.member-funds-aside ul { display: grid; gap: 0.52rem; margin: 0.7rem 0; padding-left: 1.05rem; color: rgba(245, 255, 249, 0.72); font-size: 0.76rem; line-height: 1.4; }
.member-funds-aside li::marker { color: var(--accent); }
.member-funds-aside > section > a:not(.btn) { display: block; padding-top: 0.6rem; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.member-funds-help { display: grid; gap: 0.3rem; }
.member-funds-help .btn { justify-self: start; min-height: 2.15rem; margin-top: 0.3rem; padding: 0.3rem 0.55rem; font-size: 0.72rem; }

.workspace-shell[data-party-theme="lib_dem"] .member-funds-header-note,
.workspace-shell[data-party-theme="lib_dem"] .member-funds-totals,
.workspace-shell[data-party-theme="lib_dem"] .member-funds-panel,
.workspace-shell[data-party-theme="lib_dem"] .member-funds-aside > section { border-color: var(--ld-line); background: var(--ld-surface); box-shadow: 0 12px 26px rgba(146, 64, 14, 0.07); }
.workspace-shell[data-party-theme="lib_dem"] .member-funds-header-note p,
.workspace-shell[data-party-theme="lib_dem"] .member-funds-panel-heading p,
.workspace-shell[data-party-theme="lib_dem"] .member-funds-aside p,
.workspace-shell[data-party-theme="lib_dem"] .member-funds-empty p,
.workspace-shell[data-party-theme="lib_dem"] .member-funds-form-grid label,
.workspace-shell[data-party-theme="lib_dem"] .member-fund-record-heading p,
.workspace-shell[data-party-theme="lib_dem"] .member-fund-allocation-summary span,
.workspace-shell[data-party-theme="lib_dem"] .member-fund-allocation-summary small,
.workspace-shell[data-party-theme="lib_dem"] .member-fund-no-allocations,
.workspace-shell[data-party-theme="lib_dem"] .member-funds-aside ul { color: var(--ld-ink-soft); }
.workspace-shell[data-party-theme="lib_dem"] .member-funds-totals > div,
.workspace-shell[data-party-theme="lib_dem"] .member-fund-record,
.workspace-shell[data-party-theme="lib_dem"] .member-funds-details,
.workspace-shell[data-party-theme="lib_dem"] .member-fund-allocations,
.workspace-shell[data-party-theme="lib_dem"] .member-fund-allocation,
.workspace-shell[data-party-theme="lib_dem"] .member-fund-archive,
.workspace-shell[data-party-theme="lib_dem"] .member-funds-aside > section > a:not(.btn) { border-color: var(--ld-line); }
.workspace-shell[data-party-theme="lib_dem"] .member-fund-record { background: #fffaf2; }
.workspace-shell[data-party-theme="lib_dem"] .member-funds-totals dt,
.workspace-shell[data-party-theme="lib_dem"] .member-funds-form-grid label > span { color: var(--ld-muted); }
.workspace-shell[data-party-theme="lib_dem"] .member-funds-form-grid input,
.workspace-shell[data-party-theme="lib_dem"] .member-funds-form-grid select,
.workspace-shell[data-party-theme="lib_dem"] .member-funds-form-grid textarea { border-color: var(--ld-line); background: #fffdfa; color: var(--ld-ink); }
.workspace-shell[data-party-theme="lib_dem"] .member-funds-status { border-color: rgba(217, 119, 6, 0.28); color: #92400e; }
.workspace-shell[data-party-theme="lib_dem"] .member-funds-status.is-active { border-color: rgba(22, 163, 74, 0.22); color: #166534; }
.workspace-shell[data-party-theme="lib_dem"] .member-funds-anchor,
.workspace-shell[data-party-theme="lib_dem"] .member-funds-header-note a,
.workspace-shell[data-party-theme="lib_dem"] .member-funds-aside a:not(.btn) { color: var(--accent-strong); }
.workspace-shell[data-party-theme="lib_dem"] .member-fund-delete button,
.workspace-shell[data-party-theme="lib_dem"] .member-fund-archive .btn { color: #b91c1c; }

@media (max-width: 980px) {
  .member-funds-layout { grid-template-columns: 1fr; }
  .member-funds-aside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-funds-help { grid-column: span 2; }
}
@media (max-width: 700px) {
  .member-funds-page { width: min(calc(100% - 2rem), 100rem); }
  .member-funds-header { display: grid; }
  .member-funds-header-note { width: 100%; }
  .member-funds-totals { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .member-funds-totals > div:nth-child(4) { border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.14); }
  .member-funds-totals > div:nth-child(5) { border-top: 1px solid rgba(255, 255, 255, 0.14); }
  .member-funds-aside { grid-template-columns: 1fr; }
  .member-funds-help { grid-column: auto; }
  .workspace-shell[data-party-theme="lib_dem"] .member-funds-totals > div:nth-child(4),
  .workspace-shell[data-party-theme="lib_dem"] .member-funds-totals > div:nth-child(5) { border-color: var(--ld-line); }
}
@media (max-width: 480px) {
  .member-funds-form-grid { grid-template-columns: 1fr; }
  .member-funds-wide { grid-column: auto; }
  .member-funds-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-funds-totals > div { border-top: 1px solid rgba(255, 255, 255, 0.14); }
  .member-funds-totals > div:nth-child(1),
  .member-funds-totals > div:nth-child(2) { border-top: 0; }
  .member-funds-totals > div:nth-child(3),
  .member-funds-totals > div:nth-child(5) { border-left: 0; }
  .member-fund-allocation-summary { display: grid; }
  .member-fund-allocation-summary > div:last-child { justify-items: start; text-align: left; }
  .member-funds-allocation-details { margin-right: 0; }
  .member-fund-delete { position: static; margin-top: 0.5rem; }
}

/* The fund index is intentionally only a ledger. Editing belongs in focused
   dialogs so a long list of funds never expands into a long page. */
.member-funds-page-dialogs .member-funds-header-note {
  grid-template-columns: auto minmax(0, 1fr);
  width: min(100%, 18.5rem);
  padding: 0.75rem 0.85rem;
  background: color-mix(in srgb, var(--accent-soft) 13%, rgba(1, 41, 30, 0.5));
}
.member-funds-page-dialogs .member-funds-form-grid textarea { resize: none; }
.member-funds-heading-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; justify-content: flex-end; }
.member-funds-heading-actions .btn { min-height: 2.12rem; padding: 0.3rem 0.55rem; font-size: 0.72rem; }
.member-funds-page-dialogs .member-funds-records { padding: 0.8rem; }
.member-funds-page-dialogs .member-funds-panel-heading { margin-bottom: 0.55rem; }
.member-funds-page-dialogs .member-funds-record-list { gap: 0.35rem; }
.member-funds-page-dialogs .member-fund-record { padding: 0; border: 0; border-radius: 0.45rem; background: transparent; }
.member-fund-record-open {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.14rem 0.7rem;
  width: 100%;
  padding: 0.66rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.42rem;
  background: rgba(255, 255, 255, 0.035);
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.member-fund-record-open:hover,
.member-fund-record-open:focus-visible { border-color: color-mix(in srgb, var(--accent) 52%, rgba(255,255,255,0.12)); background: color-mix(in srgb, var(--accent-soft) 12%, transparent); outline: 0; }
.member-fund-record-title { display: flex; flex-wrap: wrap; grid-column: 1; gap: 0.42rem; align-items: center; min-width: 0; }
.member-fund-record-title strong { overflow: hidden; font-size: 0.82rem; text-overflow: ellipsis; white-space: nowrap; }
.member-fund-record-meta { grid-column: 1; color: rgba(245, 255, 249, 0.64); font-size: 0.71rem; }
.member-fund-record-open > b { grid-row: 1 / span 2; grid-column: 2; align-self: center; color: var(--accent-soft); font-size: 1.25rem; }
.member-fund-record-open .member-funds-status { font-style: normal; }
.member-funds-page-dialogs .member-funds-aside { gap: 0.75rem; }
.member-funds-page-dialogs .member-funds-aside > section { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.68rem; padding: 0.9rem; }
.member-funds-aside-icon { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: color-mix(in srgb, var(--accent-soft) 68%, transparent); color: var(--accent); font-size: 1rem; font-weight: 850; }
.member-funds-page-dialogs .member-funds-aside h2 { padding-top: 0.1rem; }
.member-funds-page-dialogs .member-funds-aside ul { gap: 0.44rem; margin: 0.55rem 0 0; font-size: 0.73rem; }
.member-funds-page-dialogs .member-funds-help { background: color-mix(in srgb, #8b5cf6 9%, rgba(1, 41, 30, 0.5)); }
.member-funds-page-dialogs .member-funds-help .member-funds-aside-icon { background: rgba(139, 92, 246, 0.18); color: #c4b5fd; }

/* Account tools are sibling pages of Profile, not dead ends. */
.account-return-link {
  display: inline-flex;
  gap: 0.25rem;
  align-items: center;
  flex: 0 0 auto;
  min-height: 2rem;
  padding: 0.28rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.4rem;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(245, 255, 249, 0.92);
  font-size: 0.74rem;
  font-weight: 800;
  text-decoration: none;
}
.account-return-link span { font-size: 1.1rem; line-height: 0.7; }
.account-return-link:hover { border-color: var(--accent); color: var(--accent-soft); }

body.member-fund-modal-open { overflow: hidden; }
.member-fund-modal { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; padding: 1rem; }
.member-fund-modal[hidden] { display: none; }
.member-fund-modal-backdrop { position: absolute; inset: 0; background: rgba(0, 12, 8, 0.68); backdrop-filter: blur(3px); }
.member-fund-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 41rem);
  max-height: min(44rem, calc(100vh - 2rem));
  overflow: auto;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.72rem;
  background: #062b20;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
  color: #f5fff9;
}
.member-fund-modal-dialog-wide { width: min(100%, 51rem); }
.member-fund-modal-dialog > header,
.member-fund-modal-section-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: start; }
.member-fund-modal-dialog > header { padding-bottom: 0.75rem; border-bottom: 1px solid rgba(255,255,255,0.14); margin-bottom: 0.75rem; }
.member-fund-modal-dialog .page-kicker { margin: 0 0 0.1rem; color: rgba(245,255,249,0.62); font-size: 0.67rem; }
.member-fund-modal-dialog h2 { margin: 0; font-size: 1.12rem; }
.member-fund-modal-dialog h3 { margin: 0; font-size: 0.86rem; }
.member-fund-modal-subtitle,
.member-fund-modal-archived { margin: 0.18rem 0 0; color: rgba(245,255,249,0.68); font-size: 0.76rem; }
.member-fund-modal-close { display: grid; place-items: center; flex: 0 0 auto; width: 2rem; height: 2rem; padding: 0; border: 1px solid rgba(255,255,255,0.2); border-radius: 50%; background: rgba(255,255,255,0.06); color: inherit; cursor: pointer; font-size: 1.35rem; line-height: 1; }
.member-fund-modal-close:hover { border-color: var(--accent); color: var(--accent-soft); }
.member-fund-modal-dialog > .member-funds-form-grid { padding: 0 0.05rem; }
.member-fund-modal-section { display: grid; gap: 0.6rem; padding-top: 0.75rem; border-top: 1px solid rgba(255,255,255,0.14); }
.member-fund-modal-section + .member-fund-modal-section { margin-top: 0.85rem; }
.member-fund-modal-section-heading { align-items: center; }
.member-fund-modal-section-heading h3 { display: flex; gap: 0.35rem; align-items: center; }
.member-fund-modal-section-heading h3 span { display: grid; place-items: center; min-width: 1.15rem; height: 1.15rem; border-radius: 50%; background: rgba(255,255,255,0.1); color: rgba(245,255,249,0.82); font-size: 0.65rem; }
.member-fund-modal-section-heading .btn { min-height: 2rem; padding: 0.25rem 0.5rem; font-size: 0.7rem; }
.member-fund-modal-dialog .member-fund-allocation { padding: 0.52rem 0; }
.member-fund-allocation-edit { margin-top: 0.35rem; padding: 0; border: 0; background: transparent; color: var(--accent-soft); cursor: pointer; font: inherit; font-size: 0.7rem; font-weight: 800; }
.member-fund-modal-dialog .member-fund-archive { margin-top: 0.7rem; }
.member-fund-modal-delete { margin-top: 0.7rem; padding-top: 0.6rem; border-top: 1px solid rgba(255,255,255,0.14); }
.member-fund-modal-delete button { padding: 0; border: 0; background: transparent; color: #fecaca; cursor: pointer; font: inherit; font-size: 0.72rem; font-weight: 800; }

.workspace-shell[data-party-theme="lib_dem"] .member-funds-page-dialogs .member-funds-header-note { background: #fff8eb; }
.workspace-shell[data-party-theme="lib_dem"] .member-fund-record-open { border-color: var(--ld-line); background: #fffaf2; }
.workspace-shell[data-party-theme="lib_dem"] .member-fund-record-open:hover,
.workspace-shell[data-party-theme="lib_dem"] .member-fund-record-open:focus-visible { border-color: rgba(217,119,6,0.42); background: #fff3d6; }
.workspace-shell[data-party-theme="lib_dem"] .member-fund-record-meta { color: var(--ld-ink-soft); }
.workspace-shell[data-party-theme="lib_dem"] .member-funds-page-dialogs .member-funds-help { background: #faf7ff; }
.workspace-shell[data-party-theme="lib_dem"] .member-funds-page-dialogs .member-funds-help .member-funds-aside-icon { background: #f0e9ff; color: #6d28d9; }
.workspace-shell[data-party-theme="lib_dem"] .member-fund-modal-dialog { border-color: var(--ld-line); background: #fffdf9; color: var(--ld-ink); box-shadow: 0 28px 70px rgba(84, 45, 12, 0.3); }
.workspace-shell[data-party-theme="lib_dem"] .member-fund-modal-dialog > header,
.workspace-shell[data-party-theme="lib_dem"] .member-fund-modal-section,
.workspace-shell[data-party-theme="lib_dem"] .member-fund-modal-delete { border-color: var(--ld-line); }
.workspace-shell[data-party-theme="lib_dem"] .member-fund-modal-dialog .page-kicker,
.workspace-shell[data-party-theme="lib_dem"] .member-fund-modal-subtitle,
.workspace-shell[data-party-theme="lib_dem"] .member-fund-modal-archived { color: var(--ld-ink-soft); }
.workspace-shell[data-party-theme="lib_dem"] .member-fund-modal-close { border-color: var(--ld-line); background: #fff; color: var(--ld-ink); }
.workspace-shell[data-party-theme="lib_dem"] .member-fund-allocation-edit { color: var(--accent-strong); }
.workspace-shell[data-party-theme="lib_dem"] .member-fund-modal-delete button { color: #b91c1c; }
.workspace-shell[data-party-theme="lib_dem"] .account-return-link { border-color: var(--ld-line); background: #fffdfa; color: var(--ld-ink); }
.workspace-shell[data-party-theme="lib_dem"] .account-return-link:hover { border-color: rgba(217,119,6,0.42); color: var(--accent-strong); }

/* Civic Progress is a quiet private centre, with the same three concerns as
   the iPhone: coverage, useful milestones and the seasonal review prompt. */
.civic-progress-page { width: min(calc(100% - 3rem), 100rem); margin: 0 auto; padding: 1.3rem 0 2rem; }
.civic-progress-header h1 { font-size: clamp(1.85rem,2.4vw,2.35rem); }
.civic-progress-role { margin-bottom: 0.65rem; color: rgba(245,255,249,.72); font-size: .78rem; font-weight: 750; }
.civic-progress-role span { margin-left: .4rem; padding: .13rem .35rem; border-radius: .25rem; background: rgba(255,255,255,.1); color: rgba(245,255,249,.6); font-size: .66rem; }
.civic-progress-tabs { display: flex; gap: .3rem; margin-bottom: .75rem; padding: .25rem; border: 1px solid rgba(255,255,255,.14); border-radius: .55rem; background: rgba(1,41,30,.45); }
.civic-progress-tabs button { flex: 1; min-height: 2.2rem; border: 0; border-radius: .35rem; background: transparent; color: rgba(245,255,249,.7); cursor: pointer; font: inherit; font-size: .78rem; font-weight: 800; }
.civic-progress-tabs button.is-active { background: color-mix(in srgb,var(--accent-soft) 72%,white); color: #083b2b; }
.civic-progress-panel { border: 1px solid rgba(255,255,255,.14); border-radius: .65rem; background: rgba(1,41,30,.5); box-shadow: 0 12px 26px rgba(0,0,0,.1); }
.civic-progress-panel[hidden] { display: none; }
.civic-coverage-overview,.civic-recent-walks,.civic-milestones-main,.civic-next-steps,.civic-seasonal-focus,.civic-related-issues { padding: .9rem 1rem; }
.civic-coverage-overview { border-bottom: 1px solid rgba(255,255,255,.14); }
.civic-section-heading { display: flex; gap: .65rem; align-items: center; }
.civic-section-icon { display:grid; place-items:center; width:2.25rem; height:2.25rem; border-radius:50%; background: color-mix(in srgb,var(--accent-soft) 62%,transparent); color:var(--accent); font-size:1rem; font-weight:900; }
.civic-section-heading h2,.civic-next-steps h2,.civic-related-issues h2 { margin:0; font-size:1rem; }
.civic-section-heading p,.civic-next-steps p,.civic-seasonal-focus > p,.civic-related-issues p,.civic-milestone p,.civic-area p { margin:.16rem 0 0; color:rgba(245,255,249,.68); font-size:.77rem; line-height:1.42; }
.civic-coverage-progress,.civic-next-progress { height:.45rem; margin:.75rem 0; overflow:hidden; border-radius:99px; background:rgba(255,255,255,.12); }
.civic-coverage-progress span,.civic-next-progress span { display:block; height:100%; min-width:0; border-radius:inherit; background:var(--accent); }
.civic-coverage-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); margin:0; }
.civic-coverage-metrics div { display:grid; gap:.13rem; padding:0 .7rem; border-left:1px solid rgba(255,255,255,.14); }
.civic-coverage-metrics div:first-child { padding-left:0; border-left:0; }
.civic-coverage-metrics dt { font-size:.94rem; font-weight:850; }
.civic-coverage-metrics dd,.civic-coverage-fact { margin:0; color:rgba(245,255,249,.63); font-size:.7rem; }
.civic-coverage-fact { margin-top:.65rem; }
.civic-walk-row { display:flex; justify-content:space-between; gap:1rem; padding:.5rem 0; border-top:1px solid rgba(255,255,255,.1); }
.civic-walk-row:first-of-type { margin-top:.6rem; }
.civic-walk-row strong { font-size:.78rem; }
.civic-walk-row span { color:rgba(245,255,249,.64); font-size:.72rem; text-align:right; }
.civic-empty-copy { color:rgba(245,255,249,.64); font-size:.78rem; }
.civic-milestones-layout,.civic-seasonal-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(15rem,.36fr); }
.civic-next-steps,.civic-related-issues { border-left:1px solid rgba(255,255,255,.14); background:rgba(255,255,255,.025); }
.civic-area-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.45rem; margin:.8rem 0; }
.civic-area { padding:.55rem .6rem; border:1px solid rgba(255,255,255,.12); border-radius:.42rem; background:rgba(255,255,255,.035); }
.civic-area strong { display:block; font-size:.73rem; text-transform:capitalize; }
.civic-area span { display:block; margin-top:.2rem; font-size:.67rem; font-weight:800; color:var(--accent-soft); }
.civic-area-needs_review span { color:#fde68a; }.civic-area-in_good_shape span { color:#bbf7d0; }.civic-area-no_data_yet span { color:rgba(245,255,249,.5); }
.civic-area p { font-size:.68rem; }
.civic-milestone-groups { display:grid; gap:.7rem; }
.civic-milestone-groups section h3 { margin:0 0 .35rem; color:var(--accent-soft); font-size:.74rem; text-transform:capitalize; }
.civic-milestone { display:flex; justify-content:space-between; gap:.7rem; align-items:center; padding:.52rem .6rem; border-top:1px solid rgba(255,255,255,.1); }
.civic-milestone:first-of-type { border-top:0; }.civic-milestone strong { font-size:.77rem; }.civic-milestone p { max-width:40rem; font-size:.71rem; }
.civic-milestone form { flex:0 0 auto; }.civic-milestone button { padding:0; border:0; background:transparent; color:var(--accent-soft); cursor:pointer; font:inherit; font-size:.7rem; font-weight:800; }
.civic-acknowledged,.civic-not-yet { flex:0 0 auto; font-size:.68rem; font-weight:750; }.civic-acknowledged { color:#bbf7d0; }.civic-not-yet { color:rgba(245,255,249,.5); }
.civic-next-steps article { display:grid; gap:.32rem; padding:.65rem 0; border-top:1px solid rgba(255,255,255,.12); }.civic-next-steps article:first-of-type { margin-top:.55rem; }.civic-next-steps strong { font-size:.78rem; }.civic-next-steps p { font-size:.72rem; }.civic-next-progress { margin:.15rem 0; }.civic-next-steps small { color:rgba(245,255,249,.55); font-size:.66rem; }.civic-next-steps a { color:var(--accent-soft); font-size:.72rem; font-weight:800; text-decoration:none; }.civic-next-steps a b { float:right; font-size:1rem; }
.civic-seasonal-focus > .page-kicker { margin:0; color:var(--accent-soft); }.civic-seasonal-focus h2 { margin:.2rem 0 0; font-size:1.15rem; }.civic-seasonal-observation { margin:.85rem 0; padding:.65rem; border-left:2px solid var(--accent); background:rgba(255,255,255,.035); }.civic-seasonal-observation strong,.civic-seasonal-focus h3 { font-size:.78rem; }.civic-seasonal-focus h3 { margin:.8rem 0 .35rem; }.civic-seasonal-focus ul { display:grid; gap:.42rem; margin:0; padding-left:1rem; color:rgba(245,255,249,.72); font-size:.74rem; line-height:1.4; }.civic-seasonal-focus li::marker { color:var(--accent); }.civic-seasonal-tags { display:flex; flex-wrap:wrap; gap:.35rem; margin-top:.8rem; }.civic-seasonal-tags span { padding:.25rem .45rem; border-radius:99px; background:color-mix(in srgb,var(--accent-soft) 15%,transparent); color:var(--accent-soft); font-size:.68rem; font-weight:750; }.civic-seasonal-note { margin-top:.85rem!important; padding-top:.65rem; border-top:1px solid rgba(255,255,255,.12); font-size:.71rem!important; }
.civic-related-issues a { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:.15rem .5rem; padding:.58rem 0; border-top:1px solid rgba(255,255,255,.12); color:inherit; text-decoration:none; }.civic-related-issues a:first-of-type { margin-top:.55rem; }.civic-related-issues a:hover strong { color:var(--accent-soft); }.civic-related-issues strong,.civic-related-issues span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.civic-related-issues strong { font-size:.76rem; }.civic-related-issues span { color:rgba(245,255,249,.62); font-size:.7rem; }.civic-related-issues b { grid-row:1 / span 2; grid-column:2; align-self:center; color:var(--accent-soft); font-size:1rem; }
.workspace-shell[data-party-theme="lib_dem"] .civic-progress-role,.workspace-shell[data-party-theme="lib_dem"] .civic-section-heading p,.workspace-shell[data-party-theme="lib_dem"] .civic-next-steps p,.workspace-shell[data-party-theme="lib_dem"] .civic-seasonal-focus > p,.workspace-shell[data-party-theme="lib_dem"] .civic-related-issues p,.workspace-shell[data-party-theme="lib_dem"] .civic-milestone p,.workspace-shell[data-party-theme="lib_dem"] .civic-area p,.workspace-shell[data-party-theme="lib_dem"] .civic-walk-row span,.workspace-shell[data-party-theme="lib_dem"] .civic-empty-copy,.workspace-shell[data-party-theme="lib_dem"] .civic-related-issues span { color:var(--ld-ink-soft); }
.workspace-shell[data-party-theme="lib_dem"] .civic-progress-tabs,.workspace-shell[data-party-theme="lib_dem"] .civic-progress-panel { border-color:var(--ld-line); background:var(--ld-surface); box-shadow:0 12px 26px rgba(146,64,14,.07); }.workspace-shell[data-party-theme="lib_dem"] .civic-progress-tabs button { color:var(--ld-ink-soft); }.workspace-shell[data-party-theme="lib_dem"] .civic-progress-tabs button.is-active { background:#fff0cc; color:var(--ld-ink); }.workspace-shell[data-party-theme="lib_dem"] .civic-progress-role span { background:#fff3d6; color:#92400e; }.workspace-shell[data-party-theme="lib_dem"] .civic-coverage-overview,.workspace-shell[data-party-theme="lib_dem"] .civic-next-steps,.workspace-shell[data-party-theme="lib_dem"] .civic-related-issues,.workspace-shell[data-party-theme="lib_dem"] .civic-area,.workspace-shell[data-party-theme="lib_dem"] .civic-milestone,.workspace-shell[data-party-theme="lib_dem"] .civic-next-steps article,.workspace-shell[data-party-theme="lib_dem"] .civic-related-issues a,.workspace-shell[data-party-theme="lib_dem"] .civic-seasonal-note { border-color:var(--ld-line); }.workspace-shell[data-party-theme="lib_dem"] .civic-next-steps,.workspace-shell[data-party-theme="lib_dem"] .civic-related-issues,.workspace-shell[data-party-theme="lib_dem"] .civic-area,.workspace-shell[data-party-theme="lib_dem"] .civic-seasonal-observation { background:#fffaf2; }.workspace-shell[data-party-theme="lib_dem"] .civic-coverage-metrics div { border-color:var(--ld-line); }.workspace-shell[data-party-theme="lib_dem"] .civic-coverage-metrics dd,.workspace-shell[data-party-theme="lib_dem"] .civic-coverage-fact,.workspace-shell[data-party-theme="lib_dem"] .civic-next-steps small { color:var(--ld-muted); }.workspace-shell[data-party-theme="lib_dem"] .civic-area-needs_review span { color:#a16207; }.workspace-shell[data-party-theme="lib_dem"] .civic-area-in_good_shape span,.workspace-shell[data-party-theme="lib_dem"] .civic-acknowledged { color:#166534; }.workspace-shell[data-party-theme="lib_dem"] .civic-area-no_data_yet span,.workspace-shell[data-party-theme="lib_dem"] .civic-not-yet { color:var(--ld-muted); }.workspace-shell[data-party-theme="lib_dem"] .civic-milestone button,.workspace-shell[data-party-theme="lib_dem"] .civic-next-steps a,.workspace-shell[data-party-theme="lib_dem"] .civic-related-issues a:hover strong,.workspace-shell[data-party-theme="lib_dem"] .civic-related-issues b { color:var(--accent-strong); }.workspace-shell[data-party-theme="lib_dem"] .civic-seasonal-focus ul { color:var(--ld-ink-soft); }
@media (max-width:980px){.civic-milestones-layout,.civic-seasonal-layout{grid-template-columns:1fr}.civic-next-steps,.civic-related-issues{border-top:1px solid rgba(255,255,255,.14);border-left:0}.workspace-shell[data-party-theme="lib_dem"] .civic-next-steps,.workspace-shell[data-party-theme="lib_dem"] .civic-related-issues{border-color:var(--ld-line)}}
@media (max-width:700px){.civic-progress-page{width:min(calc(100% - 2rem),100rem)}.civic-area-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.civic-coverage-metrics{grid-template-columns:1fr}.civic-coverage-metrics div{padding:.45rem 0;border-top:1px solid rgba(255,255,255,.14);border-left:0}.civic-coverage-metrics div:first-child{padding-top:0;border-top:0}.workspace-shell[data-party-theme="lib_dem"] .civic-coverage-metrics div{border-color:var(--ld-line)}}

/* Desktop Civic Centre density: each tab should be a one-screen review, not
   a sequence of equal-weight cards. */
.civic-progress-compact { padding-top: 1rem; }
.civic-progress-compact .civic-progress-header { align-items: start; margin-bottom: .3rem; }
.civic-progress-compact .civic-progress-header h1 { font-size: 1.85rem; margin: .08rem 0; }
.civic-progress-compact .civic-progress-role { margin: .48rem 0 0; font-size: .66rem; }
.civic-progress-compact .civic-progress-tabs { margin-bottom: .65rem; }
.civic-progress-compact .civic-progress-tabs button { min-height: 2rem; }
.civic-progress-compact .civic-progress-panel { min-height: 0; }
.civic-view-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(16rem, .72fr); }
.civic-view-grid .civic-related-issues { border-top: 0; border-left: 1px solid rgba(255,255,255,.14); }
.civic-coverage-main { display: grid; }
.civic-progress-compact .civic-coverage-overview,.civic-progress-compact .civic-recent-walks,.civic-progress-compact .civic-seasonal-focus,.civic-progress-compact .civic-related-issues,.civic-progress-compact .civic-milestones-main,.civic-progress-compact .civic-next-steps { padding: .8rem .9rem; }
.civic-progress-compact .civic-coverage-overview { padding-bottom: .65rem; }
.civic-progress-compact .civic-coverage-progress { margin: .55rem 0; }
.civic-progress-compact .civic-coverage-metrics div { padding: 0 .55rem; }
.civic-progress-compact .civic-coverage-fact { margin-top: .5rem; }
.civic-progress-compact .civic-recent-walks { padding-top: .65rem; }
.civic-progress-compact .civic-walk-row { padding: .34rem 0; }
.civic-rail-heading { display:flex; justify-content:space-between; gap:.7rem; align-items:center; }
.civic-rail-heading a { color:var(--accent-soft); font-size:.68rem; font-weight:800; text-decoration:none; }
.civic-progress-compact .civic-related-issues a { padding:.48rem 0; }
.civic-progress-compact .civic-related-issues a:first-of-type { margin-top:.35rem; }
.civic-progress-compact .civic-seasonal-focus h2 { font-size:1.05rem; }
.civic-progress-compact .civic-seasonal-observation { margin:.65rem 0; padding:.55rem .6rem; }
.civic-progress-compact .civic-seasonal-focus h3 { margin:.6rem 0 .25rem; }
.civic-progress-compact .civic-seasonal-focus ul { gap:.32rem; font-size:.72rem; }
.civic-progress-compact .civic-seasonal-tags { margin-top:.6rem; }
.civic-progress-compact .civic-seasonal-note { margin-top:.6rem!important; padding-top:.5rem; }
.civic-milestone-dashboard { display:grid; grid-template-columns:minmax(0,1.55fr) minmax(16rem,.72fr); }
.civic-progress-compact .civic-milestone-dashboard .civic-area-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:.45rem; margin:.75rem 0 0; }
.civic-progress-compact .civic-milestone-dashboard .civic-area { min-height:5.65rem; padding:.6rem; }
.civic-progress-compact .civic-milestone-dashboard .civic-area strong { font-size:.73rem; }.civic-progress-compact .civic-milestone-dashboard .civic-area span { font-size:.68rem; }.civic-progress-compact .civic-milestone-dashboard .civic-area p { font-size:.68rem; }
.civic-achievement-strip { display:flex; flex-wrap:wrap; gap:.3rem .5rem; align-items:center; padding-top:.55rem; border-top:1px solid rgba(255,255,255,.12); }
.civic-achievement-strip strong { font-size:.7rem; }.civic-achievement-strip span { color:rgba(245,255,249,.64); font-size:.66rem; }
.civic-achievement-strip form { display:inline; }.civic-achievement-strip button { margin-left:.18rem; padding:0; border:0; background:transparent; color:var(--accent-soft); cursor:pointer; font:inherit; font-size:.64rem; font-weight:800; }
.civic-progress-compact .civic-next-steps article { padding:.48rem 0; }.civic-progress-compact .civic-next-steps p { font-size:.68rem; }.civic-progress-compact .civic-next-progress { margin:.1rem 0; }
.workspace-shell[data-party-theme="lib_dem"] .civic-view-grid .civic-related-issues { border-color:var(--ld-line); }.workspace-shell[data-party-theme="lib_dem"] .civic-achievement-strip { border-color:var(--ld-line); }.workspace-shell[data-party-theme="lib_dem"] .civic-rail-heading a { color:var(--accent-strong); }.workspace-shell[data-party-theme="lib_dem"] .civic-achievement-strip span { color:var(--ld-ink-soft); }
.workspace-shell[data-party-theme="lib_dem"] .civic-achievement-strip button { color:var(--accent-strong); }
@media (max-width:980px){.civic-view-grid,.civic-milestone-dashboard{grid-template-columns:1fr}.civic-view-grid .civic-related-issues{border-top:1px solid rgba(255,255,255,.14);border-left:0}.civic-progress-compact .civic-area-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.workspace-shell[data-party-theme="lib_dem"] .civic-view-grid .civic-related-issues{border-color:var(--ld-line)}}
@media (max-width:700px){.civic-progress-compact .civic-area-grid,.civic-progress-compact .civic-milestone-dashboard .civic-area-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.civic-progress-compact .civic-progress-panel{min-height:0}.civic-progress-compact .civic-coverage-metrics div{padding:.35rem 0}.civic-progress-compact .civic-related-issues{border-top:1px solid rgba(255,255,255,.14)}}

/* Civic acknowledgement details are available on demand, keeping all three views equally compact. */
.civic-progress-compact .civic-seasonal-tags span { background:rgba(255,255,255,.12); color:#fef3c7; }
.civic-acknowledgements-button { margin-left:auto; padding:.24rem .45rem; border:1px solid rgba(255,255,255,.2); border-radius:.35rem; background:rgba(255,255,255,.06); color:rgba(245,255,249,.9); cursor:pointer; font:inherit; font-size:.68rem; font-weight:800; white-space:nowrap; }
.civic-acknowledgements-button:hover { border-color:var(--accent); color:var(--accent-soft); }
.civic-ack-modal { position:fixed; z-index:1000; inset:0; display:grid; place-items:center; padding:1rem; }
.civic-ack-modal[hidden] { display:none; }
.civic-ack-modal-backdrop { position:absolute; inset:0; background:rgba(0,12,8,.68); backdrop-filter:blur(3px); }
.civic-ack-modal-dialog { position:relative; z-index:1; width:min(100%,38rem); max-height:calc(100vh - 2rem); overflow:auto; padding:1rem; border:1px solid rgba(255,255,255,.18); border-radius:.65rem; background:#062b20; color:#f5fff9; box-shadow:0 28px 70px rgba(0,0,0,.45); }
.civic-ack-modal-dialog header { display:flex; justify-content:space-between; gap:1rem; padding-bottom:.7rem; border-bottom:1px solid rgba(255,255,255,.14); }
.civic-ack-modal-dialog header h2 { margin:.08rem 0; font-size:1rem; }
.civic-ack-modal-dialog header p { margin:0; color:rgba(245,255,249,.65); font-size:.72rem; }
.civic-ack-modal-dialog header button { display:grid; place-items:center; width:1.9rem; height:1.9rem; padding:0; border:1px solid rgba(255,255,255,.2); border-radius:50%; background:rgba(255,255,255,.06); color:inherit; cursor:pointer; font-size:1.2rem; }
.civic-ack-modal-dialog article { display:flex; justify-content:space-between; gap:.75rem; align-items:center; padding:.65rem 0; border-top:1px solid rgba(255,255,255,.1); }
.civic-ack-modal-dialog article:first-of-type { border-top:0; }
.civic-ack-modal-dialog strong { font-size:.77rem; }.civic-ack-modal-dialog article p { margin:.15rem 0 0; color:rgba(245,255,249,.65); font-size:.71rem; }
.civic-ack-modal-dialog article > span { color:#bbf7d0; font-size:.7rem; font-weight:800; }.civic-ack-modal-dialog form { flex:0 0 auto; }.civic-ack-modal-dialog form button { padding:0; border:0; background:transparent; color:var(--accent-soft); cursor:pointer; font:inherit; font-size:.7rem; font-weight:800; }
.workspace-shell[data-party-theme="lib_dem"] .civic-progress-compact .civic-seasonal-tags span { background:#fff0cf; color:#92400e; }
.workspace-shell[data-party-theme="lib_dem"] .civic-acknowledgements-button { border-color:var(--ld-line); background:#fffdfa; color:var(--ld-ink); }
.workspace-shell[data-party-theme="lib_dem"] .civic-ack-modal-dialog { border-color:var(--ld-line); background:#fffdf9; color:var(--ld-ink); box-shadow:0 28px 70px rgba(84,45,12,.3); }
.workspace-shell[data-party-theme="lib_dem"] .civic-ack-modal-dialog header,.workspace-shell[data-party-theme="lib_dem"] .civic-ack-modal-dialog article { border-color:var(--ld-line); }
.workspace-shell[data-party-theme="lib_dem"] .civic-ack-modal-dialog header p,.workspace-shell[data-party-theme="lib_dem"] .civic-ack-modal-dialog article p { color:var(--ld-ink-soft); }
.workspace-shell[data-party-theme="lib_dem"] .civic-ack-modal-dialog header button { border-color:var(--ld-line); background:#fff; color:var(--ld-ink); }
.workspace-shell[data-party-theme="lib_dem"] .civic-ack-modal-dialog article > span { color:#166534; }.workspace-shell[data-party-theme="lib_dem"] .civic-ack-modal-dialog form button { color:var(--accent-strong); }

@media (max-width: 700px) {
  .member-funds-page-dialogs .member-funds-header-note { width: 100%; }
  .member-fund-modal { padding: 0.5rem; }
  .member-fund-modal-dialog { max-height: calc(100vh - 1rem); padding: 0.8rem; }
}
@media (max-width: 480px) {
  .member-funds-heading-actions { justify-content: flex-start; }
  .member-fund-modal-dialog-wide { width: 100%; }
  .account-return-link { min-height: 1.85rem; }
}

@media (max-width: 700px) {
  .account-profile-photo-form { grid-template-columns: 1fr; }
  .account-profile-photo-actions { justify-content: flex-start; }
  .account-profile-access-callout { grid-template-columns: 1fr; }
}

/* Profile-photo changes are an occasional action. Keep them behind the avatar
   rather than allowing upload controls to dominate the account overview. */
.account-profile-photo-menu,
.account-profile-photo-control {
  position: relative;
  flex: 0 0 auto;
}

.account-profile-photo-menu > summary {
  display: grid;
  position: relative;
  cursor: pointer;
  list-style: none;
}

.account-profile-photo-menu > summary::-webkit-details-marker { display: none; }

.account-profile-photo-button {
  padding: 0;
  cursor: pointer;
  appearance: none;
  font: inherit;
}

.account-profile-avatar-edit {
  display: grid;
  place-items: center;
  position: absolute;
  right: 0.08rem;
  bottom: 0.08rem;
  width: 1.3rem;
  height: 1.3rem;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
}

.account-profile-avatar-edit svg {
  width: 0.72rem;
  height: 0.72rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.account-profile-photo-panel {
  display: none;
  position: absolute;
  top: calc(100% + 0.55rem);
  left: 0;
  z-index: 80;
  gap: 0.65rem;
  width: min(18rem, calc(100vw - 3rem));
  padding: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.55rem;
  background: rgba(1, 41, 30, 0.98);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.24);
}

.account-profile-photo-panel[hidden] { display: none; }
.account-profile-photo-panel:not([hidden]) { display: grid; }

.account-profile-photo-menu[open] .account-profile-photo-panel { display: grid; }

.account-profile-photo-panel > div {
  display: grid;
  gap: 0.12rem;
}

.account-profile-photo-panel small {
  font-size: 0.72rem;
}

.account-profile-photo-panel form {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  margin: 0;
}

.account-profile-photo-picker {
  display: inline-flex;
  min-width: 0;
  flex: 1 1 auto;
  align-items: center;
  min-height: 2.15rem;
  padding: 0 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0.4rem;
  background: rgba(255, 255, 255, 0.07);
  color: inherit;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 750;
}

.account-profile-photo-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

.account-profile-photo-panel .account-profile-remove { color: #fecaca; }

.workspace-shell[data-party-theme="lib_dem"] .account-profile-photo-panel {
  border-color: var(--ld-line);
  background: rgba(255, 255, 255, 0.99);
  box-shadow: 0 18px 38px rgba(146, 64, 14, 0.16);
}

.workspace-shell[data-party-theme="lib_dem"] .account-profile-avatar-edit { border-color: #fff; }
.workspace-shell[data-party-theme="lib_dem"] .account-profile-photo-picker { border-color: var(--ld-line); background: #fffdf8; }
.workspace-shell[data-party-theme="lib_dem"] .account-profile-photo-panel .account-profile-remove { color: #b91c1c; }

.workspace-user-chip-link { text-decoration: none; }
.workspace-user-chip-link.is-active { border-color: rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.08); }
.account-profile-tool-links .account-profile-signout { color: #fecaca; }
.workspace-shell[data-party-theme="lib_dem"] .account-profile-tool-links .account-profile-signout { color: #b91c1c; }

/* The Liberal Democrat workspace is the light portal shown in the supplied
   mock. Keep settings tokens local so default/custom roles remain themed. */
.workspace-shell[data-party-theme="lib_dem"] .settings-workspace {
  border-color: rgba(217, 119, 6, 0.13);
}

.workspace-shell[data-party-theme="lib_dem"] .settings-context-rail {
  border-color: rgba(217, 119, 6, 0.14);
  background: rgba(255, 255, 255, 0.48);
}

.workspace-shell[data-party-theme="lib_dem"] .settings-context-rail h2,
.workspace-shell[data-party-theme="lib_dem"] .settings-page-header h1,
.workspace-shell[data-party-theme="lib_dem"] .settings-card h2,
.workspace-shell[data-party-theme="lib_dem"] .settings-area-copy strong,
.workspace-shell[data-party-theme="lib_dem"] .settings-role-facts dd,
.workspace-shell[data-party-theme="lib_dem"] .settings-theme-form label,
.workspace-shell[data-party-theme="lib_dem"] .settings-add-names-card label,
.workspace-shell[data-party-theme="lib_dem"] .settings-legacy-list label {
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .settings-context-link,
.workspace-shell[data-party-theme="lib_dem"] .settings-context-current {
  border-color: rgba(217, 119, 6, 0.14);
  background: rgba(255, 255, 255, 0.75);
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .settings-context-link:hover,
.workspace-shell[data-party-theme="lib_dem"] .settings-context-link.is-active,
.workspace-shell[data-party-theme="lib_dem"] .settings-context-current {
  border-color: rgba(226, 138, 0, 0.26);
  background: #fff1cf;
  color: #7c2d12;
}

.workspace-shell[data-party-theme="lib_dem"] .settings-back-link {
  border-color: rgba(217, 119, 6, 0.14);
  background: rgba(255, 255, 255, 0.75);
  color: var(--ld-ink);
  box-shadow: 0 8px 18px rgba(146, 64, 14, 0.07);
}

.workspace-shell[data-party-theme="lib_dem"] .settings-back-link:hover {
  background: #fff1cf;
  color: #7c2d12;
}

.workspace-shell[data-party-theme="lib_dem"] .settings-page-header p,
.workspace-shell[data-party-theme="lib_dem"] .settings-card-head p,
.workspace-shell[data-party-theme="lib_dem"] .settings-empty-copy,
.workspace-shell[data-party-theme="lib_dem"] .settings-form-actions p,
.workspace-shell[data-party-theme="lib_dem"] .settings-area-copy small {
  color: var(--ld-muted);
}

.workspace-shell[data-party-theme="lib_dem"] .settings-role-page-header .page-kicker,
.workspace-shell[data-party-theme="lib_dem"] .settings-add-role-disclosure > summary small {
  color: var(--ld-muted);
}

.workspace-shell[data-party-theme="lib_dem"] .settings-card {
  border-color: rgba(217, 119, 6, 0.14);
  background: rgba(255, 255, 255, 0.91);
  box-shadow: 0 16px 32px rgba(146, 64, 14, 0.08);
}

.workspace-shell[data-party-theme="lib_dem"] .settings-role-facts > div,
.workspace-shell[data-party-theme="lib_dem"] .settings-area-list li,
.workspace-shell[data-party-theme="lib_dem"] .settings-legacy-list li,
.workspace-shell[data-party-theme="lib_dem"] .settings-area-disclosure,
.workspace-shell[data-party-theme="lib_dem"] .settings-role-coverage,
.workspace-shell[data-party-theme="lib_dem"] .settings-role-item {
  border-color: rgba(217, 119, 6, 0.13);
}

.workspace-shell[data-party-theme="lib_dem"] .settings-area-list li,
.workspace-shell[data-party-theme="lib_dem"] .settings-legacy-list li,
.workspace-shell[data-party-theme="lib_dem"] .settings-area-disclosure,
.workspace-shell[data-party-theme="lib_dem"] .settings-role-coverage,
.workspace-shell[data-party-theme="lib_dem"] .settings-role-item {
  background: rgba(255, 253, 248, 0.88);
}

.workspace-shell[data-party-theme="lib_dem"] .settings-role-facts dt {
  color: #8a6d3b;
}

.workspace-shell[data-party-theme="lib_dem"] .settings-area-handle {
  color: #78869a;
}

.workspace-shell[data-party-theme="lib_dem"] :is(.settings-area-disclosure summary, .settings-role-coverage summary, .settings-role-item h3, .settings-role-theme-row label, .settings-role-picker label, .settings-check-row) {
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .settings-role-options,
.workspace-shell[data-party-theme="lib_dem"] .settings-role-options .settings-role-theme-row,
.workspace-shell[data-party-theme="lib_dem"] .settings-add-role-body {
  border-color: rgba(217,119,6,.13);
}

.workspace-shell[data-party-theme="lib_dem"] .settings-role-options { background:#fffaf2; }
.workspace-shell[data-party-theme="lib_dem"] .settings-role-options summary,
.workspace-shell[data-party-theme="lib_dem"] .settings-add-role-disclosure > summary { color:var(--ld-ink); }

.workspace-shell[data-party-theme="lib_dem"] .settings-role-compact .settings-role-disclosures > details > summary { color:var(--ld-muted); }
.workspace-shell[data-party-theme="lib_dem"] .settings-role-compact .settings-role-disclosures > details[open] > p,
.workspace-shell[data-party-theme="lib_dem"] .settings-role-compact .settings-role-disclosures > details[open] > .settings-role-covered-area-list,
.workspace-shell[data-party-theme="lib_dem"] .settings-role-compact .settings-role-disclosures > details[open] > .settings-role-theme-row { border-color:var(--ld-line); background:#fffdf9; color:var(--ld-ink); box-shadow:0 14px 28px rgba(146,64,14,.16); }
.workspace-shell[data-party-theme="lib_dem"] .settings-role-compact .settings-role-disclosures > details[open] > p,
.workspace-shell[data-party-theme="lib_dem"] .settings-role-compact .settings-role-disclosures > details[open] > .settings-role-covered-area-list { color:var(--ld-ink-soft); }
.workspace-shell[data-party-theme="lib_dem"] .settings-role-compact .settings-role-disclosures > details[open] > .settings-role-covered-area-list { box-shadow:none; }
.workspace-shell[data-party-theme="lib_dem"] .settings-role-badge { background:#ffddb7; color:#7c2d12; }.workspace-shell[data-party-theme="lib_dem"] .settings-role-badge.is-muted { background:#fff0cc; color:#8a5a12; }
.workspace-shell[data-party-theme="lib_dem"] .settings-add-role-modal { border-color:var(--ld-line); background:#fffdf9; color:var(--ld-ink); box-shadow:0 26px 70px rgba(84,45,12,.32); }
.workspace-shell[data-party-theme="lib_dem"] .settings-add-role-modal header { border-color:var(--ld-line); }.workspace-shell[data-party-theme="lib_dem"] .settings-add-role-modal header .page-kicker,.workspace-shell[data-party-theme="lib_dem"] .settings-add-role-modal header p:last-child { color:var(--ld-muted); }.workspace-shell[data-party-theme="lib_dem"] .settings-dialog-close { border-color:var(--ld-line); background:#fff; color:var(--ld-ink); }
.workspace-shell[data-party-theme="lib_dem"] .settings-role-inline-action { color:#c2410c; }
.workspace-shell[data-party-theme="lib_dem"] .settings-coverage-editor-modal .settings-role-coverage-editor { border-color:var(--ld-line); }
.workspace-shell[data-party-theme="lib_dem"] .settings-coverage-editor-modal .settings-role-coverage-copy small,.workspace-shell[data-party-theme="lib_dem"] .settings-coverage-editor-modal .settings-role-coverage-editor label span { color:var(--ld-muted); }

.workspace-shell[data-party-theme="lib_dem"] :is(.settings-role-item p, .settings-role-coverage p) {
  color: var(--ld-muted);
}

.workspace-shell[data-party-theme="lib_dem"] .settings-context-divider {
  background: rgba(217, 119, 6, 0.14);
}

/* Account photos are deliberately cropped for their circular avatar frame.
   The source photos are retained untouched; this only corrects the visual crop. */
.workspace-user-chip .workspace-avatar img,
.workspace-account-head .workspace-avatar img {
  object-position: 50% 72%;
  transform: scale(1.08);
}

@media (max-width: 760px) {
  .settings-workspace {
    grid-template-columns: 1fr;
  }

  .settings-context-rail {
    gap: 0.65rem;
    padding: 1rem;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .settings-content {
    width: 100%;
    padding: 1rem 1rem 2.5rem;
  }
}

@media (max-width: 520px) {
  .settings-role-facts,
  .settings-form-grid {
    grid-template-columns: 1fr;
  }

  .settings-role-facts > div:last-child {
    grid-column: auto;
  }

  .settings-form-actions,
  .settings-card-head,
  .settings-role-item-head,
  .settings-role-theme-row,
  .settings-add-role-submit {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-role-page-header {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-role-item-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Final archive workspace density: these rules deliberately follow all
   legacy archive styles so Archive shares the compact record-workspace
   treatment used by Issues, Enquiries, and Activity. */
.archive-workspace {
  grid-template-columns: minmax(17.5rem, 21rem) minmax(0, 1fr);
  min-height: calc(100vh - 62px);
}

.archive-finder {
  position: sticky;
  top: 62px;
  max-height: calc(100vh - 62px);
  gap: 0.85rem;
  padding: 1.25rem 1rem;
}

.archive-finder-heading h1 {
  font-family: inherit;
  font-size: 1.15rem;
}

.archive-finder-filters {
  gap: 0.5rem;
}

.archive-finder-filters input,
.archive-finder-filters select {
  min-height: 2.45rem;
  border-radius: 0.6rem;
}

.archive-finder-list {
  gap: 0;
  max-height: none;
  padding-right: 0;
}

.archive-finder-record {
  gap: 0.25rem;
  padding: 0.75rem 0.82rem;
  border-width: 0 0 1px 3px;
  border-radius: 0;
  background: transparent;
}

.archive-finder-record:hover,
.archive-finder-record.is-active {
  border-left-color: #4ade80;
  background: rgba(255, 255, 255, 0.07);
}

.archive-finder-record strong {
  font-size: 0.86rem;
}

.archive-finder-record > span:not(.archive-record-type),
.archive-finder-record small,
.archive-finder-empty {
  font-size: 0.75rem;
}

.archive-content {
  gap: 1rem;
  padding: 1.8rem 2.25rem 2.5rem;
}

.archive-page-header h1 {
  font-size: clamp(2rem, 3vw, 2.55rem);
}

.archive-page-header p:not(.page-kicker) {
  max-width: 44rem;
  font-size: 0.92rem;
}

.archive-record-strip {
  margin: 0;
}

.archive-detail-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(18rem, 0.75fr);
  gap: 0.85rem;
}

.archive-record-panel,
.archive-review-panel,
.archive-about-panel {
  padding: 0.9rem;
  border-radius: 0.65rem;
  box-shadow: none;
}

.archive-side-stack {
  gap: 0.85rem;
}

.archive-selected-heading h2 {
  font-size: 1.08rem;
}

.archive-selected-facts {
  gap: 0;
  margin: 0.8rem 0;
  padding: 0.66rem 0.72rem;
  border-radius: 0.6rem;
}

.archive-selected-facts div {
  padding: 0 0.7rem;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0;
  background: transparent;
}

.archive-selected-facts div:first-child {
  padding-left: 0;
  border-left: 0;
}

.archive-review-panel dl {
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.archive-review-panel dl div {
  padding: 0.55rem 0;
  border-radius: 0;
  background: transparent;
}

.workspace-shell[data-party-theme="lib_dem"] .archive-finder-record {
  background: transparent;
}

.workspace-shell[data-party-theme="lib_dem"] .archive-finder-record:hover,
.workspace-shell[data-party-theme="lib_dem"] .archive-finder-record.is-active {
  border-left-color: #ffb21a;
  background: #fff1cf;
}

.workspace-shell[data-party-theme="lib_dem"] .archive-selected-facts {
  background: rgba(255, 255, 255, 0.74);
}

@media (max-width: 1050px) {
  .archive-workspace { grid-template-columns: minmax(15.5rem, 18rem) minmax(0, 1fr); }
  .archive-detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .archive-finder { position: static; max-height: none; }
  .archive-content { padding: 1.25rem 1rem 2rem; }
  .archive-selected-facts { grid-template-columns: 1fr; gap: 0.35rem; }
  .archive-selected-facts div { padding-left: 0; border-left: 0; }
}

/* Archive now uses the same record-workspace structure as Issues and
   Enquiries. These remain intentionally small, archive-specific details only;
   shared spacing, surfaces, finder behaviour, and theme colours come from the
   thread and issue workspace components above. */
.archive-thread-workspace .archive-thread-finder-filters > .btn {
  justify-self: start;
}

/* Archive deliberately consumes the same finder vocabulary as Issues.  The
   base components supply a matching light or role-colour surface; these rules
   only keep archive's existing submit action and short record metadata tidy. */
.archive-page-shell .archive-thread-finder-filters .portal-finder-actions {
  display: flex;
  justify-content: flex-start;
}

.archive-page-shell .archive-thread-finder-filters .portal-finder-actions .btn {
  width: auto;
}

.archive-page-shell .archive-thread-finder-filters .portal-toolbar-select {
  grid-column: 1 / -1;
}

.archive-page-shell .archive-thread-finder .finder-record-meta {
  white-space: nowrap;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-issues.archive-page-shell .archive-record-strip,
.workspace-shell:not([data-party-theme="lib_dem"]) .portal-page-shell-issues.archive-page-shell .archive-record-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.archive-thread-workspace .archive-record-kind {
  width: fit-content;
}

.archive-thread-workspace .archive-selected-record-head {
  margin-bottom: 0.68rem;
}

.archive-thread-workspace .archive-thread-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.archive-thread-workspace .archive-profile-link {
  flex: 0 0 auto;
  margin-top: 0.1rem;
}

.archive-thread-workspace .archive-selected-record {
  overflow: visible;
}

.archive-thread-workspace .archive-selected-record-controls {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.archive-thread-workspace .archive-record-menu {
  position: relative;
}

.archive-thread-workspace .archive-record-menu-trigger {
  display: grid;
  width: 1.85rem;
  height: 1.85rem;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0.42rem;
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.archive-thread-workspace .archive-record-menu.is-open .archive-record-menu-trigger {
  border-color: var(--accent, #ffb21a);
  background: color-mix(in srgb, var(--accent-soft, #ffb21a) 38%, transparent);
}

.archive-thread-workspace .archive-record-menu-panel {
  position: absolute;
  top: calc(100% + 0.38rem);
  right: 0;
  z-index: 45;
  display: grid;
  width: min(18rem, calc(100vw - 3rem));
  gap: 0.18rem;
  padding: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.52rem;
  background: #062b20;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.24);
}

.archive-thread-workspace .archive-record-menu-panel[hidden] { display: none; }

.archive-thread-workspace .archive-record-menu-panel form { display: grid; gap: 0.35rem; margin: 0; }

.archive-thread-workspace .archive-record-menu-heading,
.archive-thread-workspace .archive-record-menu-warning {
  margin: 0.2rem 0.35rem;
  font-size: 0.68rem;
  font-weight: 780;
}

.archive-thread-workspace .archive-record-menu-heading { color: rgba(245, 255, 249, 0.62); text-transform: uppercase; letter-spacing: 0.06em; }
.archive-thread-workspace .archive-record-menu-warning { color: rgba(245, 255, 249, 0.66); line-height: 1.35; }

.archive-thread-workspace .archive-record-menu-action {
  width: 100%;
  min-height: 2.05rem;
  padding: 0.38rem 0.5rem;
  border: 0;
  border-radius: 0.34rem;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 760;
  text-align: left;
  cursor: pointer;
}

.archive-thread-workspace .archive-record-menu-action:hover { background: rgba(255, 255, 255, 0.09); }
.archive-thread-workspace .archive-record-menu-action.is-danger { color: #fecaca; }
.archive-thread-workspace .archive-record-menu-divider { height: 1px; margin: 0.22rem 0; background: rgba(255, 255, 255, 0.14); }

.archive-thread-workspace .archive-menu-confirm-form { padding: 0.12rem 0; }
.archive-thread-workspace .archive-menu-confirm-form input { min-height: 2rem; padding: 0.36rem 0.48rem; font-size: 0.72rem; }

.archive-thread-workspace .archive-selected-record-head h2 {
  margin: 0.34rem 0 0;
  font-size: 1rem;
}

.archive-thread-workspace .archive-selected-record-facts {
  margin: 0 0 0.78rem;
}

.archive-thread-workspace .archive-selected-record-facts > div:first-child { min-width: 10rem; }
.archive-thread-workspace .archive-selected-record-facts > div:first-child dd { white-space: nowrap; }

.archive-thread-workspace .archive-record-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 0.1rem;
}

.archive-thread-workspace .archive-record-actions .btn {
  min-height: 2.25rem;
  padding: 0.42rem 0.7rem;
  font-size: 0.76rem;
}

.archive-thread-workspace .archive-destructive-actions {
  margin-top: 0.8rem;
  padding: 0.62rem 0.75rem;
  border: 1px solid rgba(31, 53, 79, 0.1);
  border-radius: 7px;
  background: rgba(248, 251, 255, 0.76);
}

.archive-thread-workspace .archive-destructive-actions summary {
  font-size: 0.76rem;
}

.archive-thread-workspace .archive-destructive-actions .archive-confirm-form {
  gap: 0.5rem;
}

.archive-thread-workspace .archive-destructive-actions .archive-confirm-form input,
.archive-thread-workspace .archive-destructive-actions .archive-confirm-form .btn {
  min-height: 2.25rem;
  padding: 0.4rem 0.65rem;
  font-size: 0.76rem;
}

.archive-thread-workspace .archive-context-panel {
  display: grid;
  gap: 0.5rem;
}

.archive-thread-workspace .archive-context-panel .thread-block-head {
  margin: 0;
}

.archive-thread-workspace .archive-context-panel > p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.42;
}

.archive-review-list {
  display: grid;
  gap: 0;
  margin: 0.1rem 0 0;
}

.archive-review-list div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.55rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.archive-review-list dt {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.78rem;
  font-weight: 750;
}

.archive-review-list dd {
  margin: 0;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 850;
}

.workspace-shell[data-party-theme="lib_dem"] .archive-thread-workspace .archive-context-panel > p,
.workspace-shell[data-party-theme="lib_dem"] .archive-thread-workspace .archive-review-list dt {
  color: var(--ld-ink-soft);
}

.workspace-shell[data-party-theme="lib_dem"] .archive-thread-workspace .archive-review-list div {
  border-top-color: var(--ld-line);
}

.workspace-shell[data-party-theme="lib_dem"] .archive-thread-workspace .archive-review-list dd {
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .archive-thread-workspace .archive-record-menu-trigger {
  border-color: var(--ld-line);
  background: #fff;
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] .archive-thread-workspace .archive-record-menu.is-open .archive-record-menu-trigger {
  border-color: #f1bf69;
  background: #fff1cf;
}

.workspace-shell[data-party-theme="lib_dem"] .archive-thread-workspace .archive-record-menu-panel {
  border-color: var(--ld-line);
  background: #fffdf9;
  color: var(--ld-ink);
  box-shadow: 0 16px 32px rgba(146, 64, 14, 0.16);
}

.workspace-shell[data-party-theme="lib_dem"] .archive-thread-workspace .archive-record-menu-heading,
.workspace-shell[data-party-theme="lib_dem"] .archive-thread-workspace .archive-record-menu-warning { color: var(--ld-muted); }
.workspace-shell[data-party-theme="lib_dem"] .archive-thread-workspace .archive-record-menu-action:hover { background: #fff1cf; }
.workspace-shell[data-party-theme="lib_dem"] .archive-thread-workspace .archive-record-menu-divider { background: var(--ld-line); }

@media (max-width: 980px) {
  .archive-thread-workspace,
  .archive-thread-workspace .issue-desktop-grid {
    grid-template-columns: 1fr;
  }

  .archive-thread-workspace .thread-finder {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    position: static;
    max-height: none;
  }
}

@media (max-width: 42rem) {
  .archive-thread-workspace .archive-thread-header {
    align-items: stretch;
    flex-direction: column;
  }

  .archive-thread-workspace .archive-profile-link { align-self: flex-start; }
  .archive-thread-workspace .archive-selected-record-facts > div:first-child { min-width: 0; }
  .archive-thread-workspace .archive-selected-record-facts > div:first-child dd { white-space: normal; }
}

/* Contact support follows the compact two-column account workspace rather than
   placing a small composer on one edge of a very wide portal page. */
.account-support-page {
  display: grid;
  width: min(calc(100% - 3rem), 100rem);
  gap: 0.9rem;
  margin: 0 auto;
  padding: 1.3rem 0 2rem;
  color: #f5fff9;
}

.account-support-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.account-support-header .page-kicker { margin: 0; color: rgba(245, 255, 249, 0.65); }
.account-support-header h1 { margin: 0.18rem 0 0; color: inherit; font-size: clamp(1.85rem, 2.4vw, 2.35rem); }
.account-support-header .support-text { margin: 0.18rem 0 0; color: rgba(245, 255, 249, 0.7); }

.account-support-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(18rem, 0.72fr); gap: 0.9rem; align-items: start; }
.account-support-page .thread-block { padding: 1.05rem 1.15rem; border-radius: 0.65rem; box-shadow: none; }
.account-support-panel-heading { margin-bottom: 0.8rem; }
.account-support-panel-heading h2,
.account-support-context-panel h2,
.account-support-direct-panel h2 { margin: 0; color: inherit; font-size: 1rem; }
.account-support-panel-heading p,
.account-support-context-panel p,
.account-support-direct-panel p { margin: 0.28rem 0 0; color: rgba(245, 255, 249, 0.7); font-size: 0.78rem; line-height: 1.42; }

.account-support-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem 0.75rem; }
.account-support-form label { display: grid; gap: 0.28rem; color: inherit; font-size: 0.76rem; font-weight: 760; }
.account-support-form label span { color: rgba(245, 255, 249, 0.62); font-size: 0.68rem; font-weight: 650; }
.account-support-form select,
.account-support-form textarea { width: 100%; min-height: 2.2rem; padding: 0.46rem 0.55rem; border-radius: 0.42rem; font: inherit; font-size: 0.78rem; }
.account-support-form textarea { min-height: auto; resize: none; line-height: 1.42; }
.account-support-wide { grid-column: 1 / -1; }
.account-support-form-actions { display: flex; align-items: center; gap: 0.7rem; }
.account-support-form-actions .btn { flex: 0 0 auto; }
.account-support-form-actions p { margin: 0; color: rgba(245, 255, 249, 0.68); font-size: 0.72rem; }

.account-support-aside { display: grid; }
.account-support-information-panel { display: grid; gap: 1rem; }
.account-support-context-panel dl { display: grid; gap: 0; margin: 0.75rem 0 0; }
.account-support-context-panel dl div { display: grid; grid-template-columns: 5.8rem minmax(0, 1fr); gap: 0.55rem; padding: 0.46rem 0; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.account-support-context-panel dt { color: rgba(245, 255, 249, 0.62); font-size: 0.7rem; font-weight: 760; }
.account-support-context-panel dd { margin: 0; overflow-wrap: anywhere; font-size: 0.72rem; font-weight: 760; }
.account-support-direct-panel { padding-top: 0.85rem; border-top: 1px solid rgba(255, 255, 255, 0.12); }

.workspace-shell[data-party-theme="lib_dem"] .account-support-page .thread-block { border-color: var(--ld-line); background: rgba(255, 253, 249, 0.94); }
.workspace-shell[data-party-theme="lib_dem"] .account-support-page :is(.account-support-panel-heading p, .account-support-context-panel p, .account-support-direct-panel p, .account-support-form-actions p, .account-support-context-panel dt, .account-support-form label span) { color: var(--ld-muted); }
.workspace-shell[data-party-theme="lib_dem"] .account-support-context-panel dl div,
.workspace-shell[data-party-theme="lib_dem"] .account-support-direct-panel { border-color: var(--ld-line); }
.workspace-shell[data-party-theme="lib_dem"] .account-support-form select,
.workspace-shell[data-party-theme="lib_dem"] .account-support-form textarea { border-color: var(--ld-line); background: #fff; color: var(--ld-ink); }

@media (max-width: 980px) {
  .account-support-layout { grid-template-columns: 1fr; }
}

@media (max-width: 42rem) {
  .account-support-page { width: min(calc(100% - 2rem), 100rem); }
  .account-support-header { align-items: stretch; flex-direction: column; }
  .account-support-header .account-return-link { align-self: flex-start; }
  .account-support-form { grid-template-columns: 1fr; }
  .account-support-wide { grid-column: auto; }
}

/* Policies use the same concise account workspace as profile and support.
   The policy text remains the source of truth; these rules only provide a
   readable index and a stable detail-page rhythm. */
.account-policies-page,
.account-policy-detail-page {
  display: grid;
  width: min(calc(100% - 3rem), 100rem);
  gap: 0.9rem;
  margin: 0 auto;
  padding: 1.3rem 0 2rem;
  color: #f5fff9;
}

.account-policies-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.account-policies-header .page-kicker,
.account-policy-detail-header .page-kicker { margin: 0; color: rgba(245, 255, 249, 0.65); }
.account-policies-header h1,
.account-policy-detail-header h1 { margin: 0.18rem 0 0; color: inherit; font-size: clamp(1.85rem, 2.4vw, 2.35rem); }
.account-policies-header > div > p:last-child,
.account-policy-detail-header > div > p:last-child { margin: 0.18rem 0 0; color: rgba(245, 255, 249, 0.7); }
.account-policies-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(18rem, 0.72fr); gap: 0.9rem; align-items: start; }
.account-policies-card,
.account-policy-copy-card,
.account-policy-on-page,
.account-policy-support-link {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.65rem;
  background: rgba(1, 41, 30, 0.5);
}

.account-policies-card { display: grid; gap: 0.8rem; padding: 1.05rem 1.15rem; }
.account-policies-card h2,
.account-policy-copy-card h2,
.account-policy-on-page h2 { margin: 0; color: inherit; font-size: 1rem; }
.account-policies-card p { margin: 0.26rem 0 0; color: rgba(245, 255, 249, 0.7); font-size: 0.78rem; line-height: 1.42; }
.account-policies-aside { display: grid; gap: 0.9rem; }
.account-policies-support-card .btn { justify-self: start; margin-top: 0.05rem; }
.account-policy-list { display: grid; gap: 0.55rem; }
.account-policy-list > a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.72rem;
  align-items: center;
  min-height: 4.85rem;
  padding: 0.7rem 0.78rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.5rem;
  color: inherit;
  text-decoration: none;
}
.account-policy-list > a:hover { border-color: var(--accent, #ffb21a); background: rgba(255, 255, 255, 0.06); }
.account-policy-list strong,
.account-policy-list small { display: block; }
.account-policy-list strong { font-size: 0.9rem; }
.account-policy-list small { margin-top: 0.14rem; color: rgba(245, 255, 249, 0.7); font-size: 0.74rem; line-height: 1.36; }
.account-policy-list i { color: var(--accent-soft, #ffca68); font-size: 1.35rem; font-style: normal; }
.account-policy-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent-soft, #ffb21a) 18%, transparent);
  color: var(--accent-soft, #ffca68);
}
.account-policy-icon svg { width: 1.28rem; height: 1.28rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.account-policy-back {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  min-height: 1.95rem;
  padding: 0.38rem 0.58rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0.42rem;
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  font-size: 0.76rem;
  font-weight: 760;
  text-decoration: none;
}
.account-policy-back:hover { border-color: var(--accent, #ffb21a); color: var(--accent-soft, #ffca68); }
.account-policy-detail-header { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.75rem; align-items: center; padding: 0.1rem 0; }
.account-policy-detail-header .account-policy-icon { width: 3.1rem; height: 3.1rem; }
.account-policy-detail-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(15rem, 0.52fr); gap: 0.9rem; align-items: start; }
.account-policy-copy-card { display: grid; padding: 0 1.15rem; }
.account-policy-copy-card section { padding: 0.92rem 0; border-top: 1px solid rgba(255, 255, 255, 0.13); scroll-margin-top: 1rem; }
.account-policy-copy-card section:first-child { border-top: 0; }
.account-policy-copy-card h2 { font-size: 0.9rem; }
.account-policy-copy-card p { margin: 0.36rem 0 0; color: rgba(245, 255, 249, 0.76); font-size: 0.78rem; line-height: 1.48; }
.account-policy-copy-card a { color: var(--accent-soft, #ffca68); font-weight: 800; }
.account-policy-detail-aside { display: grid; gap: 0.7rem; }
.account-policy-on-page { display: grid; gap: 0.05rem; padding: 0.95rem 1rem; }
.account-policy-on-page h2 { margin-bottom: 0.42rem; font-size: 0.82rem; }
.account-policy-on-page a { padding: 0.34rem 0; color: rgba(245, 255, 249, 0.74); font-size: 0.74rem; text-decoration: none; }
.account-policy-on-page a:hover { color: var(--accent-soft, #ffca68); }
.account-policy-support-link { display: flex; align-items: center; justify-content: space-between; min-height: 2.2rem; padding: 0.48rem 0.68rem; color: inherit; font-size: 0.76rem; font-weight: 760; text-decoration: none; }
.account-policy-support-link:hover { border-color: var(--accent, #ffb21a); }

.workspace-shell[data-party-theme="lib_dem"] :is(.account-policies-page, .account-policy-detail-page) { color: var(--ld-ink); }
.workspace-shell[data-party-theme="lib_dem"] :is(.account-policies-card, .account-policy-copy-card, .account-policy-on-page, .account-policy-support-link) { border-color: var(--ld-line); background: rgba(255, 253, 249, 0.94); }
.workspace-shell[data-party-theme="lib_dem"] :is(.account-policies-header h1, .account-policy-detail-header h1, .account-policies-card h2, .account-policy-copy-card h2, .account-policy-on-page h2, .account-policy-list > a, .account-policy-list strong, .account-policy-support-link) { color: var(--ld-ink); }
.workspace-shell[data-party-theme="lib_dem"] :is(.account-policies-header .page-kicker, .account-policy-detail-header .page-kicker, .account-policies-header > div > p:last-child, .account-policy-detail-header > div > p:last-child, .account-policies-card p, .account-policy-list small, .account-policy-copy-card p, .account-policy-on-page a) { color: var(--ld-muted); }
.workspace-shell[data-party-theme="lib_dem"] .account-policy-list > a { border-color: var(--ld-line); }
.workspace-shell[data-party-theme="lib_dem"] .account-policy-list > a:hover { border-color: #f1bf69; background: #fff8e8; }
.workspace-shell[data-party-theme="lib_dem"] .account-policy-list i { color: #c2410c; }
.workspace-shell[data-party-theme="lib_dem"] .account-policy-icon { background: #fff1cf; color: #b45309; }
.workspace-shell[data-party-theme="lib_dem"] .account-policy-back { border-color: var(--ld-line); background: #fffdfa; color: var(--ld-ink); }
.workspace-shell[data-party-theme="lib_dem"] .account-policy-copy-card section,
.workspace-shell[data-party-theme="lib_dem"] .account-policy-direct-panel { border-color: var(--ld-line); }
.workspace-shell[data-party-theme="lib_dem"] .account-policy-copy-card a,
.workspace-shell[data-party-theme="lib_dem"] .account-policy-on-page a:hover { color: #c2410c; }

@media (max-width: 980px) {
  .account-policies-layout,
  .account-policy-detail-layout { grid-template-columns: 1fr; }
}

@media (max-width: 42rem) {
  .account-policies-page,
  .account-policy-detail-page { width: min(calc(100% - 2rem), 100rem); }
  .account-policies-header { align-items: stretch; flex-direction: column; }
  .account-policies-header .account-return-link { align-self: flex-start; }
}

/* Owner access is a compact management workbench: choose a user on the left,
   then change only that account's controls on the right. */
.owner-access-page {
  display: grid;
  width: min(calc(100% - 3rem), 100rem);
  gap: 0.8rem;
  margin: 0 auto;
  padding: 1.3rem 0 2rem;
  color: #f5fff9;
}
.owner-access-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.owner-access-header .page-kicker { margin: 0; color: rgba(245, 255, 249, 0.65); }
.owner-access-header h1 { margin: 0.18rem 0 0; color: inherit; font-size: clamp(1.85rem, 2.4vw, 2.35rem); }
.owner-access-header > div > p:last-child { margin: 0.18rem 0 0; color: rgba(245, 255, 249, 0.7); }
.owner-access-page .alert { margin: 0; }

.owner-access-stat-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.7rem; }
.owner-access-stat-strip article,
.owner-access-mail-strip,
.owner-access-users-card,
.owner-access-detail-card {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.65rem;
  background: rgba(1, 41, 30, 0.5);
}
.owner-access-stat-strip article { display: flex; align-items: center; gap: 0.62rem; min-height: 4.25rem; padding: 0.7rem 0.85rem; }
.owner-access-stat-strip article > span { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: color-mix(in srgb, var(--accent-soft, #ffb21a) 18%, transparent); color: var(--accent-soft, #ffca68); font-size: 1.25rem; font-weight: 850; }
.owner-access-stat-strip article div { display: grid; gap: 0.05rem; }
.owner-access-stat-strip strong { font-size: 1.2rem; line-height: 1; }
.owner-access-stat-strip small { color: rgba(245, 255, 249, 0.68); font-size: 0.66rem; font-weight: 780; letter-spacing: 0.06em; text-transform: uppercase; }

.owner-access-mail-strip { display: flex; align-items: center; gap: 1rem; padding: 0.75rem 0.95rem; }
.owner-access-mail-strip > div { display: grid; flex: 1 1 auto; gap: 0.16rem; }
.owner-access-mail-strip strong { font-size: 0.85rem; }
.owner-access-mail-strip small,
.owner-access-mail-strip p { margin: 0; color: rgba(245, 255, 249, 0.68); font-size: 0.74rem; line-height: 1.38; }
.owner-access-mail-strip form { margin: 0; }

.owner-access-workbench { display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(26rem, 0.96fr); gap: 0.8rem; align-items: start; }
.owner-access-users-card { overflow: hidden; }
.owner-access-users-heading { display: flex; align-items: end; justify-content: space-between; gap: 0.75rem; padding: 0.9rem 1rem; border-bottom: 1px solid rgba(255, 255, 255, 0.13); }
.owner-access-users-heading h2,
.owner-access-detail-header h2,
.owner-access-detail-section-heading h3 { margin: 0; color: inherit; font-size: 0.95rem; }
.owner-access-users-heading p,
.owner-access-detail-header p,
.owner-access-detail-section-heading p { margin: 0.18rem 0 0; color: rgba(245, 255, 249, 0.68); font-size: 0.72rem; line-height: 1.36; }
.owner-access-search input { width: 10.2rem; min-height: 2rem; padding: 0.38rem 0.55rem; border-radius: 0.42rem; font: inherit; font-size: 0.74rem; }
.owner-access-table-head,
.owner-access-user-row { display: grid; grid-template-columns: minmax(13rem, 1.6fr) minmax(5.6rem, 0.72fr) minmax(4rem, 0.54fr) minmax(5.2rem, 0.64fr); gap: 0.55rem; align-items: center; }
.owner-access-table-head { padding: 0.5rem 1rem; color: rgba(245, 255, 249, 0.58); font-size: 0.64rem; font-weight: 780; letter-spacing: 0.055em; text-transform: uppercase; }
.owner-access-user-list {
  display: grid;
  max-height: calc(6 * 3.95rem + 6px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.owner-access-user-row { min-height: 3.95rem; padding: 0.55rem 1rem; border-top: 1px solid rgba(255, 255, 255, 0.1); color: inherit; text-decoration: none; }
.owner-access-user-row.is-search-hidden { display: none !important; }
.owner-access-user-row:hover { background: rgba(255, 255, 255, 0.06); }
.owner-access-user-row.is-selected { background: color-mix(in srgb, var(--accent-soft, #ffb21a) 13%, transparent); box-shadow: inset 0.18rem 0 0 var(--accent, #ffb21a); }
.owner-access-user-identity { display: flex; align-items: center; min-width: 0; gap: 0.55rem; }
.owner-access-user-identity > b,
.owner-access-detail-avatar { display: grid; flex: 0 0 auto; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: color-mix(in srgb, var(--accent-soft, #ffb21a) 20%, transparent); color: var(--accent-soft, #ffca68); font-size: 0.66rem; font-weight: 850; }
.owner-access-user-identity span { display: grid; min-width: 0; gap: 0.08rem; }
.owner-access-user-identity strong { overflow: hidden; font-size: 0.75rem; text-overflow: ellipsis; white-space: nowrap; }
.owner-access-user-identity small { overflow: hidden; color: rgba(245, 255, 249, 0.64); font-size: 0.67rem; text-overflow: ellipsis; white-space: nowrap; }
.owner-access-level,
.owner-access-last-login { color: rgba(245, 255, 249, 0.72); font-size: 0.68rem; }
.owner-access-page .badge { justify-self: start; font-size: 0.64rem; }
.owner-access-search-empty { margin: 0; padding: 1rem; color: rgba(245, 255, 249, 0.68); font-size: 0.76rem; text-align: center; }

.owner-access-detail-card { overflow: hidden; }
.owner-access-detail-header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.62rem; padding: 0.9rem 1rem; border-bottom: 1px solid rgba(255, 255, 255, 0.13); }
.owner-access-detail-avatar { width: 2.5rem; height: 2.5rem; font-size: 0.78rem; }
.owner-access-detail-header h2 { overflow-wrap: anywhere; }
.owner-access-detail-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 0.68rem 1rem; border-bottom: 1px solid rgba(255, 255, 255, 0.13); }
.owner-access-detail-facts div { display: grid; gap: 0.14rem; min-width: 0; padding: 0 0.58rem; border-left: 1px solid rgba(255, 255, 255, 0.13); }
.owner-access-detail-facts div:first-child { padding-left: 0; border-left: 0; }
.owner-access-detail-facts dt { color: rgba(245, 255, 249, 0.58); font-size: 0.62rem; font-weight: 780; }
.owner-access-detail-facts dd { margin: 0; overflow-wrap: anywhere; font-size: 0.69rem; font-weight: 760; }
.owner-access-detail-form { display: grid; gap: 0.62rem; margin: 0; padding: 0.8rem 1rem; border-top: 1px solid rgba(255, 255, 255, 0.13); }
.owner-access-detail-facts + .owner-access-detail-form { border-top: 0; }
.owner-access-detail-section-heading { display: grid; grid-template-columns: minmax(7rem, 0.55fr) minmax(0, 1.45fr); gap: 0.6rem; }
.owner-access-detail-section-heading p { margin: 0; }
.owner-access-control-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(5rem, 0.65fr)); gap: 0.55rem; }
.owner-access-detail-form label { display: grid; gap: 0.26rem; font-size: 0.68rem; font-weight: 760; }
.owner-access-detail-form :is(select, input) { min-height: 2rem; padding: 0.35rem 0.46rem; border-radius: 0.4rem; font: inherit; font-size: 0.72rem; }
.owner-access-actions { display: flex; justify-content: flex-end; gap: 0.45rem; }
.owner-access-password-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 0.55rem; align-items: end; }
.owner-access-branding-form { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.owner-access-branding-form .owner-access-detail-section-heading { grid-column: 1 / -1; }
.owner-access-branding-form .checkbox-row { display: flex; align-items: center; gap: 0.42rem; }
.owner-access-branding-form .checkbox-row input { min-height: auto; }

.workspace-shell[data-party-theme="lib_dem"] .owner-access-page { color: var(--ld-ink); }
.workspace-shell[data-party-theme="lib_dem"] :is(.owner-access-stat-strip article, .owner-access-mail-strip, .owner-access-users-card, .owner-access-detail-card) { border-color: var(--ld-line); background: rgba(255, 253, 249, 0.94); }
.workspace-shell[data-party-theme="lib_dem"] :is(.owner-access-header .page-kicker, .owner-access-header > div > p:last-child, .owner-access-stat-strip small, .owner-access-mail-strip small, .owner-access-mail-strip p, .owner-access-users-heading p, .owner-access-detail-header p, .owner-access-detail-section-heading p, .owner-access-table-head, .owner-access-user-identity small, .owner-access-level, .owner-access-last-login, .owner-access-detail-facts dt) { color: var(--ld-muted); }
.workspace-shell[data-party-theme="lib_dem"] :is(.owner-access-users-heading, .owner-access-user-row, .owner-access-detail-header, .owner-access-detail-facts, .owner-access-detail-facts div, .owner-access-detail-form) { border-color: var(--ld-line); }
.workspace-shell[data-party-theme="lib_dem"] .owner-access-search-empty { color: var(--ld-muted); }
.workspace-shell[data-party-theme="lib_dem"] .owner-access-user-row:hover { background: #fff8e8; }
.workspace-shell[data-party-theme="lib_dem"] .owner-access-user-row.is-selected { background: #fff1cf; box-shadow: inset 0.18rem 0 0 #f59e0b; }
.workspace-shell[data-party-theme="lib_dem"] :is(.owner-access-stat-strip article > span, .owner-access-user-identity > b, .owner-access-detail-avatar) { background: #fff1cf; color: #b45309; }
.workspace-shell[data-party-theme="lib_dem"] .owner-access-search input,
.workspace-shell[data-party-theme="lib_dem"] .owner-access-detail-form :is(select, input) { border-color: var(--ld-line); background: #fff; color: var(--ld-ink); }

@media (max-width: 1100px) {
  .owner-access-workbench { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .owner-access-page { width: min(calc(100% - 2rem), 100rem); }
  .owner-access-header { align-items: stretch; flex-direction: column; }
  .owner-access-header .account-return-link { align-self: flex-start; }
  .owner-access-stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .owner-access-mail-strip { align-items: stretch; flex-direction: column; }
  .owner-access-mail-strip form { align-self: flex-start; }
  .owner-access-table-head { display: none; }
  .owner-access-user-row { grid-template-columns: minmax(0, 1fr) auto; }
  .owner-access-user-row > :is(.owner-access-level, .owner-access-last-login) { display: none; }
  .owner-access-user-list { max-height: calc(6 * 3.95rem + 6px); }
  .owner-access-detail-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem 0; }
  .owner-access-detail-facts div:nth-child(3) { padding-left: 0; border-left: 0; }
  .owner-access-control-grid,
  .owner-access-password-grid,
  .owner-access-branding-form { grid-template-columns: 1fr; }
  .owner-access-detail-section-heading { grid-template-columns: 1fr; }
  .owner-access-actions { justify-content: flex-start; flex-wrap: wrap; }
}

/* Invites use the owner-management rhythm without adding a generic help rail. */
.owner-invites-page { display: grid; width: min(calc(100% - 3rem), 100rem); gap: 0.9rem; margin: 0 auto; padding: 1.3rem 0 2rem; color: #f5fff9; }
.owner-invites-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.owner-invites-header .page-kicker { margin: 0; color: rgba(245, 255, 249, 0.65); }
.owner-invites-header h1 { margin: 0.18rem 0 0; color: inherit; font-size: clamp(1.85rem, 2.4vw, 2.35rem); }
.owner-invites-header > div > p:last-child { margin: 0.18rem 0 0; color: rgba(245, 255, 249, 0.7); }
.owner-invites-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(18rem, 0.58fr); gap: 0.9rem; align-items: start; }
.owner-invites-main,
.owner-invites-aside { display: grid; gap: 0.9rem; }
.owner-invite-stat-strip,
.owner-invite-card { border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 0.65rem; background: rgba(1, 41, 30, 0.5); }
.owner-invite-stat-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.owner-invite-stat-strip article { display: flex; align-items: center; gap: 0.65rem; min-height: 5rem; padding: 0.75rem 0.9rem; border-left: 1px solid rgba(255, 255, 255, 0.13); }
.owner-invite-stat-strip article:first-child { border-left: 0; }
.owner-invite-stat-strip article > span,
.owner-invite-row-icon { display: grid; flex: 0 0 auto; place-items: center; width: 2.45rem; height: 2.45rem; border-radius: 50%; background: color-mix(in srgb, var(--accent-soft, #ffb21a) 18%, transparent); color: var(--accent-soft, #ffca68); font-size: 1.2rem; font-weight: 850; }
.owner-invite-stat-strip article div { display: grid; gap: 0.06rem; }
.owner-invite-stat-strip strong { font-size: 1.15rem; line-height: 1; }
.owner-invite-stat-strip small { color: rgba(245, 255, 249, 0.75); font-size: 0.72rem; font-weight: 800; }
.owner-invite-stat-strip p { margin: 0.14rem 0 0; color: rgba(245, 255, 249, 0.64); font-size: 0.68rem; line-height: 1.3; }
.owner-invite-card { padding: 1rem 1.1rem; }
.owner-invite-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.6rem; }
.owner-invite-card-heading h2 { margin: 0; color: inherit; font-size: 0.98rem; }
.owner-invite-card-heading h2 span { display: inline-grid; min-width: 1.35rem; place-items: center; margin-left: 0.22rem; padding: 0.1rem 0.3rem; border-radius: 0.38rem; background: rgba(255, 255, 255, 0.09); color: inherit; font-size: 0.68rem; vertical-align: middle; }
.owner-invite-card-heading p,
.owner-invite-empty { margin: 0.25rem 0 0; color: rgba(245, 255, 249, 0.68); font-size: 0.75rem; line-height: 1.4; }
.owner-invite-live-list { display: grid; gap: 0.5rem; margin-top: 0.75rem; }
.owner-invite-live-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.65rem; align-items: center; padding: 0.72rem; border: 1px solid rgba(255, 255, 255, 0.13); border-radius: 0.5rem; }
.owner-invite-row-icon { width: 2.15rem; height: 2.15rem; font-size: 1rem; }
.owner-invite-live-content { display: grid; min-width: 0; gap: 0.36rem; }
.owner-invite-live-head { display: flex; align-items: center; justify-content: space-between; gap: 0.45rem; }
.owner-invite-live-head strong { overflow-wrap: anywhere; font-size: 0.8rem; }
.owner-invite-live-head .badge { flex: 0 0 auto; font-size: 0.62rem; }
.owner-invite-link { display: flex; min-width: 0; align-items: center; gap: 0.38rem; padding: 0.32rem 0.42rem; border: 1px solid rgba(255, 255, 255, 0.13); border-radius: 0.36rem; }
.owner-invite-link code { overflow: hidden; flex: 1 1 auto; color: rgba(245, 255, 249, 0.73); font-family: inherit; font-size: 0.67rem; text-overflow: ellipsis; white-space: nowrap; }
.owner-invite-copy,
.owner-invite-revoke { flex: 0 0 auto; padding: 0.18rem 0.35rem; border: 0; background: transparent; color: var(--accent-soft, #ffca68); font: inherit; font-size: 0.68rem; font-weight: 800; cursor: pointer; }
.owner-invite-revoke { color: #fca5a5; }
.owner-invite-row-meta { display: flex; flex-wrap: wrap; gap: 0.7rem; color: rgba(245, 255, 249, 0.64); font-size: 0.68rem; }
.owner-invite-live-row form { margin: 0; }
.owner-invite-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.62rem 0.75rem; margin-top: 0.75rem; }
.owner-invite-form label { display: grid; gap: 0.26rem; color: inherit; font-size: 0.69rem; font-weight: 760; }
.owner-invite-form label[hidden] { display: none; }
.owner-invite-form label span { color: rgba(245, 255, 249, 0.58); font-size: 0.64rem; font-weight: 650; }
.owner-invite-form :is(input, select) { min-height: 2.1rem; padding: 0.38rem 0.5rem; border-radius: 0.42rem; font: inherit; font-size: 0.74rem; }
.owner-invite-form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; margin-top: 0.1rem; }
.owner-invite-side-card { display: grid; gap: 0.65rem; }
.owner-invite-side-list { display: grid; gap: 0.45rem; }
.owner-invite-side-list > div,
.owner-invite-side-list > a { display: grid; min-width: 0; gap: 0.14rem; padding: 0.65rem 0; border-top: 1px solid rgba(255, 255, 255, 0.12); color: inherit; text-decoration: none; }
.owner-invite-side-list > a { grid-template-columns: minmax(0, 1fr) auto; }
.owner-invite-side-list > a i { grid-row: 1 / span 2; grid-column: 2; align-self: center; color: var(--accent-soft, #ffca68); font-size: 1.15rem; font-style: normal; }
.owner-invite-side-list strong { overflow-wrap: anywhere; font-size: 0.75rem; }
.owner-invite-side-list small { color: rgba(245, 255, 249, 0.64); font-size: 0.67rem; line-height: 1.34; }

.workspace-shell[data-party-theme="lib_dem"] .owner-invites-page { color: var(--ld-ink); }
.workspace-shell[data-party-theme="lib_dem"] :is(.owner-invite-stat-strip, .owner-invite-card) { border-color: var(--ld-line); background: rgba(255, 253, 249, 0.94); }
.workspace-shell[data-party-theme="lib_dem"] :is(.owner-invite-stat-strip article, .owner-invite-live-row, .owner-invite-link, .owner-invite-side-list > div, .owner-invite-side-list > a) { border-color: var(--ld-line); }
.workspace-shell[data-party-theme="lib_dem"] :is(.owner-invites-header .page-kicker, .owner-invites-header > div > p:last-child, .owner-invite-stat-strip small, .owner-invite-stat-strip p, .owner-invite-card-heading p, .owner-invite-empty, .owner-invite-link code, .owner-invite-row-meta, .owner-invite-side-list small, .owner-invite-form label span) { color: var(--ld-muted); }
.workspace-shell[data-party-theme="lib_dem"] :is(.owner-invite-stat-strip article > span, .owner-invite-row-icon) { background: #fff1cf; color: #b45309; }
.workspace-shell[data-party-theme="lib_dem"] .owner-invite-copy { color: #c2410c; }
.workspace-shell[data-party-theme="lib_dem"] .owner-invite-side-list > a:hover { background: #fff8e8; }
.workspace-shell[data-party-theme="lib_dem"] .owner-invite-form :is(input, select) { border-color: var(--ld-line); background: #fff; color: var(--ld-ink); }

@media (max-width: 980px) { .owner-invites-layout { grid-template-columns: 1fr; } }
@media (max-width: 680px) {
  .owner-invites-page { width: min(calc(100% - 2rem), 100rem); }
  .owner-invites-header { align-items: stretch; flex-direction: column; }
  .owner-invites-header .account-return-link { align-self: flex-start; }
  .owner-invite-stat-strip { grid-template-columns: 1fr; }
  .owner-invite-stat-strip article { min-height: 3.9rem; border-top: 1px solid rgba(255, 255, 255, 0.13); border-left: 0; }
  .owner-invite-stat-strip article:first-child { border-top: 0; }
  .owner-invite-live-row { grid-template-columns: auto minmax(0, 1fr); }
  .owner-invite-live-row form { grid-column: 2; justify-self: end; }
  .owner-invite-form { grid-template-columns: 1fr; }
  .owner-invite-form-actions { grid-column: auto; justify-content: flex-start; }
}

/* Billing shows the real entitlement as an account overview, without pretending
   an invoice or payment-method system exists when Stripe is not configured. */
.billing-overview-page { display: grid; width: min(calc(100% - 3rem), 100rem); gap: 0.9rem; margin: 0 auto; padding: 1.3rem 0 2rem; color: #f5fff9; }
.billing-overview-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.billing-overview-header .page-kicker { margin: 0; color: rgba(245, 255, 249, 0.65); }
.billing-overview-header h1 { margin: 0.18rem 0 0; color: inherit; font-size: clamp(1.85rem, 2.4vw, 2.35rem); }
.billing-overview-header > div > p:last-child { margin: 0.18rem 0 0; color: rgba(245, 255, 249, 0.7); }
.billing-overview-hero,
.billing-overview-stat-strip article,
.billing-overview-card { border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 0.65rem; background: rgba(1, 41, 30, 0.5); }
.billing-overview-hero { display: grid; grid-template-columns: auto minmax(15rem, 1.25fr) minmax(0, 1.75fr); gap: 1rem; align-items: center; padding: 1rem 1.15rem; }
.billing-overview-icon { display: grid; place-items: center; width: 3.4rem; height: 3.4rem; border-radius: 50%; background: color-mix(in srgb, var(--accent-soft, #ffb21a) 18%, transparent); color: var(--accent-soft, #ffca68); font-size: 1.75rem; }
.billing-overview-plan small,
.billing-overview-stat-strip small { color: rgba(245, 255, 249, 0.62); font-size: 0.66rem; font-weight: 780; letter-spacing: 0.06em; text-transform: uppercase; }
.billing-overview-plan h2 { margin: 0.18rem 0 0; color: inherit; font-size: 1.12rem; }
.billing-overview-plan p { margin: 0.22rem 0 0; color: rgba(245, 255, 249, 0.7); font-size: 0.75rem; line-height: 1.38; }
.billing-state { display: inline-block; margin-left: 0.3rem; padding: 0.18rem 0.36rem; border-radius: 0.34rem; background: rgba(134, 239, 172, 0.16); color: #86efac; font-size: 0.66rem; font-weight: 820; vertical-align: middle; }
.billing-state-expired,
.billing-state-past_due,
.billing-state-canceled { background: rgba(252, 165, 165, 0.16); color: #fecaca; }
.billing-overview-hero-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.billing-overview-hero-facts > div { display: grid; min-width: 0; gap: 0.14rem; padding: 0 0.7rem; border-left: 1px solid rgba(255, 255, 255, 0.13); }
.billing-overview-hero-facts dt { color: rgba(245, 255, 249, 0.62); font-size: 0.65rem; font-weight: 760; }
.billing-overview-hero-facts dd { margin: 0; overflow-wrap: anywhere; font-size: 0.76rem; font-weight: 800; }
.billing-overview-hero-facts small { color: rgba(245, 255, 249, 0.67); font-size: 0.66rem; }
.billing-overview-hero-facts code { font: inherit; }
.billing-overview-hero-facts button { margin-left: 0.28rem; padding: 0.1rem 0.25rem; border: 0; background: transparent; color: var(--accent-soft, #ffca68); font: inherit; font-size: 0.65rem; font-weight: 780; cursor: pointer; }
.billing-overview-stat-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.7rem; }
.billing-overview-stat-strip article { display: flex; align-items: center; min-height: 4.3rem; gap: 0.62rem; padding: 0.7rem 0.85rem; }
.billing-overview-stat-strip article > span,
.billing-overview-record-card > span { display: grid; flex: 0 0 auto; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: color-mix(in srgb, var(--accent-soft, #ffb21a) 18%, transparent); color: var(--accent-soft, #ffca68); font-size: 1rem; font-weight: 850; }
.billing-overview-stat-strip article div { display: grid; min-width: 0; gap: 0.15rem; }
.billing-overview-stat-strip strong { overflow-wrap: anywhere; font-size: 0.78rem; }
.billing-overview-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(18rem, 0.62fr); gap: 0.9rem; align-items: start; }
.billing-overview-main,
.billing-overview-aside { display: grid; gap: 0.9rem; }
.billing-overview-card { display: grid; gap: 0.75rem; padding: 1rem 1.1rem; }
.billing-overview-card h2,
.billing-overview-card h3 { margin: 0; color: inherit; font-size: 0.98rem; }
.billing-overview-card p { margin: 0.22rem 0 0; color: rgba(245, 255, 249, 0.7); font-size: 0.75rem; line-height: 1.42; }
.billing-overview-subscription-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(15rem, 0.95fr); gap: 1rem; }
.billing-overview-subscription-grid ul { display: grid; gap: 0.58rem; margin: 0; padding: 0; list-style: none; }
.billing-overview-subscription-grid li { position: relative; padding-left: 1.45rem; color: rgba(245, 255, 249, 0.76); font-size: 0.75rem; }
.billing-overview-subscription-grid li::before { position: absolute; left: 0; top: -0.08rem; display: grid; place-items: center; width: 1rem; height: 1rem; border-radius: 50%; content: '✓'; background: rgba(134, 239, 172, 0.16); color: #86efac; font-size: 0.62rem; font-weight: 850; }
.billing-overview-subscription-grid li.is-limited::before { content: '–'; background: rgba(255, 255, 255, 0.12); color: rgba(245, 255, 249, 0.7); }
.billing-overview-timeline { display: grid; gap: 0.5rem; padding-left: 1rem; border-left: 1px solid rgba(255, 255, 255, 0.13); }
.billing-overview-timeline h3 { margin-bottom: 0.05rem; }
.billing-overview-timeline > div { display: grid; grid-template-columns: 1rem minmax(0, 1fr); gap: 0.45rem; }
.billing-overview-timeline b { width: 0.72rem; height: 0.72rem; margin-top: 0.12rem; border: 2px solid rgba(245, 255, 249, 0.5); border-radius: 50%; }
.billing-overview-timeline b.is-done { border-color: #86efac; background: #86efac; }
.billing-overview-timeline p { display: grid; gap: 0.11rem; margin: 0; }
.billing-overview-timeline p strong { font-size: 0.72rem; }
.billing-overview-timeline p span { color: rgba(245, 255, 249, 0.66); font-size: 0.67rem; }
.billing-overview-record-card { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; }
.billing-overview-manage-card form { margin: 0.15rem 0 0; }
.billing-overview-manage-card a { color: var(--accent-soft, #ffca68); font-size: 0.75rem; font-weight: 780; }
.billing-overview-owner-card > a { display: flex; justify-content: space-between; padding: 0.52rem 0; border-top: 1px solid rgba(255, 255, 255, 0.12); color: inherit; font-size: 0.75rem; font-weight: 760; text-decoration: none; }
.billing-overview-owner-card > a i { color: var(--accent-soft, #ffca68); font-size: 1.1rem; font-style: normal; }

.workspace-shell[data-party-theme="lib_dem"] .billing-overview-page { color: var(--ld-ink); }
.workspace-shell[data-party-theme="lib_dem"] :is(.billing-overview-hero, .billing-overview-stat-strip article, .billing-overview-card) { border-color: var(--ld-line); background: rgba(255, 253, 249, 0.94); }
.workspace-shell[data-party-theme="lib_dem"] :is(.billing-overview-header .page-kicker, .billing-overview-header > div > p:last-child, .billing-overview-plan small, .billing-overview-plan p, .billing-overview-stat-strip small, .billing-overview-card p, .billing-overview-hero-facts dt, .billing-overview-hero-facts small, .billing-overview-subscription-grid li, .billing-overview-timeline p span) { color: var(--ld-muted); }
.workspace-shell[data-party-theme="lib_dem"] :is(.billing-overview-hero-facts > div, .billing-overview-timeline, .billing-overview-owner-card > a) { border-color: var(--ld-line); }
.workspace-shell[data-party-theme="lib_dem"] :is(.billing-overview-icon, .billing-overview-stat-strip article > span, .billing-overview-record-card > span) { background: #fff1cf; color: #b45309; }
.workspace-shell[data-party-theme="lib_dem"] .billing-state { background: #e8f7eb; color: #237a43; }
.workspace-shell[data-party-theme="lib_dem"] :is(.billing-state-expired, .billing-state-past_due, .billing-state-canceled) { background: #fff0f0; color: #b42318; }
.workspace-shell[data-party-theme="lib_dem"] .billing-overview-hero-facts button,
.workspace-shell[data-party-theme="lib_dem"] .billing-overview-manage-card a,
.workspace-shell[data-party-theme="lib_dem"] .billing-overview-owner-card > a i { color: #c2410c; }
.workspace-shell[data-party-theme="lib_dem"] .billing-overview-subscription-grid li::before { background: #e8f7eb; color: #237a43; }
.workspace-shell[data-party-theme="lib_dem"] .billing-overview-subscription-grid li.is-limited::before { background: #f3f4f6; color: var(--ld-muted); }
.workspace-shell[data-party-theme="lib_dem"] .billing-overview-timeline b { border-color: #b8c1cb; }
.workspace-shell[data-party-theme="lib_dem"] .billing-overview-timeline b.is-done { border-color: #2c9c57; background: #2c9c57; }

@media (max-width: 980px) { .billing-overview-layout { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
  .billing-overview-page { width: min(calc(100% - 2rem), 100rem); }
  .billing-overview-header { align-items: stretch; flex-direction: column; }
  .billing-overview-header .account-return-link { align-self: flex-start; }
  .billing-overview-hero { grid-template-columns: auto minmax(0, 1fr); }
  .billing-overview-hero-facts { grid-column: 1 / -1; }
  .billing-overview-stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .billing-overview-subscription-grid { grid-template-columns: 1fr; }
  .billing-overview-timeline { padding: 0.8rem 0 0; border-top: 1px solid rgba(255, 255, 255, 0.13); border-left: 0; }
  .billing-overview-record-card { grid-template-columns: auto minmax(0, 1fr); }
  .billing-overview-record-card form { grid-column: 1 / -1; justify-self: start; }
}

/* Enquiry/activity capture uses the same two-panel composition as issue capture. */
.workspace-shell .enquiry-capture-page {
  max-width: 1380px;
}

.workspace-shell .enquiry-capture-header h1 {
  font-size: clamp(2rem, 2.3vw, 2.35rem);
}

.workspace-shell .enquiry-capture-layout {
  grid-template-columns: minmax(0, 1.6fr) minmax(24rem, 0.8fr);
  gap: 1rem;
}

.workspace-shell .enquiry-capture-main-panel,
.workspace-shell .enquiry-capture-side-panel {
  display: grid;
  align-content: start;
  gap: 0;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 30px rgba(146, 100, 20, 0.08);
}

.workspace-shell .enquiry-capture-main-panel {
  padding: 1.25rem 1.35rem 1.35rem;
}

.workspace-shell .enquiry-capture-side-panel {
  padding: 1.35rem 1.45rem;
}

.workspace-shell .enquiry-capture-main-panel .enquiry-capture-core-card,
.workspace-shell .enquiry-capture-side-panel .enquiry-capture-card {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.workspace-shell .enquiry-capture-main-panel .enquiry-capture-card-head {
  margin-bottom: 1.1rem;
}

.workspace-shell .enquiry-capture-main-panel .enquiry-capture-card-head h2,
.workspace-shell .enquiry-capture-side-panel .enquiry-capture-card-head h2 {
  font-size: 1.08rem;
}

.workspace-shell .enquiry-capture-main-panel .enquiry-capture-fields {
  gap: 0.85rem;
}

.workspace-shell .enquiry-capture-main-panel .enquiry-capture-fields label {
  gap: 0.35rem;
}

.workspace-shell .enquiry-capture-main-panel .enquiry-capture-core textarea {
  min-height: 8rem;
}

.workspace-shell .enquiry-capture-main-panel .enquiry-capture-core :is(input, select, textarea),
.workspace-shell .enquiry-capture-side-panel :is(input:not([type="checkbox"]), select, textarea) {
  border: 1px solid #c6d4e6;
  background: #fff;
  color: var(--ink-940);
  box-shadow: inset 0 1px 1px rgba(18, 36, 58, 0.03);
}

.workspace-shell .enquiry-capture-main-panel > .enquiry-capture-options,
.workspace-shell .enquiry-capture-side-panel > .enquiry-capture-options {
  margin: 1.1rem 0 0;
  border: 0;
  border-top: 1px solid rgba(146, 100, 20, 0.14);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.workspace-shell .enquiry-capture-side-panel > .enquiry-capture-options {
  background: transparent !important;
}

.workspace-shell .enquiry-capture-main-panel > .enquiry-capture-options > summary,
.workspace-shell .enquiry-capture-side-panel > .enquiry-capture-options > summary {
  padding: 1rem 0 0;
  color: var(--ink-940);
  font-size: 0.86rem;
  font-weight: 800;
}

.workspace-shell .enquiry-capture-main-panel > .enquiry-capture-options > summary::after,
.workspace-shell .enquiry-capture-side-panel > .enquiry-capture-options > summary::after {
  color: var(--ink-620);
}

.workspace-shell .enquiry-capture-main-panel > .enquiry-capture-options[open] > summary,
.workspace-shell .enquiry-capture-side-panel > .enquiry-capture-options[open] > summary {
  border-bottom: 0;
}

.workspace-shell .enquiry-capture-main-panel .enquiry-capture-option-body,
.workspace-shell .enquiry-capture-side-panel .enquiry-capture-option-body {
  padding: 0.75rem 0 0;
}

.workspace-shell .enquiry-capture-side-panel .enquiry-capture-location-card {
  order: -3;
  padding-bottom: 1.05rem;
}

.workspace-shell .enquiry-capture-side-panel .enquiry-capture-location-card .enquiry-capture-card-head {
  margin-bottom: 0.65rem;
}

.workspace-shell .enquiry-capture-side-panel .enquiry-capture-location-card label {
  gap: 0.35rem;
  font-size: 0.8rem;
}

.workspace-shell .enquiry-capture-side-panel .enquiry-capture-more-options {
  order: 3;
  margin-top: 0;
}

.workspace-shell .enquiry-capture-side-panel .enquiry-capture-more-options .app-accordion {
  border: 0;
  background: transparent;
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-capture-main-panel,
.workspace-shell[data-party-theme="lib_dem"] .enquiry-capture-side-panel {
  border-color: var(--ld-line);
  background: var(--ld-surface-strong);
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-capture-main-panel > .enquiry-capture-options,
.workspace-shell[data-party-theme="lib_dem"] .enquiry-capture-side-panel > .enquiry-capture-options {
  border-top-color: var(--ld-line);
}

.workspace-shell[data-party-theme="lib_dem"] .enquiry-capture-main-panel .enquiry-capture-core :is(input, select, textarea),
.workspace-shell[data-party-theme="lib_dem"] .enquiry-capture-side-panel :is(input:not([type="checkbox"]), select, textarea) {
  border-color: var(--ld-line);
  background: #fff;
  color: var(--ld-ink);
}

@media (max-width: 900px) {
  .workspace-shell .enquiry-capture-layout {
    grid-template-columns: 1fr;
  }
}

/* Compact four-part capture workspace shared by enquiries and activity. */
.workspace-shell .capture-workspace-page {
  max-width: 94rem;
}

.workspace-shell .capture-workspace-header {
  align-items: end;
  margin-bottom: 0.9rem;
}

.workspace-shell .capture-workspace-header h1 {
  margin: 0.12rem 0 0;
  color: var(--ink-940);
  font-size: clamp(1.8rem, 2.3vw, 2.35rem);
  line-height: 1.04;
}

.workspace-shell .capture-workspace-header > div > p:last-child {
  margin: 0.42rem 0 0;
  color: var(--ink-620);
  font-size: 0.82rem;
}

.workspace-shell .capture-workspace-actions {
  justify-content: flex-end;
}

.workspace-shell .capture-workspace-form {
  margin: 0;
}

.workspace-shell .capture-workspace-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 0.48fr);
  align-items: start;
  gap: 0.85rem;
}

.workspace-shell .capture-workspace-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 0.85rem;
}

.workspace-shell .capture-workspace-card,
.workspace-shell .capture-workspace-save-card,
.workspace-shell .capture-workspace-progress {
  border: 1px solid var(--line-200);
  border-radius: 0.7rem;
  background: var(--surface-strong);
  box-shadow: 0 0.45rem 1.2rem rgba(36, 31, 20, 0.045);
}

.workspace-shell .capture-workspace-card {
  min-width: 0;
  padding: 0.85rem 0.95rem 0.9rem;
  border-top-width: 3px;
}

.workspace-shell .capture-workspace-card-who { border-top-color: #38a76f; }
.workspace-shell .capture-workspace-card-what { border-top-color: #2877d3; }
.workspace-shell .capture-workspace-card-where { border-top-color: #8163cf; }
.workspace-shell .capture-workspace-card-extra { border-top-color: #ef9708; }

.workspace-shell .capture-workspace-card-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.72rem;
}

.workspace-shell .capture-workspace-card-head h2,
.workspace-shell .capture-workspace-card-head p {
  margin: 0;
}

.workspace-shell .capture-workspace-card-head h2 {
  display: inline;
  color: var(--ink-940);
  font-size: 1rem;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0.035em;
}

.workspace-shell .capture-workspace-card-head p {
  display: inline;
  margin-left: 0.45rem;
  color: var(--ink-620);
  font-size: 0.74rem;
}

.workspace-shell .capture-workspace-icon {
  display: inline-grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 0.55rem;
  background: #e6f7ef;
  color: #158557;
  font-size: 1.2rem;
  font-weight: 800;
}

.workspace-shell .capture-workspace-card-what .capture-workspace-icon { background: #e8f1ff; color: #256bc4; }
.workspace-shell .capture-workspace-card-where .capture-workspace-icon { background: #f0eaff; color: #7154ba; }
.workspace-shell .capture-workspace-card-extra .capture-workspace-icon { background: #fff0dc; color: #d57800; }

.workspace-shell .capture-workspace-fields,
.workspace-shell .capture-workspace-extra-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: 0.58rem 0.72rem;
}

.workspace-shell .capture-workspace-fields label,
.workspace-shell .capture-workspace-extra-grid > label {
  display: grid;
  min-width: 0;
  gap: 0.25rem;
  color: var(--ink-820);
  font-size: 0.72rem;
  font-weight: 700;
}

.workspace-shell .capture-workspace-span-full,
.workspace-shell .capture-workspace-map-wrap,
.workspace-shell .capture-workspace-concerns {
  grid-column: 1 / -1;
}

.workspace-shell .capture-workspace-fields :is(input, select, textarea),
.workspace-shell .capture-workspace-extra-grid > label input {
  width: 100%;
  min-height: 2.1rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--line-300);
  border-radius: 0.4rem;
  background: var(--surface-strong);
  color: var(--ink-940);
  box-shadow: none;
  font: inherit;
  font-size: 0.78rem;
}

.workspace-shell .capture-workspace-fields textarea {
  min-height: 6.25rem;
  resize: none;
}

.workspace-shell .capture-workspace-check {
  display: flex !important;
  min-height: 2.1rem;
  align-items: center;
  gap: 0.42rem !important;
  padding-bottom: 0.08rem;
  font-size: 0.76rem !important;
}

.workspace-shell .capture-workspace-check input {
  width: 1rem;
  min-height: 1rem;
  margin: 0;
}

.workspace-shell .capture-workspace-map {
  height: 10.25rem;
  overflow: hidden;
  border: 1px solid var(--line-200);
  border-radius: 0.45rem;
}

.workspace-shell .capture-workspace-map-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-top: 0.35rem;
  color: var(--ink-620);
  font-size: 0.69rem;
}

.workspace-shell .capture-workspace-map-meta .btn {
  color: var(--danger-700);
}

.workspace-shell .capture-workspace-area-note {
  margin: 0 0 0.18rem;
  color: var(--ink-620);
  font-size: 0.69rem;
}

.workspace-shell .capture-workspace-subsection {
  margin-top: 0.72rem;
  border-top: 1px solid var(--line-200);
}

.workspace-shell .capture-workspace-subsection > summary {
  padding: 0.65rem 0 0.1rem;
  color: var(--ink-820);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 750;
}

.workspace-shell .capture-workspace-subsection .check-grid {
  margin-top: 0.52rem;
}

.workspace-shell .capture-workspace-concerns {
  margin-top: 0;
}

.workspace-shell .capture-workspace-concerns .support-text,
.workspace-shell .capture-workspace-concerns .empty-state {
  margin: 0.4rem 0;
  font-size: 0.72rem;
}

.workspace-shell .capture-workspace-concerns textarea {
  resize: none;
}

.workspace-shell .capture-workspace-side {
  display: grid;
  align-content: start;
  gap: 0.85rem;
}

.workspace-shell .capture-workspace-save-card,
.workspace-shell .capture-workspace-progress {
  padding: 1rem;
}

.workspace-shell .capture-workspace-save-card h2,
.workspace-shell .capture-workspace-progress h2 {
  margin: 0;
  color: var(--ink-940);
  font-size: 1rem;
}

.workspace-shell .capture-workspace-save-card p {
  margin: 0.5rem 0 0.78rem;
  color: var(--ink-620);
  font-size: 0.76rem;
  line-height: 1.4;
}

.workspace-shell .capture-workspace-save-card .btn {
  width: 100%;
  justify-content: center;
}

.workspace-shell .capture-workspace-progress {
  display: grid;
  gap: 0;
}

.workspace-shell .capture-workspace-progress h2 {
  padding-bottom: 0.48rem;
}

.workspace-shell .capture-workspace-progress div {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  min-height: 2.35rem;
  padding: 0.45rem 0 0.45rem 1.42rem;
  border-top: 1px solid var(--line-200);
  color: var(--ink-940);
  font-size: 0.78rem;
}

.workspace-shell .capture-workspace-progress div::before {
  position: absolute;
  left: 0.08rem;
  width: 0.78rem;
  height: 0.78rem;
  border: 2px solid var(--line-400);
  border-radius: 999px;
  content: "";
}

.workspace-shell .capture-workspace-progress div.is-ready::before {
  border-color: #28a875;
  background: #e7f8ef;
  box-shadow: inset 0 0 0 0.18rem var(--surface-strong);
}

.workspace-shell .capture-workspace-progress span {
  color: var(--ink-620);
  font-size: 0.7rem;
}

.workspace-shell .capture-workspace-progress p {
  margin: 0.65rem 0 0;
  padding-top: 0.6rem;
  border-top: 1px solid var(--line-200);
  color: var(--ink-620);
  font-size: 0.72rem;
  line-height: 1.4;
}

.workspace-shell[data-party-theme="lib_dem"] :is(.capture-workspace-card, .capture-workspace-save-card, .capture-workspace-progress) {
  border-color: var(--ld-line);
  background: var(--ld-surface-strong);
}

.workspace-shell[data-party-theme="lib_dem"] :is(.capture-workspace-header h1, .capture-workspace-card-head h2, .capture-workspace-fields label, .capture-workspace-extra-grid > label, .capture-workspace-subsection > summary, .capture-workspace-save-card h2, .capture-workspace-progress h2, .capture-workspace-progress div) {
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] :is(.capture-workspace-header > div > p:last-child, .capture-workspace-card-head p, .capture-workspace-map-meta, .capture-workspace-area-note, .capture-workspace-save-card p, .capture-workspace-progress span, .capture-workspace-progress p) {
  color: var(--ld-muted);
}

.workspace-shell[data-party-theme="lib_dem"] .capture-workspace-fields :is(input, select, textarea),
.workspace-shell[data-party-theme="lib_dem"] .capture-workspace-extra-grid > label input {
  border-color: var(--ld-line);
  background: #fff;
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] :is(.capture-workspace-subsection, .capture-workspace-progress div, .capture-workspace-progress p) {
  border-color: var(--ld-line);
}

@media (max-width: 1120px) {
  .workspace-shell .capture-workspace-layout { grid-template-columns: 1fr; }
  .workspace-shell .capture-workspace-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .workspace-shell .capture-workspace-header { align-items: stretch; flex-direction: column; }
  .workspace-shell .capture-workspace-grid,
  .workspace-shell .capture-workspace-fields,
  .workspace-shell .capture-workspace-extra-grid,
  .workspace-shell .capture-workspace-side { grid-template-columns: 1fr; }
  .workspace-shell .capture-workspace-map { height: 9rem; }
}

/* Activity capture follows the compact What / Where / Extra working rhythm. */
.workspace-shell .activity-capture-header {
  align-items: flex-end;
  margin-bottom: 0.8rem;
}

.workspace-shell .activity-capture-header h1 {
  margin: 0;
  font-size: clamp(2rem, 2.4vw, 2.45rem);
  line-height: 1;
}

.workspace-shell .activity-capture-header > div > p:last-child {
  margin: 0.45rem 0 0;
  color: var(--ink-620);
  font-size: 0.9rem;
}

.workspace-shell .activity-capture-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(18rem, 0.55fr);
  gap: 0.9rem;
  align-items: start;
}

.workspace-shell .activity-capture-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.workspace-shell .activity-capture-card,
.workspace-shell .activity-capture-save-card,
.workspace-shell .activity-capture-checklist {
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(146, 100, 20, 0.07);
}

.workspace-shell .activity-capture-card {
  padding: 1rem 1.05rem;
}

.workspace-shell .activity-capture-card-what {
  grid-column: 1 / -1;
  border-color: rgba(68, 140, 209, 0.35);
}

.workspace-shell .activity-capture-card-where {
  border-color: rgba(128, 91, 210, 0.3);
}

.workspace-shell .activity-capture-card-extra {
  border-color: rgba(224, 139, 27, 0.32);
}

.workspace-shell .activity-capture-card-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.workspace-shell .activity-capture-card-head p,
.workspace-shell .activity-capture-card-head h2 {
  margin: 0;
}

.workspace-shell .activity-capture-card-head p {
  color: var(--ink-620);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.workspace-shell .activity-capture-card-head h2 {
  color: var(--ink-940);
  font-size: 0.98rem;
}

.workspace-shell .activity-capture-card-head h2 span {
  color: var(--ink-620);
  font-size: 0.78rem;
  font-weight: 650;
}

.workspace-shell .activity-capture-icon {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 0.65rem;
  font-size: 1.2rem;
  font-weight: 850;
}

.workspace-shell .activity-capture-icon-what { background: #e9f3ff; color: #286cb5; }
.workspace-shell .activity-capture-icon-where { background: #f1ecff; color: #6d58b5; }
.workspace-shell .activity-capture-icon-extra { background: #fff0e4; color: #c55a00; }

.workspace-shell .activity-capture-fields,
.workspace-shell .activity-capture-extra-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.workspace-shell .activity-capture-fields label,
.workspace-shell .activity-capture-extra-grid > label {
  display: grid;
  gap: 0.3rem;
  color: var(--ink-940);
  font-size: 0.79rem;
  font-weight: 800;
}

.workspace-shell .activity-capture-fields label[hidden],
.workspace-shell .activity-capture-fields #update_source_detail_wrap[hidden],
.workspace-shell .activity-capture-subsection[hidden] {
  display: none !important;
}

.workspace-shell .activity-capture-span-full {
  grid-column: 1 / -1;
}

.workspace-shell .activity-capture-fields :is(input, select, textarea),
.workspace-shell .activity-capture-extra-grid > label input {
  min-height: 40px;
  padding: 0.45rem 0.7rem;
  border: 1px solid #c6d4e6;
  border-radius: 8px;
  background: #fff;
  color: var(--ink-940);
  font-size: 0.9rem;
  font-weight: 550;
}

.workspace-shell .activity-capture-fields textarea {
  min-height: 8.5rem;
  resize: none;
}

.workspace-shell .activity-capture-location-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--ink-620);
  font-size: 0.78rem;
}

.workspace-shell .activity-capture-fields > .btn {
  justify-self: start;
}

.workspace-shell .activity-capture-subsection {
  grid-column: 1 / -1;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(146, 100, 20, 0.14);
}

.workspace-shell .activity-capture-subsection > summary {
  color: var(--ink-940);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
}

.workspace-shell .activity-capture-subsection > .check-grid,
.workspace-shell .activity-capture-subsection > .stack {
  margin-top: 0.75rem;
}

.workspace-shell .activity-capture-concerns {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.workspace-shell .activity-capture-side {
  display: grid;
  gap: 0.9rem;
}

.workspace-shell .activity-capture-save-card,
.workspace-shell .activity-capture-checklist {
  padding: 1rem 1.05rem;
}

.workspace-shell .activity-capture-save-card h2,
.workspace-shell .activity-capture-checklist h2 {
  margin: 0;
  color: var(--ink-940);
  font-size: 1rem;
}

.workspace-shell .activity-capture-save-card p {
  margin: 0.45rem 0 0.8rem;
  color: var(--ink-620);
  font-size: 0.78rem;
  line-height: 1.4;
}

.workspace-shell .activity-capture-save-card .btn {
  width: 100%;
  justify-content: center;
}

.workspace-shell .activity-capture-checklist {
  display: grid;
  gap: 0;
}

.workspace-shell .activity-capture-checklist h2 {
  padding-bottom: 0.65rem;
}

.workspace-shell .activity-capture-checklist div {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.65rem 0;
  border-top: 1px solid rgba(146, 100, 20, 0.14);
  color: var(--ink-940);
  font-size: 0.82rem;
}

.workspace-shell .activity-capture-checklist span {
  color: var(--ink-620);
  font-size: 0.74rem;
}

.workspace-shell[data-party-theme="lib_dem"] :is(.activity-capture-card, .activity-capture-save-card, .activity-capture-checklist) {
  border-color: var(--ld-line);
  background: var(--ld-surface-strong);
}

.workspace-shell[data-party-theme="lib_dem"] :is(.activity-capture-card-head h2, .activity-capture-fields label, .activity-capture-extra-grid > label, .activity-capture-subsection > summary, .activity-capture-save-card h2, .activity-capture-checklist h2, .activity-capture-checklist div) {
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] :is(.activity-capture-header > div > p:last-child, .activity-capture-card-head p, .activity-capture-card-head h2 span, .activity-capture-location-note, .activity-capture-save-card p, .activity-capture-checklist span) {
  color: var(--ld-muted);
}

.workspace-shell[data-party-theme="lib_dem"] .activity-capture-fields :is(input, select, textarea),
.workspace-shell[data-party-theme="lib_dem"] .activity-capture-extra-grid > label input {
  border-color: var(--ld-line);
  background: #fff;
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] :is(.activity-capture-subsection, .activity-capture-checklist div) {
  border-color: var(--ld-line);
}

@media (max-width: 980px) {
  .workspace-shell .activity-capture-layout {
    grid-template-columns: 1fr;
  }

  .workspace-shell .activity-capture-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .workspace-shell .activity-capture-header {
    align-items: stretch;
    flex-direction: column;
  }

  .workspace-shell .activity-capture-grid,
  .workspace-shell .activity-capture-fields,
  .workspace-shell .activity-capture-extra-grid,
  .workspace-shell .activity-capture-side {
    grid-template-columns: 1fr;
  }
}

/* Keep the shared capture workspace compact even when the standard map and
   party-theme rules are loaded later in this stylesheet. */
.workspace-shell .capture-workspace-map {
  height: 8.5rem;
  min-height: 8.5rem;
  max-height: 8.5rem;
}

.workspace-shell .capture-workspace-card-who {
  border-top-color: #38a76f !important;
}

.workspace-shell .capture-workspace-card-what {
  border-top-color: #2877d3 !important;
}

.workspace-shell .capture-workspace-card-where {
  border-top-color: #8163cf !important;
}

.workspace-shell .capture-workspace-card-extra {
  border-top-color: #ef9708 !important;
}

.workspace-shell[data-party-theme="lib_dem"] .capture-workspace-card {
  border-top-width: 3px;
}

/* Issue capture uses the same compact workspace rhythm as enquiries and activity. */
.workspace-shell .issue-capture-workspace-page {
  max-width: 94rem;
}

.workspace-shell .issue-capture-linked-source {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line-200);
  border-radius: 0.55rem;
  background: var(--surface-strong);
  color: var(--ink-620);
  font-size: 0.74rem;
}

.workspace-shell .issue-capture-linked-source strong {
  color: var(--ink-940);
}

.workspace-shell .issue-capture-location-suggestions {
  min-height: 0;
}

.workspace-shell .issue-capture-location-suggestions .suggestion-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding-top: 0.05rem;
}

.workspace-shell .issue-capture-location-suggestions .suggestion-chip {
  min-height: 1.8rem;
  padding: 0.25rem 0.48rem;
  border: 1px solid var(--line-300);
  border-radius: 0.35rem;
  background: var(--surface-strong);
  color: var(--ink-820);
  cursor: pointer;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 700;
}

.workspace-shell .issue-capture-summary-wrap {
  position: relative;
  display: block;
}

.workspace-shell .issue-capture-summary-wrap textarea {
  padding-bottom: 1.45rem;
}

.workspace-shell .issue-capture-summary-count {
  position: absolute;
  right: 0.5rem;
  bottom: 0.38rem;
  color: var(--ink-620);
  font-size: 0.65rem;
  font-weight: 700;
  pointer-events: none;
}

.workspace-shell .issue-capture-extra-card {
  min-height: 0;
}

.workspace-shell .issue-capture-workspace-page .capture-workspace-save-card .btn {
  width: auto;
  min-width: 8.6rem;
}

.workspace-shell .issue-capture-workspace-page .capture-workspace-progress div.is-ready::before {
  display: grid;
  place-items: center;
  border-color: #28a875;
  background: #28a875;
  color: #fff;
  content: "✓";
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1;
}

.workspace-shell .issue-capture-extra-grid {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.workspace-shell .capture-extra-summary {
  margin: 0;
  color: var(--ink-620);
  font-size: 0.74rem;
}

.workspace-shell .capture-extra-dialog {
  width: min(38rem, calc(100vw - 2rem));
  max-height: min(44rem, calc(100vh - 2rem));
  padding: 0;
  border: 1px solid var(--line-300);
  border-radius: 0.75rem;
  background: var(--surface-strong);
  color: var(--ink-940);
  box-shadow: 0 1.1rem 3rem rgba(25, 37, 55, 0.2);
}

.workspace-shell .capture-extra-dialog::backdrop {
  background: rgba(20, 28, 40, 0.32);
}

.workspace-shell .capture-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line-200);
}

.workspace-shell .capture-dialog-header h2 {
  margin: 0;
  color: var(--ink-940);
  font-size: 1rem;
}

.workspace-shell .capture-dialog-header p {
  margin: 0.25rem 0 0;
  color: var(--ink-620);
  font-size: 0.74rem;
}

.workspace-shell .capture-extra-dialog-content {
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem 1rem 1rem;
}

.workspace-shell .issue-capture-extra-section {
  display: grid;
  gap: 0.55rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--line-200);
}

.workspace-shell .issue-capture-extra-section:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.workspace-shell .issue-capture-extra-section h3,
.workspace-shell .issue-capture-extra-section p {
  margin: 0;
}

.workspace-shell .issue-capture-extra-section h3 {
  color: var(--ink-940);
  font-size: 0.82rem;
}

.workspace-shell .issue-capture-extra-section p {
  color: var(--ink-620);
  font-size: 0.72rem;
}

.workspace-shell .issue-capture-file-button {
  justify-self: start;
}

.workspace-shell .issue-capture-file-button input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.workspace-shell .issue-capture-upload-list {
  display: grid;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  color: var(--ink-620);
  font-size: 0.7rem;
  list-style: none;
}

.workspace-shell .issue-capture-upload-list li::before {
  margin-right: 0.35rem;
  color: #6d58b5;
  content: "•";
}

.workspace-shell .issue-capture-actioner-fields[hidden],
.workspace-shell #follow_up_date_wrap[hidden],
.workspace-shell #action_due_date_wrap[hidden],
.workspace-shell #action_contact_wrap[hidden] {
  display: none !important;
}

.workspace-shell[data-party-theme="lib_dem"] :is(
  .issue-capture-linked-source,
  .capture-extra-dialog
) {
  border-color: var(--ld-line);
  background: var(--ld-surface-strong);
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] :is(
  .issue-capture-linked-source strong,
  .capture-dialog-header h2,
  .issue-capture-extra-section h3
) {
  color: var(--ld-ink);
}

.workspace-shell[data-party-theme="lib_dem"] :is(
  .issue-capture-linked-source,
  .capture-dialog-header p,
  .issue-capture-extra-section p,
  .capture-extra-summary,
  .issue-capture-summary-count,
  .issue-capture-upload-list
) {
  color: var(--ld-muted);
}

.workspace-shell[data-party-theme="lib_dem"] :is(
  .capture-dialog-header,
  .issue-capture-extra-section
) {
  border-color: var(--ld-line);
}

@media (max-width: 720px) {
  .workspace-shell .issue-capture-extra-grid {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

/* A workspace should open ready to choose a record, not assume the first row. */
.workspace-shell .issue-thread-workspace .thread-workspace-empty {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.48rem;
  min-height: min(31rem, calc(100vh - 12rem));
  padding: 2rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink-620, #66768a);
  text-align: center;
}

.workspace-shell .issue-thread-workspace .thread-workspace-empty .page-kicker {
  margin: 0;
  color: var(--ink-620, #66768a);
}

.workspace-shell .issue-thread-workspace .thread-workspace-empty h1 {
  margin: 0;
  color: var(--ink-940, #132237);
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
}

.workspace-shell .issue-thread-workspace .thread-workspace-empty p:not(.page-kicker) {
  max-width: 28rem;
  margin: 0;
  color: var(--ink-620, #66768a);
  font-size: 0.8rem;
  line-height: 1.5;
}

.workspace-shell .issue-thread-workspace .thread-workspace-empty-search {
  display: flex;
  width: min(100%, 31rem);
  align-items: center;
  gap: 0.42rem;
  margin: 0.32rem 0 0.08rem;
}

.workspace-shell .issue-thread-workspace .thread-workspace-empty-search label {
  flex: 1 1 auto;
  min-width: 0;
}

.workspace-shell .issue-thread-workspace .thread-workspace-empty-search input {
  width: 100%;
  min-height: 2.1rem;
  padding: 0.38rem 0.55rem;
  border: 1px solid var(--line-300, #cad5e3);
  border-radius: 0.42rem;
  background: var(--surface-strong, #fff);
  color: var(--ink-940, #132237);
  box-shadow: none;
  font: inherit;
  font-size: 0.76rem;
}

.workspace-shell .issue-thread-workspace .thread-workspace-empty-search .btn {
  flex: 0 0 auto;
  margin: 0;
}

.workspace-shell .issue-thread-workspace .thread-workspace-empty .btn {
  min-height: 2.1rem;
  margin-top: 0.25rem;
  box-shadow: none;
}

.workspace-shell .issue-thread-workspace .thread-workspace-empty-suggestions {
  display: grid;
  width: min(100%, 31rem);
  max-height: 14rem;
  gap: 0.25rem;
  margin-top: -0.18rem;
  overflow-y: auto;
  text-align: left;
}

.workspace-shell .issue-thread-workspace .thread-workspace-empty-suggestions:empty {
  display: none;
}

.workspace-shell .issue-thread-workspace .thread-workspace-empty-suggestion,
.workspace-shell .issue-thread-workspace .thread-workspace-empty-no-results {
  display: grid;
  gap: 0.1rem;
  width: 100%;
  padding: 0.48rem 0.62rem;
  border: 1px solid var(--line-300, #cad5e3);
  border-radius: 0.42rem;
  background: var(--surface-strong, #fff);
  color: var(--ink-940, #132237);
  box-shadow: none;
}

.workspace-shell .issue-thread-workspace .thread-workspace-empty-suggestion {
  text-decoration: none;
}

.workspace-shell .issue-thread-workspace .thread-workspace-empty-suggestion:hover,
.workspace-shell .issue-thread-workspace .thread-workspace-empty-suggestion:focus-visible {
  border-color: var(--accent-500, #e59b19);
  background: var(--surface-soft, #f8fafc);
  outline: none;
}

.workspace-shell .issue-thread-workspace .thread-workspace-empty-suggestion strong {
  overflow: hidden;
  color: var(--ink-940, #132237);
  font-size: 0.78rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-shell .issue-thread-workspace .thread-workspace-empty-suggestion small,
.workspace-shell .issue-thread-workspace .thread-workspace-empty-no-results {
  overflow: hidden;
  color: var(--ink-620, #66768a);
  font-size: 0.7rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 520px) {
  .workspace-shell .issue-thread-workspace .thread-workspace-empty-search {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Reports: compact start screen for choosing the report before the writing workspace opens. */

.portal-page-shell-report-builder .report-start-setup {
  padding: 0;
  overflow: hidden;
}

.portal-page-shell-report-builder .report-start-form {
  gap: 0;
}

.portal-page-shell-report-builder .report-start-section {
  display: grid;
  gap: 0.55rem;
  padding: 0.78rem 0.92rem;
}

.portal-page-shell-report-builder .report-start-section + .report-start-section {
  border-top: 1px solid var(--line-soft);
}

.portal-page-shell-report-builder .report-start-section-head,
.portal-page-shell-report-builder .report-start-rail-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.62rem;
}

.portal-page-shell-report-builder .report-start-section-icon {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent-soft) 72%, transparent);
  color: var(--accent-strong);
  line-height: 1;
}

.portal-page-shell-report-builder .report-start-section-icon svg,
.portal-page-shell-report-builder .report-start-export-mark svg {
  width: 1.18rem;
  height: 1.18rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.85;
}

.portal-page-shell-report-builder .report-start-icon-area {
  background: #e9f1ff;
  color: #2476e9;
}

.portal-page-shell-report-builder .report-start-icon-period {
  background: #e8f8ef;
  color: #15995b;
}

.portal-page-shell-report-builder .report-start-icon-content {
  background: #f1eaff;
  color: #7954ce;
}

.portal-page-shell-report-builder .report-start-icon-draft {
  background: #f1eaff;
  color: #7954ce;
}

.portal-page-shell-report-builder .report-start-icon-history {
  background: #fff1df;
  color: #d97811;
}

.portal-page-shell-report-builder .report-start-section-head h2,
.portal-page-shell-report-builder .report-start-rail-head h2 {
  margin: 0;
  font-family: inherit;
  font-size: 0.98rem;
  line-height: 1.2;
}

.portal-page-shell-report-builder .report-start-section-head p,
.portal-page-shell-report-builder .report-start-rail-head p {
  margin: 0.08rem 0 0;
  color: var(--ink-620);
  font-size: 0.76rem;
  line-height: 1.35;
}

.portal-page-shell-report-builder .report-start-preset {
  max-width: 26rem;
}

.portal-page-shell-report-builder .report-start-setup .report-setup-field {
  gap: 0.14rem;
  font-size: 0.76rem;
}

.portal-page-shell-report-builder .report-start-setup .report-setup-field :is(select, input) {
  min-height: 2.35rem;
  padding: 0.38rem 0.62rem;
}

.portal-page-shell-report-builder .report-start-checks {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.62rem;
}

.portal-page-shell-report-builder .report-start-checks .report-inline-check {
  min-height: 3.55rem;
  padding: 0.56rem 0.65rem;
  border: 1px solid var(--line-soft);
  border-radius: 0.68rem;
  background: var(--surface-soft);
}

.portal-page-shell-report-builder .report-start-checks .report-inline-check span {
  display: grid;
  gap: 0.12rem;
}

.portal-page-shell-report-builder .report-start-checks .report-inline-check strong {
  color: var(--ink-940);
  font-size: 0.8rem;
  line-height: 1.3;
}

.portal-page-shell-report-builder .report-start-checks .report-inline-check small {
  color: var(--ink-620);
  font-size: 0.72rem;
  line-height: 1.32;
}

.portal-page-shell-report-builder .report-start-actions {
  justify-content: space-between;
  margin: 0;
  min-height: 4rem;
  padding: 0.62rem 0.92rem;
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(105deg, rgba(233, 244, 255, 0.72), rgba(250, 253, 255, 0.3));
}

.portal-page-shell-report-builder .report-start-action-copy {
  display: grid;
  gap: 0.1rem;
}

.portal-page-shell-report-builder .report-start-action-copy strong {
  color: var(--ink-940);
  font-size: 0.8rem;
}

.portal-page-shell-report-builder .report-start-action-copy span {
  color: var(--ink-620);
  font-size: 0.72rem;
}

.portal-page-shell-report-builder .report-start-actions .btn {
  min-height: 2.2rem;
  padding-inline: 1.05rem;
  box-shadow: none;
}

.portal-page-shell-report-builder .report-start-rail-card {
  display: grid;
  gap: 0.78rem;
}

/* Keep the two report-builder columns visually level when a resumable draft exists. */
.portal-page-shell-report-builder .report-resume-draft-block {
  gap: 0.56rem;
  padding: 0.84rem 0.9rem;
}

.portal-page-shell-report-builder .report-resume-draft-block .report-history-surface {
  padding: 0.12rem 0;
}

.portal-page-shell-report-builder .report-resume-draft-block .report-history-row {
  gap: 0.42rem;
  padding: 0.46rem 0;
}

.portal-page-shell-report-builder .report-start-export-list {
  display: grid;
  border-top: 1px solid var(--line-soft);
}

.portal-page-shell-report-builder .report-start-export-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  padding: 0.62rem 0;
  border-bottom: 1px solid var(--line-soft);
  color: inherit;
  text-decoration: none;
}

.portal-page-shell-report-builder .report-start-export-row:hover strong,
.portal-page-shell-report-builder .report-start-export-row:focus-visible strong {
  color: var(--accent-strong);
}

.portal-page-shell-report-builder .report-start-export-mark {
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 0.45rem;
  background: var(--surface-tint);
  color: var(--ink-760);
  font-size: 0.75rem;
}

.portal-page-shell-report-builder .report-start-export-row > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 0.1rem;
}

.portal-page-shell-report-builder .report-start-export-row strong,
.portal-page-shell-report-builder .report-start-export-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-page-shell-report-builder .report-start-export-row strong {
  font-size: 0.78rem;
  line-height: 1.25;
}

.portal-page-shell-report-builder .report-start-export-row small {
  color: var(--ink-620);
  font-size: 0.69rem;
  line-height: 1.25;
}

.portal-page-shell-report-builder .report-start-export-row b,
.portal-page-shell-report-builder .report-start-archive-link b {
  color: var(--accent-strong);
  font-size: 1rem;
  line-height: 1;
}

.portal-page-shell-report-builder .report-start-archive-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  color: var(--ink-940);
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
}

.portal-page-shell-report-builder .report-start-archive-link:hover,
.portal-page-shell-report-builder .report-start-archive-link:focus-visible {
  color: var(--accent-strong);
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-report-builder .report-start-section + .report-start-section,
.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-report-builder .report-start-actions,
.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-report-builder .report-start-export-list,
.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-report-builder .report-start-export-row,
.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-report-builder .report-start-checks .report-inline-check {
  border-color: var(--ld-line);
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-report-builder .report-start-section-head p,
.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-report-builder .report-start-rail-head p,
.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-report-builder .report-start-checks .report-inline-check small,
.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-report-builder .report-start-export-row small {
  color: var(--ld-ink-soft);
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-report-builder .report-start-checks .report-inline-check,
.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-report-builder .report-start-export-mark {
  background: rgba(255, 250, 242, 0.84);
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-start-section + .report-start-section,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-start-actions,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-start-export-list,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-start-export-row,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-start-checks .report-inline-check {
  border-color: rgba(255, 255, 255, 0.12);
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-start-section-head h2,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-start-rail-head h2,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-start-checks .report-inline-check strong,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-start-export-row strong,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-start-archive-link {
  color: #ffffff;
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-start-section-head p,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-start-rail-head p,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-start-checks .report-inline-check small,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-start-export-row small {
  color: rgba(255, 255, 255, 0.68);
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-start-checks .report-inline-check,
.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder .report-start-export-mark {
  background: rgba(0, 20, 15, 0.16);
}

@media (max-width: 720px) {
  .portal-page-shell-report-builder .report-start-checks {
    grid-template-columns: 1fr;
  }
}

/* Reports: completed-report archive. Keep archive management dense and factual. */

.portal-page-shell-report-builder.report-archive-page {
  display: grid;
  gap: 1rem;
}

.portal-page-shell-report-builder .report-archive-header {
  margin-bottom: 0;
}

.portal-page-shell-report-builder .report-archive-back {
  min-height: 2.2rem;
  padding-inline: 0.8rem;
}

.portal-page-shell-report-builder .report-archive-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 0.7rem;
  background: var(--surface-strong);
}

.portal-page-shell-report-builder .report-archive-stat {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.62rem;
  min-height: 5.1rem;
  padding: 0.68rem 0.92rem;
}

.portal-page-shell-report-builder .report-archive-stat + .report-archive-stat {
  border-left: 1px solid var(--line-soft);
}

.portal-page-shell-report-builder .report-archive-stat > span:last-child {
  display: grid;
  min-width: 0;
  gap: 0.08rem;
}

.portal-page-shell-report-builder .report-archive-stat small,
.portal-page-shell-report-builder .report-archive-stat em {
  color: var(--ink-620);
  font-size: 0.7rem;
  font-style: normal;
  line-height: 1.25;
}

.portal-page-shell-report-builder .report-archive-stat small {
  font-weight: 800;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.portal-page-shell-report-builder .report-archive-stat strong {
  overflow: hidden;
  color: var(--ink-940);
  font-size: 1.04rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-page-shell-report-builder .report-archive-stat-range strong {
  font-size: 0.86rem;
}

.portal-page-shell-report-builder .report-archive-stat-icon {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1;
}

.portal-page-shell-report-builder .report-archive-stat-complete { background: #e8f8ef; color: #15995b; }
.portal-page-shell-report-builder .report-archive-stat-month { background: #f1eaff; color: #7954ce; }
.portal-page-shell-report-builder .report-archive-stat-archived { background: #fff1df; color: #d97811; }
.portal-page-shell-report-builder .report-archive-stat-date { background: #e9f1ff; color: #2476e9; }

.portal-page-shell-report-builder .report-archive-filters {
  display: grid;
  grid-template-columns: minmax(18rem, 1.45fr) minmax(9rem, 0.5fr) minmax(9rem, 0.5fr) auto auto;
  align-items: center;
  gap: 0.56rem;
  padding: 0.68rem;
  border: 1px solid var(--line-soft);
  border-radius: 0.7rem;
  background: var(--surface-strong);
}

.portal-page-shell-report-builder .report-archive-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.46rem;
  min-width: 0;
  min-height: 2.26rem;
  padding: 0 0.68rem;
  border: 1px solid var(--line-300);
  border-radius: 0.5rem;
  background: var(--surface-strong);
  color: var(--ink-620);
}

.portal-page-shell-report-builder .report-archive-search > span {
  font-size: 1.05rem;
  line-height: 1;
}

.portal-page-shell-report-builder .report-archive-search input,
.portal-page-shell-report-builder .report-archive-filter-field select {
  min-height: 2.26rem;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.portal-page-shell-report-builder .report-archive-search input:focus,
.portal-page-shell-report-builder .report-archive-filter-field select:focus {
  outline: none;
  box-shadow: none;
}

.portal-page-shell-report-builder .report-archive-search:focus-within,
.portal-page-shell-report-builder .report-archive-filter-field:focus-within {
  border-color: var(--accent-500);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-soft) 72%, transparent);
}

.portal-page-shell-report-builder .report-archive-filter-field {
  min-width: 0;
  border: 1px solid var(--line-300);
  border-radius: 0.5rem;
  background: var(--surface-strong);
}

.portal-page-shell-report-builder .report-archive-filter-field select {
  width: 100%;
  padding: 0.35rem 1.95rem 0.35rem 0.66rem;
  color: var(--ink-940);
  font-size: 0.78rem;
  font-weight: 700;
}

.portal-page-shell-report-builder .report-archive-filters .btn {
  min-height: 2.22rem;
  padding-inline: 0.76rem;
  box-shadow: none;
}

.portal-page-shell-report-builder .report-archive-table-card {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 0.7rem;
  background: var(--surface-strong);
}

.portal-page-shell-report-builder .report-archive-table-head,
.portal-page-shell-report-builder .report-archive-row {
  display: grid;
  grid-template-columns: minmax(12rem, 1.08fr) minmax(8rem, 0.72fr) minmax(9rem, 0.82fr) minmax(5.5rem, 0.46fr) minmax(5rem, 0.42fr) minmax(20rem, 1.5fr);
  gap: 0.56rem;
  align-items: center;
}

.portal-page-shell-report-builder .report-archive-table-head {
  padding: 0.56rem 1rem;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-620);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.portal-page-shell-report-builder .report-archive-row {
  min-height: 5.25rem;
  padding: 0.72rem 1rem;
  border-bottom: 1px solid var(--line-soft);
}

.portal-page-shell-report-builder .report-archive-row:last-child {
  border-bottom: 0;
}

.portal-page-shell-report-builder .report-archive-row :is(strong, small) {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-page-shell-report-builder .report-archive-row strong {
  color: var(--ink-940);
  font-size: 0.78rem;
  line-height: 1.3;
}

.portal-page-shell-report-builder .report-archive-row small {
  margin-top: 0.08rem;
  color: var(--ink-620);
  font-size: 0.7rem;
  line-height: 1.25;
}

.portal-page-shell-report-builder .report-archive-report {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.52rem;
  min-width: 0;
}

.portal-page-shell-report-builder .report-archive-report-mark {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.5rem;
  background: #e8f8ef;
  color: #15995b;
  font-size: 1rem;
  line-height: 1;
}

.portal-page-shell-report-builder .report-archive-status {
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
  padding: 0.2rem 0.5rem;
  border: 1px solid #bce7cd;
  border-radius: 999px;
  background: #eaf8ef;
  color: #207541;
  font-size: 0.64rem;
  font-weight: 800;
  line-height: 1;
}

.portal-page-shell-report-builder .report-archive-status.is-archived {
  border-color: var(--line-300);
  background: var(--surface-soft);
  color: var(--ink-760);
}

.portal-page-shell-report-builder .report-archive-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: 0.3rem;
  min-width: 0;
}

.portal-page-shell-report-builder .report-archive-actions form {
  margin: 0;
}

.portal-page-shell-report-builder .report-archive-actions .btn {
  flex: 0 0 auto;
  min-height: 1.9rem;
  padding: 0.25rem 0.43rem;
  box-shadow: none;
  font-size: 0.62rem;
  white-space: nowrap;
}

.portal-page-shell-report-builder .report-archive-download {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.portal-page-shell-report-builder .report-archive-actions svg {
  width: 0.76rem;
  height: 0.76rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.portal-page-shell-report-builder .report-archive-download:first-child {
  color: #d84b31;
}

.portal-page-shell-report-builder .report-archive-download:nth-child(2) {
  color: #175fc6;
}

.portal-page-shell-report-builder .report-archive-download:hover {
  border-color: currentColor;
  background: var(--surface-strong);
}

.portal-page-shell-report-builder .report-archive-restore {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-color: var(--line-300);
  background: var(--surface-soft);
  color: var(--ink-860);
}

@media (min-width: 1281px) {
  .portal-page-shell-report-builder .report-archive-actions .btn {
    min-height: 2.05rem;
    padding: 0.3rem 0.58rem;
    font-size: 0.67rem;
  }

  .portal-page-shell-report-builder .report-archive-download,
  .portal-page-shell-report-builder .report-archive-restore {
    gap: 0.32rem;
  }

  .portal-page-shell-report-builder .report-archive-restore {
    padding-inline: 0.7rem;
  }

  .portal-page-shell-report-builder .report-archive-actions svg {
    width: 0.84rem;
    height: 0.84rem;
  }
}

.portal-page-shell-report-builder .report-archive-empty {
  padding: 2.2rem 1rem;
  text-align: center;
}

.portal-page-shell-report-builder .report-archive-empty strong {
  color: var(--ink-940);
  font-size: 0.88rem;
}

.portal-page-shell-report-builder .report-archive-empty p {
  max-width: 30rem;
  margin: 0.34rem auto 0;
  color: var(--ink-620);
  font-size: 0.78rem;
}

.portal-page-shell-report-builder .report-archive-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.64rem 0.86rem;
  border-top: 1px solid var(--line-soft);
  color: var(--ink-620);
  font-size: 0.72rem;
}

.portal-page-shell-report-builder .report-archive-pagination-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.portal-page-shell-report-builder .report-archive-pagination-actions strong {
  color: var(--ink-760);
  font-size: 0.72rem;
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-report-builder :is(.report-archive-stats, .report-archive-filters, .report-archive-table-card) {
  border-color: var(--ld-line);
  background: rgba(255, 253, 249, 0.9);
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-report-builder :is(.report-archive-stat + .report-archive-stat, .report-archive-table-head, .report-archive-row, .report-archive-pagination) {
  border-color: var(--ld-line);
}

.workspace-shell[data-party-theme="lib_dem"] .portal-page-shell-report-builder :is(.report-archive-stat small, .report-archive-stat em, .report-archive-row small, .report-archive-empty p, .report-archive-pagination) {
  color: var(--ld-ink-soft);
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder :is(.report-archive-stats, .report-archive-filters, .report-archive-table-card) {
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(0, 20, 15, 0.16);
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder :is(.report-archive-stat + .report-archive-stat, .report-archive-table-head, .report-archive-row, .report-archive-pagination) {
  border-color: rgba(255, 255, 255, 0.13);
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder :is(.report-archive-stat strong, .report-archive-row strong, .report-archive-empty strong, .report-archive-pagination-actions strong) {
  color: #fff;
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder :is(.report-archive-stat small, .report-archive-stat em, .report-archive-row small, .report-archive-empty p, .report-archive-pagination) {
  color: rgba(255, 255, 255, 0.72);
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder :is(.report-archive-search, .report-archive-filter-field) {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(0, 20, 15, 0.22);
}

.workspace-shell[data-party-theme="casework"] .portal-page-shell-report-builder :is(.report-archive-search input, .report-archive-filter-field select) {
  color: #fff;
}

@media (max-width: 1080px) {
  .portal-page-shell-report-builder .report-archive-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portal-page-shell-report-builder .report-archive-stat:nth-child(odd) {
    border-left: 0;
  }

  .portal-page-shell-report-builder .report-archive-stat:nth-child(n + 3) {
    border-top: 1px solid var(--line-soft);
  }

  .portal-page-shell-report-builder .report-archive-filters {
    grid-template-columns: minmax(12rem, 1fr) minmax(9rem, 0.45fr) minmax(10rem, 0.5fr) auto;
  }

  .portal-page-shell-report-builder .report-archive-filters .btn-quiet {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .portal-page-shell-report-builder .report-archive-table-head {
    display: none;
  }

  .portal-page-shell-report-builder .report-archive-row {
    grid-template-columns: minmax(12rem, 1.2fr) minmax(9rem, 0.9fr) minmax(10rem, 1fr) auto;
  }

  .portal-page-shell-report-builder .report-archive-completed {
    display: none;
  }

  .portal-page-shell-report-builder .report-archive-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 660px) {
  .portal-page-shell-report-builder .report-archive-stats,
  .portal-page-shell-report-builder .report-archive-filters,
  .portal-page-shell-report-builder .report-archive-row {
    grid-template-columns: 1fr;
  }

  .portal-page-shell-report-builder .report-archive-stat + .report-archive-stat,
  .portal-page-shell-report-builder .report-archive-stat:nth-child(n + 3) {
    border-top: 1px solid var(--line-soft);
    border-left: 0;
  }

  .portal-page-shell-report-builder .report-archive-filters .btn-quiet {
    grid-column: auto;
  }

  .portal-page-shell-report-builder .report-archive-actions {
    flex-wrap: wrap;
  }

  .portal-page-shell-report-builder .report-archive-pagination {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Compact role switcher: retain every role action while making the header
   popover read as one calm, scannable control rather than a stack of panels. */
.workspace-popover-root .workspace-role-card {
  width: min(24.5rem, calc(100vw - 2rem));
  gap: 0.42rem;
  padding: 0.72rem;
  border-radius: 0.8rem;
}

.workspace-popover-root .workspace-role-card-head {
  gap: 0.16rem;
  padding: 0.12rem 0.16rem 0.55rem;
}

.workspace-popover-root .workspace-role-card-head span,
.workspace-popover-root .workspace-role-card-section-label {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.035em;
}

.workspace-popover-root .workspace-role-card-head strong {
  font-size: 0.82rem;
  line-height: 1.28;
}

.workspace-popover-root .workspace-role-card-section-label {
  display: block;
  padding: 0.08rem 0.16rem 0.18rem;
  text-transform: uppercase;
}

.workspace-popover-root .workspace-role-list {
  gap: 0.32rem;
}

.workspace-popover-root .workspace-role-option {
  gap: 0.52rem;
  min-height: 3.5rem;
  padding: 0.48rem 0.52rem;
  border-radius: 0.56rem;
}

.workspace-popover-root .workspace-role-option > div:first-child {
  gap: 0.08rem;
}

.workspace-popover-root .workspace-role-option strong {
  font-size: 0.76rem;
  line-height: 1.23;
}

.workspace-popover-root .workspace-role-option small {
  font-size: 0.66rem;
  line-height: 1.2;
}

.workspace-popover-root .workspace-role-actions {
  gap: 0.24rem;
  flex-wrap: nowrap;
}

.workspace-popover-root .workspace-role-actions .btn,
.workspace-popover-root .workspace-role-default {
  min-height: 1.6rem;
  padding: 0.14rem 0.38rem;
  border-radius: 0.38rem;
  box-shadow: none;
  font-size: 0.58rem;
  font-weight: 850;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.workspace-popover-root .workspace-role-option.is-active .workspace-role-actions .btn[disabled] {
  opacity: 1;
}

.workspace-popover-root .workspace-role-manage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 2.2rem;
  margin-top: 0.08rem;
  padding: 0.28rem 0.18rem;
  border-top: 1px solid currentColor;
  font-size: 0.7rem;
  font-weight: 800;
  text-decoration: none;
}

.workspace-popover-root .workspace-role-manage > span:last-child {
  font-size: 1.15rem;
  line-height: 1;
}

.workspace-popover-root[data-party-theme="lib_dem"] .workspace-role-manage {
  border-top-color: rgba(217, 119, 6, 0.18);
  color: #7c2d12;
}

.workspace-popover-root[data-party-theme="lib_dem"] .workspace-role-actions .btn {
  border-color: rgba(217, 119, 6, 0.25);
  background: rgba(255, 255, 255, 0.9);
  color: #b45309;
}

.workspace-popover-root[data-party-theme="lib_dem"] .workspace-role-option.is-active .workspace-role-actions .btn[disabled] {
  border-color: #bce7cd;
  background: #eaf8ef;
  color: #207541;
}

.workspace-popover-root[data-party-theme="lib_dem"] .workspace-role-default {
  border-color: rgba(217, 119, 6, 0.15);
  background: #fff7df;
  color: #8a5a16;
}

.workspace-popover-root[data-party-theme="casework"] .workspace-role-manage {
  border-top-color: rgba(255, 255, 255, 0.16);
}

/* Dashboard briefing: one compact, role-themed snapshot using solid portal surfaces. */
.dashboard-briefing {
  --dashboard-panel: var(--surface-strong);
  --dashboard-line: var(--line-200);
  --dashboard-muted: var(--ink-620);
  display:grid; gap:.8rem; max-width:1280px; padding-top:.9rem; padding-bottom:1.1rem;
}
.dashboard-briefing-header { display:flex; align-items:end; min-height:2.45rem; }
.dashboard-briefing-date { display:flex; align-items:center; gap:.62rem; margin:0; color:var(--ink-940); font-size:1.42rem; font-weight:850; letter-spacing:-.03em; }
.dashboard-heading-calendar,.dashboard-section-icon,.dashboard-search-icon,.dashboard-suggestion-icon { flex:none; display:grid; place-items:center; border-radius:.48rem; background:var(--accent-soft); color:var(--accent-strong); }
.dashboard-heading-calendar { width:1.8rem; height:1.8rem; }.dashboard-heading-calendar::before { content:"□"; font-size:1.12rem; font-weight:900; }
.dashboard-briefing-area { margin:.18rem 0 0 2.42rem; color:var(--dashboard-muted); font-size:.72rem; font-weight:750; }
.dashboard-global-search { position:relative; max-width:820px; }
.dashboard-global-search-form { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:.25rem; align-items:center; padding:.18rem .22rem .18rem .68rem; border:1px solid var(--dashboard-line); border-radius:.55rem; background:var(--surface-strong); box-shadow:0 .45rem 1rem rgba(23,35,45,.08); }
.dashboard-global-search-form label { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
.dashboard-search-icon { width:1.2rem; height:1.2rem; background:transparent; }.dashboard-search-icon::before { content:"⌕"; font-size:1.35rem; font-weight:800; line-height:1; }
.dashboard-global-search-form input { width:100%; min-height:2.25rem; padding:0 .35rem; border:0; background:transparent; color:var(--ink-940); font:inherit; font-size:.82rem; font-weight:700; outline:0; }
.dashboard-global-search-form input::placeholder { color:var(--ink-620); }.dashboard-global-search-submit { min-height:2.15rem; padding:0 .72rem; border:0; border-radius:.38rem; background:var(--accent); color:#fff; font:inherit; font-size:.74rem; font-weight:850; cursor:pointer; }
.dashboard-global-search > p { margin:.28rem .25rem 0 2.25rem; color:var(--dashboard-muted); font-size:.65rem; }
.dashboard-search-suggestions { position:absolute; z-index:40; top:calc(100% + .34rem); left:0; right:0; }
.dashboard-suggestion-panel { display:grid; padding:.28rem; border:1px solid var(--line-300); border-radius:.58rem; background:var(--surface-strong); box-shadow:0 1rem 2.25rem rgba(20,32,42,.24); }
.dashboard-suggestion-panel a { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:.52rem; padding:.52rem .58rem; border-radius:.38rem; color:var(--ink-940); text-decoration:none; }.dashboard-suggestion-panel a + a { border-top:1px solid var(--line-200); border-radius:0; }.dashboard-suggestion-panel a:hover { background:var(--accent-soft); }
.dashboard-suggestion-icon { width:1.65rem; height:1.65rem; }.dashboard-suggestion-icon::before { content:"•"; font-size:1.15rem; }.dashboard-suggestion-panel .is-issue .dashboard-suggestion-icon{color:#1670cf;background:#e9f3ff}.dashboard-suggestion-panel .is-enquiry .dashboard-suggestion-icon{color:#cf6b00;background:#fff1dd}.dashboard-suggestion-panel .is-activity .dashboard-suggestion-icon{color:#7358cb;background:#f0ecff}.dashboard-suggestion-panel .is-contact .dashboard-suggestion-icon{color:#129a61;background:#e8f8f0}.dashboard-suggestion-panel .is-note .dashboard-suggestion-icon{color:#c96d11;background:#fff0dc}
.dashboard-suggestion-copy { display:grid; min-width:0; gap:.08rem; }.dashboard-suggestion-copy strong,.dashboard-suggestion-copy small { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.dashboard-suggestion-copy strong{font-size:.75rem}.dashboard-suggestion-copy small,.dashboard-suggestion-empty{color:var(--dashboard-muted);font-size:.65rem}.dashboard-suggestion-arrow{color:var(--accent-strong);font-size:1.2rem}.dashboard-suggestion-empty{padding:.65rem .72rem;}
.dashboard-briefing-top-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.8rem; }.dashboard-briefing-middle-grid { display:grid; grid-template-columns:1fr .94fr 1.08fr; gap:.8rem; align-items:start; }
.dashboard-briefing-card { min-width:0; padding:.78rem .85rem; border:1px solid var(--dashboard-line); border-radius:.58rem; background:var(--dashboard-panel); box-shadow:0 .35rem .95rem rgba(23,35,45,.055); }
.dashboard-card-head { display:flex; align-items:center; justify-content:space-between; gap:.7rem; min-width:0; margin-bottom:.42rem; }.dashboard-card-head h2 { display:flex; align-items:center; gap:.44rem; margin:0; color:var(--ink-940); font-family:Manrope,system-ui,sans-serif; font-size:.84rem; font-weight:850; letter-spacing:-.015em; }.dashboard-card-head p { margin:.14rem 0 0; color:var(--dashboard-muted); font-size:.67rem; }.dashboard-card-head a,.dashboard-report-actions a,.dashboard-report-actions button { color:var(--accent-strong); font-size:.66rem; font-weight:850; text-decoration:none; }.dashboard-card-head a:hover,.dashboard-report-actions a:hover { text-decoration:underline; }
.dashboard-section-icon { width:1.5rem; height:1.5rem; }.dashboard-section-icon::before{font-size:.88rem;font-weight:900}.dashboard-section-icon.is-recent::before{content:"◷"}.dashboard-section-icon.is-upcoming::before{content:"!"}.dashboard-section-icon.is-meetings::before{content:"□"}.dashboard-section-icon.is-waiting::before{content:"⌛"}.dashboard-section-icon.is-report::before{content:"▤"}.dashboard-section-icon.is-map::before{content:"⌖"}.dashboard-section-icon.is-upcoming{color:#de5a36;background:#fff0e8}.dashboard-section-icon.is-meetings{color:#17995e;background:#e8f8ef}.dashboard-section-icon.is-waiting{color:#7257c5;background:#f0ecff}.dashboard-section-icon.is-report{color:#2a73d3;background:#e9f3ff}.dashboard-section-icon.is-map{color:#8c5bd0;background:#f2edff}
.dashboard-briefing-list { display:grid; }.dashboard-briefing-row { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:.54rem; min-height:2.65rem; padding:.34rem 0; border-top:1px solid var(--line-200); color:var(--ink-940); text-decoration:none; }.dashboard-briefing-row:first-child { border-top:0; }.dashboard-briefing-row:hover strong { color:var(--accent-strong); }.dashboard-item-mark { width:.62rem; height:.62rem; border:2px solid var(--accent); border-radius:50%; background:var(--accent-soft); }.dashboard-item-mark.is-enquiry{border-color:#2879da;background:#e7f1ff}.dashboard-item-mark.is-activity{border-color:#7655ce;background:#eee8ff}.dashboard-item-mark.is-note{border-color:#db7b19;background:#fff1dc}.dashboard-item-mark.is-overdue{border-color:#e34b37;background:#fff0ea}.dashboard-item-mark.is-due{border-color:#e89c19;background:#fff3d7}.dashboard-item-mark.is-waiting{border-color:#8561ca;background:#f0ebff}
.dashboard-item-copy { display:grid; min-width:0; gap:.07rem; }.dashboard-item-copy strong { overflow:hidden; color:var(--ink-940); font-size:.72rem; line-height:1.2; text-overflow:ellipsis; white-space:nowrap; }.dashboard-item-copy small { overflow:hidden; color:var(--dashboard-muted); font-size:.63rem; line-height:1.2; text-overflow:ellipsis; white-space:nowrap; }.dashboard-item-meta { max-width:7rem; overflow:hidden; color:var(--dashboard-muted); font-size:.61rem; font-weight:800; text-align:right; text-overflow:ellipsis; white-space:nowrap; }.dashboard-item-meta.is-overdue { color:#c43d2b; }.dashboard-date-mark { display:grid; place-items:center; width:2rem; height:2rem; border:1px solid var(--line-200); border-radius:.32rem; background:var(--accent-soft); color:var(--accent-strong); line-height:1; }.dashboard-date-mark b{font-size:.7rem}.dashboard-date-mark small{margin-top:.08rem;font-size:.48rem;font-weight:850;text-transform:uppercase}.dashboard-arrow{color:var(--accent-strong);font-size:1.1rem}.dashboard-empty-copy{margin:.55rem 0;color:var(--dashboard-muted);font-size:.69rem}
.dashboard-waiting-card .dashboard-empty-copy { display:flex; align-items:center; min-height:4.55rem; padding:.35rem .12rem; }
.dashboard-report-card { display:grid; align-content:start; }.dashboard-report-due { display:grid; gap:.1rem; padding:.45rem .52rem; border-left:3px solid var(--accent); border-radius:.3rem; background:var(--accent-soft); }.dashboard-report-due.is-overdue { border-left-color:#db4936; }.dashboard-report-due strong{font-size:.71rem}.dashboard-report-due span{color:var(--ink-940);font-size:.78rem;font-weight:900}.dashboard-report-due small{color:var(--dashboard-muted);font-size:.62rem}.dashboard-report-period{margin:.38rem 0 0;color:var(--dashboard-muted);font-size:.62rem}.dashboard-report-material{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.25rem;margin-top:.45rem;padding-top:.42rem;border-top:1px solid var(--line-200)}.dashboard-report-material span{display:grid;gap:.04rem;color:var(--dashboard-muted);font-size:.6rem}.dashboard-report-material b{color:var(--ink-940);font-size:.8rem}.dashboard-report-actions{display:flex;justify-content:space-between;gap:.55rem;margin-top:.5rem}.dashboard-report-actions button{padding:0;border:0;background:transparent;cursor:pointer}
.dashboard-map-card { padding-bottom:.65rem; }.dashboard-map-card .dashboard-card-head{margin-bottom:.5rem}#dashboard-area-map{height:118px;border-radius:.38rem;overflow:hidden}.dashboard-map-empty{display:grid;place-items:center;min-height:100px;border:1px dashed var(--dashboard-line);border-radius:.42rem;color:var(--dashboard-muted);font-size:.75rem}.dashboard-map-empty a{margin-left:.25rem;color:var(--accent-strong);font-weight:800}
/* Dashboard briefing refinement: match the dashboard workspace hierarchy rather
   than inheriting the low-contrast decorative account-card treatment. */
.dashboard-briefing {
  --dashboard-panel: var(--surface, #fff);
  --dashboard-line: var(--line-soft, #dde5ef);
  --dashboard-muted: var(--ink-620, #61728b);
  width: min(100%, 1420px);
  max-width: none;
  margin: 0 auto;
  gap: 1rem;
  padding: 1.1rem 1rem 1.35rem;
}
.dashboard-briefing-header { min-height: auto; }
.dashboard-briefing-date { gap: .72rem; font-size: 1.48rem; }
.dashboard-heading-calendar { width: 1.9rem; height: 1.9rem; background: var(--accent-soft); }
.dashboard-heading-calendar::before { content: none; }
.dashboard-heading-calendar svg { width: 1.13rem; height: 1.13rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dashboard-briefing-area { margin: .22rem 0 0 2.62rem; font-size: .75rem; }
.dashboard-global-search {
  /* Match the left dashboard canvas: this ends at the visual colour break,
     rather than stretching across the decorative right-hand field. */
  width: 64%;
  min-width: 0;
  max-width: none;
  justify-self: start;
}
.dashboard-global-search-form,
.dashboard-global-search-form:focus-within {
  min-height: 3.05rem;
  gap: .4rem;
  padding: .26rem .8rem;
  border-color: var(--dashboard-line);
  border-radius: .52rem;
  background: var(--dashboard-panel);
  outline: 0;
  box-shadow: none !important;
}
.dashboard-global-search-form input,
.dashboard-global-search-form input:focus,
.dashboard-global-search-form input:focus-visible {
  min-height: 2.45rem;
  padding: 0 .35rem;
  border: 0;
  outline: 0;
  box-shadow: none !important;
  background: transparent;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  font-size: .86rem;
}
.dashboard-global-search-form input::-moz-focus-inner {
  padding: 0;
  border: 0;
}
.dashboard-search-icon { width: 1.45rem; height: 1.45rem; }
.dashboard-search-icon::before { font-size: 1.58rem; }
.dashboard-global-search-submit { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dashboard-global-search > p { margin: .42rem 0 0 3.1rem; font-size: .67rem; }
.dashboard-search-suggestions {
  top: calc(100% + .1rem);
  width: 100%;
  max-width: none;
}
.dashboard-suggestion-panel { padding: .4rem; border-color: var(--line, #cfdae8); background: var(--surface, #fff); box-shadow: 0 .65rem 1.35rem rgba(20,32,42,.18); }
.dashboard-suggestion-empty { min-height: 2.45rem; padding: .64rem .82rem; border-radius: 0 0 .5rem .5rem; color: var(--dashboard-muted); }
.dashboard-suggestion-panel a + a { border-top-color: var(--dashboard-line); }

.dashboard-briefing-top-grid { gap: 1rem; }
.dashboard-briefing-middle-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.dashboard-briefing-card { padding: .94rem 1rem; border-color: var(--dashboard-line); border-radius: .62rem; background: var(--dashboard-panel); box-shadow: 0 .42rem 1.15rem rgba(23,35,45,.08); }
.dashboard-card-head { margin-bottom: .56rem; }
.dashboard-card-head h2 { gap: .54rem; font-size: .88rem; }
.dashboard-card-head a, .dashboard-report-actions a, .dashboard-report-actions button { font-size: .68rem; }
.dashboard-section-icon { width: 1.7rem; height: 1.7rem; border-radius: .5rem; }
.dashboard-section-icon::before { font-size: .94rem; }
.dashboard-briefing-row { grid-template-columns: auto minmax(0,1fr) auto; gap: .62rem; min-height: 3.22rem; padding: .43rem 0; border-top-color: var(--dashboard-line); }
.dashboard-record-icon { display: grid; place-items: center; flex: none; width: 2.08rem; height: 2.08rem; border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); }
.dashboard-record-icon::before { font-size: 1rem; font-weight: 900; }
.dashboard-record-icon.is-issue::before { content: "▤"; }.dashboard-record-icon.is-enquiry::before { content: "◌"; }.dashboard-record-icon.is-activity::before { content: "▥"; }.dashboard-record-icon.is-note::before { content: "▱"; }.dashboard-record-icon.is-overdue::before { content: "!"; }.dashboard-record-icon.is-due::before { content: "◷"; }.dashboard-record-icon.is-waiting::before { content: "⌛"; }
.dashboard-record-icon.is-issue { color:#1b74cf; background:#e9f3ff; }.dashboard-record-icon.is-enquiry { color:#cb7008; background:#fff1dc; }.dashboard-record-icon.is-activity { color:#7358ca; background:#f0ebff; }.dashboard-record-icon.is-note { color:#cb7314; background:#fff0de; }.dashboard-record-icon.is-overdue { color:#df4d38; background:#fff0ea; }.dashboard-record-icon.is-due { color:#de9519; background:#fff3dc; }.dashboard-record-icon.is-waiting { color:#7658c6; background:#f0ebff; }
.dashboard-item-copy { gap: .12rem; }.dashboard-item-copy strong { font-size: .76rem; }.dashboard-item-copy small { font-size: .65rem; }
.dashboard-row-end { display: flex; align-items: center; justify-content: flex-end; gap: .4rem; min-width: 4.4rem; }
.dashboard-kind-badge { max-width: 6.6rem; overflow: hidden; padding: .18rem .3rem; border-radius: .22rem; color: var(--accent-strong); background: var(--accent-soft); font-size: .52rem; font-weight: 850; letter-spacing: .015em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.dashboard-kind-badge.is-issue { color:#1a69b4; background:#e7f2ff; }.dashboard-kind-badge.is-enquiry { color:#ad6102; background:#fff0dd; }.dashboard-kind-badge.is-activity { color:#6546bb; background:#eee8ff; }.dashboard-kind-badge.is-note { color:#a95d0c; background:#fff0dc; }.dashboard-kind-badge.is-overdue { color:#c53e2b; background:#fff0ea; }.dashboard-kind-badge.is-due { color:#a7650b; background:#fff3da; }
.dashboard-arrow { color: var(--ink-620, #61728b); font-size: 1.24rem; }
.dashboard-date-mark { width: 2.18rem; height: 2.18rem; border-color: var(--dashboard-line); background: var(--accent-soft); }
.dashboard-empty-copy { color: var(--dashboard-muted); }
.dashboard-waiting-card.is-empty { align-self: start; }
.dashboard-waiting-card.is-empty .dashboard-empty-copy { min-height: 2.25rem; margin: .18rem 0; padding: 0; }

.dashboard-report-card { padding-bottom: .82rem; }
.dashboard-report-due { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .8rem; padding: .52rem .62rem; border-left-width: 3px; background: var(--accent-soft); }
.dashboard-report-due div { display: grid; gap: .08rem; min-width: 0; }.dashboard-report-due div + div { padding-left: .72rem; border-left: 1px solid var(--dashboard-line); }.dashboard-report-due span { color: var(--dashboard-muted); font-size: .57rem; font-weight: 800; text-transform: uppercase; }.dashboard-report-due strong { overflow: hidden; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }.dashboard-report-due small { font-size: .61rem; }
.dashboard-report-period { margin-top: .45rem; font-size: .62rem; }
.dashboard-report-material { margin-top: .36rem; padding-top: .38rem; border-top-color: var(--dashboard-line); }
.dashboard-report-actions { margin-top: .46rem; }
.dashboard-map-card { padding: .88rem 1rem .75rem; }.dashboard-map-card .dashboard-card-head { margin-bottom: .58rem; }
#dashboard-area-map { height: 124px; border: 1px solid var(--dashboard-line); border-radius: .42rem; }

.dashboard-schedule-dialog { width:min(29rem,calc(100vw - 2rem)); padding:0; border:1px solid var(--dashboard-line); border-radius:.7rem; background:var(--surface, #fff); color:var(--ink-940); box-shadow:0 1.2rem 3.5rem rgba(20,32,42,.26); }.dashboard-schedule-dialog::backdrop{background:rgba(19,29,42,.36)}.dashboard-schedule-dialog-header{display:flex;align-items:flex-start;justify-content:space-between;gap:.7rem;padding:.8rem .9rem;border-bottom:1px solid var(--dashboard-line)}.dashboard-schedule-dialog-header h2{margin:0;font-size:1rem}.dashboard-schedule-dialog-header p{margin:.2rem 0 0;color:var(--dashboard-muted);font-size:.71rem}.dashboard-schedule-dialog-header button{width:1.8rem;height:1.8rem;padding:0;border:1px solid var(--line, #cfdae8);border-radius:50%;background:var(--surface, #fff);color:var(--ink-940);font-size:1.1rem;cursor:pointer}.dashboard-schedule-form{display:grid;gap:.65rem;padding:.85rem .9rem .95rem}.dashboard-schedule-form label{display:grid;gap:.24rem;color:var(--ink-940);font-size:.72rem;font-weight:850}.dashboard-schedule-form select,.dashboard-schedule-form input{min-height:2.25rem;padding:0 .55rem;border:1px solid var(--line, #cfdae8);border-radius:.4rem;background:var(--surface, #fff);color:var(--ink-940);font:inherit}.dashboard-schedule-form p{margin:0;color:var(--dashboard-muted);font-size:.67rem;line-height:1.4}.dashboard-schedule-form>div{display:flex;justify-content:flex-end;gap:.45rem}

@media (max-width: 980px) { .dashboard-global-search { width:100%; }.dashboard-briefing-middle-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.dashboard-report-card{grid-column:span 2;} }
@media (max-width: 680px) { .dashboard-briefing-top-grid,.dashboard-briefing-middle-grid{grid-template-columns:1fr}.dashboard-report-card{grid-column:auto}.dashboard-global-search-form{grid-template-columns:auto minmax(0,1fr)}.dashboard-global-search-submit{display:none}.dashboard-item-meta{display:none}#dashboard-area-map{height:160px}.dashboard-report-material{grid-template-columns:repeat(2,minmax(0,1fr))} }

/* Responsibility workspace uses the portal's role theme variables exclusively. */
.responsibilities-layout{display:grid;grid-template-columns:minmax(220px,280px) minmax(0,1fr);gap:20px}.responsibility-finder,.responsibility-canvas,.responsibility-empty{background:var(--surface, #fff);border:1px solid var(--border, #d9e0df);border-radius:18px;padding:18px}.responsibility-finder-row{display:block;padding:12px 10px;border-radius:12px;color:inherit;text-decoration:none;border:1px solid transparent}.responsibility-finder-row:hover,.responsibility-finder-row.is-selected{border-color:var(--theme-primary, var(--accent));background:var(--theme-soft, #eef8f6)}.responsibility-finder-row small{display:block;margin-top:3px;color:var(--muted)}.responsibility-compact-form,.responsibility-work-grid article form{display:grid;gap:8px;margin-top:16px}.responsibility-header{display:flex;justify-content:space-between;gap:16px}.responsibility-header h2{margin:.3rem 0}.responsibility-tabs{display:flex;gap:14px;overflow:auto;border-block:1px solid var(--border, #d9e0df);padding:12px 0;margin:18px 0}.responsibility-tabs a{white-space:nowrap;color:var(--theme-strong, var(--accent));font-weight:650;text-decoration:none}.responsibility-summary-grid,.responsibility-work-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.responsibility-work-grid{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:14px}.responsibility-summary-grid article,.responsibility-work-grid article{border:1px solid var(--border, #d9e0df);border-radius:14px;padding:14px;background:var(--surface-raised,#fff)}.responsibility-timeline{border-left:3px solid var(--theme-primary,var(--accent));padding-left:10px;margin:10px 0}.responsibility-timeline p{white-space:pre-wrap}.tag{display:inline-block;border-radius:999px;padding:3px 8px;background:var(--theme-soft,#eef8f6);color:var(--theme-strong,var(--accent));font-size:.78rem;font-weight:700}.muted{color:var(--muted)}@media(max-width:900px){.responsibilities-layout{grid-template-columns:1fr}.responsibility-summary-grid,.responsibility-work-grid{grid-template-columns:1fr}}

/* Responsibilities: portal primary-workspace presentation. */
.portal-page-shell-responsibilities {
  gap: 1rem;
  width: min(100%, 1420px);
  margin: 0 auto;
  padding: 1.1rem 1rem 1.6rem;
}

.responsibilities-page-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding: .2rem .1rem .1rem;
}

.responsibilities-page-header .page-kicker,
.responsibility-finder .page-kicker,
.responsibility-section-head .page-kicker,
.responsibility-create-panel .page-kicker,
.responsibility-start .page-kicker {
  margin: 0 0 .26rem;
  color: var(--accent-strong);
  font-size: .68rem;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.responsibilities-page-header h1 {
  margin: 0;
  color: var(--ink-940);
  font-family: Manrope, system-ui, sans-serif;
  font-size: clamp(1.45rem, 2.4vw, 2.05rem);
  letter-spacing: -.045em;
}

.responsibilities-page-header > div > p:not(.page-kicker) {
  max-width: 45rem;
  margin: .35rem 0 0;
  color: var(--ink-620);
  font-size: .82rem;
  line-height: 1.5;
}

.responsibilities-workspace {
  display: grid;
  grid-template-columns: 17.5rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.responsibility-finder,
.responsibility-main,
.responsibility-start {
  border: 1px solid var(--line-soft);
  border-radius: .78rem;
  background: var(--surface);
  box-shadow: 0 .5rem 1.45rem rgba(24, 42, 66, .07);
}

.responsibility-finder { padding: .9rem; }
.responsibility-finder-head { display: flex; align-items: end; justify-content: space-between; gap: .6rem; padding: .08rem .12rem .72rem; }
.responsibility-finder-head h2 { margin: 0; color: var(--ink-940); font-size: .96rem; letter-spacing: -.02em; }
.responsibility-finder-head > span { display: grid; place-items: center; min-width: 1.6rem; height: 1.6rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); font-size: .68rem; font-weight: 850; }
.responsibility-finder-list { display: grid; gap: .34rem; }

.responsibility-finder-row {
  display: grid;
  grid-template-columns: 1.9rem minmax(0, 1fr);
  gap: .56rem;
  align-items: center;
  padding: .58rem;
  border: 1px solid transparent;
  border-radius: .55rem;
  color: inherit;
  text-decoration: none;
}

.responsibility-finder-row:hover,
.responsibility-finder-row:focus-visible,
.responsibility-finder-row.is-selected { border-color: color-mix(in srgb, var(--accent) 35%, var(--line-soft)); background: var(--accent-soft); outline: none; }
.responsibility-finder-mark { display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: .48rem; background: var(--surface-tint); color: var(--accent-strong); font-size: .74rem; font-weight: 850; }
.responsibility-finder-row.is-selected .responsibility-finder-mark { background: var(--accent); color: #fff; }
.responsibility-finder-row strong,.responsibility-finder-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.responsibility-finder-row strong { color: var(--ink-940); font-size: .74rem; line-height: 1.25; }
.responsibility-finder-row small { margin-top: .12rem; color: var(--ink-620); font-size: .63rem; line-height: 1.25; }
.responsibility-finder-empty { margin: .15rem .12rem .4rem; color: var(--ink-620); font-size: .72rem; line-height: 1.45; }

.responsibility-new-disclosure { margin-top: .72rem; border-top: 1px solid var(--line-soft); padding-top: .65rem; }
.responsibility-new-disclosure summary { color: var(--accent-strong); cursor: pointer; font-size: .73rem; font-weight: 850; }
.responsibility-new-disclosure .responsibility-create-form { margin-top: .72rem; }

.responsibility-start {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(22rem, .95fr);
  min-height: 29rem;
  overflow: hidden;
}

.responsibility-start-copy { display: grid; align-content: center; padding: clamp(1.5rem, 4vw, 3.7rem); background: linear-gradient(145deg, color-mix(in srgb, var(--accent-soft) 55%, var(--surface)) 0%, var(--surface) 68%); }
.responsibility-start-icon { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; margin-bottom: 1.15rem; border-radius: .72rem; background: var(--accent); color: #fff; font-size: 1.15rem; font-weight: 900; box-shadow: 0 .55rem 1rem color-mix(in srgb, var(--accent) 20%, transparent); }
.responsibility-start h2 { max-width: 31rem; margin: 0; color: var(--ink-940); font-family: Fraunces, Georgia, serif; font-size: clamp(1.65rem, 3vw, 2.45rem); font-weight: 700; letter-spacing: -.035em; line-height: 1.1; }
.responsibility-start-copy > p:not(.page-kicker) { max-width: 34rem; margin: 1rem 0 0; color: var(--ink-620); font-size: .85rem; line-height: 1.58; }
.responsibility-start-copy ul { display: grid; gap: .5rem; max-width: 34rem; margin: 1.35rem 0 0; padding: 0; list-style: none; }
.responsibility-start-copy li { position: relative; padding-left: 1.3rem; color: var(--ink-760); font-size: .75rem; line-height: 1.4; }
.responsibility-start-copy li::before { position: absolute; left: 0; color: var(--accent-strong); content: "✓"; font-weight: 900; }

.responsibility-create-panel { align-self: center; margin: clamp(1rem, 3vw, 2.4rem); padding: clamp(1rem, 2.8vw, 1.7rem); border: 1px solid var(--line-soft); border-radius: .72rem; background: var(--surface); box-shadow: 0 .9rem 2rem rgba(24, 42, 66, .1); }
.responsibility-create-panel-head h3 { margin: 0; color: var(--ink-940); font-size: 1.08rem; letter-spacing: -.025em; }
.responsibility-create-panel-head > p:not(.page-kicker) { margin: .32rem 0 0; color: var(--ink-620); font-size: .72rem; line-height: 1.45; }

.responsibility-create-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .82fr); gap: .72rem; margin-top: 1.1rem; }
.responsibility-create-form label { display: grid; gap: .28rem; color: var(--ink-760); font-size: .69rem; font-weight: 850; }
.responsibility-create-form label > span { display: flex; justify-content: space-between; gap: .5rem; }
.responsibility-create-form em { color: var(--ink-500); font-style: normal; font-weight: 650; }
.responsibility-create-form-full { grid-column: 1 / -1; }
.responsibility-create-form input,.responsibility-create-form select,.responsibility-create-form textarea,.responsibility-work-grid form :is(input,select,textarea) { box-sizing: border-box; width: 100%; min-height: 2.35rem; padding: .48rem .58rem; border: 1px solid var(--line); border-radius: .45rem; background: var(--surface); color: var(--ink-940); font: inherit; font-size: .76rem; box-shadow: none; }
.responsibility-create-form textarea,.responsibility-work-grid form textarea { min-height: 5.2rem; resize: none; }
.responsibility-create-form :is(input,select,textarea):focus,.responsibility-work-grid form :is(input,select,textarea):focus { border-color: var(--accent); outline: 2px solid color-mix(in srgb, var(--accent) 18%, transparent); outline-offset: 1px; }
.responsibility-create-form .btn { justify-self: start; min-height: 2.4rem; margin-top: .1rem; padding-inline: 1rem; }

.responsibility-main { overflow: hidden; }
.responsibility-main-header { display: flex; align-items: start; justify-content: space-between; gap: 1rem; padding: 1.15rem 1.2rem .95rem; border-bottom: 1px solid var(--line-soft); background: linear-gradient(110deg, color-mix(in srgb, var(--accent-soft) 48%, var(--surface)), var(--surface) 60%); }
.responsibility-type-badge,.responsibility-private-note { display: inline-flex; align-items: center; min-height: 1.55rem; padding: 0 .52rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); font-size: .62rem; font-weight: 850; letter-spacing: .02em; }
.responsibility-main-header h2 { margin: .42rem 0 0; color: var(--ink-940); font-size: 1.25rem; letter-spacing: -.04em; }
.responsibility-main-header p { max-width: 46rem; margin: .35rem 0 0; color: var(--ink-620); font-size: .76rem; line-height: 1.45; }
.responsibility-private-note { flex: none; background: var(--surface); border: 1px solid var(--line-soft); color: var(--ink-620); }
.responsibility-tabs { display: flex; gap: .2rem; padding: .58rem 1.2rem; overflow-x: auto; border-bottom: 1px solid var(--line-soft); background: var(--surface); }
.responsibility-tabs a { padding: .42rem .55rem; border-radius: .38rem; color: var(--ink-620); font-size: .68rem; font-weight: 800; text-decoration: none; white-space: nowrap; }.responsibility-tabs a:hover,.responsibility-tabs a:focus-visible { background: var(--accent-soft); color: var(--accent-strong); outline: none; }
.responsibility-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; padding: .95rem 1.2rem 0; }.responsibility-summary-grid article { padding: .72rem .78rem; border: 1px solid var(--line-soft); border-radius: .55rem; background: var(--surface-soft); }.responsibility-summary-grid span { display: block; color: var(--ink-620); font-size: .63rem; font-weight: 800; }.responsibility-summary-grid strong { display: block; margin-top: .22rem; color: var(--accent-strong); font-size: 1.18rem; line-height: 1; }.responsibility-summary-grid p { margin: .3rem 0 0; color: var(--ink-620); font-size: .64rem; line-height: 1.35; }
.responsibility-work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; padding: 1rem 1.2rem 1.2rem; }.responsibility-work-grid > article { min-width: 0; padding: .9rem; border: 1px solid var(--line-soft); border-radius: .6rem; background: var(--surface); }.responsibility-section-head { display: flex; align-items: start; justify-content: space-between; gap: .5rem; margin-bottom: .65rem; }.responsibility-section-head h3 { margin: 0; color: var(--ink-940); font-size: .88rem; letter-spacing: -.02em; }.responsibility-list { display: grid; gap: .22rem; margin: 0; padding: 0; list-style: none; }.responsibility-list li { display: flex; align-items: center; justify-content: space-between; gap: .55rem; padding: .48rem 0; border-top: 1px solid var(--line-soft); }.responsibility-list li:first-child { border-top: 0; }.responsibility-list li > span { min-width: 0; }.responsibility-list strong,.responsibility-list a { display: block; overflow: hidden; color: var(--ink-940); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }.responsibility-list a:hover { color: var(--accent-strong); }.responsibility-list small { display: block; margin-top: .1rem; color: var(--ink-620); font-size: .62rem; }.responsibility-list .is-empty,.responsibility-empty-copy { color: var(--ink-620); font-size: .7rem; line-height: 1.45; }.responsibility-work-grid article form { display: grid; gap: .48rem; margin-top: .72rem; padding-top: .72rem; border-top: 1px solid var(--line-soft); }.responsibility-work-grid article form .btn { justify-self: start; }.responsibility-timeline { position: relative; padding: .5rem 0 .5rem .8rem; border-left: 2px solid var(--accent); }.responsibility-timeline + .responsibility-timeline { margin-top: .35rem; }.responsibility-timeline-type { display: block; margin-bottom: .12rem; color: var(--accent-strong); font-size: .58rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }.responsibility-timeline strong { color: var(--ink-940); font-size: .72rem; }.responsibility-timeline p { margin: .22rem 0 0; color: var(--ink-620); font-size: .68rem; line-height: 1.4; white-space: pre-wrap; }.responsibility-report-link { margin: .35rem 0; color: var(--ink-620); font-size: .68rem; }.responsibility-report-link a { color: var(--accent-strong); font-weight: 800; }.responsibility-report-sources { display: grid; gap: .38rem; margin: 0; padding: .55rem; border: 1px solid var(--line-soft); border-radius: .45rem; }.responsibility-report-sources legend { padding: 0 .18rem; color: var(--ink-760); font-size: .68rem; font-weight: 800; }.responsibility-report-sources label { color: var(--ink-760); font-size: .68rem; font-weight: 650; }

@media (max-width: 960px) { .responsibilities-workspace { grid-template-columns: 14.5rem minmax(0, 1fr); }.responsibility-start { grid-template-columns: 1fr; }.responsibility-create-panel { max-width: 38rem; margin-top: 0; }.responsibility-work-grid { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .portal-page-shell-responsibilities { padding: .82rem .7rem 1.1rem; }.responsibilities-page-header { align-items: start; flex-direction: column; }.responsibilities-workspace { grid-template-columns: 1fr; }.responsibility-finder { order: 2; }.responsibility-start-copy { padding: 1.35rem; }.responsibility-create-panel { margin: .7rem; }.responsibility-create-form { grid-template-columns: 1fr; }.responsibility-summary-grid { grid-template-columns: 1fr; }.responsibility-main-header { padding: 1rem; }.responsibility-tabs,.responsibility-summary-grid,.responsibility-work-grid { padding-left: 1rem; padding-right: 1rem; } }

/* Compact utility controls preserve the redesigned primary navigation at
   desktop widths while retaining the full, wrapping layout on smaller screens. */
.workspace-globalnav .workspace-navmeta {
  gap: 0.45rem;
}

.workspace-globalnav .workspace-nav-icon-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 9px;
}

.workspace-globalnav .workspace-drafts-alert {
  border-color: rgba(250, 204, 21, 0.38);
  background: rgba(113, 63, 18, 0.48);
  color: #fef3c7;
}

.workspace-globalnav .workspace-drafts-alert svg,
.workspace-role-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.workspace-globalnav .workspace-drafts-alert span {
  position: absolute;
  top: -0.38rem;
  right: -0.4rem;
  min-width: 1.12rem;
  height: 1.12rem;
  margin: 0;
  padding: 0 0.22rem;
  font-size: 0.62rem;
  line-height: 1;
}

.workspace-globalnav .workspace-role-chip {
  grid-template-columns: auto auto;
  gap: 0.05rem;
  width: 46px;
  min-width: 46px;
  max-width: none;
  padding: 0 0.28rem;
  border-radius: 9px;
  text-align: center;
}

.workspace-role-chevron {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.workspace-role-menu.is-open .workspace-role-chevron {
  transform: rotate(180deg);
}

.workspace-globalnav .workspace-user-chip {
  padding: 0.16rem;
  border-radius: 50%;
}

.workspace-globalnav .workspace-user-chip .workspace-avatar {
  width: 30px;
  height: 30px;
}

.workspace-shell[data-party-theme="lib_dem"] .workspace-globalnav .workspace-drafts-alert {
  border-color: rgba(255, 100, 0, 0.34);
  background: #fff1cf;
  color: #7c2d12;
}

.workspace-shell[data-party-theme="lib_dem"] .workspace-globalnav .workspace-drafts-alert:hover,
.workspace-shell[data-party-theme="lib_dem"] .workspace-globalnav .workspace-drafts-alert.is-active {
  background: #ffd35a;
  color: #7c2d12;
}

.workspace-globalnav .workspace-shares-alert {
  border: 1px solid rgba(250, 204, 21, 0.38);
  background: rgba(113, 63, 18, 0.48);
  color: #fef3c7;
}

.workspace-globalnav .workspace-shares-alert:hover,
.workspace-globalnav .workspace-shares-alert.is-active {
  background: rgba(146, 64, 14, 0.72);
  color: #ffffff;
}

.workspace-globalnav .workspace-shares-alert svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.workspace-globalnav .workspace-shares-alert span {
  position: absolute;
  top: -0.38rem;
  right: -0.4rem;
  display: inline-grid;
  place-items: center;
  min-width: 1.12rem;
  height: 1.12rem;
  padding: 0 0.22rem;
  border-radius: 999px;
  background: #facc15;
  color: #422006;
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1;
}

.workspace-shell[data-party-theme="lib_dem"] .workspace-globalnav .workspace-shares-alert {
  border-color: rgba(255, 100, 0, 0.34);
  background: #fff1cf;
  color: #7c2d12;
}

.workspace-shell[data-party-theme="lib_dem"] .workspace-globalnav .workspace-shares-alert:hover,
.workspace-shell[data-party-theme="lib_dem"] .workspace-globalnav .workspace-shares-alert.is-active {
  background: #ffd35a;
  color: #7c2d12;
}

.workspace-shell[data-party-theme="lib_dem"] .workspace-globalnav .workspace-shares-alert span {
  background: #ff6400;
  color: #ffffff;
}

.shared-records-page { box-sizing: border-box; width: 100%; max-width: none; gap: 1rem; margin: 0; padding: 1rem 1.75rem 2rem; }
.shared-records-header { box-sizing: border-box; width: 100%; max-width: none; padding-inline: 1.75rem; }
.shared-records-header .support-text { max-width: 44rem; margin: .35rem 0 0; }
.shared-records-workspace { display: grid; grid-template-columns: minmax(280px, 320px) minmax(0, 1fr); align-items: stretch; gap: 0; width: 100%; min-width: 0; min-height: calc(100vh - 12rem); margin: 0; }
.shared-records-queue { overflow: hidden; border: 0; border-right: 1px solid var(--line-soft); border-radius: 0; background: rgba(255,255,255,.9); box-shadow: none; }
.shared-records-queue-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem; padding: 2.5rem 1.35rem 1.25rem; border-bottom: 1px solid var(--line-soft); }
.shared-records-queue-heading .page-kicker { display: none; }
.shared-records-queue-heading h2 { margin: 0; color: var(--ink-940); font-family: "Fraunces", Georgia, serif; font-size: 1.15rem; letter-spacing: -.02em; }
.shared-records-queue-heading > span { display: grid; place-items: center; min-width: 1.45rem; height: 1.45rem; border-radius: 999px; background: var(--surface-soft); color: var(--accent-strong); font-size: .67rem; font-weight: 850; }
.shared-records-queue-list { display: grid; }
.shared-records-queue-row { display: grid; gap: .2rem; padding: 1rem 1.2rem; border-left: 3px solid transparent; border-bottom: 1px solid var(--line-soft); color: var(--ink-620); text-decoration: none; }
.shared-records-queue-row:last-child { border-bottom: 0; }
.shared-records-queue-row:hover { background: var(--surface-soft); color: var(--ink-940); }
.shared-records-queue-row.is-selected { border-left-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, #fff); color: var(--ink-940); }
.shared-records-queue-row-type { color: var(--ink-500); font-size: .59rem; font-weight: 800; letter-spacing: .025em; }
.shared-records-queue-row strong { overflow: hidden; font-size: .73rem; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.shared-records-queue-row > span:last-child { overflow: hidden; font-size: .65rem; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.shared-records-review-panel { display: flex; min-width: 0; padding: 1.15rem 1.75rem 1.8rem; background: rgba(255,255,255,.92); }
.shared-record-preview { width: 100%; min-height: 100%; overflow: visible; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.shared-record-preview-header { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 18.5rem); gap: 1.15rem; padding: 0 0 1rem; border-bottom: 0; }
.shared-record-preview-title { min-width: 0; }
.shared-record-card-eyebrow { display: flex; flex-wrap: wrap; gap: .38rem; color: var(--ink-620); font-size: .68rem; font-weight: 800; }
.shared-record-card-eyebrow span + span::before { content: "·"; margin-right: .38rem; color: var(--ink-500); }
.shared-record-preview h2 { margin: .3rem 0 .3rem; color: var(--ink-940); font-size: clamp(1.55rem, 2vw, 2.1rem); letter-spacing: -.035em; }
.shared-record-preview-title p { margin: 0; color: var(--ink-620); font-size: .78rem; line-height: 1.5; }
.shared-record-decision { display: grid; align-content: start; gap: .42rem; padding: 0; border-radius: 0; background: transparent; }
.shared-record-decision > p { margin: 0; color: var(--ink-620); font-size: .65rem; line-height: 1.4; }
.shared-record-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0; overflow: hidden; border: 1px solid var(--line-soft); border-radius: .72rem; background: rgba(255,255,255,.88); }
.shared-record-facts div { min-width: 0; padding: .85rem 1.15rem; border-right: 1px solid var(--line-soft); }
.shared-record-facts div:last-child { border-right: 0; }
.shared-record-facts dt { color: var(--ink-500); font-size: .58rem; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.shared-record-facts dd { overflow: hidden; margin: .25rem 0 0; color: var(--ink-940); font-size: .71rem; font-weight: 760; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.shared-record-message { display: grid; gap: .2rem; margin: .9rem 0 0; padding: .72rem .88rem; border-left: 3px solid var(--accent); background: var(--surface-soft); color: var(--ink-760); font-size: .74rem; line-height: 1.45; white-space: pre-wrap; }
.shared-record-message strong { color: var(--ink-940); font-size: .64rem; text-transform: uppercase; letter-spacing: .03em; }
.shared-record-card-includes { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin-top: .78rem; }
.shared-record-preview > .shared-record-card-includes { padding: 0; }
.shared-record-card-includes-label { margin-right: .08rem; color: var(--ink-500); font-size: .64rem; font-weight: 800; letter-spacing: .025em; text-transform: uppercase; }
.shared-record-include { display: inline-flex; align-items: center; gap: .22rem; min-height: 1.45rem; padding: .16rem .4rem; border: 1px solid var(--line-soft); border-radius: 999px; font-size: .65rem; font-weight: 750; line-height: 1; white-space: nowrap; }
.shared-record-include > span { display: inline-grid; place-items: center; width: .8rem; height: .8rem; border-radius: 50%; font-size: .59rem; font-weight: 900; }
.shared-record-include.is-included { border-color: #a7dbc8; background: #effaf5; color: #176348; }
.shared-record-include.is-included > span { background: #cdeedc; color: #176348; }
.shared-record-include.is-excluded { background: #f7f8fa; color: var(--ink-500); }
.shared-record-include.is-excluded > span { background: #e8edf3; color: var(--ink-620); }
.shared-record-accept-form { display: grid; gap: .45rem; }
.shared-record-accept-form label { display: grid; gap: .28rem; color: var(--ink-760); font-size: .68rem; font-weight: 800; }
.shared-record-accept-form select { width: 100%; min-height: 2.15rem; padding: .36rem .5rem; border: 1px solid var(--line); border-radius: .45rem; background: #fff; color: var(--ink-940); font: inherit; font-size: .76rem; }
.shared-record-action-row { display: flex; align-items: center; gap: .32rem; margin-top: .12rem; }
.shared-record-action-row .btn { min-height: 2.1rem; padding: .4rem .72rem; font-size: .72rem; }
.shared-record-decline-form { display: flex; margin: 0; }
.shared-record-decline-form .btn { justify-content: center; }
.shared-record-preview-tabs { display: flex; gap: .12rem; margin-top: 1rem; padding: 0; border-bottom: 1px solid var(--line-soft); overflow-x: auto; }
.shared-record-preview-tab { display: inline-flex; align-items: center; gap: .28rem; min-height: 2.55rem; padding: 0 .68rem; border-bottom: 3px solid transparent; color: var(--ink-620); font-size: .69rem; font-weight: 820; text-decoration: none; white-space: nowrap; }
.shared-record-preview-tab:hover { color: var(--ink-940); background: var(--surface-soft); }
.shared-record-preview-tab.is-active { border-bottom-color: var(--accent); color: var(--ink-940); }
.shared-record-preview-tab span { display: inline-grid; place-items: center; min-width: 1.1rem; height: 1.1rem; border-radius: 999px; background: var(--surface-soft); color: var(--ink-620); font-size: .58rem; }
.shared-record-preview-body { padding: 1.15rem 0; }
.shared-record-overview { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(15rem, .8fr); gap: .85rem; }
.shared-record-detail-card { min-width: 0; padding: .95rem; border: 1px solid var(--line-soft); border-radius: .64rem; background: var(--surface); }
.shared-record-detail-card h3 { margin: 0 0 .72rem; color: var(--ink-940); font-size: .82rem; letter-spacing: -.015em; }
.shared-record-detail-card > p { margin: 0; color: var(--ink-620); font-size: .74rem; line-height: 1.55; white-space: pre-wrap; }
.shared-record-long-text { margin-top: .65rem; color: var(--ink-760); font-size: .76rem; line-height: 1.55; white-space: pre-wrap; }
.shared-record-source { margin-top: .85rem !important; padding-top: .75rem; border-top: 1px solid var(--line-soft); }
.shared-record-muted { color: var(--ink-500) !important; }
.shared-record-item-list,.shared-record-history-list,.shared-record-people-list,.shared-record-file-list { display: grid; gap: .55rem; }
.shared-record-item-list article,.shared-record-file-list article { display: grid; gap: .16rem; padding: .58rem 0; border-top: 1px solid var(--line-soft); }
.shared-record-item-list article:first-child,.shared-record-file-list article:first-child { padding-top: 0; border-top: 0; }
.shared-record-item-list article > span,.shared-record-history-list span { color: var(--accent-strong); font-size: .59rem; font-weight: 850; letter-spacing: .035em; text-transform: uppercase; }
.shared-record-item-list strong,.shared-record-history-list strong,.shared-record-people-list strong,.shared-record-file-list strong { color: var(--ink-940); font-size: .71rem; line-height: 1.4; }
.shared-record-item-list p { margin: 0; color: var(--ink-620); font-size: .68rem; line-height: 1.4; }
.shared-record-item-list small { color: var(--ink-620); font-size: .63rem; }
.shared-record-history-list article { display: grid; grid-template-columns: 5.4rem minmax(0, 1fr); gap: .75rem; padding: .68rem 0; border-top: 1px solid var(--line-soft); }
.shared-record-history-list article:first-child { padding-top: 0; border-top: 0; }
.shared-record-history-list time { color: var(--ink-500); font-size: .64rem; font-weight: 760; }
.shared-record-history-list article div { display: grid; gap: .16rem; }
.shared-record-history-list p { margin: 0; color: var(--ink-620); font-size: .69rem; line-height: 1.45; white-space: pre-wrap; }
.shared-record-people-list { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.shared-record-people-list article { display: grid; gap: .2rem; padding: .72rem; border: 1px solid var(--line-soft); border-radius: .5rem; background: var(--surface-soft); }
.shared-record-people-list span,.shared-record-people-list a,.shared-record-file-list span { color: var(--ink-620); font-size: .66rem; line-height: 1.35; overflow-wrap: anywhere; }
.shared-record-people-list a { color: var(--accent-strong); }
.shared-record-file-note { margin-bottom: .78rem !important; }
.shared-records-empty,.shared-records-confirmation { padding: 1.2rem; border: 1px solid rgba(138, 158, 184, .3); border-radius: .75rem; background: rgba(255,255,255,.92); color: var(--ink-620); }
.shared-records-empty h2 { margin: 0; color: var(--ink-940); font-size: 1rem; }.shared-records-empty p { margin: .35rem 0 0; font-size: .78rem; line-height: 1.5; }
.shared-records-confirmation { border-color: color-mix(in srgb, var(--accent) 38%, var(--line)); color: var(--accent-strong); font-size: .8rem; font-weight: 750; }
.shared-record-role-form { min-width: 0; max-width: 30rem; margin: 0; }
.shared-record-role-form label { display: grid; min-width: 0; gap: .28rem; color: var(--ink-760); font-size: .66rem; font-weight: 850; }
.shared-record-role-form select { width: 100%; min-width: 16rem; max-width: 30rem; min-height: 2.25rem; padding: .4rem .55rem; border: 1px solid var(--line); border-radius: .45rem; background: var(--surface); color: var(--ink-940); font: inherit; font-size: .74rem; font-weight: 750; }
.shared-record-header-actions { min-width: 0; max-width: 100%; align-items: flex-end; }
.shared-record-header-actions .shared-record-action-row { margin: 0; }
.shared-record-detail-text { margin-top: .65rem !important; white-space: pre-wrap; }
@media (max-width: 1120px) { .shared-record-header-actions { width: 100%; align-items: flex-start; }.shared-record-role-form { width: min(100%, 30rem); }.shared-record-role-form select { min-width: 0; } }
@media (max-width: 900px) { .shared-record-preview-header,.shared-record-overview { grid-template-columns: 1fr; }.shared-record-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }.shared-record-facts div:nth-child(2) { border-right: 0; }.shared-record-facts div:nth-child(-n+2) { border-bottom: 1px solid var(--line-soft); } }
@media (max-width: 760px) { .shared-records-workspace { grid-template-columns: 1fr; min-height: 0; gap: .75rem; margin: 0; }.shared-records-page { padding-left: .75rem; padding-right: .75rem; }.shared-records-header { padding-inline: 1rem; }.shared-records-queue-list { grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }.shared-records-queue-row { border-left: 0; border-bottom: 0; border-right: 1px solid var(--line-soft); }.shared-records-queue-row.is-selected { border-left: 0; border-top: 3px solid var(--accent); }.shared-record-facts { grid-template-columns: 1fr; }.shared-record-facts div,.shared-record-facts div:nth-child(2) { border-right: 0; border-bottom: 1px solid var(--line-soft); }.shared-record-facts div:last-child { border-bottom: 0; }.shared-record-preview-header,.shared-record-preview-body { padding-left: .85rem; padding-right: .85rem; }.shared-record-preview > .shared-record-card-includes,.shared-record-preview-tabs { padding-left: .85rem; padding-right: .85rem; }.shared-record-message { margin-left: .85rem; margin-right: .85rem; } }

@media (max-width: 1180px) {
  .workspace-globalnav .workspace-navmeta {
    gap: 0.35rem;
  }
}

/* A single, state-driven work queue: opening it never marks anything read. */
.workspace-notification-menu { position: relative; }
.workspace-globalnav .workspace-notification-trigger {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  border: 1px solid rgba(255, 100, 0, .34);
  border-radius: 9px;
  background: rgba(255, 255, 255, .78);
  color: #7c2d12;
  cursor: pointer;
  font: inherit;
}
.workspace-globalnav .workspace-notification-trigger:hover,
.workspace-notification-menu.is-open .workspace-notification-trigger { background: #fff1cf; color: #7c2d12; }
.workspace-globalnav .workspace-notification-trigger svg,
.workspace-notification-row-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.9; }
.workspace-globalnav .workspace-notification-trigger > span { position: absolute; top: .16rem; right: .16rem; display: inline-grid; place-items: center; min-width: .92rem; height: .92rem; padding: 0 .16rem; border: 1px solid #fffdf8; border-radius: 999px; background: #ff6400; color: #fff; font-size: .56rem; font-weight: 900; line-height: 1; }
.workspace-notification-panel { position: absolute; z-index: 120; top: calc(100% + .55rem); right: 0; width: min(23rem, calc(100vw - 1.5rem)); max-height: min(30rem, calc(100vh - 5rem)); overflow: auto; border: 1px solid var(--line); border-radius: .72rem; background: var(--surface); box-shadow: 0 18px 40px rgba(20, 33, 51, .18); }
.workspace-popover-root .workspace-notification-panel { position: fixed; top: 0; left: 0; right: auto; pointer-events: auto; }
.workspace-notification-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; padding: .85rem .9rem .72rem; border-bottom: 1px solid var(--line-soft); background: linear-gradient(120deg, color-mix(in srgb, var(--accent-soft) 54%, var(--surface)), var(--surface) 70%); }
.workspace-notification-head span,.workspace-notification-row small { display: block; color: var(--ink-620); font-size: .6rem; font-weight: 850; letter-spacing: .055em; text-transform: uppercase; }
.workspace-notification-head strong { display: block; margin-top: .16rem; color: var(--ink-940); font-size: .78rem; }
.workspace-notification-head b { display: grid; place-items: center; min-width: 1.45rem; height: 1.45rem; border-radius: 999px; background: var(--accent); color: #fff; font-size: .66rem; }
.workspace-notification-list { display: grid; padding: .3rem; }
.workspace-notification-row { display: grid !important; grid-template-columns: 2rem minmax(0, 1fr); align-items: center; gap: .55rem; min-width: 0; padding: .62rem; border-radius: .48rem; color: var(--ink-940) !important; text-decoration: none; }
.workspace-notification-row:hover { background: var(--surface-soft) !important; }
.workspace-notification-row-icon { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: .5rem; background: var(--accent-soft); color: var(--accent-strong); }
.workspace-notification-row.is-email .workspace-notification-row-icon { background: #e8f4fb; color: #246eaa; }
.workspace-notification-row strong,.workspace-notification-row em { display: block; overflow: hidden; margin-top: .12rem; text-overflow: ellipsis; white-space: nowrap; }
.workspace-notification-row strong { color: var(--ink-940); font-size: .72rem; line-height: 1.35; }
.workspace-notification-row em { color: var(--ink-620); font-size: .63rem; font-style: normal; line-height: 1.35; }
.workspace-notification-more,.workspace-notification-empty { margin: .18rem .38rem .38rem; color: var(--ink-620); font-size: .68rem; line-height: 1.45; }
.workspace-shell[data-party-theme="lib_dem"] .workspace-globalnav .workspace-notification-trigger { border-color: rgba(255, 100, 0, .34); background: rgba(255, 255, 255, .78); color: #7c2d12; }
.workspace-shell[data-party-theme="lib_dem"] .workspace-globalnav .workspace-notification-trigger:hover,.workspace-shell[data-party-theme="lib_dem"] .workspace-notification-menu.is-open .workspace-notification-trigger { background: #fff1cf; color: #7c2d12; }

/* Responsibilities uses the same focused, single-panel workspace behaviour as
   Issues, Enquiries and Activity. Only the selected tab owns page space. */
.responsibility-main { min-width: 0; }

.responsibility-tabs.portal-workspace-tabs {
  gap: .15rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: .7rem 1.2rem 0;
  border-top: 0;
  border-bottom: 1px solid var(--line-soft);
  scrollbar-width: thin;
}

.responsibility-tabs .portal-tab-pill {
  min-height: 2.6rem;
  padding: 0 .58rem;
  border-bottom-width: 3px;
  color: var(--ink-620);
  font-size: .7rem;
  white-space: nowrap;
}

.responsibility-tabs .portal-tab-pill:hover,
.responsibility-tabs .portal-tab-pill.is-active {
  background: transparent;
  color: var(--ink-940);
}

.responsibility-tabs .portal-tab-pill.is-active { border-bottom-color: var(--accent); }

.responsibility-panel {
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
}

.responsibility-panel[hidden] { display: none !important; }

.responsibility-summary-strip {
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: .72rem;
  background: var(--surface);
}

.responsibility-summary-strip article {
  display: grid;
  grid-template-columns: 1.75rem minmax(0, 1fr) auto;
  align-items: center;
  gap: .7rem;
  min-height: 3.4rem;
  padding: .66rem .9rem;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.responsibility-summary-strip article + article { border-left: 1px solid var(--line-soft); }
.responsibility-summary-strip article > span:not(.responsibility-summary-icon) { color: var(--ink-620); font-size: .61rem; font-weight: 850; letter-spacing: .045em; text-transform: uppercase; }
.responsibility-summary-strip article strong { margin: 0; color: var(--ink-940); font-size: 1.1rem; }

.responsibility-summary-icon,
.responsibility-card-icon {
  display: grid !important;
  place-items: center;
  flex: 0 0 auto;
  width: 2.15rem;
  height: 2.15rem;
  border: 1px solid var(--line-soft);
  border-radius: .54rem;
  background: var(--surface-soft);
  font-size: 1rem !important;
  font-weight: 900 !important;
}

.responsibility-summary-strip .responsibility-summary-icon { width: 1.75rem; height: 1.75rem; border-radius: .46rem; font-size: .82rem !important; color: var(--accent-strong) !important; }
.responsibility-summary-icon.is-blue,.responsibility-card-icon.is-blue { color: #2563eb !important; background: #eff6ff; }
.responsibility-summary-icon.is-orange { color: #ea580c !important; background: #fff7ed; }
.responsibility-summary-icon.is-green { color: #16a34a !important; background: #f0fdf4; }
.responsibility-card-icon.is-purple { color: #7c3aed !important; background: #f5f3ff; }

.responsibility-overview-grid,
.responsibility-section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17.5rem, .88fr);
  gap: 1rem;
}

.responsibility-overview-card,
.responsibility-panel-card {
  min-width: 0;
  padding: 1.15rem;
  border: 1px solid var(--line-soft);
  border-radius: .72rem;
  background: var(--surface);
}

.responsibility-overview-card { display: flex; flex-direction: column; min-height: 15.25rem; }

.responsibility-card-heading {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-bottom: .9rem;
}

.responsibility-card-heading h3,
.responsibility-panel-heading h3,
.responsibility-panel-card h4 {
  margin: 0;
  color: var(--ink-940);
  font-size: .88rem;
  letter-spacing: -.02em;
}

.responsibility-panel-heading { display: flex; justify-content: space-between; gap: 1rem; }
.responsibility-panel-heading h3 { margin-top: .22rem; font-size: 1.08rem; }
.responsibility-panel-heading p:not(.page-kicker) { max-width: 52rem; margin: .34rem 0 0; color: var(--ink-620); font-size: .74rem; line-height: 1.5; }
.responsibility-panel-card h4 { margin-bottom: .84rem; }

.responsibility-activity-row {
  display: grid;
  grid-template-columns: minmax(4.8rem, .62fr) minmax(0, 1.5fr) auto;
  gap: .55rem;
  align-items: center;
  padding: .54rem 0;
  border-top: 1px solid var(--line-soft);
}

.responsibility-activity-row span { color: var(--accent-strong); font-size: .61rem; font-weight: 850; text-transform: uppercase; }
.responsibility-activity-row strong { overflow: hidden; color: var(--ink-940); font-size: .71rem; text-overflow: ellipsis; white-space: nowrap; }
.responsibility-activity-row small { color: var(--ink-620); font-size: .62rem; white-space: nowrap; }
.responsibility-support-copy { margin: .38rem 0 0; color: var(--ink-620); font-size: .72rem; line-height: 1.5; }

.responsibility-text-action {
  align-self: flex-start;
  margin: auto 0 0;
  padding: .72rem 0 0;
  border: 0;
  background: transparent;
  color: var(--accent-strong);
  font: inherit;
  font-size: .71rem;
  font-weight: 850;
  cursor: pointer;
}

.responsibility-text-action span { margin-left: .35rem; font-size: 1.1rem; vertical-align: -.08em; }
.responsibility-text-action:hover,.responsibility-text-action:focus-visible { color: var(--accent); text-decoration: underline; outline: none; }

.responsibility-panel-card > form {
  display: grid;
  gap: .62rem;
  margin: 0;
}

.responsibility-panel-card form label {
  display: grid;
  gap: .28rem;
  color: var(--ink-760);
  font-size: .68rem;
  font-weight: 800;
}

.responsibility-panel-card form label > span { display: flex; justify-content: space-between; gap: .5rem; }
.responsibility-panel-card form em { color: var(--ink-500); font-style: normal; font-weight: 650; }
.responsibility-panel-card form :is(input,select,textarea) { box-sizing: border-box; width: 100%; min-height: 2.35rem; padding: .48rem .58rem; border: 1px solid var(--line); border-radius: .45rem; background: var(--surface); color: var(--ink-940); font: inherit; font-size: .76rem; box-shadow: none; }
.responsibility-panel-card form textarea { min-height: 6.25rem; resize: none; }
.responsibility-panel-card form :is(input,select,textarea):focus { border-color: var(--accent); outline: 2px solid color-mix(in srgb, var(--accent) 18%, transparent); outline-offset: 1px; }
.responsibility-panel-card form .btn { justify-self: start; min-height: 2.3rem; }
.responsibility-panel-card form input[type="file"] { padding: .38rem; font-size: .68rem; }

.responsibility-list { gap: 0; }
.responsibility-list li { min-height: 3.15rem; padding: .62rem 0; }
.responsibility-list li form { margin: 0; }
.responsibility-complete { color: #15803d; font-size: .64rem; font-weight: 800; }
.responsibility-report-link { display: flex; justify-content: space-between; gap: .7rem; padding: .64rem 0; border-top: 1px solid var(--line-soft); font-size: .72rem; }
.responsibility-report-link:first-of-type { border-top: 0; }
.responsibility-report-link span { white-space: nowrap; }
.responsibility-report-sources { max-height: 12rem; overflow-y: auto; background: var(--surface-soft); }

.workspace-shell[data-party-theme="lib_dem"] .responsibility-summary-icon.is-blue,.workspace-shell[data-party-theme="lib_dem"] .responsibility-card-icon.is-blue { color: #0f5f8f !important; background: #e7f5ff; }
.workspace-shell[data-party-theme="lib_dem"] .responsibility-summary-icon.is-orange { color: #c2410c !important; background: #fff1cf; }
.workspace-shell[data-party-theme="lib_dem"] .responsibility-summary-icon.is-green { color: #15803d !important; background: #effce9; }
.workspace-shell[data-party-theme="lib_dem"] .responsibility-card-icon.is-purple { color: #7c2d12 !important; background: #fff1cf; }

@media (max-width: 960px) {
  .responsibility-overview-grid,
  .responsibility-section-grid { grid-template-columns: 1fr; }
  .responsibility-summary-strip { grid-template-columns: 1fr; }
  .responsibility-summary-strip article + article { border-top: 1px solid var(--line-soft); border-left: 0; }
}

@media (max-width: 700px) {
  .responsibility-tabs.portal-workspace-tabs { padding-inline: .85rem; }
  .responsibility-panel { padding: .9rem; }
  .responsibility-main-header { align-items: start; flex-direction: column; }
  .responsibility-activity-row { grid-template-columns: 1fr auto; }
  .responsibility-activity-row span { grid-column: 1 / -1; }
}

/* A project is a focused workspace inside a responsibility, not a static list
   item. These controls keep the project hierarchy readable in every theme. */
.responsibility-projects-grid { align-items: start; }
.responsibility-project-list { display: grid; gap: .7rem; max-height: 31rem; overflow-y: auto; padding-right: .2rem; scrollbar-color: var(--line) transparent; scrollbar-width: thin; }
.responsibility-project-year-group { display: grid; gap: .45rem; }
.responsibility-project-year-group h5 { margin: 0; padding: 0 .05rem; color: var(--ink-620); font-size: .62rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.responsibility-project-row { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; gap: .65rem; align-items: center; padding: .72rem; border: 1px solid var(--line-soft); border-radius: .58rem; color: inherit; text-decoration: none; }
.responsibility-project-row:hover,.responsibility-project-row:focus-visible { border-color: color-mix(in srgb, var(--accent) 42%, var(--line-soft)); background: var(--accent-soft); outline: none; }
.responsibility-project-row strong,.responsibility-project-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.responsibility-project-row strong { color: var(--ink-940); font-size: .75rem; }
.responsibility-project-row small { margin-top: .14rem; color: var(--ink-620); font-size: .64rem; }
.responsibility-project-row > span:last-child { color: var(--accent-strong); font-size: 1.15rem; }
.responsibility-project-create-card form { margin-top: .7rem; padding-top: 0; border-top: 0; }
.responsibility-projects-heading { align-items: end; }
.responsibility-project-filter { flex: none; margin: 0; }
.responsibility-project-filter label { display: grid; gap: .26rem; color: var(--ink-620); font-size: .62rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.responsibility-project-filter select { min-width: 10.75rem; min-height: 2.2rem; padding: .42rem 1.75rem .42rem .58rem; border: 1px solid var(--line); border-radius: .45rem; background: var(--surface); color: var(--ink-940); font: inherit; font-size: .72rem; font-weight: 750; }
.responsibility-project-filter select:focus { border-color: var(--accent); outline: 2px solid color-mix(in srgb, var(--accent) 18%, transparent); outline-offset: 1px; }

.responsibility-project-heading { display: grid; gap: .65rem; }
.responsibility-back-link { width: max-content; color: var(--accent-strong); font-size: .69rem; font-weight: 850; text-decoration: none; }
.responsibility-back-link:hover { text-decoration: underline; }
.responsibility-project-heading .responsibility-panel-heading { align-items: start; padding-bottom: .15rem; }
.responsibility-project-heading .responsibility-panel-heading h3 { font-size: 1.22rem; }
.responsibility-project-status-on_hold { background: var(--warn-soft); color: #a16207; }
.responsibility-project-status-complete { background: #edfdf3; color: #15803d; }

.responsibility-project-tabs { display: flex; gap: .2rem; overflow-x: auto; padding: .15rem 0 0; border-bottom: 1px solid var(--line-soft); }
.responsibility-project-tab { min-height: 2.35rem; padding: 0 .6rem; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--ink-620); font: inherit; font-size: .68rem; font-weight: 850; white-space: nowrap; cursor: pointer; }
.responsibility-project-tab:hover,.responsibility-project-tab.is-active { color: var(--ink-940); }
.responsibility-project-tab.is-active { border-bottom-color: var(--accent); }
.responsibility-project-tab:focus-visible { border-radius: .32rem; outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: -2px; }
.responsibility-project-panel { display: grid; gap: 1rem; }
.responsibility-project-panel[hidden] { display: none !important; }
.responsibility-project-summary { margin-top: .15rem; }

.responsibility-project-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin: 0; }
.responsibility-project-facts div { padding: .62rem; border: 1px solid var(--line-soft); border-radius: .48rem; background: var(--surface-soft); }
.responsibility-project-facts dt { color: var(--ink-620); font-size: .6rem; font-weight: 850; letter-spacing: .035em; text-transform: uppercase; }
.responsibility-project-facts dd { margin: .28rem 0 0; color: var(--ink-940); font-size: .7rem; font-weight: 750; line-height: 1.35; }
.responsibility-scope-label { display: block; margin-top: .35rem; color: var(--accent-strong); font-size: .62rem; font-weight: 800; }
.responsibility-workstream-list { display: grid; gap: .45rem; }
.responsibility-workstream-edit { border: 1px solid var(--line-soft); border-radius: .55rem; background: var(--surface-soft); }
.responsibility-workstream-edit summary { display: flex; justify-content: space-between; gap: .75rem; align-items: center; padding: .68rem .72rem; color: var(--ink-940); cursor: pointer; list-style: none; }
.responsibility-workstream-edit summary::-webkit-details-marker { display: none; }
.responsibility-workstream-edit summary strong,.responsibility-workstream-edit summary small { display: block; }
.responsibility-workstream-edit summary strong { font-size: .72rem; }
.responsibility-workstream-edit summary small { margin-top: .12rem; color: var(--ink-620); font-size: .62rem; }
.responsibility-workstream-edit[open] summary { border-bottom: 1px solid var(--line-soft); }
.responsibility-workstream-edit form { padding: .72rem; }

@media (max-width: 700px) {
  .responsibility-project-facts { grid-template-columns: 1fr; }
  .responsibility-project-heading .responsibility-panel-heading { flex-direction: column; }
  .responsibility-projects-heading { align-items: start; flex-direction: column; }
  .responsibility-project-filter,.responsibility-project-filter select { width: 100%; }
}

/* Archive is a small guarded action, not a full record editor. */
.record-actions-disclosure .issue-inline-edit-panel {
  left: auto;
  right: 0;
  width: min(25rem, calc(100vw - 1rem));
  padding: 0.8rem;
}

.record-actions-disclosure .issue-inline-edit-panel form {
  gap: 0.6rem;
}

.record-actions-disclosure .support-text {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.4;
}

.record-actions-disclosure label {
  display: grid;
  gap: 0.35rem;
  font-weight: 750;
}
