:root {
  --ink-900: #10203a;
  --ink-700: #2f486b;
  --ink-500: #4f6280;
  --cream-50: #f8f6ef;
  --cream-100: #efe9d8;
  --mint-300: #87d2b8;
  --mint-500: #2ba878;
  --amber-400: #f2ae3f;
  --coral-500: #d65a45;
  --sky-300: #a8d4ff;
  --app-bg:
    radial-gradient(circle at 9% 14%, #d9f1ff 0%, transparent 26%),
    radial-gradient(circle at 87% 11%, #ffeabf 0%, transparent 22%),
    linear-gradient(155deg, #e8f2ff 0%, #fff8ea 43%, #f2fff5 100%);
  --panel-bg: rgba(255, 255, 255, 0.86);
  --panel-edge: rgba(16, 32, 58, 0.12);
  --input-bg: rgba(255, 255, 255, 0.92);
  --input-edge: rgba(16, 32, 58, 0.2);
  --btn-primary-bg: #10203a;
  --btn-primary-fg: #fff;
  --btn-ghost-bg: rgba(16, 32, 58, 0.08);
  --btn-ghost-fg: #10203a;
  --action-orb-bg: #10203a;
  --action-orb-fg: #fff;
  --participants-nav-bg:
    linear-gradient(165deg, rgba(255, 255, 255, 0.96), rgba(242, 248, 255, 0.96));
  --participants-nav-edge: rgba(16, 32, 58, 0.16);
  --participants-nav-shadow: 0 10px 24px rgba(16, 32, 58, 0.12);
  --participants-nav-btn-bg: rgba(16, 32, 58, 0.08);
  --participants-nav-btn-fg: #10203a;
  --participants-nav-btn-edge: rgba(16, 32, 58, 0.14);
  --participants-launcher-trigger-bg: rgba(255, 255, 255, 0.92);
  --participants-launcher-trigger-edge: rgba(16, 32, 58, 0.2);
  --participants-launcher-trigger-fg: #10203a;
  --participants-launcher-menu-bg:
    linear-gradient(170deg, rgba(252, 253, 255, 0.98) 0%, rgba(242, 248, 255, 0.98) 100%);
  --participants-launcher-menu-edge: rgba(16, 32, 58, 0.18);
  --participants-launcher-menu-shadow: 0 18px 34px rgba(16, 32, 58, 0.2);
  --participants-launcher-section-bg: rgba(255, 255, 255, 0.82);
  --participants-launcher-section-edge: rgba(16, 32, 58, 0.12);
  --participants-launcher-label-fg: rgba(47, 72, 107, 0.85);
  --participants-launcher-link-fg: #10203a;
  --participants-launcher-link-hover-bg: rgba(116, 181, 255, 0.22);
  --participants-launcher-link-active-bg: rgba(116, 181, 255, 0.34);
  --participants-launcher-link-disabled-fg: rgba(79, 98, 128, 0.62);
  --participants-launcher-button-bg: rgba(116, 181, 255, 0.18);
  --participants-launcher-button-edge: rgba(16, 32, 58, 0.2);
  --participants-launcher-button-fg: #10203a;
  --drawer-field-bg: rgba(16, 32, 58, 0.04);
  --drawer-field-bg-hover: rgba(16, 32, 58, 0.08);
  --drawer-field-bg-focus: rgba(255, 255, 255, 0.96);
  --drawer-field-edge: rgba(16, 32, 58, 0.2);
  --drawer-field-edge-hover: rgba(16, 32, 58, 0.28);
  --drawer-field-edge-focus: rgba(43, 168, 120, 0.45);
  --drawer-field-fg: var(--ink-900);
  --drawer-field-placeholder: rgba(79, 98, 128, 0.85);

  /* Shared layout rhythm scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-7: 1.85rem;
  --space-8: 2.4rem;

  --layout-page-gap-default: var(--space-5);
  --layout-page-pad-top-default: 1.4rem;
  --layout-page-pad-bottom-default: var(--space-8);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  font-family: "Avenir Next", "Gill Sans", "Trebuchet MS", sans-serif;
  color: var(--ink-900);
  background: var(--app-bg);
}

h1,
h2,
h3,
h4 {
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", "Arial Narrow", sans-serif;
  letter-spacing: 0.01em;
  margin: 0;
}

p {
  margin: 0;
}

.app-auth-bar {
  max-width: 980px;
  margin: 0 auto;
  padding: 0.85rem 1rem 0;
}

.app-auth-bar--wide {
  max-width: 1600px;
}

.app-auth-bar__inner {
  background: var(--panel-bg);
  border: 1px solid var(--panel-edge);
  border-radius: 0.9rem;
  box-shadow: 0 6px 18px rgba(16, 32, 58, 0.08);
  padding: 0.56rem 0.72rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.app-auth-bar__identity {
  color: var(--ink-700);
  font-size: 0.92rem;
}

.app-auth-bar .button_to {
  margin: 0;
}

.flash-stack {
  position: relative;
  z-index: 1;
}

.flash-stack {
  display: grid;
  gap: 0.5rem;
}

.flash {
  border-radius: 0.8rem;
  padding: 0.66rem 0.85rem;
  border: 1px solid var(--panel-edge);
  background: var(--panel-bg);
}

.flash--notice {
  border-left: 4px solid var(--mint-500);
}

.flash--alert {
  border-left: 4px solid var(--coral-500);
}

.toast-stack {
  position: fixed;
  top: calc(var(--app-auth-bar-height) + 0.7rem);
  right: 1rem;
  z-index: 40;
  display: grid;
  gap: 0.5rem;
  max-width: min(27rem, calc(100vw - 2rem));
}

.toast {
  border-radius: 0.8rem;
  padding: 0.66rem 0.85rem;
  border: 1px solid var(--panel-edge);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 26px rgba(16, 32, 58, 0.14);
}

.toast--notice {
  border-left: 4px solid var(--mint-500);
}

.toast--alert {
  border-left: 4px solid var(--coral-500);
}

.workspace-panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-edge);
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 6px 20px rgba(16, 32, 58, 0.08);
  animation: panel-rise 260ms ease-out;
}

.panel-head {
  margin-bottom: 0.9rem;
  display: grid;
  gap: 0.32rem;
}

.panel-head h2 {
  font-size: 1.5rem;
}

.panel-head p {
  color: var(--ink-700);
}

.text-surface,
.text-input {
  width: 100%;
  border: 1px solid var(--input-edge);
  border-radius: 0.72rem;
  padding: 0.58rem 0.65rem;
  font: inherit;
  background: var(--input-bg);
}

.text-surface:focus,
.text-input:focus {
  outline: 2px solid rgba(43, 168, 120, 0.35);
  border-color: var(--mint-500);
}

.btn {
  border: 1px solid transparent;
  border-radius: 0.72rem;
  padding: 0.45rem 0.66rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.btn--primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
}

.btn--ghost {
  background: var(--btn-ghost-bg);
  color: var(--btn-ghost-fg);
}

.btn--danger {
  background: rgba(214, 90, 69, 0.12);
  border-color: rgba(214, 90, 69, 0.4);
  color: #8f2b1e;
}

.btn--danger-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  padding: 0;
}

.btn__icon {
  width: 1.2rem;
  height: 1.2rem;
  fill: currentColor;
}

.agenda-list {
  display: grid;
  gap: 0.6rem;
}

.agenda-item {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem;
  border: 1px solid rgba(16, 32, 58, 0.13);
  border-radius: 0.72rem;
  padding: 0.62rem;
  background: rgba(255, 255, 255, 0.92);
}

.agenda-item h3 {
  font-size: 1.03rem;
}

.agenda-item p {
  color: var(--ink-700);
}

.agenda-item--done {
  opacity: 0.67;
  background: rgba(135, 210, 184, 0.18);
}

.agenda-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

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

@media (max-width: 860px) {
  .project-gallery {
    grid-template-columns: 1fr;
  }
}

.project-spotlight-card {
  position: relative;
  min-height: 360px;
  border-radius: 1.12rem;
  overflow: hidden;
  border: 1px solid rgba(16, 32, 58, 0.2);
  box-shadow: 0 16px 30px rgba(16, 32, 58, 0.2);
}

.project-spotlight-card--link {
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.project-spotlight-card--link:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 36px rgba(16, 32, 58, 0.24);
}

.project-spotlight-card--link:focus-visible {
  outline: 2px solid rgba(116, 181, 255, 0.8);
  outline-offset: 3px;
}

.project-spotlight-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-spotlight-card__overlay {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: end;
  gap: 0.72rem;
  padding: 1rem;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(9, 18, 28, 0.1) 38%, rgba(8, 16, 24, 0.86) 100%);
}

.project-spotlight-card__overlay h3 {
  font-size: clamp(1.45rem, 3vw, 1.75rem);
}

.project-spotlight-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.project-spotlight-card__meta span {
  border-radius: 999px;
  padding: 0.27rem 0.56rem;
  font-size: 0.82rem;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.project-spotlight-card__actions {
  display: flex;
}

.project-spotlight-card__actions .btn {
  background: #fff;
  color: #10203a;
  border-color: rgba(16, 32, 58, 0.22);
}

turbo-frame#projects_drawer:empty {
  display: none;
}

turbo-frame#project_drawer:empty {
  display: none;
}

.concept-page,
.concept-public,
.concept-print {
  max-width: 980px;
  margin: 0 auto;
  padding:
    var(--layout-page-pad-top, var(--layout-page-pad-top-default))
    1rem
    var(--layout-page-pad-bottom, var(--layout-page-pad-bottom-default));
  display: grid;
  gap: var(--layout-page-gap, var(--layout-page-gap-default));
}

.concept-page--wide {
  max-width: 1600px;
}

.concept-hero,
.concept-panel,
.concept-public-header,
.concept-block {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(16, 32, 58, 0.14);
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 8px 20px rgba(16, 32, 58, 0.08);
}

.concept-kicker {
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--ink-700);
}

.concept-hero h1,
.concept-public-header h1 {
  margin-top: 0.4rem;
  font-size: clamp(1.65rem, 2.5vw, 2.2rem);
}

.concept-hero--plain {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.concept-hero--plain h1 {
  margin-top: 0;
}

.concept-panel--plain {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.concept-hero p,
.concept-public-header p {
  margin-top: 0.5rem;
  color: var(--ink-700);
}

.project-hero-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.concept-meta {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.concept-meta span {
  background: rgba(16, 32, 58, 0.08);
  border-radius: 999px;
  padding: 0.35rem 0.56rem;
  font-size: 0.8rem;
}

.concept-panel-head {
  margin-bottom: 0.7rem;
}

.concept-panel-head p {
  margin-top: 0.4rem;
  color: var(--ink-700);
}

.concept-form {
  display: grid;
  gap: 0.65rem;
}

.concept-form label {
  display: grid;
  gap: 0.24rem;
  font-size: 0.92rem;
  color: var(--ink-700);
}

.concept-actions,
.concept-share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.settings-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.settings-nav__link {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(16, 32, 58, 0.2);
  text-decoration: none;
  color: var(--ink-800);
  background: rgba(255, 255, 255, 0.78);
}

.settings-nav__link--active {
  background: rgba(16, 32, 58, 0.1);
  border-color: rgba(16, 32, 58, 0.32);
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.settings-row--start {
  align-items: flex-start;
}

.settings-row__value {
  color: var(--ink-800);
}

.settings-row__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.settings-row__actions form {
  margin: 0;
}

.onboarding-steps {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.35rem;
  color: var(--ink-800);
}

.project-edit-hero {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(245, 251, 255, 0.9));
}

.project-edit-panel {
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.94), rgba(255, 252, 240, 0.9));
}

.project-sheet {
  display: grid;
  gap: var(--space-4);
}

.project-sheet__top {
  display: flex;
  justify-content: flex-start;
}

.concept-sheet__topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.concept-sheet__topbar--actions {
  justify-content: flex-end;
}

.concept-sheet__orb-dock {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.action-orb__form {
  margin: 0;
}

.action-orb {
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 999px;
  border: 1px solid rgba(16, 32, 58, 0.24);
  background: var(--action-orb-bg);
  color: var(--action-orb-fg);
  display: grid;
  place-items: center;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(16, 32, 58, 0.2);
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.action-orb:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 10px 18px rgba(16, 32, 58, 0.24);
}

.action-orb:focus-visible {
  outline: 2px solid rgba(43, 168, 120, 0.45);
  outline-offset: 2px;
}

.action-orb--accent {
  background: #1f9a6e;
}

.action-orb__icon {
  width: 1.35rem;
  height: 1.35rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.action-orb__icon--solid {
  stroke: none;
  fill: currentColor;
}

.project-sheet__paper {
  border: 1px solid rgba(16, 32, 58, 0.16);
  border-radius: 0.85rem;
  padding: 0.95rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 249, 244, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 5px 14px rgba(16, 32, 58, 0.08);
  display: grid;
  gap: 0;
}

.paper-field {
  display: grid;
  grid-template-columns: minmax(150px, 220px) 1fr;
  align-items: center;
  gap: 0.7rem;
  padding: 0.28rem 0;
  border-bottom: 1px dashed rgba(16, 32, 58, 0.12);
}

.paper-field__label {
  margin: 0;
  font-size: 0.77rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(16, 32, 58, 0.62);
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
}

.paper-field__value,
.paper-field__input {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 0.6rem;
  background: rgba(16, 32, 58, 0.04);
  color: var(--ink-900);
  padding: 0.58rem 0.66rem;
  font: inherit;
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color 120ms ease, background-color 120ms ease;
}

.paper-field__value {
  margin: 0;
}

.paper-field--title {
  align-items: start;
}

.paper-field--stacked {
  align-items: start;
  padding-top: 0.62rem;
  padding-bottom: 0.62rem;
}

.paper-field--stacked .paper-field__input--multiline {
  margin: 0;
  display: block;
}

.paper-field__input:hover {
  background: rgba(16, 32, 58, 0.08);
  border-color: rgba(16, 32, 58, 0.15);
}

.paper-field__input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(43, 168, 120, 0.45);
  box-shadow: 0 0 0 2px rgba(43, 168, 120, 0.16);
}

.paper-field__input--title {
  font-size: 1.12rem;
  font-weight: 700;
}

.paper-field__input--date {
  max-width: 16rem;
}

.paper-field__input--multiline {
  min-height: 3.6rem;
  resize: none;
  overflow: hidden;
  scrollbar-width: none;
  border-radius: 0.45rem;
  line-height: 1.45;
}

.paper-field__input--multiline::-webkit-scrollbar {
  display: none;
}

.position-picker {
  margin: 0;
  padding: 0;
  border: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.position-picker__option {
  position: relative;
  display: inline-flex;
}

.position-picker__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.position-picker__chip {
  border-radius: 999px;
  border: 1px solid rgba(16, 32, 58, 0.22);
  background: rgba(16, 32, 58, 0.06);
  color: var(--ink-900);
  min-width: 2.15rem;
  padding: 0.28rem 0.66rem;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 120ms ease, background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.position-picker__chip:hover {
  transform: translateY(-1px);
  background: rgba(16, 32, 58, 0.1);
}

.position-picker__input:checked + .position-picker__chip {
  border-color: rgba(16, 32, 58, 0.8);
  background: var(--ink-900);
  color: #fff;
}

.position-picker__input:focus-visible + .position-picker__chip {
  outline: 2px solid rgba(43, 168, 120, 0.45);
  outline-offset: 2px;
}

.project-sheet__actions {
  align-items: center;
}

.project-sheet__paper .paper-field:last-child {
  border-bottom: none;
}

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

.help-hint {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.help-hint__trigger {
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  border: 1px solid rgba(16, 32, 58, 0.26);
  background: rgba(16, 32, 58, 0.08);
  color: rgba(16, 32, 58, 0.9);
  font-size: 0.66rem;
  font-weight: 700;
  padding: 0;
  cursor: help;
  line-height: 1;
}

.help-hint__trigger:focus-visible {
  outline: 2px solid rgba(43, 168, 120, 0.35);
  outline-offset: 1px;
}

.help-hint__bubble {
  position: absolute;
  left: 1.25rem;
  top: -0.15rem;
  width: min(20rem, 70vw);
  border: 1px solid rgba(16, 32, 58, 0.22);
  border-radius: 0.65rem;
  background: rgba(16, 32, 58, 0.92);
  color: #fff;
  padding: 0.46rem 0.55rem;
  font-size: 0.76rem;
  line-height: 1.36;
  text-transform: none;
  letter-spacing: normal;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 120ms ease, transform 120ms ease;
  z-index: 8;
}

.help-hint:hover .help-hint__bubble,
.help-hint__trigger:focus + .help-hint__bubble,
.help-hint__trigger:focus-visible + .help-hint__bubble {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 760px) {
  .paper-field {
    grid-template-columns: 1fr;
    gap: 0.36rem;
  }

  .planning-head__top {
    align-items: stretch;
  }

  .planning-drawer__panel {
    width: 100%;
  }

  .concept-sheet__topbar {
    align-items: stretch;
  }

  .concept-sheet__orb-dock {
    width: 100%;
    justify-content: flex-start;
  }

  .action-orb {
    width: 2.9rem;
    height: 2.9rem;
  }

  .help-hint__bubble {
    left: 0;
    top: 1.25rem;
  }

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

  .architecture-connection-columns {
    grid-template-columns: 1fr;
  }

  .architecture-graph {
    min-height: 520px;
  }
}

.tool-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.workspace-page {
  --layout-page-gap: var(--space-7);
}

.workspace-head {
  display: grid;
  gap: var(--space-3);
}

.workspace-meta-row {
  display: flex;
  align-items: center;
  gap: 0.5rem 0.7rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 0.05rem;
  scrollbar-width: thin;
}

.workspace-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  flex: 0 0 auto;
}

.workspace-meta__label {
  font-size: 0.77rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(16, 32, 58, 0.62);
}

.workspace-chip {
  border-radius: 999px;
  background: rgba(16, 32, 58, 0.08);
  padding: 0.28rem 0.54rem;
  font-size: 0.9rem;
  color: var(--ink-900);
}

.signal-inline-review {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--ink-900);
  display: inline-grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
}

.signal-inline-review__icon {
  width: 1.15rem;
  height: 1.15rem;
  fill: currentColor;
}

.workspace-signal-summary {
  border-left: 3px solid rgba(16, 32, 58, 0.26);
  padding-left: 0.7rem;
  color: var(--ink-700);
}

.workspace-tools {
  display: grid;
  gap: var(--space-4);
}

.workspace-tools__head p {
  margin-top: var(--space-1);
  color: var(--ink-700);
}

.planning-page {
  --layout-page-gap: var(--space-6);
}

.planning-head {
  display: grid;
  gap: var(--space-3);
}

.planning-head__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.planning-head__meta {
  padding-bottom: 0;
}

.planning-intake,
.planning-canvas {
  display: grid;
  gap: var(--space-3);
}

.planning-section-head p {
  margin-top: var(--space-1);
  color: var(--ink-700);
}

.architecture-page {
  --layout-page-gap: var(--space-6);
}

.architecture-view-switch {
  display: flex;
  justify-content: flex-end;
}

.architecture-view-switch__tabs {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  border: 1px solid rgba(16, 32, 58, 0.18);
  border-radius: 999px;
  padding: 0.16rem;
  background: rgba(255, 255, 255, 0.76);
}

.architecture-view-switch__tab {
  border: none;
  background: transparent;
  color: rgba(16, 32, 58, 0.72);
  border-radius: 999px;
  padding: 0.24rem 0.78rem;
  font: inherit;
  font-size: 0.88rem;
  line-height: 1.3;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
}

.architecture-view-switch__tab:hover {
  color: var(--ink-900);
}

.architecture-view-switch__tab.is-active {
  background: #10203a;
  color: #fff;
}

.architecture-view-switch__tab:focus-visible {
  outline: 2px solid rgba(43, 168, 120, 0.45);
  outline-offset: 2px;
}

.architecture-canvas {
  display: grid;
  gap: var(--space-3);
}

.architecture-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.architecture-legend__chip {
  border-radius: 999px;
  padding: 0.22rem 0.56rem;
  font-size: 0.76rem;
  font-weight: 700;
  border: 1px solid rgba(16, 32, 58, 0.18);
}

.architecture-legend__chip--input {
  background: #ecf4ff;
  border-color: #3f78c2;
}

.architecture-legend__chip--need {
  background: #ecf9ff;
  border-color: #2e9ab8;
}

.architecture-legend__chip--objective {
  background: #ecfff7;
  border-color: #2b9d6b;
}

.architecture-legend__chip--activity {
  background: #fff8ea;
  border-color: #c28a21;
}

.architecture-legend__chip--output {
  background: #fff2ec;
  border-color: #c66a47;
}

.architecture-legend__chip--outcome {
  background: #ffeef7;
  border-color: #b24f86;
}

.architecture-legend__chip--impact {
  background: #f4efff;
  border-color: #6844b5;
}

.architecture-graph-shell {
  border: 1px solid rgba(16, 32, 58, 0.16);
  border-radius: 0.9rem;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 248, 244, 0.95));
  box-shadow: 0 8px 20px rgba(16, 32, 58, 0.1);
}

.architecture-graph {
  min-height: 620px;
  width: 100%;
  position: relative;
  background:
    linear-gradient(
      to bottom,
      rgba(63, 120, 194, 0.06) 0%,
      rgba(63, 120, 194, 0.06) 14.2%,
      rgba(46, 154, 184, 0.06) 14.2%,
      rgba(46, 154, 184, 0.06) 28.5%,
      rgba(43, 157, 107, 0.06) 28.5%,
      rgba(43, 157, 107, 0.06) 42.8%,
      rgba(194, 138, 33, 0.06) 42.8%,
      rgba(194, 138, 33, 0.06) 57.1%,
      rgba(198, 106, 71, 0.06) 57.1%,
      rgba(198, 106, 71, 0.06) 71.4%,
      rgba(178, 79, 134, 0.06) 71.4%,
      rgba(178, 79, 134, 0.06) 85.7%,
      rgba(104, 68, 181, 0.07) 85.7%,
      rgba(104, 68, 181, 0.07) 100%
    ),
    repeating-linear-gradient(
      to right,
      rgba(16, 32, 58, 0.055) 0 1px,
      transparent 1px 56px
    ),
    repeating-linear-gradient(
      to bottom,
      rgba(16, 32, 58, 0.055) 0 1px,
      transparent 1px 42px
    );
}

.architecture-node-actions {
  position: absolute;
  display: none;
  align-items: center;
  gap: 0.45rem;
  z-index: 12;
}

.architecture-node-actions.is-visible {
  display: flex;
}

.architecture-node-action {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  border: 1px solid rgba(16, 32, 58, 0.22);
  background: #10203a;
  color: #fff;
  display: grid;
  place-items: center;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(16, 32, 58, 0.22);
  transition: transform 120ms ease, filter 120ms ease, box-shadow 120ms ease;
}

.architecture-node-action:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 10px 20px rgba(16, 32, 58, 0.26);
}

.architecture-node-action:focus-visible {
  outline: 2px solid rgba(43, 168, 120, 0.45);
  outline-offset: 2px;
}

.architecture-node-action svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: currentColor;
}

.architecture-node-action.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.architecture-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.architecture-canvas[hidden],
.architecture-grid[hidden] {
  display: none !important;
}

.architecture-node-form {
  display: grid;
  gap: 0;
}

.architecture-node-lists {
  display: grid;
  gap: 0;
}

.architecture-node-lane__empty {
  color: var(--ink-700);
  font-size: 0.88rem;
  margin: 0.2rem 0 0.4rem 1.65rem;
}

.architecture-node-group {
  border-top: 1px solid rgba(16, 32, 58, 0.12);
  padding: 0.2rem 0;
}

.architecture-node-group:first-child {
  border-top: none;
}

.architecture-node-group__summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
  padding: 0.38rem 0.12rem;
  color: var(--ink-900);
  font-size: 1rem;
}

.architecture-node-group__summary::-webkit-details-marker {
  display: none;
}

.architecture-node-group__summary::before {
  content: "▸";
  margin-right: 0.38rem;
  color: rgba(16, 32, 58, 0.65);
  transition: transform 120ms ease;
}

.architecture-node-group[open] .architecture-node-group__summary::before {
  transform: rotate(90deg);
}

.architecture-node-group__count {
  margin-left: auto;
  color: rgba(16, 32, 58, 0.62);
  font-size: 0.86rem;
}

.architecture-task-list {
  list-style: none;
  margin: 0;
  padding: 0 0 0.25rem;
}

.architecture-task-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  padding: 0.2rem 0.12rem 0.2rem 0.52rem;
  border-radius: 0.45rem;
  transition: background-color 120ms ease, opacity 120ms ease;
}

.architecture-task-row:hover,
.architecture-task-row:focus-within {
  background: rgba(16, 32, 58, 0.055);
}

.architecture-task-row--active {
  background: rgba(16, 32, 58, 0.085);
}

.architecture-task-row--dragging {
  opacity: 0.56;
}

.architecture-task-row__handle {
  width: 1.35rem;
  height: 1.35rem;
  flex: 0 0 auto;
  border: none;
  background: transparent;
  border-radius: 0;
  color: rgba(16, 32, 58, 0.48);
  display: inline-grid;
  place-items: center;
  padding: 0;
  cursor: grab;
  transition: color 120ms ease;
}

.architecture-task-row__handle:hover {
  color: rgba(16, 32, 58, 0.78);
}

.architecture-task-row__handle:active {
  cursor: grabbing;
}

.architecture-task-row__handle:focus-visible {
  outline: 2px solid rgba(43, 168, 120, 0.45);
  outline-offset: 2px;
  border-radius: 0.2rem;
}

.architecture-task-row__handle-icon {
  width: 0.96rem;
  height: 0.96rem;
  stroke: currentColor;
  fill: none;
}

.architecture-task-row__title {
  color: var(--ink-900);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.35;
}

.architecture-task-row__title:hover {
  text-decoration: underline;
}

.architecture-task-row__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  opacity: 0.45;
  transition: opacity 120ms ease;
}

.architecture-task-row:hover .architecture-task-row__actions,
.architecture-task-row:focus-within .architecture-task-row__actions {
  opacity: 1;
}

.architecture-task-row__action {
  color: rgba(16, 32, 58, 0.78);
  text-decoration: none;
  font-size: 0.85rem;
  line-height: 1;
  border-radius: 0.4rem;
  padding: 0.2rem 0.38rem;
}

.architecture-task-row__action:hover {
  background: rgba(16, 32, 58, 0.1);
  color: var(--ink-900);
}

.architecture-quick-add {
  margin: 0.18rem 0 0.45rem 2.65rem;
  display: flex;
  align-items: center;
  gap: 0.38rem;
}

.architecture-quick-add__input {
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid rgba(16, 32, 58, 0.15);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  padding: 0.24rem 0.62rem;
  font: inherit;
  font-size: 0.9rem;
  color: var(--ink-900);
}

.architecture-quick-add__input::placeholder {
  color: rgba(16, 32, 58, 0.55);
}

.architecture-quick-add__input:focus {
  outline: none;
  border-color: rgba(16, 32, 58, 0.33);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 2px rgba(16, 32, 58, 0.1);
}

.architecture-quick-add__submit {
  border: 1px solid rgba(16, 32, 58, 0.2);
  border-radius: 999px;
  background: rgba(16, 32, 58, 0.06);
  color: var(--ink-900);
  font: inherit;
  font-size: 0.84rem;
  padding: 0.22rem 0.52rem;
  cursor: pointer;
}

.architecture-quick-add__submit:hover {
  background: rgba(16, 32, 58, 0.12);
}

.architecture-quick-add__error {
  margin: 0 0 0.45rem 2.65rem;
  color: #922f22;
  font-size: 0.84rem;
}

.architecture-inspector-card {
  display: grid;
  gap: 0;
}

.architecture-inline-form {
  display: grid;
  gap: 0;
}

.architecture-connection-list {
  display: grid;
  gap: 0.8rem;
}

.architecture-connection-columns {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.architecture-connection-columns > div {
  border: 1px solid rgba(16, 32, 58, 0.14);
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.92);
  padding: 0.55rem;
  display: grid;
  gap: 0.45rem;
}

.architecture-connection-columns h3 {
  font-size: 1.03rem;
}

.architecture-connection-columns ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.architecture-connection-columns li {
  display: flex;
  justify-content: space-between;
  gap: 0.55rem;
  align-items: center;
  border: 1px dashed rgba(16, 32, 58, 0.16);
  border-radius: 0.56rem;
  padding: 0.36rem 0.42rem;
}

turbo-frame#planning_drawer:empty {
  display: none;
}

turbo-frame#architecture_drawer:empty {
  display: none;
}

.planning-drawer {
  position: fixed;
  inset: 0;
  pointer-events: auto;
  z-index: 40;
}

.planning-drawer__scrim {
  position: absolute;
  inset: 0;
  background: rgba(16, 32, 58, 0.26);
  opacity: 1;
  transition: opacity 140ms ease;
}

.planning-drawer__panel {
  position: absolute;
  right: 0;
  top: 0;
  width: min(31rem, 100vw);
  height: 100%;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(255, 253, 247, 0.98));
  border-left: 1px solid rgba(16, 32, 58, 0.18);
  box-shadow: -10px 0 28px rgba(16, 32, 58, 0.2);
  transform: translateX(0);
  transition: transform 180ms ease;
  padding: var(--space-5) var(--space-4) var(--space-4);
  display: grid;
  align-content: start;
  gap: var(--space-4);
  overflow-y: auto;
}

.planning-drawer__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.planning-drawer__head h2 {
  margin-top: var(--space-1);
  font-size: 1.55rem;
}

.planning-form--drawer {
  gap: var(--space-3);
}

.planning-form--drawer .paper-field {
  grid-template-columns: 1fr;
  align-items: start;
  gap: 0.42rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.planning-form--drawer .paper-field__label {
  font-size: 0.73rem;
}

.planning-form__paper--plain {
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.planning-form__paper--plain .paper-field {
  border-bottom-color: rgba(16, 32, 58, 0.14);
}

.planning-drawer__panel .paper-field__input,
.planning-drawer__panel .paper-field__value,
.planning-drawer__panel .text-input,
.planning-drawer__panel .text-surface {
  background: var(--drawer-field-bg);
  border-color: var(--drawer-field-edge);
  color: var(--drawer-field-fg);
}

.planning-drawer__panel .paper-field__input::placeholder,
.planning-drawer__panel .text-input::placeholder,
.planning-drawer__panel .text-surface::placeholder {
  color: var(--drawer-field-placeholder);
}

.planning-drawer__panel .paper-field__input:hover,
.planning-drawer__panel .text-input:hover,
.planning-drawer__panel .text-surface:hover {
  background: var(--drawer-field-bg-hover);
  border-color: var(--drawer-field-edge-hover);
}

.planning-drawer__panel .paper-field__input:focus,
.planning-drawer__panel .text-input:focus,
.planning-drawer__panel .text-surface:focus {
  background: var(--drawer-field-bg-focus);
  border-color: var(--drawer-field-edge-focus);
}

.paper-field__hint {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-700);
}

.tool-card {
  border: 1px solid rgba(16, 32, 58, 0.14);
  border-radius: 0.9rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.94);
  display: grid;
  gap: 0.5rem;
  position: relative;
}

.tool-card h3 {
  font-size: 1.28rem;
  color: var(--ink-900);
  padding-right: 5.6rem;
}

.tool-card p {
  color: var(--ink-700);
}

.tool-card--link {
  text-decoration: none;
  color: inherit;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.tool-card--link:link,
.tool-card--link:visited,
.tool-card--link:hover,
.tool-card--link:active {
  color: inherit;
}

.tool-card--link:hover {
  transform: translateY(-2px);
  border-color: rgba(16, 32, 58, 0.24);
  box-shadow: 0 8px 20px rgba(16, 32, 58, 0.12);
}

.tool-card--link:focus-visible {
  outline: 2px solid rgba(16, 32, 58, 0.35);
  outline-offset: 2px;
}

.tool-card__signal {
  position: absolute;
  top: 0.62rem;
  right: 0.62rem;
  padding: 0.18rem 0.45rem;
  font-size: 0.73rem;
  line-height: 1.2;
}

.tool-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tool-card__meta span {
  border-radius: 999px;
  background: rgba(16, 32, 58, 0.08);
  padding: 0.32rem 0.52rem;
  font-size: 0.82rem;
}

.tool-counter {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.tool-counter--icon-only {
  gap: 0.28rem;
  min-width: 2.6rem;
  justify-content: center;
}

.tool-counter--wide {
  align-items: flex-start;
}

.tool-counter__icon {
  width: 0.95rem;
  height: 0.95rem;
  fill: currentColor;
  flex: 0 0 auto;
}

.tool-counter strong {
  white-space: nowrap;
}

.tool-card__meta--counters {
  margin-top: auto;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.42rem;
}

.tool-card__meta--counters .tool-counter {
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
}

.tool-card__meta--counters .tool-counter--signal {
  border-color: rgba(16, 32, 58, 0.24);
  border-radius: 999px;
  padding: 0.28rem 0.54rem;
}

.signal-inbox {
  display: grid;
  gap: 0.7rem;
}

.signal-inbox__head p {
  margin-top: 0.25rem;
  color: var(--ink-700);
}

.signal-inbox__item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
}

.signal-inbox__actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.signal-summary {
  border: 1px solid rgba(16, 32, 58, 0.14);
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.7rem 0.85rem;
}

.signal-pill {
  border: 1px solid transparent;
  font-weight: 700;
}

.tool-card__signal.signal-pill {
  color: #fff;
  border-color: transparent;
}

.tool-card__signal.signal-pill--ready {
  background: #1f9a6e;
}

.tool-card__signal.signal-pill--needs-review {
  background: #c47d10;
}

.tool-card__signal.signal-pill--stale {
  background: #b53b2a;
}

.signal-pill--ready {
  background: rgba(43, 168, 120, 0.14);
  border-color: rgba(43, 168, 120, 0.35);
  color: #1b6f4f;
}

.signal-pill--needs-review {
  background: rgba(242, 174, 63, 0.2);
  border-color: rgba(242, 174, 63, 0.4);
  color: #815611;
}

.signal-pill--stale {
  background: rgba(214, 90, 69, 0.18);
  border-color: rgba(214, 90, 69, 0.45);
  color: #822619;
}

.tool-card--coming {
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.95), rgba(242, 255, 247, 0.95));
}

.tool-divider {
  margin: 0.4rem 0;
  border: none;
  border-top: 1px dashed rgba(16, 32, 58, 0.18);
}

.network-list {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 0.75rem;
}

.network-item {
  border: 1px solid rgba(16, 32, 58, 0.14);
  border-radius: 0.75rem;
  padding: 0.6rem;
  background: rgba(255, 255, 255, 0.92);
}

.network-item h3 {
  font-size: 1.03rem;
  margin-bottom: 0.15rem;
}

.network-item p {
  color: var(--ink-700);
}

.inline-grid {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.planning-board {
  display: grid;
  gap: var(--space-5);
}

.planning-row {
  position: relative;
  border: none;
  border-radius: 0;
  padding: var(--space-3) 0 var(--space-4);
  background:
    repeating-linear-gradient(
      to right,
      rgba(16, 32, 58, 0.055) 0 1px,
      transparent 1px 54px
    ),
    repeating-linear-gradient(
      to bottom,
      rgba(16, 32, 58, 0.055) 0 1px,
      transparent 1px 34px
    );
  display: grid;
  gap: var(--space-3);
}

.planning-row::before,
.planning-row::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
}

.planning-row::before {
  top: 0;
  border-top: 1px solid rgba(16, 32, 58, 0.24);
}

.planning-row::after {
  bottom: 0;
  border-top: 1px dashed rgba(16, 32, 58, 0.2);
}

.planning-row > * {
  position: relative;
  z-index: 1;
}

.planning-row--dragging {
  opacity: 0.56;
}

.planning-row__handle {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  border: 1px solid rgba(16, 32, 58, 0.24);
  background: rgba(16, 32, 58, 0.1);
  color: #1d3856;
  display: grid;
  place-items: center;
  padding: 0;
  box-shadow: 0 8px 18px rgba(16, 32, 58, 0.2);
  line-height: 1;
  cursor: grab;
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.planning-row__handle:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 10px 18px rgba(16, 32, 58, 0.24);
}

.planning-row__handle:active {
  cursor: grabbing;
  transform: translateY(0);
}

.planning-row__handle:focus-visible {
  outline: 2px solid rgba(43, 168, 120, 0.45);
  outline-offset: 2px;
}

.planning-row__handle-icon {
  width: 0.62rem;
  height: 0.82rem;
  fill: currentColor;
}

.planning-row__content {
  min-width: 0;
  display: grid;
  gap: var(--space-3);
}

.planning-row__headline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.planning-row__number {
  border-radius: 999px;
  border: 1px solid rgba(16, 32, 58, 0.2);
  background: rgba(16, 32, 58, 0.09);
  padding: 0.12rem 0.46rem;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(16, 32, 58, 0.75);
}

.planning-row__head h3 {
  font-size: 1.2rem;
}

.planning-row__head p {
  margin-top: 0.25rem;
  color: var(--ink-700);
}

.planning-cards {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: thin;
}

.planning-card {
  flex: 0 0 290px;
  border: 1px solid rgba(16, 32, 58, 0.14);
  border-radius: 0.78rem;
  background: rgba(255, 255, 255, 0.96);
  padding: 0.65rem;
  display: grid;
  gap: 0.5rem;
}

.planning-card--link {
  text-decoration: none;
  color: inherit;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.planning-card--link:hover {
  transform: translateY(-2px);
  border-color: rgba(16, 32, 58, 0.24);
  box-shadow: 0 8px 20px rgba(16, 32, 58, 0.12);
}

.planning-card--link:focus-visible {
  outline: 2px solid rgba(16, 32, 58, 0.35);
  outline-offset: 2px;
}

.planning-card--new {
  border-style: dashed;
  background: linear-gradient(135deg, rgba(244, 250, 255, 0.9), rgba(240, 255, 246, 0.95));
}

.planning-card__add-link {
  min-height: 154px;
  display: grid;
  place-items: center;
  gap: 0.25rem;
  color: var(--ink-700);
  text-align: center;
  text-decoration: none;
}

.planning-card__add-link strong {
  color: var(--ink-900);
}

.planning-card__add-link span:last-child {
  font-size: 0.82rem;
}

.partners-page {
  --layout-page-gap: var(--space-6);
}

.partners-page--flat {
  --layout-page-gap: var(--space-7);
}

.participants-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-3);
  padding: 0.15rem 0;
}

.participants-nav__left {
  justify-self: start;
}

.participants-nav__center {
  justify-self: center;
}

.participants-nav__right {
  justify-self: end;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.participants-nav .btn {
  border-color: var(--participants-nav-btn-edge);
  color: var(--participants-nav-btn-fg);
  background: var(--participants-nav-btn-bg);
}

.participants-nav .btn--primary {
  background: var(--btn-primary-bg);
  border-color: var(--participants-nav-btn-edge);
  color: var(--btn-primary-fg);
}

.participants-launcher {
  position: relative;
}

.participants-launcher summary {
  list-style: none;
}

.participants-launcher summary::-webkit-details-marker {
  display: none;
}

.participants-launcher__trigger {
  min-width: 12.2rem;
  border: 1px solid var(--participants-launcher-trigger-edge);
  border-radius: 999px;
  padding: 0.56rem 2.15rem;
  background: var(--participants-launcher-trigger-bg);
  color: var(--participants-launcher-trigger-fg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-weight: 700;
  position: relative;
}

.participants-launcher[open] .participants-launcher__trigger {
  border-color: var(--participants-launcher-trigger-edge);
  box-shadow: 0 0 0 2px rgba(116, 181, 255, 0.2);
}

.participants-launcher__brand {
  font-size: 1.03rem;
  text-align: center;
}

.participants-launcher__signal-badge {
  position: absolute;
  left: 0.86rem;
  height: 1.35rem;
  border-radius: 999px;
  border: 1px solid rgba(214, 90, 69, 0.55);
  background: rgba(214, 90, 69, 0.16);
  color: #a73424;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.1rem 0.32rem;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
}

.participants-launcher__signal-icon {
  width: 0.72rem;
  height: 0.72rem;
  fill: currentColor;
}

.participants-launcher__caret {
  color: var(--participants-launcher-trigger-fg);
  position: absolute;
  right: 0.86rem;
}

.participants-launcher__menu {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: calc(100% + 0.5rem);
  min-width: 22rem;
  max-width: min(30rem, 90vw);
  border-radius: 0.95rem;
  border: 1px solid var(--participants-launcher-menu-edge);
  background: var(--participants-launcher-menu-bg);
  box-shadow: var(--participants-launcher-menu-shadow);
  padding: 0.76rem;
  display: grid;
  gap: 0.6rem;
  z-index: 30;
}

.participants-launcher__section {
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 0.3rem 0.1rem;
  display: grid;
  gap: 0.35rem;
}

.participants-launcher__label {
  color: var(--participants-launcher-label-fg);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.participants-launcher__link {
  color: var(--participants-launcher-link-fg);
  text-decoration: none;
  border-radius: 0.56rem;
  padding: 0.33rem 0.45rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.participants-launcher__link:hover {
  background: var(--participants-launcher-link-hover-bg);
}

.participants-launcher__link--active {
  background: var(--participants-launcher-link-active-bg);
}

.participants-launcher__link--disabled {
  color: var(--participants-launcher-link-disabled-fg);
  cursor: not-allowed;
}

.participants-launcher__button {
  border: none;
  border-radius: 0.4rem;
  background: transparent;
  color: var(--participants-launcher-button-fg);
  padding: 0.35rem 0.45rem;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.participants-launcher__button:hover {
  background: var(--participants-launcher-link-hover-bg);
}

.participants-launcher__footnote {
  margin: 0.1rem 0 0.05rem;
  text-align: center;
  font-size: 0.76rem;
  color: var(--participants-launcher-label-fg);
}

.participants-launcher__signal-count {
  border-radius: 999px;
  border: 1px solid rgba(214, 90, 69, 0.52);
  background: rgba(214, 90, 69, 0.14);
  color: #a73424;
  font-size: 0.73rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.2rem 0.42rem;
}

.global-note-fab {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 28;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  border: 1px solid var(--participants-nav-btn-edge);
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  padding: 0.62rem 0.9rem;
  box-shadow: 0 10px 24px rgba(16, 32, 58, 0.25);
  transition: filter 120ms ease, transform 120ms ease;
}

.global-note-fab__icon {
  width: 1rem;
  height: 1rem;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}

.global-note-fab:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.global-note-fab:focus-visible {
  outline: 2px solid rgba(116, 181, 255, 0.6);
  outline-offset: 2px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --app-bg:
      radial-gradient(circle at 14% 14%, #1f2d46 0%, transparent 32%),
      radial-gradient(circle at 88% 8%, #33273d 0%, transparent 28%),
      linear-gradient(165deg, #0b1322 0%, #101b2f 55%, #0f2134 100%);
    --ink-900: #ecf3ff;
    --ink-700: #c0d0e6;
    --ink-500: #9fb3cf;
    --panel-bg: rgba(11, 22, 37, 0.86);
    --panel-edge: rgba(140, 174, 219, 0.25);
    --input-bg: rgba(8, 22, 39, 0.9);
    --input-edge: rgba(140, 174, 219, 0.32);
    --btn-primary-bg: #74b5ff;
    --btn-primary-fg: #0b1f37;
    --btn-ghost-bg: rgba(116, 181, 255, 0.2);
    --btn-ghost-fg: #ecf3ff;
    --action-orb-bg: #74b5ff;
    --action-orb-fg: #0b1f37;
    --participants-nav-bg:
      linear-gradient(160deg, #061a2d 0%, #0d2440 58%, #12345b 100%);
    --participants-nav-edge: rgba(97, 158, 255, 0.34);
    --participants-nav-shadow: 0 12px 26px rgba(4, 18, 34, 0.32);
    --participants-nav-btn-bg: rgba(8, 33, 57, 0.56);
    --participants-nav-btn-fg: #ecf4ff;
    --participants-nav-btn-edge: rgba(142, 198, 255, 0.35);
    --participants-launcher-trigger-bg: rgba(7, 30, 51, 0.7);
    --participants-launcher-trigger-edge: rgba(143, 201, 255, 0.36);
    --participants-launcher-trigger-fg: #eaf4ff;
    --participants-launcher-menu-bg: linear-gradient(170deg, #041527 0%, #071d35 100%);
    --participants-launcher-menu-edge: rgba(116, 181, 255, 0.45);
    --participants-launcher-menu-shadow: 0 18px 34px rgba(4, 18, 34, 0.45);
    --participants-launcher-section-bg: rgba(11, 37, 63, 0.55);
    --participants-launcher-section-edge: rgba(116, 181, 255, 0.2);
    --participants-launcher-label-fg: rgba(204, 226, 255, 0.82);
    --participants-launcher-link-fg: #e7f2ff;
    --participants-launcher-link-hover-bg: rgba(116, 181, 255, 0.18);
    --participants-launcher-link-active-bg: rgba(116, 181, 255, 0.32);
    --participants-launcher-link-disabled-fg: rgba(191, 212, 240, 0.62);
    --participants-launcher-button-bg: rgba(26, 64, 101, 0.54);
    --participants-launcher-button-edge: rgba(116, 181, 255, 0.35);
    --participants-launcher-button-fg: #e7f2ff;
    --drawer-field-bg: rgba(8, 33, 57, 0.58);
    --drawer-field-bg-hover: rgba(8, 33, 57, 0.68);
    --drawer-field-bg-focus: rgba(8, 33, 57, 0.75);
    --drawer-field-edge: rgba(142, 198, 255, 0.28);
    --drawer-field-edge-hover: rgba(142, 198, 255, 0.4);
    --drawer-field-edge-focus: rgba(142, 198, 255, 0.55);
    --drawer-field-fg: #ecf3ff;
    --drawer-field-placeholder: rgba(191, 212, 240, 0.76);
  }

  .workspace-meta__label {
    color: rgba(226, 238, 255, 0.88);
  }

  .project-sheet__paper {
    background: transparent;
    border-color: var(--participants-nav-btn-edge);
    box-shadow: none;
  }

  .paper-field__label {
    color: rgba(226, 238, 255, 0.8);
  }

  .paper-field__input {
    background: transparent;
    border-color: rgba(142, 198, 255, 0.18);
  }

  .paper-field__input:hover {
    background: rgba(8, 33, 57, 0.35);
    border-color: rgba(142, 198, 255, 0.3);
  }

  .paper-field__input:focus {
    background: rgba(8, 33, 57, 0.5);
    border-color: rgba(142, 198, 255, 0.55);
    box-shadow: 0 0 0 2px rgba(116, 181, 255, 0.18);
  }

  .paper-field__input--title,
  textarea[name="one_liner"] {
    color: #9fb7d6;
  }

  .tool-card {
    background: transparent;
    border-color: var(--participants-nav-btn-edge);
    box-shadow: none;
  }

  .tool-card--link:hover {
    border-color: rgba(142, 198, 255, 0.5);
    box-shadow: 0 8px 20px rgba(4, 18, 34, 0.3);
  }

  .tool-card--coming {
    background: transparent;
  }

  .partner-card h3 {
    color: #203752;
  }

  .partner-card__metrics span {
    background: rgba(16, 32, 58, 0.78);
    color: #ecf4ff;
    border: 1px solid rgba(16, 32, 58, 0.18);
  }

  .network-item,
  .partners-secondary,
  .partners-empty {
    background: transparent;
    border-color: var(--participants-nav-btn-edge);
  }

  .partners-secondary__body {
    border-top-color: var(--participants-nav-btn-edge);
  }

  .partners-secondary summary {
    color: var(--ink-900);
  }
}

.partners-head {
  display: grid;
  gap: 0.55rem;
}

.partners-head__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.85rem;
}

.partners-actions {
  display: grid;
  gap: 0.45rem;
}

.partners-actions__dock {
  justify-content: flex-end;
}

.partners-actions__hint {
  color: var(--ink-700);
  font-size: 0.88rem;
}

.partners-catalog {
  display: grid;
  gap: 0.95rem;
}

@media (max-width: 760px) {
  .partners-head__top {
    flex-direction: column;
    align-items: flex-start;
  }

  .partners-actions__dock {
    justify-content: flex-start;
  }
}

.partners-catalog__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.6rem;
}

.partners-catalog__head-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.partners-catalog__count {
  color: var(--ink-700);
}

.partners-contacts {
  display: grid;
  gap: 0.7rem;
}

.partners-section-head p {
  margin-top: var(--space-1);
  color: var(--ink-700);
}

.partners-empty {
  border: 1px dashed rgba(16, 32, 58, 0.25);
  border-radius: 0.95rem;
  padding: 0.9rem;
  color: var(--ink-700);
  background: rgba(255, 255, 255, 0.8);
}

turbo-frame#participants_drawer:empty {
  display: none;
}

turbo-frame#global_note_drawer:empty {
  display: none;
}

.partners-palette {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.partner-card {
  border-radius: 0.95rem;
  border: 1px solid rgba(16, 32, 58, 0.12);
  padding: 0.72rem;
  display: flex;
  flex-direction: column;
  gap: 0.58rem;
  min-height: 190px;
  background:
    linear-gradient(165deg,
      hsl(var(--partner-hue) 85% 92%) 0%,
      hsl(calc(var(--partner-hue) + 18) 80% 84%) 100%);
}

.partner-card--link {
  text-decoration: none;
  color: inherit;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.partner-card--link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(16, 32, 58, 0.16);
}

.partner-card--link:focus-visible {
  outline: 2px solid rgba(116, 181, 255, 0.8);
  outline-offset: 3px;
}

.partner-card[style*="--partner-color"] {
  background: linear-gradient(
    165deg,
    color-mix(in srgb, var(--partner-color), #ffffff 40%) 0%,
    color-mix(in srgb, var(--partner-color), #ffffff 18%) 100%
  );
}

.partner-card__head {
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: rgba(16, 32, 58, 0.72);
}

.partner-card__domain {
  font-weight: 700;
}

.partner-card h3 {
  font-size: 1.2rem;
}

.partner-card__status {
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.partner-card__metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: auto;
}

.partner-card__metrics span {
  font-size: 0.82rem;
  border-radius: 999px;
  padding: 0.2rem 0.48rem;
  background: rgba(255, 255, 255, 0.66);
}

@media (max-width: 1500px) {
  .partners-palette {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1200px) {
  .partners-palette {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

@media (max-width: 620px) {
  .partners-palette {
    grid-template-columns: 1fr;
  }
}

.partner-card__button {
  margin: 0;
}

.color-picker {
  border: 1px solid rgba(16, 32, 58, 0.14);
  border-radius: 0.86rem;
  padding: 0.8rem;
  margin: 0;
}

.color-picker--plain {
  border: none;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.color-picker legend {
  padding: 0 0.2rem;
  font-weight: 600;
  color: var(--ink-700);
}

.color-picker__options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.62rem;
}

.color-option {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  cursor: pointer;
}

.color-option__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.color-option__swatch {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: var(--swatch-color);
  border: 2px solid rgba(16, 32, 58, 0.18);
  box-shadow: 0 0 0 0 rgba(16, 32, 58, 0.22);
  transition: box-shadow 120ms ease, transform 120ms ease;
}

.color-option__name {
  font-size: 0.86rem;
  color: var(--ink-700);
}

.color-option__input:checked + .color-option__swatch {
  box-shadow: 0 0 0 3px rgba(87, 96, 255, 0.32);
  border-color: rgba(87, 96, 255, 0.7);
  transform: translateY(-1px);
}

.color-option__input:focus-visible + .color-option__swatch {
  outline: 2px solid rgba(43, 168, 120, 0.5);
  outline-offset: 2px;
}

.color-option--disabled {
  cursor: default;
  opacity: 0.65;
}

.partners-secondary {
  border: 1px solid rgba(16, 32, 58, 0.14);
  border-radius: 0.86rem;
  background: rgba(255, 255, 255, 0.84);
  padding: 0;
  overflow: hidden;
}

.partners-secondary summary {
  cursor: pointer;
  padding: 1rem;
  font-family: "Avenir Next Condensed", "Franklin Gothic Medium", "Arial Narrow", sans-serif;
  font-size: 1.18rem;
  font-weight: 600;
}

.partners-secondary__body {
  border-top: 1px solid rgba(16, 32, 58, 0.12);
  padding: 0 1rem 1rem;
  display: grid;
  gap: 0.75rem;
}

.organization-hero-actions {
  justify-content: space-between;
  align-items: center;
}

.network-item--action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
}

@media (max-width: 760px) {
  .participants-nav {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .participants-nav__left,
  .participants-nav__center,
  .participants-nav__right {
    justify-self: stretch;
  }

  .participants-nav__right {
    justify-content: stretch;
  }

  .participants-nav__right .btn {
    flex: 1 1 auto;
    text-align: center;
  }

  .participants-launcher__menu {
    left: 0;
    right: 0;
    transform: none;
    max-width: none;
    min-width: 0;
  }

  .global-note-fab {
    right: max(0.75rem, env(safe-area-inset-right));
    bottom: max(0.75rem, env(safe-area-inset-bottom));
  }

  .organization-hero-actions {
    justify-content: flex-start;
  }

  .network-item--action {
    align-items: stretch;
    flex-direction: column;
  }

  .signal-inbox__item {
    align-items: stretch;
    flex-direction: column;
  }
}

@media print {
  .global-note-fab {
    display: none !important;
  }
}

.planning-card__plus {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid rgba(16, 32, 58, 0.25);
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  line-height: 1;
}

.planning-card__head {
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
  align-items: start;
}

.planning-card__head h4 {
  font-size: 1.02rem;
}

.planning-status {
  border-radius: 999px;
  padding: 0.18rem 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.planning-status--idea {
  background: rgba(16, 32, 58, 0.08);
  border-color: rgba(16, 32, 58, 0.15);
}

.planning-status--drafted {
  background: rgba(242, 174, 63, 0.2);
  border-color: rgba(242, 174, 63, 0.4);
}

.planning-status--committed {
  background: rgba(43, 168, 120, 0.14);
  border-color: rgba(43, 168, 120, 0.35);
}

.planning-card__meta {
  font-size: 0.84rem;
  color: var(--ink-700);
}

.planning-card__snippet {
  font-size: 0.9rem;
  color: var(--ink-900);
}

.share-link-box {
  margin-top: 0.75rem;
  background: rgba(16, 32, 58, 0.06);
  border-radius: 0.75rem;
  padding: 0.65rem;
  display: grid;
  gap: 0.3rem;
}

.share-link-box--top {
  margin-top: 0;
}

.share-link-box code {
  font-size: 0.82rem;
  word-break: break-all;
}

.concept-public-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.concept-block h2 {
  font-size: 1.1rem;
  margin-bottom: 0.45rem;
}

.concept-block div p {
  color: var(--ink-900);
}

.concept-print header,
.concept-print section {
  background: #fff;
  border: 1px solid #d7d7d7;
  border-radius: 0.5rem;
  padding: 0.7rem;
}

.print-meta {
  font-size: 0.85rem;
  color: #445;
}

@media print {
  .concept-print {
    padding: 0;
    max-width: 100%;
  }

  .concept-print header,
  .concept-print section {
    border: none;
    box-shadow: none;
    page-break-inside: avoid;
  }
}

@media (prefers-color-scheme: dark) {
  .partner-card__metrics span {
    background: rgba(16, 32, 58, 0.82);
    color: #edf5ff;
    border: 1px solid rgba(221, 236, 255, 0.25);
  }

  .partners-secondary {
    background: transparent;
    border-color: var(--participants-nav-btn-edge);
  }

  .partners-secondary summary,
  .partners-secondary__body,
  .partners-secondary__body p,
  .partners-secondary__body h3 {
    color: var(--ink-900);
  }

  .partners-secondary__body {
    border-top-color: var(--participants-nav-btn-edge);
  }

  .btn--danger {
    background: rgba(214, 90, 69, 0.16);
    border-color: rgba(214, 90, 69, 0.52);
    color: #ff9d90;
  }

  .btn--danger:hover {
    background: rgba(214, 90, 69, 0.24);
  }

  .tool-card__meta--counters .tool-counter--signal {
    background: transparent;
    border-color: rgba(142, 198, 255, 0.44);
    color: #ecf4ff;
  }

  .participants-launcher__signal-badge {
    border-color: rgba(255, 158, 142, 0.52);
    background: rgba(214, 90, 69, 0.18);
    color: #ffd1c9;
  }

  .participants-launcher__signal-count {
    border-color: rgba(255, 158, 142, 0.48);
    background: rgba(214, 90, 69, 0.2);
    color: #ffd6ce;
  }

  .signal-inline-review {
    color: #eaf4ff;
  }
}

@media (prefers-color-scheme: dark) {
  .concept-hero,
  .concept-panel,
  .concept-public-header,
  .concept-block {
    background: transparent;
    border-color: var(--participants-nav-btn-edge);
    box-shadow: none;
  }

  .concept-kicker,
  .concept-hero p,
  .concept-panel-head p,
  .partners-section-head p,
  .partners-catalog__count,
  .paper-field__hint {
    color: rgba(226, 238, 255, 0.82);
  }

  .partners-empty {
    background: transparent;
    border-color: var(--participants-nav-btn-edge);
    color: var(--ink-900);
  }

  .planning-drawer__panel {
    background: linear-gradient(180deg, rgba(6, 24, 43, 0.98), rgba(8, 30, 50, 0.98));
    border-left-color: rgba(142, 198, 255, 0.32);
    box-shadow: -10px 0 28px rgba(4, 18, 34, 0.5);
    color-scheme: dark;
  }

  .planning-drawer__scrim {
    background: rgba(4, 14, 26, 0.52);
  }

  .planning-drawer__panel .paper-field__label {
    color: rgba(226, 238, 255, 0.84);
  }

  .planning-drawer__panel .paper-field {
    border-bottom-color: rgba(142, 198, 255, 0.24);
  }

  .planning-row__number {
    border-color: rgba(142, 198, 255, 0.32);
    background: rgba(8, 33, 57, 0.58);
    color: rgba(224, 238, 255, 0.88);
  }

  .planning-row__handle {
    background: rgba(8, 33, 57, 0.72);
    border-color: rgba(142, 198, 255, 0.4);
    color: #d8ebff;
    box-shadow: 0 8px 18px rgba(4, 18, 34, 0.36);
  }

  .planning-card {
    background: transparent;
    border-color: var(--participants-nav-btn-edge);
    box-shadow: none;
  }

  .planning-card--new {
    background: transparent;
    border-color: rgba(142, 198, 255, 0.42);
  }

  .planning-card__add-link,
  .planning-card__add-link strong,
  .planning-card__add-link span:last-child {
    color: var(--ink-900);
  }
}

/* ─── Tool 4: Proposal Writing ──────────────────────────────────────────────── */

/* Portal chip in workspace meta row */
.workspace-chip--portal {
  background: rgba(116, 181, 255, 0.18);
  border: 1px solid rgba(116, 181, 255, 0.42);
  color: #1a4a78;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 0.82rem;
}

/* Signal pill — draft (neutral grey, no emphasis) */
.signal-pill--draft {
  background: rgba(16, 32, 58, 0.07);
  border-color: rgba(16, 32, 58, 0.2);
  color: var(--ink-700);
}

/* ── Section quick-links list ────────────────────────────────────────────────── */

.portal-sections-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.portal-section-entry {
  display: inline-flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.5rem 0.72rem;
  border: 1px solid rgba(16, 32, 58, 0.14);
  border-radius: 0.72rem;
  background: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  color: inherit;
  transition: transform 100ms ease, border-color 100ms ease, box-shadow 100ms ease;
}

.portal-section-entry:hover {
  transform: translateY(-1px);
  border-color: rgba(16, 32, 58, 0.26);
  box-shadow: 0 5px 14px rgba(16, 32, 58, 0.1);
}

.portal-section-entry:focus-visible {
  outline: 2px solid rgba(43, 168, 120, 0.4);
  outline-offset: 2px;
}

.portal-section-entry__title {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink-900);
}

.portal-section-entry__meta {
  font-size: 0.8rem;
  color: var(--ink-700);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* ── Portal Coverage Map ─────────────────────────────────────────────────────── */

.portal-coverage__section {
  margin-bottom: 1.5rem;
}

.portal-coverage__section:last-child {
  margin-bottom: 0;
}

.portal-coverage__section-head {
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-700);
  margin-bottom: 0.55rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px dashed rgba(16, 32, 58, 0.16);
}

.portal-coverage__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: start;
  padding: 0.65rem 0.72rem;
  border-radius: 0.65rem;
  margin-bottom: 0.4rem;
  border: 1px solid transparent;
}

.portal-coverage__row--section {
  background: rgba(43, 168, 120, 0.04);
  border-color: rgba(43, 168, 120, 0.12);
}

.portal-coverage__row--alignment_field {
  background: rgba(116, 181, 255, 0.05);
  border-color: rgba(116, 181, 255, 0.18);
}

.portal-coverage__row--gap {
  background: rgba(214, 90, 69, 0.04);
  border-color: rgba(214, 90, 69, 0.14);
}

.portal-coverage__row--activity_model {
  background: rgba(242, 174, 63, 0.05);
  border-color: rgba(242, 174, 63, 0.2);
}

/* Clickable rows (section + activity_model) */
a.portal-coverage__row {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 100ms ease, box-shadow 100ms ease, border-color 120ms ease;
}

a.portal-coverage__row:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 32, 58, 0.1);
}

