:root {
  --canvas: #f3f1eb;
  --canvas-deep: #e9e5dc;
  --paper: #fffefb;
  --ink: #182321;
  --muted: #68736f;
  --line: #dcded8;
  --line-strong: #c7ccc5;
  --forest: #163c39;
  --forest-2: #245650;
  --mint: #dcece5;
  --mint-bright: #b9dbcc;
  --cocoa: #7b4c35;
  --amber: #d79a38;
  --blue: #336b7d;
  --red: #a24f48;
  --shadow-sm: 0 1px 2px rgba(24, 35, 33, 0.06);
  --shadow: 0 16px 45px rgba(35, 47, 43, 0.09);
  --radius: 18px;
  --radius-sm: 11px;
  --header-height: 92px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  background:
    radial-gradient(circle at 12% 8%, rgba(185, 219, 204, 0.22), transparent 25rem),
    linear-gradient(180deg, #f8f7f3 0, var(--canvas) 46rem);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

button,
input,
textarea {
  font: inherit;
}

button,
a,
input,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  min-height: var(--header-height);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px clamp(18px, 4vw, 64px);
  border-bottom: 1px solid rgba(22, 60, 57, 0.13);
  background: rgba(255, 254, 251, 0.91);
  backdrop-filter: blur(18px);
}

.header-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
}

.company-logo-crop {
  position: relative;
  display: block;
  width: 198px;
  height: 76px;
  flex: 0 0 auto;
  overflow: hidden;
}

.company-logo {
  position: absolute;
  top: 52.5%;
  left: 50%;
  display: block;
  width: 242px;
  max-width: none;
  height: auto;
  mix-blend-mode: multiply;
  filter: contrast(1.08) saturate(0.9);
  transform: translate(-50%, -50%);
}

.brand-copy {
  display: grid;
  gap: 2px;
  line-height: 1.15;
}

.brand-subtitle {
  color: #8a7e73;
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.035em;
  line-height: 1.2;
  white-space: nowrap;
}

.brand-copy strong {
  color: var(--forest);
  font-size: clamp(1.48rem, 2vw, 1.72rem);
  letter-spacing: -0.035em;
}

.brand-kicker,
.eyebrow {
  color: var(--cocoa);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.brand-kicker {
  margin-bottom: 4px;
  font-size: 0.61rem;
}

.header-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
}

.header-transfer-button {
  white-space: nowrap;
}

.header-transfer-status {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 60;
  max-width: min(320px, calc(100vw - 32px));
  padding: 8px 11px;
  border: 1px solid #c9d5cc;
  border-radius: 9px;
  background: #eaf1e9;
  box-shadow: var(--shadow-sm);
  color: var(--forest);
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.header-transfer-status:empty {
  display: none;
}

.date-pill {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.header-button,
.primary-button,
.secondary-button,
.text-button {
  min-height: 42px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 750;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.header-button {
  padding: 0 14px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--forest);
}

.primary-button {
  padding: 0 17px;
  background: var(--forest);
  color: #fff;
}

.primary-button:hover {
  background: var(--forest-2);
  transform: translateY(-1px);
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--forest);
}

.secondary-button:hover,
.header-button:hover {
  border-color: var(--forest-2);
  background: var(--mint);
}

.text-button {
  min-height: 34px;
  padding: 4px 8px;
  background: transparent;
  color: var(--forest-2);
  font-size: 0.84rem;
}

.text-button:hover {
  background: var(--mint);
}

.text-button:disabled {
  color: #a8afab;
  cursor: not-allowed;
}

button:focus-visible,
a:focus-visible,
input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(51, 107, 125, 0.19);
  outline-offset: 2px;
}

main {
  flex: 1 0 auto;
  width: min(1280px, calc(100% - 36px));
  margin: 0 auto 32px;
}

label > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}

input {
  min-height: 44px;
  padding: 0 13px;
}

textarea {
  display: block;
  min-height: 145px;
  padding: 13px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #9aa39f;
}

.quiet-status {
  min-height: 1.2em;
  color: var(--forest-2);
  font-size: 0.78rem;
}

.view-tabs {
  position: sticky;
  top: var(--header-height);
  z-index: 40;
  display: flex;
  width: 100vw;
  align-items: center;
  gap: 7px;
  margin: 0 0 20px;
  margin-left: 50%;
  padding: 9px clamp(18px, 4vw, 64px);
  border-bottom: 1px solid rgba(199, 204, 197, 0.82);
  background: rgba(255, 254, 251, 0.94);
  box-shadow: 0 2px 8px rgba(24, 35, 33, 0.035);
  backdrop-filter: blur(16px);
  transform: translateX(-50%);
}

.view-tab {
  display: flex;
  flex: 0 0 auto;
  min-height: 43px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 16px;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 780;
  text-decoration: none;
  white-space: nowrap;
}

.view-tab .tab-icon {
  display: inline-flex;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
}

.view-tab .tab-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.view-tab.active {
  border: 1px solid #c8d5d0;
  background: #fff;
  color: var(--forest);
  box-shadow: 0 2px 0 var(--forest-2), 0 3px 7px rgba(24, 35, 33, 0.12);
}

.view-tab:hover:not(.active) {
  background: #f1f5f2;
  color: var(--forest-2);
}

.view-panel[hidden] {
  display: none;
}

.toolbar,
.checklist-panel,
.notes-panel,
.resource-section,
.role-overview-panel,
.transfer-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.toolbar {
  margin-bottom: 18px;
  padding: 18px;
}

.toolbar-heading,
.section-heading,
.library-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.toolbar-heading {
  align-items: center;
  margin-bottom: 12px;
}

.toolbar-title,
.section-title,
.library-title {
  margin: 0;
  color: var(--ink);
  font-size: 1.32rem;
  font-weight: 780;
  letter-spacing: -0.025em;
}

.search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.search-box input {
  min-height: 46px;
  padding: 0;
  border: 0;
  outline: 0;
}

.count,
.status,
.panel-footnote {
  color: var(--muted);
  font-size: 0.78rem;
}

.link-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.checklist-workspace-grid {
  margin-bottom: 18px;
}

.checklist-panel,
.notes-panel {
  padding: 20px;
}

.checklist-panel {
  --completion-color: #87908c;
  border-top: 4px solid var(--completion-color);
  transition: border-color 240ms ease;
}