a.portal-coverage__row--section:hover {
  border-color: rgba(43, 168, 120, 0.4);
}

a.portal-coverage__row--activity_model:hover {
  border-color: rgba(242, 174, 63, 0.5);
}

a.portal-coverage__row:focus-visible {
  outline: 2px solid rgba(43, 168, 120, 0.4);
  outline-offset: 2px;
}

/* Section name label (replaces the old link inside the meta column) */
.portal-coverage__section-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-900);
}

.portal-coverage__field-info {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
}

.portal-coverage__field-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.portal-coverage__field-id {
  font-size: 0.74rem;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--ink-500);
  background: rgba(16, 32, 58, 0.06);
  border-radius: 0.32rem;
  padding: 0.08rem 0.36rem;
}

.portal-coverage__field-label {
  font-size: 0.88rem;
  color: var(--ink-900);
  line-height: 1.4;
}

.portal-coverage__field-note {
  font-size: 0.8rem;
  color: var(--ink-700);
  font-style: italic;
}

.portal-coverage__compliance-message {
  font-size: 0.82rem;
  border-radius: 0.42rem;
  padding: 0.28rem 0.5rem;
  margin-top: 0.1rem;
}

.portal-coverage__compliance-message--info {
  background: rgba(116, 181, 255, 0.12);
  color: #1a4a78;
}

.portal-coverage__compliance-message--attention {
  background: rgba(242, 174, 63, 0.18);
  color: #815611;
}

.portal-coverage__compliance-message--critical {
  background: rgba(214, 90, 69, 0.14);
  color: #7a2419;
}

.portal-coverage__field-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  min-width: 9rem;
  flex-shrink: 0;
}

.portal-coverage__section-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-900);
  text-decoration: none;
  border-bottom: 1px solid rgba(16, 32, 58, 0.3);
}

.portal-coverage__section-link:hover {
  border-bottom-color: var(--mint-500);
  color: var(--mint-500);
}

.portal-coverage__source-label {
  font-size: 0.8rem;
  border-radius: 999px;
  padding: 0.22rem 0.52rem;
}

.portal-coverage__source-label--alignment {
  background: rgba(116, 181, 255, 0.14);
  color: #1a4a78;
  border: 1px solid rgba(116, 181, 255, 0.32);
}

.portal-coverage__source-label--gap {
  background: rgba(214, 90, 69, 0.1);
  color: #7a2419;
  border: 1px solid rgba(214, 90, 69, 0.28);
}

.portal-coverage__source-label--activity {
  background: rgba(242, 174, 63, 0.14);
  color: #815611;
  border: 1px solid rgba(242, 174, 63, 0.34);
  text-decoration: none;
  font-weight: 600;
}