.checklist-panel[data-progress-level="low"] { --completion-color: #c46b54; }
.checklist-panel[data-progress-level="medium"] { --completion-color: #d19a32; }
.checklist-panel[data-progress-level="high"] { --completion-color: #3c8b7c; }
.checklist-panel[data-progress-level="complete"] { --completion-color: #197052; }

.section-heading {
  align-items: center;
  margin-bottom: 15px;
}

.checklist-panel > .section-heading h2 {
  margin-top: 0;
}

.checklist-heading-actions,
.checklist-meter {
  display: flex;
  align-items: center;
}

.checklist-heading-actions {
  gap: 8px;
}

.checklist-toolbar-icon,
.checklist-icon-button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7f8f5;
  color: var(--forest-2);
  cursor: pointer;
}

.checklist-toolbar-icon svg,
.checklist-icon-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.checklist-toolbar-icon:hover,
.checklist-icon-button:hover,
.checklist-toolbar-icon.active {
  border-color: #a9c8ba;
  background: var(--mint);
}

.checklist-toolbar-icon.active {
  box-shadow: inset 0 0 0 1px rgba(36, 86, 80, 0.12);
}

.checklist-meter {
  --progress: 0%;
  gap: 12px;
  color: var(--completion-color);
}

.progress-orb {
  position: relative;
  display: grid;
  width: 66px;
  height: 66px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--completion-color) var(--progress), #e7eae7 0);
  box-shadow: 0 5px 13px color-mix(in srgb, var(--completion-color) 20%, transparent);
}

.progress-orb::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: inherit;
  background: #fff;
}

.progress-orb > span {
  position: relative;
  z-index: 1;
  font-size: 1.42rem;
  font-weight: 900;
  line-height: 1;
}

.progress-copy {
  display: flex;
  min-width: 76px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 5px;
  line-height: normal;
}

.progress-copy strong {
  display: block;
  color: var(--completion-color);
  font-size: 1.55rem;
  font-variant-numeric: tabular-nums;
  font-weight: 820;
  letter-spacing: -0.015em;
  line-height: 1;
  transition: color 240ms ease;
}

.progress-copy small {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.065em;
  line-height: 1.15;
  text-transform: uppercase;
}

.checklist-meter.progress-updated .progress-orb {
  animation: progress-pop 360ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.checklist-panel[data-progress-level="complete"] .progress-orb {
  box-shadow: 0 0 0 6px rgba(25, 112, 82, 0.1), 0 7px 18px rgba(25, 112, 82, 0.22);
}

@keyframes progress-pop {
  0% { transform: scale(0.86) rotate(-8deg); }
  65% { transform: scale(1.08) rotate(3deg); }
  100% { transform: scale(1) rotate(0); }
}

.section-inline-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.resource-toolbar-icon {
  flex: 0 0 auto;
}

.resource-actions-hidden .resource-manage-action {
  display: none !important;
}

.resource-actions-hidden .link-card {
  grid-template-columns: 42px minmax(0, 1fr);
}

.add-item-button,
.card-icon-button,
.section-drag-handle,
.link-drag-handle {
  display: inline-grid;
  min-width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f8f5;
  color: var(--forest-2);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 800;
}

.add-item-button {
  width: auto;
  padding: 0 9px;
  border-color: #c9ddd4;
  background: #edf6f1;
}

.card-icon-button:hover,
.add-item-button:hover {
  border-color: #a9c8ba;
  background: var(--mint);
}

.delete-section-button {
  color: #8e5a55;
}

.section-drag-handle,
.link-drag-handle {
  color: #818a86;
  cursor: grab;
  letter-spacing: -0.18em;
}

.section-drag-handle:active,
.link-drag-handle:active {
  cursor: grabbing;
}

.section-heading h2:not(.section-title),
.library-heading h2,
.transfer-panel h2 {
  margin: 4px 0 0;
  font-size: 1.2rem;
  letter-spacing: -0.025em;
}

.progress-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
  padding: 15px;
  border: 1px solid #d4ddd7;
  border-radius: 17px;
  background: linear-gradient(135deg, #edf2ef 0%, #f5f7f5 100%);
}

.progress-dashboard-overall,
.list-progress-card {
  border: 1px solid #d7ded9;
  border-top: 4px solid var(--dashboard-color, var(--completion-color));
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 5px 15px rgba(31, 48, 43, 0.055);
}

.progress-dashboard-overall,
.list-progress-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 20px;
}

.progress-dashboard-label,
.list-progress-card h3 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 790;
  letter-spacing: -0.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-dashboard-overall .checklist-meter,
.list-progress-card .checklist-meter {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-width: 170px;
  justify-content: flex-end;
}

.dashboard-progress-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 650;
}

.progress-dashboard-lists {
  display: contents;
}

.list-progress-card {
  --dashboard-color: #87908c;
  --completion-color: var(--dashboard-color);
  min-height: 132px;
}