.portal-coverage__source-label--activity:hover {
  background: rgba(242, 174, 63, 0.24);
}

.portal-coverage__limit {
  font-size: 0.76rem;
  color: var(--ink-500);
}

/* ── Coverage pills ──────────────────────────────────────────────────────────── */

.coverage-pill {
  border-radius: 999px;
  padding: 0.18rem 0.52rem;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.2;
  flex-shrink: 0;
}

.coverage-pill--covered {
  background: rgba(43, 168, 120, 0.15);
  border: 1px solid rgba(43, 168, 120, 0.38);
  color: #1b6f4f;
}

.coverage-pill--partial {
  background: rgba(242, 174, 63, 0.18);
  border: 1px solid rgba(242, 174, 63, 0.42);
  color: #815611;
}

.coverage-pill--gap {
  background: rgba(214, 90, 69, 0.13);
  border: 1px solid rgba(214, 90, 69, 0.36);
  color: #7a2419;
}

.coverage-pill--activity {
  background: rgba(116, 181, 255, 0.14);
  border: 1px solid rgba(116, 181, 255, 0.36);
  color: #1a4a78;
}

/* ── Severity badges ─────────────────────────────────────────────────────────── */

.portal-severity-badge {
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
  flex-shrink: 0;
}

.portal-severity-badge--info {
  background: rgba(116, 181, 255, 0.16);
  border: 1px solid rgba(116, 181, 255, 0.36);
  color: #1a4a78;
}

.portal-severity-badge--attention {
  background: rgba(242, 174, 63, 0.2);
  border: 1px solid rgba(242, 174, 63, 0.42);
  color: #815611;
}

.portal-severity-badge--critical {
  background: rgba(214, 90, 69, 0.16);
  border: 1px solid rgba(214, 90, 69, 0.4);
  color: #7a2419;
}

/* ── Portal gauge ────────────────────────────────────────────────────────────── */

.portal-gauge {
  width: 100%;
  height: 1.5rem;
  border-radius: 0.5rem;
  background: rgba(16, 32, 58, 0.07);
  border: 1px solid rgba(16, 32, 58, 0.1);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.portal-gauge__bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  border-radius: 0.5rem;
  transition: width 200ms ease;
}

.portal-gauge--ok .portal-gauge__bar {
  background: rgba(43, 168, 120, 0.35);
}

.portal-gauge--attention .portal-gauge__bar,
.portal-gauge--warning .portal-gauge__bar {
  background: rgba(242, 174, 63, 0.45);
}

.portal-gauge--critical .portal-gauge__bar,
.portal-gauge--overflow .portal-gauge__bar {
  background: rgba(214, 90, 69, 0.42);
}

.portal-gauge__label {
  position: relative;
  z-index: 1;
  padding: 0 0.5rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-900);
  white-space: nowrap;
}