.list-progress-card[data-progress-level="low"] { --dashboard-color: #c46b54; }
.list-progress-card[data-progress-level="medium"] { --dashboard-color: #d19a32; }
.list-progress-card[data-progress-level="high"] { --dashboard-color: #3c8b7c; }
.list-progress-card[data-progress-level="complete"] { --dashboard-color: #197052; }

.list-progress-count {
  grid-column: 1;
  margin-top: -4px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 650;
}

.progress-dashboard-empty {
  align-self: stretch;
  margin: 0;
  padding: 18px;
  border: 1px dashed #c2cec7;
  border-radius: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
  font-size: 0.82rem;
}

.checklist-lists {
  display: grid;
  gap: 22px;
}

.checklist-list {
  --list-completion-color: #87908c;
  overflow: hidden;
  border: 1px solid #c9d2cc;
  border-left: 5px solid var(--list-completion-color);
  border-radius: 18px;
  background: #f1f4f1;
  box-shadow: 0 12px 30px rgba(31, 48, 43, 0.09);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.checklist-list[data-progress-level="low"] { --list-completion-color: #c46b54; }
.checklist-list[data-progress-level="medium"] { --list-completion-color: #d19a32; }
.checklist-list[data-progress-level="high"] { --list-completion-color: #3c8b7c; }
.checklist-list[data-progress-level="complete"] { --list-completion-color: #197052; }

.checklist-list-heading {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 15px 14px 18px;
  background: linear-gradient(110deg, color-mix(in srgb, var(--list-completion-color) 13%, #f4f7f5), #fff 72%);
}

.checklist-list-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.checklist-list-title-group {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 9px;
}

.checklist-list-title-group h3 {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.checklist-auto-clear-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border: 1px solid #bad5c8;
  border-radius: 999px;
  background: #edf6f1;
  color: var(--forest);
  font-size: 0.64rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.checklist-auto-clear-badge::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #3c8b7c;
  content: "";
}

.checklist-list-actions,
.checklist-list-manage {
  display: flex;
  align-items: center;
  gap: 5px;
}

.checklist-collapse-button {
  border-color: #c9d7cf;
  background: #fff;
}

.checklist-reset-button.active {
  border-color: #9fc3b2;
  background: var(--mint);
  color: var(--forest);
  box-shadow: inset 0 0 0 1px rgba(36, 86, 80, 0.1);
}

.checklist-reset-config {
  display: grid;
  gap: 12px;
  padding: 14px 16px 16px;
  border-top: 1px solid #d4dcd6;
  background: #fffdf8;
}

.checklist-reset-config-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.checklist-reset-config-heading strong,
.checklist-reset-option strong,
.checklist-reset-option small {
  display: block;
}

.checklist-reset-config-heading strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.checklist-reset-title-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.checklist-reset-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.checklist-reset-toggle-track {
  position: relative;
  width: 34px;
  height: 19px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #c7ceca;
  box-shadow: inset 0 0 0 1px rgba(35, 52, 45, 0.1);
  transition: background 150ms ease;
}

.checklist-reset-toggle-track i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(22, 47, 38, 0.24);
  transition: transform 150ms ease;
}

.checklist-reset-toggle[aria-checked="true"] .checklist-reset-toggle-track {
  background: var(--forest-2);
}

.checklist-reset-toggle[aria-checked="true"] .checklist-reset-toggle-track i {
  transform: translateX(15px);
}

.checklist-reset-toggle-label {
  min-width: 18px;
  font-size: 0.68rem;
  font-weight: 800;
}

.checklist-reset-close {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
}

.checklist-reset-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.checklist-reset-option {
  min-height: 72px;
  padding: 10px 11px;
  border: 1px solid #d7ddd8;
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.checklist-reset-option:hover {
  border-color: #a9c8ba;
  background: #f6faf7;
}

.checklist-reset-option.active {
  border-color: var(--forest-2);
  background: #edf6f1;
  box-shadow: inset 0 0 0 1px rgba(36, 86, 80, 0.12);
}

.checklist-reset-option:disabled,
.checklist-reset-option:disabled:hover {
  border-color: #e0e3e0;
  background: #f3f4f2;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.52;
}

.checklist-reset-option strong {
  font-size: 0.82rem;
}

.checklist-reset-option small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.69rem;
  line-height: 1.35;
}

.checklist-list-body {
  padding: 17px;
  border-top: 1px solid #d4dcd6;
  background: linear-gradient(180deg, #eef2ef 0%, #f4f6f4 100%);
}

.checklist-list.collapsed .checklist-list-body {
  display: none;
}

.checklist-list.collapsed .checklist-list-heading {
  min-height: 74px;
  padding: 13px 15px 13px 18px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--list-completion-color) 8%, #f8faf8), #fbfcfa 48%, #fff 100%);
}

.checklist-list.collapsed {
  box-shadow: 0 9px 24px color-mix(in srgb, var(--list-completion-color) 10%, transparent);
}

.checklist-list.collapsed .checklist-list-title-group h3 {
  font-size: 1.14rem;
}

.checklist-list.collapsed .checklist-collapse-button {
  width: 38px;
  height: 38px;
  border-color: color-mix(in srgb, var(--list-completion-color) 30%, #c9d7cf);
  color: var(--list-completion-color);
}

.checklist-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 16px;
}

.checklist-list-editor,
.empty-checklist-workspace {
  width: 100%;
  border: 1px dashed #b7c9c0;
  border-radius: 14px;
  background: #f7faf8;
}

.checklist-list-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  padding: 12px;
}

.empty-checklist-workspace,
.empty-checklist {
  min-height: 58px;
  color: var(--forest-2);
  cursor: pointer;
  font-weight: 750;
}

.empty-checklist {
  grid-column: 1 / -1;
  border: 1px dashed #c4d1c9;
  border-radius: 12px;
  background: #f8faf8;
}

.actions-hidden .checklist-manage-action {
  display: none !important;
}

.actions-hidden .checklist-category-heading {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.actions-hidden .check-item {
  grid-template-columns: 22px minmax(0, 1fr);
}

.checklist-category {
  --category-accent: #52796d;
  overflow: hidden;
  border: 1px solid #d3dad5;
  border-top: 4px solid var(--category-accent);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(31, 48, 43, 0.075);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.checklist-category[data-category-tone="1"] { --category-accent: #477d70; }
.checklist-category[data-category-tone="2"] { --category-accent: #9a7044; }
.checklist-category[data-category-tone="3"] { --category-accent: #55728b; }
.checklist-category[data-category-tone="4"] { --category-accent: #806a8d; }

.checklist-category.dragging,
.check-item.dragging {
  opacity: 0.46;
}

.checklist-category.drag-over {
  border-color: var(--forest-2);
  box-shadow: 0 0 0 3px rgba(36, 86, 80, 0.14);
}

.checklist-category-heading {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 9px 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--category-accent) 18%, #dde2dd);
  background: linear-gradient(105deg, color-mix(in srgb, var(--category-accent) 11%, #f7f9f7), #fff 88%);
}

.checklist-category-heading h3 {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 790;
  letter-spacing: -0.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.checklist-category-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.checklist-category-heading > .count {
  min-width: 38px;
  padding: 3px 7px;
  border: 1px solid color-mix(in srgb, var(--category-accent) 28%, #d8dfda);
  border-radius: 999px;
  background: color-mix(in srgb, var(--category-accent) 9%, #fff);
  color: var(--category-accent);
  font-weight: 800;
  text-align: center;
}

.checklist-category-actions .delete-section-button,
.checklist-list-manage .delete-section-button {
  color: #8e5a55;
}

.check-group-drag,
.check-task-drag {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #7c8782;
  cursor: grab;
  font-weight: 850;
  letter-spacing: -0.2em;
}

.check-group-drag:hover,
.check-task-drag:hover {
  border-color: #cbd5cf;
  background: #fff;
  color: var(--forest-2);
}

.check-group-drag:active,
.check-task-drag:active {
  cursor: grabbing;
}

.checklist-category-title-input {
  min-height: 32px;
  padding: 4px 8px;
  font-size: 1rem;
  font-weight: 750;
}

.checklist-task-list {
  display: grid;
  min-height: 45px;
  gap: 6px;
  padding: 10px;
  background: #fbfcfb;
  transition: background 140ms ease, box-shadow 140ms ease;
}

.checklist-task-list.drag-over {
  background: #edf6f1;
  box-shadow: inset 0 0 0 2px rgba(36, 86, 80, 0.16);
}

.empty-category {
  margin: 4px;
  padding: 9px;
  border: 1px dashed #cbd4ce;
  border-radius: 9px;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.checklist-category-editor,
.checklist-task-editor {
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid #a9c8ba;
  border-radius: 12px;
  background: #f5faf7;
  box-shadow: 0 8px 20px rgba(24, 35, 33, 0.08);
}

.checklist-category-editor {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.check-item {
  position: relative;
  display: grid;
  grid-template-columns: 28px 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 50px;
  padding: 7px 8px;
  border: 1px solid #e0e4e1;
  border-radius: 10px;
  background: linear-gradient(145deg, #ffffff 0%, #fbfcfa 100%);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(31, 48, 43, 0.035);
  font-size: 0.96rem;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.check-item:hover {
  border-color: #b7c9c1;
  box-shadow: 0 8px 20px rgba(31, 48, 43, 0.09);
  transform: translateY(-1px);
}

.check-task-text {
  min-width: 0;
  cursor: pointer;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.check-task-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.check-task-actions .checklist-icon-button {
  width: 34px;
  height: 34px;
}

.check-task-actions .checklist-icon-button svg {
  width: 19px;
  height: 19px;
}

.check-item.complete {
  border-color: #bed8cc;
  background: linear-gradient(145deg, #f3faf6 0%, #eaf5ef 100%);
  box-shadow: 0 4px 12px rgba(25, 112, 82, 0.08);
}

.check-item.complete .check-task-text {
  color: #60716a;
  text-decoration: line-through;
  text-decoration-color: #8fa69c;
  text-decoration-thickness: 1.5px;
}

.check-toggle {
  display: grid;
  width: 22px;
  height: 22px;
  cursor: pointer;
}

.check-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.check-visual {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 2px solid #aeb8b3;
  border-radius: 7px;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(31, 48, 43, 0.08);
  color: #fff;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.check-visual::after {
  content: "✓";
  font-size: 0.84rem;
  font-weight: 900;
  line-height: 1;
  opacity: 0;
  transform: scale(0.35) rotate(-12deg);
  transition: opacity 140ms ease, transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.check-toggle input:checked + .check-visual {
  border-color: var(--forest-2);
  background: var(--forest-2);
  box-shadow: 0 0 0 4px rgba(36, 86, 80, 0.11);
}

.check-toggle input:checked + .check-visual::after {
  opacity: 1;
  transform: scale(1) rotate(0);
}

.check-toggle input:focus-visible + .check-visual {
  outline: 3px solid rgba(36, 86, 80, 0.22);
  outline-offset: 3px;
}

.remove-check,
.remove-link {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.05rem;
}

.remove-check:hover,
.remove-link:hover {
  border-color: #efd4d1;
  background: #fff2f1;
  color: var(--red);
}

.panel-footnote {
  margin: 12px 0 0;
}

.notes-panel textarea {
  min-height: 238px;
  border-color: #e2ded2;
  background: #fffdf6;
  line-height: 1.65;
}

.bottom-notes {
  margin-top: 18px;
}

.library-heading {
  align-items: center;
  margin: 14px 2px 8px;
}

.library-title {
  font-size: 1.9rem;
  line-height: 1.15;
}

.library-heading-copy {
  display: grid;
}

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

.resource-section {
  position: relative;
  padding: 20px;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--section-color) 22%, var(--line));
  border-top: 5px solid var(--section-color, var(--forest-2));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--section-color) 8%, #fff) 0 88px, #fffefb 88px 100%);
  box-shadow: 0 10px 26px color-mix(in srgb, var(--section-color) 8%, transparent);
}

.resource-section::after {
  content: "";
  position: absolute;
  top: -46px;
  right: -42px;
  width: 124px;
  height: 124px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--section-color) 11%, transparent);
}

.section-blue { --section-color: #336b7d; }
.section-green { --section-color: #38745c; }
.section-amber { --section-color: #b97a2d; }
.section-slate { --section-color: #65736f; }
.section-violet { --section-color: #735b7e; }
.section-teal { --section-color: #26706a; }
.section-gray { --section-color: #737a77; }
.section-meeting { --section-color: #b56f36; }

.resource-heading {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.resource-heading h2 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.2;
  letter-spacing: -0.018em;
}

.resource-heading .count {
  margin-left: auto;
  padding: 4px 9px;
  border: 1px solid color-mix(in srgb, var(--section-color) 22%, #d8dfda);
  border-radius: 999px;
  background: color-mix(in srgb, var(--section-color) 7%, #fff);
  color: var(--section-color);
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.section-title-editor {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin: -5px 0 16px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--section-color) 28%, #ccd5d0);
  border-radius: 12px;
  background: color-mix(in srgb, var(--section-color) 5%, #fff);
  box-shadow: 0 8px 20px rgba(24, 35, 33, 0.07);
}

.section-title-field {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.section-title-field > span {
  margin: 0;
  color: var(--section-color);
  font-size: 0.72rem;
  font-weight: 820;
  letter-spacing: 0.035em;
}

.section-title-field input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid color-mix(in srgb, var(--section-color) 28%, #cbd4cf);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 740;
}

.section-title-editor-actions {
  display: flex;
  gap: 7px;
}

.section-rename-button[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--section-color) 35%, #cbd3ce);
  background: color-mix(in srgb, var(--section-color) 11%, #fff);
  color: var(--section-color);
}

.section-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--section-color) 34%, transparent);
  border-radius: 13px;
  background: var(--section-color);
  box-shadow: 0 6px 14px color-mix(in srgb, var(--section-color) 22%, transparent);
  color: #fff;
  font-size: 1rem;
  font-weight: 850;
}

.theme-panel {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  margin: -5px 0 16px;
  padding: 11px 12px;
  border: 1px solid color-mix(in srgb, var(--section-color) 25%, #d8dfda);
  border-radius: 12px;
  background: color-mix(in srgb, var(--section-color) 5%, #fff);
  box-shadow: 0 7px 18px rgba(24, 35, 33, 0.06);
}

.theme-panel[hidden] {
  display: none;
}

.theme-panel-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.theme-panel-copy strong {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 820;
}

.theme-panel-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theme-swatches {
  display: flex;
  align-items: center;
  gap: 6px;
}

.theme-swatch {
  position: relative;
  width: 27px;
  min-width: 27px;
  height: 27px;
  padding: 0;
  border: 3px solid #fff;
  border-radius: 50%;
  outline: 1px solid color-mix(in srgb, var(--swatch-color, #6f7c77) 25%, #cbd2cd);
  background: var(--swatch-color, #6f7c77);
  box-shadow: 0 2px 5px color-mix(in srgb, var(--swatch-color, #6f7c77) 20%, transparent);
  cursor: pointer;
}

.theme-swatch:hover {
  transform: translateY(-1px) scale(1.06);
}

.theme-swatch.selected {
  outline: 3px solid color-mix(in srgb, var(--swatch-color, var(--section-color)) 35%, #fff);
  outline-offset: 1px;
}

.theme-swatch.selected::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.66rem;
  font-weight: 900;
}

.theme-swatch-default {
  --swatch-color: #6f7c77;
  background: conic-gradient(#336b7d 0 25%, #38745c 0 50%, #b97a2d 0 75%, #735b7e 0);
}

.theme-custom-control {
  display: flex;
  min-height: 32px;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding-left: 10px;
  border-left: 1px solid color-mix(in srgb, var(--section-color) 18%, #d8dfda);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.theme-custom-control > span {
  margin: 0;
}

.theme-custom-control input[type="color"] {
  width: 38px;
  height: 30px;
  padding: 3px;
  border: 1px solid #cbd3ce;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.theme-picker-button[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--section-color) 35%, #cbd3ce);
  background: color-mix(in srgb, var(--section-color) 11%, #fff);
  color: var(--section-color);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--section-color) 12%, transparent);
}

.link-grid {
  display: grid;
  gap: 10px;
  min-height: 12px;
}

.link-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 78px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--section-color) 15%, var(--line));
  border-left: 3px solid color-mix(in srgb, var(--section-color) 52%, #fff);
  border-radius: 12px;
  background: linear-gradient(110deg, #fff 68%, color-mix(in srgb, var(--section-color) 5%, #fff));
  transition: border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.link-card:hover {
  border-color: color-mix(in srgb, var(--section-color) 42%, #bdc8c3);
  box-shadow: 0 9px 22px color-mix(in srgb, var(--section-color) 13%, transparent);
  transform: translateY(-1px);
}

.link-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--section-color) 24%, #d8dfda);
  border-radius: 11px;
  background: color-mix(in srgb, var(--section-color) 10%, #fff);
  color: var(--section-color);
}

.link-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.link-card.dragging,
.resource-section.dragging {
  opacity: 0.45;
}

.link-card.drag-over {
  border-color: var(--forest-2);
  box-shadow: inset 0 3px 0 var(--forest-2);
}

.resource-section.drag-over {
  border-color: var(--forest-2);
  box-shadow: 0 0 0 3px rgba(36, 86, 80, 0.16), var(--shadow-sm);
}

.link-grid.drag-over-container {
  border-radius: 10px;
  box-shadow: inset 0 0 0 2px rgba(36, 86, 80, 0.24);
}

.link-details {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.link-card a,
.link-card strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 750;
  line-height: 1.3;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-card a:hover {
  color: var(--forest-2);
  text-decoration: underline;
}

.link-card .link-details > span:not(.type-badge) {
  color: var(--muted);
  font-size: 0.84rem;
}

.type-badge {
  justify-self: start;
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef1ee;
  color: #53615c;
  font-size: 0.72rem;
  font-weight: 800;
}

.type-sharepoint,
.type-excel { background: #e5f2eb; color: #32654e; }
.type-system,
.type-internal { background: #e7f0f5; color: #315f70; }
.type-portal,
.type-form { background: #eeecf6; color: #625779; }
.type-regulation,
.type-report { background: #fff0dd; color: #8e5b20; }
.type-reference,
.type-external { background: #f1ebf2; color: #6b526f; }
.type-template,
.type-map { background: #eef1ee; color: #59645f; }
.type-meeting { background: #fff0e2; color: #9a5d28; }
.type-setup { background: #edf2ee; color: #69736e; }
.type-soon { background: #f0f1ef; color: #747c78; }
.type-custom { background: #e8f1f0; color: #315f5b; }

.link-drag-handle {
  width: 40px;
  min-width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 10px;
}

.link-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  opacity: 0.78;
  transition: opacity 140ms ease;
}

.link-card:hover .link-actions,
.link-card:focus-within .link-actions {
  opacity: 1;
}

.inline-link-editor {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  padding: 10px;
  border: 1px solid #a9c8ba;
  border-radius: 11px;
  background: #f5faf7;
  box-shadow: 0 8px 22px rgba(24, 35, 33, 0.08);
}

.inline-link-editor input {
  min-height: 38px;
  padding: 0 10px;
  font-size: 0.8rem;
}

.link-icon-picker {
  min-width: 0;
  margin: 2px 0 0;
  padding: 9px;
  border: 1px solid #d4dfd9;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.74);
}

.link-icon-picker legend {
  padding: 0 5px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.link-icon-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(34px, 1fr));
  gap: 5px;
}

.link-icon-option {
  display: grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 1px solid #d7ded9;
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}

.link-icon-option:hover {
  border-color: color-mix(in srgb, var(--section-color) 45%, #cbd3ce);
  color: var(--section-color);
}

.link-icon-option.selected {
  border-color: var(--section-color);
  background: color-mix(in srgb, var(--section-color) 11%, #fff);
  color: var(--section-color);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--section-color) 18%, transparent);
}

.link-icon-option svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.inline-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.inline-save-button,
.inline-cancel-button {
  min-height: 38px;
  padding: 0 11px;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 800;
}

.inline-save-button {
  background: var(--forest);
  color: #fff;
}

.inline-cancel-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}

.add-section-card,
.add-section-form {
  display: grid;
  min-height: 150px;
  place-content: center;
  gap: 10px;
  padding: 20px;
  border: 1px dashed #aebdb6;
  border-radius: var(--radius);
  background: rgba(255, 254, 251, 0.5);
  color: var(--forest-2);
}

.add-section-card {
  cursor: pointer;
}

.add-section-card:hover {
  border-color: var(--forest-2);
  background: #f2f8f4;
}

.add-section-card span {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--mint);
  font-size: 1.35rem;
}

.add-section-card strong {
  font-size: 0.85rem;
}

.add-section-form {
  grid-template-columns: 1fr auto auto;
  align-content: center;
}

.add-section-form input {
  min-width: 0;
}

.show-more-button {
  width: 100%;
  min-height: 40px;
  margin-top: 11px;
  border: 1px solid color-mix(in srgb, var(--section-color) 20%, var(--line));
  border-radius: 9px;
  background: color-mix(in srgb, var(--section-color) 5%, #f9faf8);
  color: var(--section-color);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 750;
}

.empty-state {
  color: var(--muted);
}

.empty-state p {
  margin: 8px 0;
  font-size: 0.83rem;
}

.resource-section:not(.expanded) .link-card.collapsed-link {
  display: none;
}

.resource-section.searching .link-card.collapsed-link {
  display: grid;
}

.hidden,
.link-card.hidden,
.resource-section.hidden {
  display: none !important;
}

.role-overview-panel {
  margin-bottom: 16px;
  padding: clamp(22px, 3vw, 30px);
}

.role-overview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.role-overview-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.34rem;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.role-prompt-bar {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 10px 12px;
  border: 1px solid #dfe8e1;
  border-radius: 11px;
  background: #f5f8f5;
}

.role-prompt-label {
  flex: 0 0 auto;
  color: var(--forest);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.role-prompt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.role-prompt-chip {
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid #cfdad2;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
}

.role-prompt-chip:hover,
.role-prompt-chip.active {
  border-color: var(--forest-2);
  background: var(--forest);
  color: #fff;
}

.role-prompt-chip:focus-visible {
  outline: 3px solid rgba(35, 105, 91, 0.18);
  outline-offset: 2px;
}

.role-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.role-overview-field {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 15px;
  border: 1px solid #e0e7e1;
  border-radius: 12px;
  background: #fbfcfa;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.role-overview-field:focus-within {
  border-color: #9dbbb1;
  box-shadow: 0 0 0 3px rgba(35, 105, 91, 0.08);
}

.role-overview-field strong,
.role-overview-field small {
  display: block;
}

.role-overview-field strong {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 800;
}

.role-overview-field small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 500;
  line-height: 1.45;
}

.role-overview-field textarea {
  min-height: 104px;
  border-color: #d9e0da;
  background: #fff;
  line-height: 1.55;
}

.ownership-boundaries-grid,
.decision-boundaries-grid,
.role-overview-field-wide {
  grid-column: 1 / -1;
}

.ownership-boundaries-grid,
.decision-boundaries-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.transfer-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.42fr);
  gap: 34px;
  padding: clamp(22px, 4vw, 36px);
}

.handover-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 18px;
}

.handover-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.8rem;
}

.handover-check::before {
  content: "";
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #fff;
}

.handover-check.complete {
  color: var(--forest);
  font-weight: 700;
}

.handover-check.complete::before {
  content: "✓";
  display: grid;
  place-content: center;
  border-color: var(--forest-2);
  background: var(--mint);
  color: var(--forest);
  font-size: 0.7rem;
}

.transfer-actions {
  display: grid;
  align-content: center;
  gap: 9px;
}

.transfer-actions .primary-button,
.transfer-actions .secondary-button {
  width: 100%;
  text-align: center;
}

.import-button {
  position: relative;
}

.import-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.print-button {
  justify-self: center;
}

.privacy-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 13px 17px;
  border: 1px solid #d6e3dc;
  border-radius: 12px;
  background: #edf6f1;
  color: var(--forest-2);
  font-size: 0.8rem;
}

.privacy-note strong {
  white-space: nowrap;
}

.app-footer {
  display: flex;
  width: min(1280px, calc(100% - 36px));
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 auto 30px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.74rem;
}

body.modal-open {
  overflow: hidden;
}

.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  padding: 20px;
  place-items: center;
}

.confirm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 28, 26, 0.54);
  backdrop-filter: blur(4px);
}

.confirm-dialog {
  position: relative;
  display: grid;
  width: min(100%, 460px);
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 15px;
  padding: 24px;
  border: 1px solid rgba(140, 87, 79, 0.22);
  border-radius: 18px;
  background: #fffdfb;
  box-shadow: 0 28px 70px rgba(16, 28, 26, 0.24);
  animation: confirm-dialog-in 180ms ease-out;
}

.confirm-dialog-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  background: #fff0ee;
  color: #a4483f;
  font-size: 1.25rem;
  font-weight: 900;
}

.confirm-dialog-copy h2 {
  margin: 1px 0 7px;
  color: var(--ink);
  font-size: 1.2rem;
  letter-spacing: -0.025em;
}

.confirm-dialog-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.confirm-dialog-actions {
  display: flex;
  grid-column: 1 / -1;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 5px;
}

.danger-button {
  min-height: 42px;
  padding: 0 17px;
  border: 1px solid #a64d43;
  border-radius: 9px;
  background: #a64d43;
  color: #fff;
  cursor: pointer;
  font-weight: 780;
}

.danger-button:hover {
  border-color: #873c34;
  background: #873c34;
}

.danger-button:focus-visible {
  outline: 3px solid rgba(166, 77, 67, 0.24);
  outline-offset: 3px;
}

@keyframes confirm-dialog-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 2026 warm editorial workspace refresh */
:root {
  --canvas: #f3eee5;
  --canvas-deep: #e8dfd1;
  --paper: #fffdf8;
  --ink: #261c17;
  --muted: #746d65;
  --line: #ded4c5;
  --line-strong: #c9baa7;
  --forest: #173b35;
  --forest-2: #24564c;
  --mint: #e4ece4;
  --mint-bright: #bacbbd;
  --cocoa: #6b351d;
  --amber: #b9873d;
  --shadow-sm: 0 1px 2px rgba(62, 39, 25, 0.05);
  --shadow: 0 14px 38px rgba(66, 45, 30, 0.075);
  --radius: 20px;
  --header-height: 88px;
}

body {
  background:
    radial-gradient(circle at 8% 4%, rgba(185, 135, 61, 0.08), transparent 25rem),
    radial-gradient(circle at 92% 24%, rgba(23, 59, 53, 0.07), transparent 28rem),
    linear-gradient(180deg, #fbf8f2 0, var(--canvas) 64rem);
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.025'/%3E%3C/svg%3E");
  content: "";
  pointer-events: none;
}

.app-header {
  padding-block: 8px;
  border-bottom-color: rgba(107, 53, 29, 0.12);
  background: rgba(255, 253, 248, 0.92);
}

.company-logo-crop {
  width: 166px;
  height: 64px;
}

.company-logo {
  width: 204px;
}

.header-brand {
  gap: 16px;
}

.brand-copy {
  padding-left: 16px;
  border-left: 1px solid rgba(107, 53, 29, 0.2);
}

.brand-copy strong,
.progress-dashboard-label,
.list-progress-card h3,
.checklist-list-title-group h3,
.notes-panel h2 {
  font-family: Georgia, "Times New Roman", serif;
}

.brand-copy strong {
  color: var(--forest);
  font-size: clamp(1.55rem, 2vw, 1.88rem);
  font-weight: 600;
  letter-spacing: -0.045em;
}

.brand-kicker,
.eyebrow,
.section-kicker {
  color: var(--amber);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.18em;
}

.date-pill,
.header-button {
  min-height: 44px;
  padding-inline: 15px;
  border-color: #dfd3c2;
  background: rgba(255, 253, 248, 0.78);
}

.primary-button {
  min-height: 46px;
  padding-inline: 20px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow: 0 8px 20px rgba(23, 59, 53, 0.15);
}

.header-transfer-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.header-transfer-button svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

main {
  width: min(1500px, calc(100% - 56px));
}

.view-tabs {
  gap: 12px;
  margin-bottom: 0;
  padding-block: 8px;
  border-bottom-color: rgba(107, 53, 29, 0.13);
  background: rgba(255, 253, 248, 0.93);
  box-shadow: none;
}

.view-tab {
  min-height: 48px;
  padding-inline: 18px;
  border-radius: 12px 12px 5px 5px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.98rem;
  font-weight: 600;
}

.view-tab.active {
  border-color: #ddcfbd;
  color: var(--forest);
  box-shadow: 0 3px 0 var(--forest), 0 8px 18px rgba(57, 39, 27, 0.07);
}

.checklist-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(310px, 0.65fr);
  align-items: start;
  gap: 18px;
  margin-top: 20px;
  margin-bottom: 22px;
}

.checklist-panel,
.notes-panel {
  border-color: #d7cbbb;
  background: rgba(255, 253, 248, 0.95);
  box-shadow: var(--shadow);
}

.checklist-panel {
  padding: 24px;
  border-top: 1px solid #d7cbbb;
}

.checklist-panel > .section-heading {
  padding-bottom: 16px;
  border-bottom: 1px solid #e5dbce;
}

.section-kicker {
  display: block;
  margin-bottom: 3px;
}

.checklist-panel > .section-heading h2 {
  margin: 0;
  color: #35251e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.42rem;
  font-weight: 600;
}

.progress-dashboard {
  grid-template-columns: minmax(260px, 1.15fr) repeat(2, minmax(150px, 0.72fr));
  gap: 0;
  overflow: hidden;
  margin-bottom: 20px;
  padding: 0;
  border-color: #dfd3c2;
  border-radius: 16px;
  background: linear-gradient(135deg, #faf6ee, #f2eee4);
}

.progress-dashboard-overall,
.list-progress-card {
  min-height: 126px;
  border: 0;
  border-right: 1px solid #dfd3c2;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.list-progress-card:last-child {
  border-right: 0;
}

.progress-dashboard-label,
.list-progress-card h3 {
  color: #37261f;
  font-size: 1rem;
  font-weight: 600;
}

.progress-dashboard-overall .checklist-meter,
.list-progress-card .checklist-meter {
  min-width: auto;
}

.list-progress-card {
  grid-template-columns: 1fr;
  align-content: center;
  gap: 6px;
}

.list-progress-card h3 {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.list-progress-card .checklist-meter {
  grid-column: 1;
  grid-row: auto;
  justify-content: flex-start;
}

.list-progress-card .progress-orb {
  display: none;
}

.list-progress-card .progress-copy {
  min-width: 0;
  flex-direction: row;
  align-items: baseline;
  gap: 7px;
}

.list-progress-card .progress-copy strong {
  font-size: 1.25rem;
}

.list-progress-card .progress-copy small {
  font-size: 0.64rem;
}

.list-progress-count {
  margin-top: 0;
}

.progress-orb {
  width: 58px;
  height: 58px;
  background: conic-gradient(var(--completion-color) var(--progress), #e4dbcd 0);
  box-shadow: 0 4px 12px rgba(85, 56, 36, 0.08);
}

.progress-orb::before {
  background: #fffdf9;
}

.progress-copy {
  min-width: 54px;
}

.progress-copy strong {
  color: #4b3327;
  font-family: Georgia, "Times New Roman", serif;
}

.checklist-lists {
  gap: 14px;
}

.checklist-list {
  border: 1px solid #d6c9b7;
  border-left: 1px solid #d6c9b7;
  border-radius: 16px;
  background: #fbf8f1;
  box-shadow: 0 10px 28px rgba(62, 42, 28, 0.07);
}

.checklist-list-heading {
  min-height: 74px;
  color: #fffdf8;
  background: linear-gradient(120deg, #153c35 0%, #204d43 100%);
}

.checklist-list-heading .checklist-list-title-group h3,
.checklist-list-heading .checklist-icon-button,
.checklist-list-heading .checklist-list-progress,
.checklist-list-heading .checklist-list-actions {
  color: #fffdf8;
}

.checklist-list-heading .checklist-icon-button {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
}

.checklist-list.collapsed .checklist-list-heading {
  background: linear-gradient(120deg, #f7f2e9, #fffdf8);
}

.checklist-list.collapsed .checklist-list-title-group h3,
.checklist-list.collapsed .checklist-icon-button,
.checklist-list.collapsed .checklist-list-progress,
.checklist-list.collapsed .checklist-list-actions {
  color: #3d3028;
}

.checklist-list-body {
  padding: 14px;
  border-top: 0;
  background: #fbf8f1;
}

.checklist-groups {
  grid-template-columns: 1fr;
  gap: 12px;
}

.checklist-category {
  border: 0;
  border-radius: 12px;
  box-shadow: none;
}

.checklist-category-heading {
  border: 1px solid #e1d7ca;
  border-bottom: 0;
  border-radius: 11px 11px 0 0;
  background: #f5f1e8;
}

.checklist-task-list {
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #e1d7ca;
  border-radius: 0 0 11px 11px;
  background: #fffdf8;
}

.check-item {
  min-height: 54px;
  padding: 7px 20px;
  border: 0;
  border-bottom: 1px solid #e8dfd3;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.check-item:last-child {
  border-bottom: 0;
}

.check-item:hover {
  border-color: #e8dfd3;
  background: #f7f2e9;
  box-shadow: none;
  transform: none;
}

.check-item.complete {
  background: #edf3ed;
  box-shadow: none;
}

.check-visual {
  border-color: #b7aa99;
  border-radius: 6px;
}

.notes-panel {
  position: sticky;
  top: calc(var(--header-height) + 82px);
  min-height: 590px;
  padding: 0;
  overflow: hidden;
}

.notes-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 20px;
  border-bottom: 1px solid #d7cbbb;
  background: linear-gradient(130deg, #eef1e8, #f7f3e9);
}

.notes-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #aabbaa;
  border-radius: 12px;
  color: var(--forest);
  background: rgba(255, 253, 248, 0.7);
}

.notes-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notes-panel h2 {
  margin: 0;
  color: var(--forest);
  font-size: 1.3rem;
  font-weight: 600;
}

.notes-panel textarea {
  min-height: 465px;
  padding: 22px;
  border: 0;
  border-radius: 0;
  background: rgba(255, 253, 248, 0.94);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.96rem;
  line-height: 1.75;
  resize: vertical;
}

.notes-panel textarea:focus {
  outline: 0;
  box-shadow: inset 0 0 0 2px rgba(36, 86, 76, 0.16);
}

.notes-save-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border-top: 1px solid #e4dacd;
  color: #577263;
  background: #f4f1e8;
}

.bottom-notes {
  margin-top: 0;
}

/* Work Area and Desk Transfer continuation */
#workAreaView,
#handoverView {
  padding-top: 20px;
}

.toolbar-title-copy,
.role-overview-title-copy,
.library-heading-copy {
  display: grid;
  gap: 3px;
}

.view-description,
.transfer-summary {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.work-toolbar {
  padding: 0;
  overflow: hidden;
  border-color: #d7cbbb;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: var(--shadow);
}

.work-toolbar .toolbar-heading {
  margin: 0;
  padding: 19px 22px 16px;
  border-bottom: 1px solid #e3d8ca;
  background: linear-gradient(130deg, #eef1e8, #f8f4eb);
}

.work-toolbar .toolbar-title {
  color: #35251e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  font-weight: 600;
}

.work-toolbar .search-box {
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  margin: 16px 22px 20px;
  padding-inline: 15px;
  border-color: #d7cbbb;
  background: #fffdf8;
  box-shadow: inset 0 1px 2px rgba(62, 42, 28, 0.035);
}

.search-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--forest-2);
  stroke-width: 1.8;
  stroke-linecap: round;
  opacity: 0.78;
}

.library-heading {
  margin: 24px 4px 12px;
}

.library-title {
  color: #35251e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -0.035em;
}

.sections-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.resource-section {
  padding: 0 18px 18px;
  border-width: 1px;
  border-top-width: 4px;
  border-color: color-mix(in srgb, var(--section-color) 25%, #d8ccbd);
  border-radius: 18px;
  background: #fffdf8;
  box-shadow: 0 15px 36px color-mix(in srgb, var(--section-color) 9%, rgba(62, 42, 28, 0.08));
}

.resource-section::after {
  top: -54px;
  right: -48px;
  width: 132px;
  height: 132px;
  opacity: 0.72;
}

.resource-heading {
  grid-template-columns: 48px minmax(150px, 1fr) auto;
  gap: 12px;
  margin: 0 -18px 16px;
  padding: 16px 18px;
  border-bottom: 1px solid color-mix(in srgb, var(--section-color) 17%, #ded5c9);
  background: linear-gradient(110deg, color-mix(in srgb, var(--section-color) 9%, #fbf8f1), #fffdf8 84%);
}

.resource-heading h2 {
  color: #35251e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.16rem;
  font-weight: 600;
  line-height: 1.15;
}

.resource-heading .section-inline-actions {
  position: relative;
  z-index: 2;
  flex-wrap: nowrap;
}

.section-icon {
  width: 46px;
  height: 46px;
  border-color: rgba(255, 255, 255, 0.34);
  border-radius: 12px;
  box-shadow: 0 7px 16px color-mix(in srgb, var(--section-color) 19%, transparent);
}

.link-grid {
  gap: 9px;
}

.link-card {
  min-height: 68px;
  padding: 10px 11px;
  border-color: color-mix(in srgb, var(--section-color) 17%, #ddd4c8);
  border-left-color: color-mix(in srgb, var(--section-color) 52%, #fff);
  background: linear-gradient(110deg, #fffdf9 70%, color-mix(in srgb, var(--section-color) 4%, #fff));
  box-shadow: 0 2px 6px rgba(62, 42, 28, 0.025);
}

.link-card a,
.link-card strong {
  color: #352a24;
  font-size: 0.96rem;
}

.add-section-card,
.add-section-form {
  min-height: 164px;
  border-color: #bdae9b;
  background: rgba(255, 253, 248, 0.62);
}

.transfer-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(330px, 0.5fr);
  align-items: start;
  gap: 18px;
}

.role-overview-panel {
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-color: #d7cbbb;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: var(--shadow);
}

.role-overview-heading {
  margin: 0;
  padding: 21px 23px 18px;
  border-bottom: 1px solid #e3d8ca;
  background: linear-gradient(130deg, #eef1e8, #f8f4eb);
}

.role-overview-heading h2 {
  margin: 0;
  color: #35251e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.035em;
}

.role-overview-heading .status {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid #d3c7b8;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.72);
  color: #5f7167;
  font-weight: 700;
}

.role-prompt-bar {
  margin: 18px 22px 0;
  padding: 11px 12px;
  border-color: #d8cdbf;
  background: #f6f1e8;
}

.role-prompt-chip {
  border-color: #d4c8b9;
  background: #fffdf8;
}

.role-overview-grid {
  gap: 14px;
  margin: 14px 0 0;
  padding: 0 22px 22px;
}

.role-overview-field {
  padding: 16px;
  border-color: #e0d6ca;
  background: #fbf8f1;
}

.role-overview-field:focus-within {
  border-color: #9eb5aa;
  background: #fffdf8;
  box-shadow: 0 0 0 3px rgba(35, 105, 91, 0.08);
}

.role-overview-field strong {
  color: #382a23;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.98rem;
  font-weight: 600;
}

.role-overview-field textarea {
  min-height: 112px;
  border-color: #ddd2c5;
  border-radius: 10px;
  background: #fffdf9;
}

.ownership-boundaries-grid,
.decision-boundaries-grid {
  gap: 14px;
}

.transfer-side {
  position: sticky;
  top: calc(var(--header-height) + 82px);
  display: grid;
  gap: 14px;
}

.transfer-panel {
  display: block;
  padding: 24px;
  border-color: #d7cbbb;
  border-top: 4px solid var(--forest);
  background: rgba(255, 253, 248, 0.97);
  box-shadow: var(--shadow);
}

.transfer-panel h2 {
  margin: 3px 0 0;
  color: #35251e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.48rem;
  font-weight: 600;
  letter-spacing: -0.035em;
}

.transfer-summary {
  margin-top: 5px;
}

.handover-checklist {
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 17px;
  border-top: 1px solid #e4dacf;
}

.handover-check {
  min-height: 38px;
  padding: 7px 0;
  border-bottom: 1px solid #ece4da;
  color: #70675f;
  font-size: 0.78rem;
}

.handover-check::before {
  width: 19px;
  height: 19px;
  border-color: #c8baa9;
  background: #fffdf8;
}

.transfer-actions {
  margin-top: 20px;
  padding-top: 19px;
  border-top: 1px solid #e3d9cd;
}

.transfer-actions .primary-button,
.transfer-actions .secondary-button,
.transfer-actions .text-button {
  min-height: 44px;
}

.transfer-actions .text-button {
  width: 100%;
  justify-self: stretch;
}

.privacy-note {
  margin: 0;
  padding: 15px 17px;
  border-color: #c9d5cc;
  background: #eaf1e9;
  line-height: 1.5;
}

.app-footer {
  width: min(1500px, calc(100% - 56px));
  min-height: 0;
  justify-content: center;
  gap: 9px;
  margin-bottom: 24px;
  padding: 4px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #817b73;
}

.footer-brand,
.footer-storage-status {
  display: flex;
  align-items: center;
}

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

.footer-brand strong {
  color: #7c766e;
  font-size: 0.72rem;
  font-weight: 650;
  white-space: nowrap;
}

.footer-divider {
  color: #b9b2a9;
  font-size: 0.78rem;
}

.footer-storage-status {
  gap: 5px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #77867e;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

.footer-storage-status svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 1120px) {
  .checklist-workspace-grid {
    grid-template-columns: 1fr;
  }

  .transfer-workspace-grid {
    grid-template-columns: 1fr;
  }

  .transfer-side {
    position: static;
  }

  .notes-panel {
    position: static;
    min-height: 420px;
  }

  .notes-panel textarea {
    min-height: 300px;
  }
}

@media (max-width: 1300px) {
  .sections-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1050px) {
  .transfer-panel {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 720px) {
  :root {
    --header-height: 70px;
  }

  .app-header {
    padding: 9px 16px;
  }

  #workAreaView,
  #handoverView {
    padding-top: 14px;
  }

  .work-toolbar .toolbar-heading,
  .role-overview-heading {
    padding: 18px;
  }

  .work-toolbar .search-box {
    margin: 14px 18px 18px;
  }

  .role-prompt-bar {
    margin: 14px 16px 0;
  }

  .role-overview-grid {
    padding: 0 16px 18px;
  }

  .company-logo-crop {
    width: 132px;
    height: 54px;
  }

  .company-logo {
    width: 164px;
  }

  .brand-copy,
  .date-pill,
  .header-button {
    display: none;
  }

  .header-actions {
    gap: 7px;
  }

  .header-actions .primary-button,
  .header-actions .secondary-button {
    min-height: 40px;
    padding: 0 11px;
    font-size: 0.76rem;
  }

  main {
    width: min(100% - 22px, 1280px);
    margin-top: 0;
  }

  .app-footer {
    width: calc(100% - 22px);
    min-height: 0;
    margin-bottom: 16px;
    padding: 4px 0;
    border-radius: 0;
  }

  .footer-storage-status {
    padding: 0;
    font-size: 0.68rem;
  }

  .view-tabs {
    width: 100vw;
    max-width: none;
    gap: 6px;
    margin: 0 0 14px;
    margin-left: 50%;
    padding: 7px 8px;
    overflow: hidden;
    transform: translateX(-50%);
  }

  .view-tab {
    min-width: 0;
    flex: 1 1 0;
    justify-content: center;
    gap: 4px;
    padding: 0 4px;
    font-size: 0.73rem;
  }

  .view-tab .tab-icon {
    width: 18px;
    height: 18px;
  }

  .toolbar,
  .checklist-panel,
  .notes-panel,
  .role-overview-panel,
  .transfer-panel {
    border-radius: 14px;
  }

  .toolbar-heading,
  .section-heading,
  .library-heading {
    align-items: flex-start;
  }

  .checklist-panel .section-heading {
    display: grid;
    gap: 12px;
  }

  .checklist-heading-actions {
    width: 100%;
    justify-content: flex-start;
    gap: 7px;
  }

  .progress-dashboard {
    grid-template-columns: 1fr;
    padding: 9px;
  }

  .progress-dashboard-overall,
  .list-progress-card {
    border-right: 0;
    border-bottom: 1px solid #dfd3c2;
  }

  .list-progress-card:last-child {
    border-bottom: 0;
  }

  .progress-dashboard .progress-orb {
    width: 50px;
    height: 50px;
  }

  .progress-dashboard-overall,
  .list-progress-card {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .progress-dashboard-overall .checklist-meter,
  .list-progress-card .checklist-meter {
    grid-column: 1;
    grid-row: auto;
    min-width: 0;
    justify-content: flex-start;
  }

  .list-progress-count {
    margin-top: 0;
  }

  .toolbar-heading {
    display: grid;
  }

  .resource-heading {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .resource-heading .section-inline-actions {
    grid-column: 1 / -1;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .theme-panel {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .section-title-editor {
    grid-template-columns: 1fr;
  }

  .section-title-editor-actions {
    justify-content: flex-end;
  }

  .theme-swatches {
    flex-wrap: wrap;
  }

  .theme-custom-control {
    justify-content: space-between;
    padding: 9px 0 0;
    border-top: 1px solid color-mix(in srgb, var(--section-color) 18%, #d8dfda);
    border-left: 0;
  }

  .link-card {
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: start;
  }

  .link-icon {
    width: 34px;
    height: 34px;
  }

  .link-actions {
    grid-column: 2;
    justify-self: end;
  }

  .resource-actions-hidden .link-card {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .add-section-form {
    grid-template-columns: 1fr;
  }

  .checklist-groups,
  .sections-grid,
  .role-overview-grid,
  .ownership-boundaries-grid,
  .decision-boundaries-grid,
  .handover-checklist {
    grid-template-columns: 1fr;
  }

  .role-overview-heading {
    display: grid;
    gap: 10px;
  }

  .ownership-boundaries-grid,
  .decision-boundaries-grid,
  .role-overview-field-wide {
    grid-column: auto;
  }

  .role-prompt-bar {
    display: grid;
    gap: 8px;
  }

  .role-overview-field {
    padding: 13px;
  }

  .library-heading {
    display: grid;
    gap: 7px;
  }

  .transfer-panel {
    padding: 21px 18px;
  }

  .checklist-category-editor {
    grid-template-columns: 1fr;
  }

  .checklist-list-editor {
    grid-template-columns: 1fr;
  }

  .checklist-list-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: flex-start;
    gap: 10px;
  }

  .checklist-list-copy {
    display: grid;
    width: 100%;
    gap: 7px;
  }

  .checklist-list-title-group h3 {
    overflow: visible;
    white-space: normal;
  }

  .checklist-list-actions,
  .checklist-list-manage {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .checklist-reset-options {
    grid-template-columns: 1fr;
  }

  .checklist-list-actions {
    width: 100%;
  }

  .checklist-category-heading {
    grid-template-columns: 28px minmax(0, 1fr) auto;
  }

  .checklist-category-actions {
    grid-column: 1 / -1;
  }

  .checklist-heading-actions {
    flex-wrap: wrap;
  }

  .checklist-meter {
    margin-right: 0;
    gap: 6px;
  }

  .privacy-note {
    align-items: flex-start;
    flex-direction: column;
  }

  .confirm-dialog {
    padding: 20px;
  }

  .confirm-dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .app-header {
    gap: 7px;
    padding: 7px 10px;
  }

  .company-logo-crop {
    width: 94px;
    height: 46px;
  }

  .company-logo {
    width: 120px;
  }

  .header-actions {
    gap: 5px;
  }

  .header-actions .primary-button,
  .header-actions .secondary-button {
    min-height: 38px;
    padding: 0 7px;
    border-radius: 8px;
    font-size: 0.7rem;
  }

  .header-transfer-button {
    gap: 5px;
  }

  .header-transfer-button svg {
    width: 15px;
    height: 15px;
  }
}

@media (max-width: 390px) {
  .view-tab {
    font-size: 0.68rem;
  }

  .view-tab .tab-icon {
    width: 16px;
    height: 16px;
  }
}

@media (max-width: 340px) {
  .company-logo-crop {
    width: 82px;
    height: 44px;
  }

  .company-logo {
    width: 106px;
  }

  .header-actions .primary-button,
  .header-actions .secondary-button {
    padding-inline: 6px;
    font-size: 0.67rem;
  }

  .header-transfer-button {
    gap: 0;
  }

  .header-transfer-button svg {
    display: none;
  }

  .app-footer {
    gap: 6px;
  }

  .footer-brand strong {
    font-size: 0.68rem;
  }

  .footer-storage-status {
    padding-inline: 0;
    font-size: 0.66rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .checklist-meter.progress-updated .progress-orb,
  .confirm-dialog {
    animation: none;
  }
}

@media print {
  body {
    background: #fff;
    color: #111;
  }

  .app-header,
  .view-tabs,
  #checklistView,
  #workAreaView,
  .transfer-actions,
  .privacy-note,
  footer {
    display: none !important;
  }

  main {
    width: 100%;
    margin: 0;
  }

  #handoverView[hidden] {
    display: block;
  }

  .role-overview-panel,
  .transfer-panel {
    break-inside: avoid;
    box-shadow: none;
  }

  input,
  textarea {
    border-color: #bbb;
    background: #fff;
  }
}