.portal-gauge__overflow {
  color: var(--coral-500);
  font-weight: 700;
  margin-left: 0.2rem;
}

/* ── Section editor page layout ──────────────────────────────────────────────── */

.section-editor-page {
  --layout-page-gap: var(--space-5);
  max-width: 980px;
}

.section-editor-layout {
  display: grid;
  grid-template-columns: 1fr 22rem;
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 900px) {
  .section-editor-layout {
    grid-template-columns: 1fr;
  }
}

.section-editor-layout--single {
  grid-template-columns: minmax(0, 860px);
  justify-content: center;
}

.section-editor-form {
  display: grid;
  gap: 0.75rem;
}

.section-editor-form__field {
  display: grid;
  gap: 0.4rem;
}

.section-editor-form__textarea {
  width: 100%;
  min-height: 26rem;
  border: 1px solid var(--input-edge);
  border-radius: 0.72rem;
  padding: 0.72rem 0.82rem;
  font: inherit;
  font-size: 0.97rem;
  line-height: 1.5;
  background: var(--input-bg);
  color: var(--ink-900);
  resize: vertical;
  overflow: hidden;
}

.section-editor-form__textarea:focus {
  outline: 2px solid rgba(43, 168, 120, 0.35);
  border-color: var(--mint-500);
}

.section-editor-form__counters {
  display: flex;
  align-items: center;
  gap: 0.22rem;
  font-size: 0.82rem;
  color: var(--ink-700);
}

.section-editor-form__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.section-editor-form__actions {
  justify-content: flex-end;
  margin-left: auto;
}

.section-editor-panel {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.char-counter {
  font-weight: 700;
  color: var(--ink-900);
}

.char-counter__separator,
.char-counter__label {
  color: var(--ink-500);
}

.char-counter__limit {
  font-weight: 600;
}

/* ── Portal panel (aside) ────────────────────────────────────────────────────── */

.portal-panel {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(116, 181, 255, 0.28);
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 8px 20px rgba(16, 32, 58, 0.07);
  display: grid;
  gap: 0.75rem;
}

.portal-panel__head {
  border-bottom: 1px solid rgba(16, 32, 58, 0.1);
  padding-bottom: 0.6rem;
  display: grid;
  gap: 0.2rem;
}

.portal-panel__title {
  font-size: 1.1rem;
}

.portal-panel__subtitle {
  font-size: 0.83rem;
  color: var(--ink-700);
}

.portal-panel__field {
  border: 1px solid rgba(16, 32, 58, 0.1);
  border-radius: 0.72rem;
  padding: 0.65rem;
  display: grid;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.7);
}

.portal-panel__field--info {
  border-color: rgba(116, 181, 255, 0.28);
  background: rgba(116, 181, 255, 0.04);
}

.portal-panel__field--attention {
  border-color: rgba(242, 174, 63, 0.36);
  background: rgba(242, 174, 63, 0.05);
}

.portal-panel__field--critical {
  border-color: rgba(214, 90, 69, 0.34);
  background: rgba(214, 90, 69, 0.04);
}

.portal-panel__field-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
}

.portal-field-id {
  font-size: 0.72rem;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--ink-500);
  background: rgba(16, 32, 58, 0.06);
  border-radius: 0.3rem;
  padding: 0.06rem 0.32rem;
}

.portal-field-limit {
  font-size: 0.76rem;
  color: var(--ink-500);
  flex-shrink: 0;
}

.portal-panel__field-label {
  font-size: 0.84rem;
  color: var(--ink-900);
  line-height: 1.4;
}

.portal-panel__compliance {
  font-size: 0.8rem;
  border-radius: 0.4rem;
  padding: 0.26rem 0.46rem;
}

.portal-panel__compliance--info {
  background: rgba(116, 181, 255, 0.14);
  color: #1a4a78;
}

.portal-panel__compliance--attention {
  background: rgba(242, 174, 63, 0.18);
  color: #815611;
}

.portal-panel__compliance--critical {
  background: rgba(214, 90, 69, 0.14);
  color: #7a2419;
}

.portal-panel__note-details {
  border-top: 1px dashed rgba(16, 32, 58, 0.12);
  padding-top: 0.35rem;
}

.portal-panel__note-summary {
  font-size: 0.78rem;
  color: var(--ink-700);
  cursor: pointer;
}

.portal-panel__note {
  font-size: 0.8rem;
  color: var(--ink-700);
  font-style: italic;
  margin-top: 0.3rem;
}

/* Dark mode adjustments for Tool 4 */
@media (prefers-color-scheme: dark) {
  .workspace-chip--portal {
    background: rgba(116, 181, 255, 0.14);
    border-color: rgba(116, 181, 255, 0.36);
    color: #a8d4ff;
  }

  .portal-section-entry {
    background: transparent;
    border-color: var(--participants-nav-btn-edge);
  }

  .portal-coverage__row--section {
    background: rgba(43, 168, 120, 0.06);
    border-color: rgba(43, 168, 120, 0.2);
  }

  .portal-coverage__row--alignment_field {
    background: rgba(116, 181, 255, 0.06);
    border-color: rgba(116, 181, 255, 0.22);
  }

  .portal-coverage__row--gap {
    background: rgba(214, 90, 69, 0.07);
    border-color: rgba(214, 90, 69, 0.22);
  }

  .portal-coverage__row--activity_model {
    background: rgba(242, 174, 63, 0.07);
    border-color: rgba(242, 174, 63, 0.24);
  }

  .portal-coverage__field-label,
  .portal-panel__field-label {
    color: var(--ink-900);
  }

  .portal-panel {
    background: transparent;
    border-color: rgba(116, 181, 255, 0.28);
    box-shadow: none;
  }

  .portal-panel__field {
    background: transparent;
    border-color: var(--participants-nav-btn-edge);
  }

  .section-editor-form__textarea {
    background: var(--input-bg);
    color: var(--ink-900);
    border-color: var(--input-edge);
  }
}
