.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{background-color:transparent;border:none;font-size:1em}.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline;list-style:none;padding:0}.select2-container .select2-selection--multiple .select2-selection__clear{background-color:transparent;border:none;font-size:1em}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;margin-left:5px;padding:0;max-width:100%;resize:none;height:18px;vertical-align:bottom;font-family:sans-serif;overflow:hidden;word-break:keep-all}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:white;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;user-select:none;-webkit-user-select:none}.select2-results__option--selectable{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;height:26px;margin-right:20px;padding-right:0px}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;padding-bottom:5px;padding-right:5px;position:relative}.select2-container--default .select2-selection--multiple.select2-selection--clearable{padding-right:25px}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;font-weight:bold;height:20px;margin-right:10px;margin-top:5px;position:absolute;right:0;padding:1px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:inline-block;margin-left:5px;margin-top:5px;padding:0;padding-left:20px;position:relative;max-width:100%;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom;white-space:nowrap}.select2-container--default .select2-selection--multiple .select2-selection__choice__display{cursor:default;padding-left:2px;padding-right:5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{background-color:transparent;border:none;border-right:1px solid #aaa;border-top-left-radius:4px;border-bottom-left-radius:4px;color:#999;cursor:pointer;font-size:1em;font-weight:bold;padding:0 4px;position:absolute;left:0;top:0}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover,.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:focus{background-color:#f1f1f1;color:#333;outline:none}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__display{padding-left:5px;padding-right:2px}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{border-left:1px solid #aaa;border-right:none;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:4px;border-bottom-right-radius:4px}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__clear{float:left;margin-left:10px;margin-right:auto}.select2-container--default.select2-container--focus .select2-selection--multiple{border:solid black 1px;outline:0}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #aaa}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--group{padding:0}.select2-container--default .select2-results__option--disabled{color:#999}.select2-container--default .select2-results__option--selected{background-color:#ddd}.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable{background-color:#5897fb;color:white}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top, #fff 50%, #eee 100%);background-image:-o-linear-gradient(top, #fff 50%, #eee 100%);background-image:linear-gradient(to bottom, #fff 50%, #eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;height:26px;margin-right:20px}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top, #eee 50%, #ccc 100%);background-image:-o-linear-gradient(top, #eee 50%, #ccc 100%);background-image:linear-gradient(to bottom, #eee 50%, #ccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0)}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top, #fff 0%, #eee 50%);background-image:-o-linear-gradient(top, #fff 0%, #eee 50%);background-image:linear-gradient(to bottom, #fff 0%, #eee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top, #eee 50%, #fff 100%);background-image:-o-linear-gradient(top, #eee 50%, #fff 100%);background-image:linear-gradient(to bottom, #eee 50%, #fff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0)}.select2-container--classic .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0;padding-bottom:5px;padding-right:5px}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;display:inline-block;margin-left:5px;margin-top:5px;padding:0}.select2-container--classic .select2-selection--multiple .select2-selection__choice__display{cursor:default;padding-left:2px;padding-right:5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{background-color:transparent;border:none;border-top-left-radius:4px;border-bottom-left-radius:4px;color:#888;cursor:pointer;font-size:1em;font-weight:bold;padding:0 4px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555;outline:none}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__display{padding-left:5px;padding-right:2px}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:4px;border-bottom-right-radius:4px}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;box-shadow:none}.select2-container--classic .select2-dropdown{background-color:#fff;border:1px solid transparent}.select2-container--classic .select2-dropdown--above{border-bottom:none}.select2-container--classic .select2-dropdown--below{border-top:none}.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--classic .select2-results__option--group{padding:0}.select2-container--classic .select2-results__option--disabled{color:grey}.select2-container--classic .select2-results__option--highlighted.select2-results__option--selectable{background-color:#3875d7;color:#fff}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb}

trix-editor {
  border: 1px solid #bbb;
  border-radius: 3px;
  margin: 0;
  padding: 0.4em 0.6em;
  min-height: 5em;
  outline: none;
}

trix-toolbar * {
  box-sizing: border-box;
}
trix-toolbar .trix-button-row {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  overflow-x: auto;
}
trix-toolbar .trix-button-group {
  display: flex;
  margin-bottom: 10px;
  border: 1px solid #bbb;
  border-top-color: #ccc;
  border-bottom-color: #888;
  border-radius: 3px;
}
trix-toolbar .trix-button-group:not(:first-child) {
  margin-left: 1.5vw;
}
@media (max-width: 768px) {
  trix-toolbar .trix-button-group:not(:first-child) {
    margin-left: 0;
  }
}
trix-toolbar .trix-button-group-spacer {
  flex-grow: 1;
}
@media (max-width: 768px) {
  trix-toolbar .trix-button-group-spacer {
    display: none;
  }
}
trix-toolbar .trix-button {
  position: relative;
  float: left;
  color: rgba(0, 0, 0, 0.6);
  font-size: 0.75em;
  font-weight: 600;
  white-space: nowrap;
  padding: 0 0.5em;
  margin: 0;
  outline: none;
  border: none;
  border-bottom: 1px solid #ddd;
  border-radius: 0;
  background: transparent;
}
trix-toolbar .trix-button:not(:first-child) {
  border-left: 1px solid #ccc;
}
trix-toolbar .trix-button.trix-active {
  background: #cbeefa;
  color: rgb(0, 0, 0);
}
trix-toolbar .trix-button:not(:disabled) {
  cursor: pointer;
}
trix-toolbar .trix-button:disabled {
  color: rgba(0, 0, 0, 0.125);
}
@media (max-width: 768px) {
  trix-toolbar .trix-button {
    letter-spacing: -0.01em;
    padding: 0 0.3em;
  }
}
trix-toolbar .trix-button--icon {
  font-size: inherit;
  width: 2.6em;
  height: 1.6em;
  max-width: calc(0.8em + 4vw);
  text-indent: -9999px;
}
@media (max-width: 768px) {
  trix-toolbar .trix-button--icon {
    height: 2em;
    max-width: calc(0.8em + 3.5vw);
  }
}
trix-toolbar .trix-button--icon::before {
  display: inline-block;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  opacity: 0.6;
  content: "";
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}
@media (max-width: 768px) {
  trix-toolbar .trix-button--icon::before {
    right: 6%;
    left: 6%;
  }
}
trix-toolbar .trix-button--icon.trix-active::before {
  opacity: 1;
}
trix-toolbar .trix-button--icon:disabled::before {
  opacity: 0.125;
}
trix-toolbar .trix-button--icon-attach::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M10.5%2018V7.5c0-2.25%203-2.25%203%200V18c0%204.125-6%204.125-6%200V7.5c0-6.375%209-6.375%209%200V18%22%20stroke%3D%22%23000%22%20stroke-width%3D%222%22%20stroke-miterlimit%3D%2210%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E");
  top: 8%;
  bottom: 4%;
}
trix-toolbar .trix-button--icon-bold::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6.522%2019.242a.5.5%200%200%201-.5-.5V5.35a.5.5%200%200%201%20.5-.5h5.783c1.347%200%202.46.345%203.24.982.783.64%201.216%201.562%201.216%202.683%200%201.13-.587%202.129-1.476%202.71a.35.35%200%200%200%20.049.613c1.259.56%202.101%201.742%202.101%203.22%200%201.282-.483%202.334-1.363%203.063-.876.726-2.132%201.12-3.66%201.12h-5.89ZM9.27%207.347v3.362h1.97c.766%200%201.347-.17%201.733-.464.38-.291.587-.716.587-1.27%200-.53-.183-.928-.513-1.198-.334-.273-.838-.43-1.505-.43H9.27Zm0%205.606v3.791h2.389c.832%200%201.448-.177%201.853-.497.399-.315.614-.786.614-1.423%200-.62-.22-1.077-.63-1.385-.418-.313-1.053-.486-1.905-.486H9.27Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-italic::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M9%205h6.5v2h-2.23l-2.31%2010H13v2H6v-2h2.461l2.306-10H9V5Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-link::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M18.948%205.258a4.337%204.337%200%200%200-6.108%200L11.217%206.87a.993.993%200%200%200%200%201.41c.392.39%201.027.39%201.418%200l1.623-1.613a2.323%202.323%200%200%201%203.271%200%202.29%202.29%200%200%201%200%203.251l-2.393%202.38a3.021%203.021%200%200%201-4.255%200l-.05-.049a1.007%201.007%200%200%200-1.418%200%20.993.993%200%200%200%200%201.41l.05.049a5.036%205.036%200%200%200%207.091%200l2.394-2.38a4.275%204.275%200%200%200%200-6.072Zm-13.683%2013.6a4.337%204.337%200%200%200%206.108%200l1.262-1.255a.993.993%200%200%200%200-1.41%201.007%201.007%200%200%200-1.418%200L9.954%2017.45a2.323%202.323%200%200%201-3.27%200%202.29%202.29%200%200%201%200-3.251l2.344-2.331a2.579%202.579%200%200%201%203.631%200c.392.39%201.027.39%201.419%200a.993.993%200%200%200%200-1.41%204.593%204.593%200%200%200-6.468%200l-2.345%202.33a4.275%204.275%200%200%200%200%206.072Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-strike::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6%2014.986c.088%202.647%202.246%204.258%205.635%204.258%203.496%200%205.713-1.728%205.713-4.463%200-.275-.02-.536-.062-.781h-3.461c.398.293.573.654.573%201.123%200%201.035-1.074%201.787-2.646%201.787-1.563%200-2.773-.762-2.91-1.924H6ZM6.432%2010h3.763c-.632-.314-.914-.715-.914-1.273%200-1.045.977-1.739%202.432-1.739%201.475%200%202.52.723%202.617%201.914h2.764c-.05-2.548-2.11-4.238-5.39-4.238-3.145%200-5.392%201.719-5.392%204.316%200%20.363.04.703.12%201.02ZM4%2011a1%201%200%201%200%200%202h15a1%201%200%201%200%200-2H4Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-quote::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M4.581%208.471c.44-.5%201.056-.834%201.758-.995C8.074%207.17%209.201%207.822%2010%208.752c1.354%201.578%201.33%203.555.394%205.277-.941%201.731-2.788%203.163-4.988%203.56a.622.622%200%200%201-.653-.317c-.113-.205-.121-.49.16-.764.294-.286.567-.566.791-.835.222-.266.413-.54.524-.815.113-.28.156-.597.026-.908-.128-.303-.39-.524-.72-.69a3.02%203.02%200%200%201-1.674-2.7c0-.905.283-1.59.72-2.088Zm9.419%200c.44-.5%201.055-.834%201.758-.995%201.734-.306%202.862.346%203.66%201.276%201.355%201.578%201.33%203.555.395%205.277-.941%201.731-2.789%203.163-4.988%203.56a.622.622%200%200%201-.653-.317c-.113-.205-.122-.49.16-.764.294-.286.567-.566.791-.835.222-.266.412-.54.523-.815.114-.28.157-.597.026-.908-.127-.303-.39-.524-.72-.69a3.02%203.02%200%200%201-1.672-2.701c0-.905.283-1.59.72-2.088Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-heading-1::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21.5%207.5v-3h-12v3H14v13h3v-13h4.5ZM9%2013.5h3.5v-3h-10v3H6v7h3v-7Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-code::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3.293%2011.293a1%201%200%200%200%200%201.414l4%204a1%201%200%201%200%201.414-1.414L5.414%2012l3.293-3.293a1%201%200%200%200-1.414-1.414l-4%204Zm13.414%205.414%204-4a1%201%200%200%200%200-1.414l-4-4a1%201%200%201%200-1.414%201.414L18.586%2012l-3.293%203.293a1%201%200%200%200%201.414%201.414Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-bullet-list::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%207.5a1.5%201.5%200%201%200%200-3%201.5%201.5%200%200%200%200%203ZM8%206a1%201%200%200%201%201-1h11a1%201%200%201%201%200%202H9a1%201%200%200%201-1-1Zm1%205a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm0%206a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm-2.5-5a1.5%201.5%200%201%201-3%200%201.5%201.5%200%200%201%203%200ZM5%2019.5a1.5%201.5%200%201%200%200-3%201.5%201.5%200%200%200%200%203Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-number-list::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3%204h2v4H4V5H3V4Zm5%202a1%201%200%200%201%201-1h11a1%201%200%201%201%200%202H9a1%201%200%200%201-1-1Zm1%205a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm0%206a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm-3.5-7H6v1l-1.5%202H6v1H3v-1l1.667-2H3v-1h2.5ZM3%2017v-1h3v4H3v-1h2v-.5H4v-1h1V17H3Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-undo::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3%2014a1%201%200%200%200%201%201h6a1%201%200%201%200%200-2H6.257c2.247-2.764%205.151-3.668%207.579-3.264%202.589.432%204.739%202.356%205.174%205.405a1%201%200%200%200%201.98-.283c-.564-3.95-3.415-6.526-6.825-7.095C11.084%207.25%207.63%208.377%205%2011.39V8a1%201%200%200%200-2%200v6Zm2-1Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-redo::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2014a1%201%200%200%201-1%201h-6a1%201%200%201%201%200-2h3.743c-2.247-2.764-5.151-3.668-7.579-3.264-2.589.432-4.739%202.356-5.174%205.405a1%201%200%200%201-1.98-.283c.564-3.95%203.415-6.526%206.826-7.095%203.08-.513%206.534.614%209.164%203.626V8a1%201%200%201%201%202%200v6Zm-2-1Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-decrease-nesting-level::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%206a1%201%200%200%201%201-1h12a1%201%200%201%201%200%202H6a1%201%200%200%201-1-1Zm4%205a1%201%200%201%200%200%202h9a1%201%200%201%200%200-2H9Zm-3%206a1%201%200%201%200%200%202h12a1%201%200%201%200%200-2H6Zm-3.707-5.707a1%201%200%200%200%200%201.414l2%202a1%201%200%201%200%201.414-1.414L4.414%2012l1.293-1.293a1%201%200%200%200-1.414-1.414l-2%202Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-increase-nesting-level::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%206a1%201%200%200%201%201-1h12a1%201%200%201%201%200%202H6a1%201%200%200%201-1-1Zm4%205a1%201%200%201%200%200%202h9a1%201%200%201%200%200-2H9Zm-3%206a1%201%200%201%200%200%202h12a1%201%200%201%200%200-2H6Zm-2.293-2.293%202-2a1%201%200%200%200%200-1.414l-2-2a1%201%200%201%200-1.414%201.414L3.586%2012l-1.293%201.293a1%201%200%201%200%201.414%201.414Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-dialogs {
  position: relative;
}
trix-toolbar .trix-dialog {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  font-size: 0.75em;
  padding: 15px 10px;
  background: #fff;
  box-shadow: 0 0.3em 1em #ccc;
  border-top: 2px solid #888;
  border-radius: 5px;
  z-index: 5;
}
trix-toolbar .trix-input--dialog {
  font-size: inherit;
  font-weight: normal;
  padding: 0.5em 0.8em;
  margin: 0 10px 0 0;
  border-radius: 3px;
  border: 1px solid #bbb;
  background-color: #fff;
  box-shadow: none;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}
trix-toolbar .trix-input--dialog.validate:invalid {
  box-shadow: #F00 0px 0px 1.5px 1px;
}
trix-toolbar .trix-button--dialog {
  font-size: inherit;
  padding: 0.5em;
  border-bottom: none;
}
trix-toolbar .trix-dialog--link {
  max-width: 600px;
}
trix-toolbar .trix-dialog__link-fields {
  display: flex;
  align-items: baseline;
}
trix-toolbar .trix-dialog__link-fields .trix-input {
  flex: 1;
}
trix-toolbar .trix-dialog__link-fields .trix-button-group {
  flex: 0 0 content;
  margin: 0;
}

trix-editor [data-trix-mutable]:not(.attachment__caption-editor) {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

trix-editor [data-trix-mutable] ::-moz-selection, trix-editor [data-trix-mutable]::-moz-selection,
trix-editor [data-trix-cursor-target]::-moz-selection {
  background: none;
}
trix-editor [data-trix-mutable] ::selection, trix-editor [data-trix-mutable]::selection,
trix-editor [data-trix-cursor-target]::selection {
  background: none;
}

trix-editor [data-trix-mutable].attachment__caption-editor:focus::-moz-selection {
  background: highlight;
}
trix-editor [data-trix-mutable].attachment__caption-editor:focus::selection {
  background: highlight;
}

trix-editor [data-trix-mutable].attachment.attachment--file {
  box-shadow: 0 0 0 2px highlight;
  border-color: transparent;
}
trix-editor [data-trix-mutable].attachment img {
  box-shadow: 0 0 0 2px highlight;
}
trix-editor .attachment {
  position: relative;
}
trix-editor .attachment:hover {
  cursor: default;
}
trix-editor .attachment--preview .attachment__caption:hover {
  cursor: text;
}
trix-editor .attachment__progress {
  position: absolute;
  z-index: 1;
  height: 20px;
  top: calc(50% - 10px);
  left: 5%;
  width: 90%;
  opacity: 0.9;
  transition: opacity 200ms ease-in;
}
trix-editor .attachment__progress[value="100"] {
  opacity: 0;
}
trix-editor .attachment__caption-editor {
  display: inline-block;
  width: 100%;
  margin: 0;
  padding: 0;
  font-size: inherit;
  font-family: inherit;
  line-height: inherit;
  color: inherit;
  text-align: center;
  vertical-align: top;
  border: none;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}
trix-editor .attachment__toolbar {
  position: absolute;
  z-index: 1;
  top: -0.9em;
  left: 0;
  width: 100%;
  text-align: center;
}
trix-editor .trix-button-group {
  display: inline-flex;
}
trix-editor .trix-button {
  position: relative;
  float: left;
  color: #666;
  white-space: nowrap;
  font-size: 80%;
  padding: 0 0.8em;
  margin: 0;
  outline: none;
  border: none;
  border-radius: 0;
  background: transparent;
}
trix-editor .trix-button:not(:first-child) {
  border-left: 1px solid #ccc;
}
trix-editor .trix-button.trix-active {
  background: #cbeefa;
}
trix-editor .trix-button:not(:disabled) {
  cursor: pointer;
}
trix-editor .trix-button--remove {
  text-indent: -9999px;
  display: inline-block;
  padding: 0;
  outline: none;
  width: 1.8em;
  height: 1.8em;
  line-height: 1.8em;
  border-radius: 50%;
  background-color: #fff;
  border: 2px solid highlight;
  box-shadow: 1px 1px 6px rgba(0, 0, 0, 0.25);
}
trix-editor .trix-button--remove::before {
  display: inline-block;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  opacity: 0.7;
  content: "";
  background-image: url("data:image/svg+xml,%3Csvg%20height%3D%2224%22%20width%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M19%206.41%2017.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012z%22%2F%3E%3Cpath%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22%2F%3E%3C%2Fsvg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 90%;
}
trix-editor .trix-button--remove:hover {
  border-color: #333;
}
trix-editor .trix-button--remove:hover::before {
  opacity: 1;
}
trix-editor .attachment__metadata-container {
  position: relative;
}
trix-editor .attachment__metadata {
  position: absolute;
  left: 50%;
  top: 2em;
  transform: translate(-50%, 0);
  max-width: 90%;
  padding: 0.1em 0.6em;
  font-size: 0.8em;
  color: #fff;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 3px;
}
trix-editor .attachment__metadata .attachment__name {
  display: inline-block;
  max-width: 100%;
  vertical-align: bottom;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
trix-editor .attachment__metadata .attachment__size {
  margin-left: 0.2em;
  white-space: nowrap;
}

.trix-content {
  line-height: 1.5;
  overflow-wrap: break-word;
  word-break: break-word;
}
.trix-content * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
.trix-content h1 {
  font-size: 1.2em;
  line-height: 1.2;
}
.trix-content blockquote {
  border: 0 solid #ccc;
  border-left-width: 0.3em;
  margin-left: 0.3em;
  padding-left: 0.6em;
}
.trix-content [dir=rtl] blockquote,
.trix-content blockquote[dir=rtl] {
  border-width: 0;
  border-right-width: 0.3em;
  margin-right: 0.3em;
  padding-right: 0.6em;
}
.trix-content li {
  margin-left: 1em;
}
.trix-content [dir=rtl] li {
  margin-right: 1em;
}
.trix-content pre {
  display: inline-block;
  width: 100%;
  vertical-align: top;
  font-family: monospace;
  font-size: 0.9em;
  padding: 0.5em;
  white-space: pre;
  background-color: #eee;
  overflow-x: auto;
}
.trix-content img {
  max-width: 100%;
  height: auto;
}
.trix-content .attachment {
  display: inline-block;
  position: relative;
  max-width: 100%;
}
.trix-content .attachment a {
  color: inherit;
  text-decoration: none;
}
.trix-content .attachment a:hover, .trix-content .attachment a:visited:hover {
  color: inherit;
}
.trix-content .attachment__caption {
  text-align: center;
}
.trix-content .attachment__caption .attachment__name + .attachment__size::before {
  content: " •";
}
.trix-content .attachment--preview {
  width: 100%;
  text-align: center;
}
.trix-content .attachment--preview .attachment__caption {
  color: #666;
  font-size: 0.9em;
  line-height: 1.2;
}
.trix-content .attachment--file {
  color: #333;
  line-height: 1;
  margin: 0 2px 2px 2px;
  padding: 0.4em 1em;
  border: 1px solid #bbb;
  border-radius: 5px;
}
.trix-content .attachment-gallery {
  display: flex;
  flex-wrap: wrap;
  position: relative;
}
.trix-content .attachment-gallery .attachment {
  flex: 1 0 33%;
  padding: 0 0.5em;
  max-width: 33%;
}
.trix-content .attachment-gallery.attachment-gallery--2 .attachment, .trix-content .attachment-gallery.attachment-gallery--4 .attachment {
  flex-basis: 50%;
  max-width: 50%;
}
/*
 * Provides a drop-in pointer for the default Trix stylesheet that will format the toolbar and
 * the trix-editor content (whether displayed or under editing). Feel free to incorporate this
 * inclusion directly in any other asset bundle and remove this file.
 *

*/

/*
 * We need to override trix.css’s image gallery styles to accommodate the
 * <action-text-attachment> element we wrap around attachments. Otherwise,
 * images in galleries will be squished by the max-width: 33%; rule.
*/
.trix-content .attachment-gallery > action-text-attachment,
.trix-content .attachment-gallery > .attachment {
  flex: 1 0 33%;
  padding: 0 0.5em;
  max-width: 33%;
}

.trix-content .attachment-gallery.attachment-gallery--2 > action-text-attachment,
.trix-content .attachment-gallery.attachment-gallery--2 > .attachment, .trix-content .attachment-gallery.attachment-gallery--4 > action-text-attachment,
.trix-content .attachment-gallery.attachment-gallery--4 > .attachment {
  flex-basis: 50%;
  max-width: 50%;
}

.trix-content action-text-attachment .attachment {
  padding: 0 !important;
  max-width: 100% !important;
}
/* Audit Logs Styles */

/* Filters Section */
.audit-filters {
  background: var(--gray-100, #f8f9fa);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.audit-filters__form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.filter-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 180px;
  flex: 1;
}

.filter-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700, #495057);
}

.filter-actions {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  align-items: flex-end;
}

.filter-actions .btn {
  white-space: nowrap;
}

/* Summary */
.audit-summary {
  margin-bottom: 1rem;
  color: var(--gray-600, #6c757d);
  font-size: 0.875rem;
}

/* Table Styles */
.audit-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.audit-table th,
.audit-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--gray-200, #e9ecef);
}

.audit-table th {
  background: var(--gray-50, #f8f9fa);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--gray-700, #495057);
}

.audit-table tbody tr:hover {
  background: var(--gray-50, #f8f9fa);
}

.audit-timestamp {
  font-size: 0.875rem;
  color: var(--gray-600, #6c757d);
  white-space: nowrap;
}

.audit-type {
  font-weight: 500;
}

.audit-type .type-name {
  display: block;
  font-weight: 500;
  color: var(--gray-800, #343a40);
}

.audit-type .type-detail {
  display: block;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--gray-600, #6c757d);
  line-height: 1.4;
}

.audit-record {
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-user {
  font-size: 0.875rem;
  color: var(--gray-600, #6c757d);
}

.audit-context {
  font-size: 0.875rem;
}

.audit-context span {
  display: block;
  line-height: 1.4;
}

.context-platform {
  font-weight: 500;
  color: var(--gray-800, #343a40);
}

.context-focus-area {
  color: var(--gray-600, #6c757d);
  font-size: 0.8125rem;
}

.context-partner-org {
  color: var(--gray-500, #868e96);
  font-size: 0.8125rem;
  font-style: italic;
}

/* Action Badges */
.action-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.action-badge--created {
  background: #d4edda;
  color: #155724;
}

.action-badge--updated {
  background: #cce5ff;
  color: #004085;
}

.action-badge--destroyed {
  background: #f8d7da;
  color: #721c24;
}

.action-badge--large {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Detail View */
.audit-detail {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.audit-detail__header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gray-200, #e9ecef);
}

.audit-detail__header h2 {
  margin: 0;
}

.audit-attributes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.audit-attribute {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.audit-attribute dt {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500, #6c757d);
}

.audit-attribute dd {
  margin: 0;
  font-size: 1rem;
}

.audit-attribute--wide {
  grid-column: 1 / -1;
}

/* Changes Table */
.audit-changes {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.audit-changes h3 {
  margin-top: 0;
  margin-bottom: 1rem;
}

.changes-table {
  width: 100%;
  border-collapse: collapse;
}

.changes-table th,
.changes-table td {
  padding: 0.75rem;
  text-align: left;
  border: 1px solid var(--gray-200, #e9ecef);
  vertical-align: top;
}

.changes-table th {
  background: var(--gray-50, #f8f9fa);
  font-weight: 600;
  font-size: 0.875rem;
}

.changes-table .field-name {
  font-weight: 500;
  width: 25%;
}

.changes-table .field-nested-key {
  display: block;
  font-weight: 400;
  font-size: 0.85em;
  color: var(--gray-600, #4b5563);
  padding-left: 0.75rem;
  border-left: 2px solid var(--gray-200, #e5e7eb);
  margin-left: 0.25rem;
}

.changes-table .old-value {
  background: #fff5f5;
}

.changes-table .new-value {
  background: #f0fff4;
}

.changes-table pre {
  margin: 0;
  font-size: 0.75rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.changes-table em {
  color: var(--gray-500, #6c757d);
  font-style: italic;
}

.side-effect-tag {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  background: var(--gray-100, #f3f4f6);
  color: var(--gray-600, #6b7280);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  vertical-align: middle;
  cursor: help;
}

.audit-triggered-by {
  background: #fff7ed;
  border-left: 4px solid #fb923c;
  border-radius: 4px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.audit-triggered-by h3 {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #9a3412;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.audit-triggered-by__summary {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  color: var(--gray-800, #1f2937);
  font-weight: 500;
}

.audit-triggered-by__note {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--gray-600, #6b7280);
  font-style: italic;
}

/* Metadata Section */
.audit-metadata {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.audit-metadata h3 {
  margin-top: 0;
  margin-bottom: 1rem;
}

.metadata-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.metadata-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.metadata-item dt {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-500, #6c757d);
}

.metadata-item dd {
  margin: 0;
}

/* Link Section */
.audit-link {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.audit-link h3 {
  margin-top: 0;
  margin-bottom: 1rem;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--gray-500, #6c757d);
}

/* Pagination */
.pagination-wrapper {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

/* Responsive */
@media (max-width: 768px) {
  .filter-row {
    flex-direction: column;
  }

  .filter-group {
    width: 100%;
  }

  .audit-table {
    font-size: 0.875rem;
  }

  .audit-table th,
  .audit-table td {
    padding: 0.5rem;
  }

  .audit-record {
    max-width: 150px;
  }
}

/* Revert on a company entry (AuditLogRevert) and a logo's thumbnail. */
.audit-revert-form { display: inline-block; margin: 0 0 0 6px; }
.audit-reverted { margin-left: 6px; font-size: 0.8125rem; color: var(--text-faint, #6b7280); }
.audit-reverted-note { margin: 8px 0 0; color: var(--text-faint, #6b7280); }
.audit-logo { width: 48px; height: 48px; object-fit: contain; border: 1px solid var(--line-soft, #e5e7eb); border-radius: 4px; vertical-align: middle; }
* {
    box-sizing: border-box;
}
:root,
body {
    background: #fff;
    color: var(--gray-dark);
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 0;
}
:root {
    --accent-darker: #6fc4cb;
    --accent-base: #b2e0e4;
    --accent-lighter: #d8eff1;
    --accent-lightest: #f6fcfc;
    --danger-darker: #e8595a;

    --gray-dark: #313131;
    --gray-base: #666;
    --gray-light: #969696;
    --gray-lighter: #ccc;
    --gray-lightest: #fafafa;
    --font-family: Interstate, Overpass, sans-serif;

    --select-arrow: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="13" height="8"><path fill="%23313131" fill-rule="evenodd" d="m7.01 7.222 5.19-5.538A1 1 0 0 0 11.472 0H1.088a1 1 0 0 0-.73 1.684L5.55 7.222a1 1 0 0 0 1.46 0Z"/></svg>');
    font: normal 1rem var(--font-family);
}

main {
    margin: 3.75rem 1.875rem 1.875rem;
    max-width: 90rem;
    padding-bottom: 1.875rem;
}
@media (min-width: 93.75rem) {
    main {
        margin: 3.75rem auto 1.875rem;
    }
}

a {
    color: var(--accent-darker);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 400;
    margin: 0;
    text-transform: uppercase;
}


h1 {
    font: normal 2.25rem / 1.2 var(--font-family);
    grid-column: 1;
    letter-spacing: calc(-0.15 / 56 * 1em);
}
@media (max-width: 1400px) {
    h1 {
        font-size: 2rem;
    }
}
@media (max-width: 1200px) {
    h1 {
        font-size: 1.75rem;
    }
}
@media (max-width: 968px) {
    h1 {
        font-size: 1.5rem;
    }
}
@media (max-width: 768px) {
    h1 {
        font-size: 1.25rem;
    }
}

h2,
caption {
    font: normal 1.5rem / 1.2 var(--font-family);
    letter-spacing: calc(-0.26 / 24 * 1em);
    line-height: calc(29 / 24);
    text-transform: uppercase;
}

p {
    font-weight: 300;
    letter-spacing: calc(-0.17 / 16 * 1em);
    line-height: 1.375;
}

button,
input,
select,
textarea {
    font-family: inherit;
}
input,
textarea {
    border: solid 1px var(--gray-lighter);
    border-radius: 0.25rem;
    color: var(--gray-dark);
    font-size: 1rem;
    letter-spacing: calc(-0.17 / 16 * 1em);
    line-height: calc(8 / 7);
}
input {
    padding: 0.5rem 0.875rem;
}
label {
    font-size: 1.125rem;
    letter-spacing: calc(-0.19 / 18 * 1em);
    line-height: 1.16666666;
}
select {
    appearance: none;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="13" height="8"><path fill="%23313131" fill-rule="evenodd" d="m7.01 7.222 5.19-5.538A1 1 0 0 0 11.472 0H1.088a1 1 0 0 0-.73 1.684L5.55 7.222a1 1 0 0 0 1.46 0Z"/></svg>') no-repeat right 0.5rem center / 1rem 0.5rem, linear-gradient(to bottom, #fdfdfd, #e5e5e5);
    border: solid 1px var(--gray-lighter);
    border-radius: 0.25rem;
    color: var(--gray-light);
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: calc(-0.15 / 14 * 1em);
    padding: 0.5rem 2rem 0.5rem 0.875rem;
}
select[multiple] {
    background-image: none;
    padding: 0.5rem 0.875rem;
}
select:disabled,
select[multiple]:disabled {
    background: var(--gray-lighter);
    border: solid 1px var(--gray-lightest);
    color: var(--gray-dark);
    opacity: 0.6;
    cursor: not-allowed;
}

textarea {
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.5);
    max-width: 100%;
    padding: 0.5rem 0.875rem;
    width: 100%;
}
textarea:disabled {
    background: var(--gray-lighter);
    border: solid 1px var(--gray-lightest);
    color: var(--gray-dark);
    opacity: 0.6;
    cursor: not-allowed;
}

input[type="submit"],
input[type="button"],
input[type="reset"],
button,
.button {
    background-color: var(--gray-lightest);
    border: solid 1px var(--gray-lighter);
    border-radius: 0.25rem;
    color: var(--accent-darker);
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: calc(-0.15 / 14 * 1em);
    padding: 0.5rem 0.875rem;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
}

input[type="submit"]:disabled,
input[type="button"]:disabled,
input[type="reset"]:disabled,
button:disabled,
.button:disabled {
    background-color: var(--gray-lighter); /* Lighter gray to indicate disabled */
    border: solid 1px var(--gray-lightest);
    color: var(--gray-dark); /* Muted text color */
    cursor: not-allowed; /* Show a "not allowed" cursor */
    opacity: 0.6; /* Reduce opacity to indicate disabled state */
}

input[type="checkbox"] {
    transform: scale(1.5);
    width: auto;
}

iframe {
    border: none;
}
::backdrop {
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    background: rgba(0,0,0,0.2);
}
dialog {
    background: #fff;
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 2px 1.25rem rgba(0,0,0,0.5);
}
dialog[open] {
    height: calc(100vh);
    width: 90vw;
}
dialog > button {
    background: transparent;
    border: none;
    border-radius: 0 0.5rem 0 0;
    padding: 1.25rem 1.25rem 0 0;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 1;
}
dialog > button > svg {
    display: block;
}
dialog > iframe {
    height: 100%;
    width: 100%;
}
dialog > img {
    height: 100%;
    object-fit: scale-down;
    object-position: center;
    width: 100%;
}
.button--danger {
    color: var(--danger-darker);
}

.button--danger:hover {
    background-color: var(--danger-darker);
    border-color: var(--danger-darker);
    color: #fff;
}

.button--text {
    background: transparent;
    border-color: transparent;
    display: inline-block;
    padding: 0;
}
a:has(> .calendar-box) {
    text-decoration: none;
}
.calendar-box {
    align-items: center;
    background: var(--accent-base);
    color: #000;
    display: flex;
    flex: 0  0 var(--icon-size);
    flex-direction: column;
    height: var(--icon-size);
    padding: 0 0.3125rem 0.3125rem;
    text-align: center;
    width: var(--icon-size);
}

.calendar-box > .day {
    flex: 1 0 1.25rem;
    font-size: 0.75rem;
    font-weight: 900;
    height: 1.25rem;
    letter-spacing: calc(1.07 / 12 * 1em);
    line-height: calc(5 / 4);
}
.calendar-box > .date {
    background: #fff;
    flex: 1 0 auto;
    font-size: 1.5rem;
    font-weight: 700;
    justify-content: center;
    letter-spacing: calc(-0.26 / 24 * 1em);
    line-height: calc(29 / 24);
    width: 100%;
}

.calendar-box--small {
    padding: 0 0.1875rem 0.1875rem;
}
.calendar-box--small > .day {
    flex-basis: 0.5rem;
    font-size: 0.375rem;
    height: 0.5rem;
}
.calendar-box--small > .date {
    font-size: 1rem;
}
expandable-text .summary,
expandable-text button {
    display: none;
}

expandable-text:defined button {
    display: inline-block;
}

expandable-text:defined .summary {
    display: block;
}
expandable-text:defined .fulltext {
    display: none;
}
expandable-text:defined[open] .summary {
    display: none;
}
expandable-text:defined[open] .fulltext {
    display: block;
}
.actions {
    align-items: center;
    display: flex;
    gap: 1rem 2rem;
    justify-content: space-between;
}

.field,
.actions {
    margin: 0 0 1rem;
}
.field + .field,
.field + .actions {
    margin-top: 1rem;
}

.field > label {
    display: block;
    margin-bottom: 0.5rem;
}
.field > label + br {
    display: none;
}
.field .note {
    margin: 0;
}

/* At some future point we could replace this with a :has() selector, but
 * support isn't quite there yet.
 */
.field--checkbox {
    align-items: baseline;
    display: grid;
    grid-gap: 0.25rem 0.5rem;
    grid-template-columns: auto 1fr;
}
.field--checkbox input {
    grid-column: 1;
}
.field--checkbox label {
    grid-column: 2;
}

.form--with-conditional-fields .field--conditional {
    display: none;
}
.small-icon-file-download-wrapper {
    --icon-size: 1.875rem;
    align-items: center;
    margin-bottom: 0.625rem;
}

.small-icon-file-download-wrapper img {
    height: var(--icon-size);
    object-fit: scale-down;
    width: var(--icon-size);
}
.small-icon-file-download-wrapper a {
    align-items: center;
    display: flex;
    gap: 0.625rem;
    max-width: 100%;
}
.flash__wrapper {
    align-items: center;
    display: flex;
    justify-content: center;
    left: 0;
    position: absolute;
    right: 0;
    width: 100%;
}
.flash {
    align-items: center;
    background: #fff;
    border-radius: 0.25rem;
    box-shadow: 0 0.1rem 0.5rem rgba(0,0,0,0.2);
    display: flex;
    font-weight: 400;
    gap: 0.5rem;
    margin: 1rem;
    max-width: 90rem;
    min-width: 18rem;
    padding: 0.75rem 0.875rem 0.75rem;
}

.flash:empty {
    display: none;
}

.flash--alert {
    border: solid 1px var(--danger-darker);
    color: var(--danger-darker);
}

.flash--notice {
    border: solid 1px var(--accent-darker);
    color: var(--accent-darker);
}

@media (min-width: 93.75rem) {
    .flash {
        margin: 1rem auto 1rem
    }
}
header {
    background-color: #000;
    color: #fff;
    display: grid;
    font-size: 1.125rem;
    grid-template-columns: 1fr 130px 1fr;
}
header > nav {
    padding: 1rem 0.875rem;
}
header.admin {
    grid-auto-flow: column;
    grid-template-rows: min-content 1fr;
}
/* The staff strip above the masthead: a label and a list of links. No link
   ever breaks onto two lines; when the row runs out the list wraps to a
   second row of whole links, lined up under the first link rather than under
   the label. The page a member of staff is on is white over the teal rule. */
.admin .admin-nav {
    align-items: start;
    background: var(--gray-dark);
    column-gap: 1.25rem;
    display: grid;
    font-size: var(--fs-meta);
    grid-column: 1 / -1;
    grid-row: 1;
    grid-template-columns: auto minmax(0, 1fr);
    letter-spacing: 0.04em;
    line-height: 1.5rem;
    padding: 0.375rem 1.875rem;
    text-transform: uppercase;
}
.admin-nav__label {
    color: var(--gray-lighter);
    font-weight: 700;
    white-space: nowrap;
}
.admin-nav__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.375rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.admin-nav__list > li {
    margin: 0;
    padding: 0;
}
.admin-nav a {
    color: var(--accent-lighter);
    display: block;
    font-weight: 400;
    letter-spacing: inherit;
    transition: color 0.15s ease-out;
    white-space: nowrap;
}
.admin-nav a:hover {
    color: #fff;
}
.admin-nav a.current {
    box-shadow: inset 0 -2px 0 var(--accent-base);
    color: #fff;
}
.admin-nav a:focus-visible {
    outline: 2px solid var(--accent-base);
    outline-offset: 2px;
}

header a {
    color: var(--accent-base);
    font-weight: 300;
    letter-spacing: calc(-0.19 / 18 * 1em);
    text-decoration: none;
    text-transform: uppercase;
}
header > * {
    grid-row: 1;
}
header.admin > * {
    grid-row: 2;
}

header > .site-logo {
    background-color: #000;
    border-radius: 50%;
    grid-column: 2;
    margin-bottom: -4rem;
    margin-top: 0;
    padding: 1rem;
}

header popover-toggle {
    --popover-background: #000;
    align-self: center;
    justify-self: end;
    margin-right: 0.625rem;
}
header popover-toggle details {
    justify-self: end;
}
header popover-toggle summary {
    color: var(--accent-base);
}

.nav-list {
    display: grid;
    grid-auto-flow: column;
    grid-column: 1;
    grid-gap: 0 1.25rem;
    justify-content: start;
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.nav-item a {
    align-items: center;
    border-radius: 1.5rem;
    display: flex;
    justify-items: center;
    min-height: 3.125rem;
    padding: 0 1rem;
    text-decoration: none;
}

.nav-item a:hover {
    text-decoration: underline;
}

/* The masthead's own links. The screen you are on is white type over a short
   teal rule set into the bar's bottom edge (the brand's hairline), not a
   filled pill. A label never breaks onto two lines: below 1180px the type
   steps down, and below 1080px the logo gives up its exact centre so the
   links keep their row. */
header > nav {
    --nav-pad: 1rem;
}
header > nav .nav-list {
    grid-gap: 0 0.5rem;
}
header > nav .nav-item a {
    border-radius: 0;
    padding: 0 var(--nav-pad);
    position: relative;
    transition: color 0.15s ease-out;
    white-space: nowrap;
}
header > nav .nav-item a:hover {
    color: #fff;
    text-decoration: none;
}
header > nav .nav-item a:focus-visible {
    outline: 2px solid var(--accent-base);
    outline-offset: -2px;
}
header > nav .nav-item .current {
    color: #fff;
    font-weight: 400;
}
header > nav .nav-item .current::after {
    background: var(--accent-base);
    bottom: -1rem;
    content: "";
    height: 3px;
    left: var(--nav-pad);
    position: absolute;
    right: var(--nav-pad);
}
@media (max-width: 1180px) {
    header > nav {
        --nav-pad: 0.75rem;
        font-size: 1rem;
    }
}
@media (max-width: 1080px) {
    header:has(> .site-logo) {
        grid-template-columns: auto 130px minmax(0, 1fr);
    }
}

#user_nav {
    grid-column: 3;
    justify-self: end;
}

.page-header {
    --icon-size: 5rem;
    align-items: end;
    align-items: last baseline;
    display: grid;
    grid-column: 1 / -1;
    grid-gap: 1.25rem 0.625rem;
    grid-template-areas: "logo title . actions"
        "filter filter filter filter";
    grid-template-columns: var(--icon-size) min-content 1fr min-content;
    min-height: var(--icon-size);
}

.page-header--no-logo {
    grid-template-areas: "title . actions"
        "filter filter filter";
    grid-template-columns: min-content 1fr min-content;
}

.page-header .actions {
    grid-area: actions;
    white-space: nowrap;
}
.page-header .logo {
    border: solid 2px var(--accent-lighter);
    grid-area: logo;
    height: var(--icon-size);
    position: relative;
    width: var(--icon-size);
}
.page-header .logo > img {
    height: calc(var(--icon-size) - 4px);
    width: calc(var(--icon-size) - 4px);
}

.page-header .p-name,
.page-header h1 {
    align-items: start;
    display: flex;
    flex-direction: column;
    grid-area: title;
    justify-content: start;
    white-space: nowrap;
}

/* Program logo used as the page title (replaces the platform name text).
   The box has a FIXED height so the header claims the logo's space before
   the image loads — no layout shift when it arrives. The img inside keeps
   max-constraints so small logos aren't upscaled. */
.page-header__brand-logo-box {
    display: flex;
    align-items: center;
    height: 4.5rem;
    margin-bottom: 0.5rem;
}
.page-header__brand-logo {
    max-height: 4.5rem;
    max-width: 420px;
    width: auto;
    display: block;
}

.page-header .p-name::before {
    color: var(--gray-light);
    content: attr(data-pagetype);
    font: normal 0.875rem / 1.15 var(--font-family);
    letter-spacing: calc(-0.15 / 56 * 1em);
}
.page-header .filter {
    grid-area: filter;
}

@media (max-width: 1200px) {
    .page-header {
        grid-template-columns: var(--icon-size) 1fr min-content;
    }
    .page-header--no-logo {
        grid-template-columns: 1fr min-content;
    }
    .page-header .p-name,
    .page-header h1 {
        white-space: normal;
    }
}
/* If the only element in a section__header, or section__subheader is a heading
 * element (h2, or h3 specifically), this class can be applied directly to that
 * element instead of to the wrapper
 */
.section__header {
    align-items: baseline;
    border-bottom: solid 2px var(--accent-base);
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding: 0 0 0.5rem;
    text-align: left;
}
.section__header > .actions {
    margin: 0;
}
.section__subheader {
    align-items: baseline;
    display: flex;
    justify-content: space-between;
    margin-top: 1.25rem;
    padding: 0 0 0.5rem;
}

.section__subheader--small {
    font-size: 1.125rem;
    font-weight: 400;
    letter-spacing: calc(-0.19 / 18 * 1em);
    line-height: calc(7 / 6);
    text-transform: none;
}

section,
.section {
    margin-bottom: 1.25rem;
}

.section__header a {
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: calc(-0.15 / 14* 1em);
    line-height: calc(8 / 7);
    text-decoration: none;
    text-transform: uppercase;
}

.tabs {
    /*max-width: calc((100vw - 6.25rem) / 3);*/
}
.tabs--wide {
    /*max-width: calc((100vw - 6.25rem) / 3 * 2);*/
}
@media (min-width: 93.75rem) {
    .tabs {
        max-width: calc(87.5rem / 3);
    }
    .tabs--wide {
        max-width: calc(100rem / 3 * 2);
    }
}
.tab-header {
    border-bottom: solid 1px var(--gray-lighter);
    margin-bottom: 1rem;
}
.tab-nav {
    display: flex;
    flex-wrap: nowrap;
    list-style: '';
    margin-bottom: -1px;
    overflow-x: auto;
    padding: 0 0.5rem 0 0;
}
.tab-nav a {
    background: var(--gray-lightest);
    border: solid 1px var(--gray-lighter);
    border-bottom-color: var(--gray-lighter);
    border-radius: 0.5rem 0.5rem 0 0;
    display: block;
    padding: 0.25rem 0.75rem;
    text-decoration: none;
    white-space: nowrap;
}

.tab-nav li + li {
    margin-left: 5px;
}
.tab-nav .active {
    background: #fff;
    border: solid 1px var(--gray-lighter);
    border-bottom-color: #fff;
    color: var(--gray-dark);
    position: relative;
    z-index: 1;
}

.task-list {
    list-style: '';
    margin: 0;
    padding: 0;
}

.task-list .task {
    border-top: solid 1px var(--accent-lighter);
    display: grid;
    grid-gap: 0.625rem 1.5rem;
    grid-template-columns: 10fr 7fr;
    margin: 0 0 1.25rem;
    padding: 0.625rem 0;
}

.task-list img {
    height: var(--icon-size, 3.75rem);
    margin-top: -0.625rem;
    width: var(--icon-size, 3.75rem);
}

.task-list select,
.task-list textarea {
    width: 100%;
}

/* In general we want our form controls to use 1rem for their text size,
 * 1. It's nice, and tends to look better
 * 2. iOS will zoom in when the control is focused if it has a smaller font-size
 *
 * The design calls for smaller text here, but if we want to maintain the larger
 * text on smaller (touch) devices to prevent the goofy zoom.
 */
@media (hover: hover) {
    .task-list select,
    .task-list textarea {
        font-size: 0.875rem;
    }
}

.task-list .task:last-child {
    margin: 0;
}

.task__header {
    align-items: baseline;
    display: flex;
    justify-content: space-between;
}
.task__wrapper {
    /*border: solid 2px var(--accent-base);*/
    list-style: '';
    padding: 1.25rem;
}
.task__wrapper + .task__wrapper {
    margin-top: 1.25rem;
}
.section__header > .task__wrapper,
.section__header + ol > .task__wrapper:first-child,
.section__header + ul > .task__wrapper:first-child {
    border-top: none;
    margin-top: -1.25rem;
}

.task .new_partner_response .actions {
    margin-bottom: 0;
}
.u-logo {
    display: block;
    height: var(--icon-size, 3.75rem);
    object-fit: scale-down;
    object-position: center;
    width: var(--icon-size, 3.75rem);
}
.meeting_header {
    display: flex;
    flex-direction: row;
}

.create_button {
    border: 1px solid #ebebeb;
    display: flex;
    width: fit-content;
    margin: auto;
    padding: 10px;
    border-radius: 10px;
}

.link {
    text-decoration: none;
}
.link:hover {
    color: #99dde0;
}

.meeting_card {
    margin: 10px;
    border-radius: 10px;
    padding-top: 15px;
    padding-bottom: 15px;
    padding-left: 25px;
    padding-right: 25px;
    background-color: white;
    box-shadow: 0 1px 2px #bab8b6, 0 -1px 1px #cfcbc8;
}

.meeting_startup_list {
    display: flex;
    flex-direction: row;
}


.startup_bubble{
    border: 1px solid #ebebeb;
    width: fit-content;
    height: 25px;
    padding: 10px;
    margin-left: 10px;
    margin-right: 10px;
    margin-top: 20px;
    margin-bottom: 10px;
    border-radius: 10px;
    display: flex;
    flex-direction: row;
    align-items: center;
}

.startup_bubble_logo img{
    margin-right: 15px;
    height: 25px;
    width: auto;
}
.construct-list {
    --icon-size: 3.75rem;
    list-style: '';
    padding: 0;
}

.construct-list img:not(.chat-bubble) {
    box-shadow: inset 0 0 0 1px var(--accent-lighter);
    height: var(--icon-size);
    object-fit: scale-down;
    width: var(--icon-size);
}

.construct-list li {
    border-top: solid 1px var(--accent-base);
    margin: 0 0 0.625rem;
    min-height: var(--icon-size);
    padding: 0;
    padding-top: 0.625rem;
}
.construct-list li:first-child {
    border-top: none;
    margin: 0;
    padding: 0;
}
.construct-list popover-toggle {
    align-self: center;
}
.construct-list .p-name {
    color: currentColor;
    display: block;
    font-size: 1rem;
    letter-spacing: calc(-0.17 / 16 * 1em);
    line-height: calc(19 / 16);
    text-decoration: none;
}

.construct-list--tasks {
    --icon-size: 5rem;
    margin: 0 0 1.25rem;
}

.flex-container {
    display: flex;
    flex-wrap: wrap;
}

.flex-container li {
    margin-right: 20px;
    width: calc(50% - 20px); /* adjust width to account for padding */
}

.full-container {
    display: flex;
    flex-wrap: wrap;
}

.full-container li {
    margin-right: 20px;
    width: calc(100% - 20px); /* adjust width to account for padding */
}
.construct-list > .file {
    border-top: solid 2px var(--accent-base);
    display: grid;
    grid-gap: 0.25rem 0.5rem;
    grid-template-areas: "icon category . ."
        "icon name link hamburger"
        "icon meta . .";
    grid-template-columns: 3.75rem 1fr min-content min-content;
    padding: 0.25rem 0 0.75rem;
}
.construct-list .file__filename {
    align-self: center;
    grid-area: name;
    letter-spacing: calc(-0.17 / 16 * 1em);
}
.construct-list .file__icon {
    grid-area: icon;
    margin-top: -0.25rem;
}
.construct-list .file__link {
    align-self: center;
    font-size: 0.875rem;
    font-weight: 700;
    grid-area: link;
    letter-spacing: calc(-0.15 / 14 * 1em);
    text-decoration: none;
    text-transform: uppercase;
}
.construct-list .file__category,
.construct-list .file__meta {
    color: var(--gray-light);
    font-size: 0.75rem;
    letter-spacing: calc(-0.13 / 12 * 1em);
}
.construct .file__meta {
    display: grid;
    grid-gap: 0 1.25rem;
    grid-template-columns: 1fr 1fr 1fr;
}
.construct-list .file popover-toggle {
    grid-area: hamburger;
}
.construct-list .focus-area-startup popover-toggle summary {
    color: var(--accent-base);
}
.construct-list > .focus-area-startup .p-name,
.construct-list > .focus-area-startup .hint {
    padding: 0.25rem 0;
}
.construct-list > .focus-area-startup .p-name {
    color: var(--gray-dark);
}
.construct-list > .focus-area-startup .u-url {
    align-items: center;
    display: grid;
    grid-gap: 0.625rem;
    grid-template-columns: var(--icon-size) 1fr min-content;
    min-height: var(--icon-size);
    text-decoration: none;
}
.construct-list .focus-area-startup-meta {
    display: grid;
    grid-auto-flow: column;
    grid-column: 2;
    grid-gap: 0.625rem;
    grid-row: 2;
    justify-content: start;
}
.construct-list .focus-area-startup-meta > *:empty {
    display: none;
}
.construct-list > .focus-area-startup--with-meta .hint,
.construct-list > .focus-area-startup--with-meta .u-logo {
    grid-row: 1 / span 2;
}

.embedded-focus-area-startup {
    align-items: center;
    display: grid;
    grid-auto-columns: var(--icon-size, 3.75rem) 1fr min-content min-content;
    grid-auto-flow: column;
    grid-gap: 0.625rem;
}
.embedded-focus-area-startup .focus-area-startup__summary {
    font-size: 0.875rem;
    letter-spacing: calc(-0.15 / 14 * 1em);
    line-height: calc(8 / 7);
}
.embedded-focus-area-startup .focus-area-startup__summary p:first-child {
    margin-top: 0;
}
.embedded-focus-area-startup .focus-area-startup__name {
    color: currentColor;
    display: block;
    text-decoration: none;
}
.embedded-focus-area-startup .focus-area-startup__name + br {
    display: none;
}
.embedded-focus-area-startup .focus-area-startup__body {
    justify-self: start;
}

.embedded-focus-area-startup--detailed {
    align-items: start;
}
.embedded-focus-area-startup--detailed .focus-area-startup__name {
    font-size: 1.25rem;
    letter-spacing: calc(-0.21 / 20 * 1em);
    line-height: 1.2;
}
.embedded-focus-area {
    align-items: center;
    display: grid;
    grid-gap: 0.625rem;
    grid-template-columns: var(--icon-size) 1fr min-content;
}

.embedded-focus-area-meeting,
.embedded-focus-area-meeting > .focus-area {
    display: grid;
    grid-auto-flow: column;
    grid-gap: 0.625rem;
}
.embedded-focus-area-meeting {
    align-items: start;
    grid-auto-columns: var(--icon-size) 1fr 1fr min-content;
}
.embedded-focus-area-meeting .focus-area {
    align-items: center;
    display: grid;
    grid-auto-columns: var(--icon-size) 1fr min-content min-content;
    grid-column: 1 / span 4;
}
.embedded-focus-area-meeting .p-name {
    font-weight: 700;
}
.embedded-focus-area-meeting .key-attachment {
    --icon-size: 1.875rem;
    flex-grow: 0;
    grid-column: 2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}
.embedded-focus-area-meeting .key-attachment a {
    align-items: center;
    display: flex;
    gap: 0.625rem;
    max-width: 100%;
}
.embedded-focus-area-meeting .key-attachment .file__filename {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.embedded-focus-area-meeting .remainder {
    align-content: last baseline;
    color: var(--gray-light);
    grid-column: 4;
    justify-self: end;
    line-height: 1.875rem;
    margin: calc(19 / 16 * 1rem + 0.625rem) 0 0; /* FIXME: Find a better solution */
    white-space: nowrap;
}
.embedded-focus-area-meeting .startup-list {
    --icon-size: 1.875rem;
    grid-column: 3 / span 1;
    overflow: hidden;
}
.embedded-focus-area-meeting .startup-list p {
    margin: 0.875em 0;
}
.embedded-focus-area-meeting .startup-list ul {
    display: flex;
    flex-wrap: nowrap;
    gap: 1.25rem;
    list-style: "";
    overflow: hidden;
}
.embedded-focus-area-meeting .startup-list li {
    align-items: center;
    border-top: none;
    display: flex;
    gap: 0.625rem;
    margin: 0;
    white-space: nowrap;
}
.embedded-focus-area-meeting .startup-list .is-ocluded {
    visibility: hidden;
}

.embedded-focus-area-meeting .list-heading {
    font-size: 1rem;
    letter-spacing: calc(-0.17 / 16 * 1em);
    line-height: calc(19 / 16);
    margin: 0 0 0.625rem;
    text-transform: none;
}
.construct-list .meeting {
    align-items: center;
    border: none;
    display: grid;
    grid-gap: 0.625rem;
    grid-template-areas: "date name action";
    grid-template-columns: var(--icon-size) 1fr 1.25rem;
}

.construct-list .meeting--small {
    --icon-size: 1.875rem;
}

.construct-list .meeting > * {
    grid-row: 1;
}

.construct-list .meeting > .calendar-box {
    grid-area: date;
}
.construct-list .meeting > .p-name {
    grid-area: name;
}
.embedded-partner-org {
    align-items: center;
    display: grid;
    grid-auto-columns: var(--icon-size) 1fr;
    grid-auto-flow: column;
    grid-gap: 0.625rem;
}

.embedded-partner-org .p-name {
    color: var(--gray-dark);
}
.construct-list > .partner-response {
    align-items: center;
    display: grid;
    grid-gap: 0.625rem;
    grid-template-columns: var(--icon-size) 1fr 1.25rem;
}
.embedded-platform {
    display: block; /* We shouldn't need this, but Safari sure thinks we do */
}
.embedded-platform > a {
    align-items: center;
    align-self: start;
    display: grid;
    grid-auto-columns: var(--icon-size) 1fr min-content;
    grid-auto-flow: column;
    grid-gap: 0.625rem;
    text-decoration: none;
}

.embedded-platform .p-name {
    color: var(--gray-dark);
}
.construct-list > .project.h-card {
    align-items: center;
    border-top: solid 1px var(--accent-lighter);
    display: grid;
    grid-auto-columns: 1fr 1.25rem;
    min-height: var(--icon-size);
    padding: 0;
}
.construct-list > .project .p-name,
.construct-list > .project .hint {
    padding: 0.25rem 0;
}
.construct-list > .project .hint {
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: calc(-0.15 / 14 * 1em);
    text-transform: uppercase;
}
.construct-list > .project .p-name {
    color: var(--gray-dark);
}
.construct-list > .project .u-url {
    align-items: center;
    display: grid;
    grid-gap: 0.625rem;
    grid-template-columns: var(--icon-size) 1fr min-content;
    min-height: var(--icon-size);
    text-decoration: none;
}
.construct-list .scouting-priority popover-toggle summary {
    color: var(--accent-base);
}
.construct-list > .scouting-priority .p-name,
.construct-list > .scouting-priority .hint {
    padding: 0.25rem 0;
}
.construct-list > .scouting-priority .p-name {
    color: var(--gray-dark);
}
.construct-list > .scouting-priority .u-url {
    align-items: center;
    display: grid;
    grid-gap: 0.625rem;
    grid-template-columns: var(--icon-size) 1fr min-content;
    min-height: var(--icon-size);
    text-decoration: none;
}
.construct-list .scouting-priority-meta {
    display: grid;
    grid-auto-flow: column;
    grid-column: 2;
    grid-gap: 0.625rem;
    grid-row: 2;
    justify-content: start;
}
.construct-list .scouting-priority-meta > *:empty {
    display: none;
}
.construct-list > .scouting-priority--with-meta .hint,
.construct-list > .scouting-priority--with-meta .u-logo {
    grid-row: 1 / span 2;
}
.embedded-scouting-priority {
    align-items: center;
    display: flex;
    flex-direction: row;
    justify-content: space-between; /* Push items to the ends of the container */

}

.embedded-scouting-priority .scouting-priority__body {
    align-items: center;
    display: grid;
    grid-template-columns: 3rem 10rem 1fr auto auto; /* Number, name, summary (flexible), controls, popover */
    grid-gap: 0.625rem;
}

.embedded-scouting-priority .scouting-priority__name {
    color: currentColor;
    display: block;
    text-decoration: none;
}

.embedded-scouting-priority .scouting-priority__summary {
    color: currentColor;
    display: block;
    text-decoration: none;
    margin-left: 20px;
    width: 80%;
}
.embedded-scouting-priority .scouting-priority__name + br {
    display: none;
}
.embedded-scouting-priority .scouting-priority__body {
    justify-self: start;
}

.embedded-scouting-priority--detailed {
    align-items: start;
}
.embedded-scouting-priority--detailed .scouting-priority__name {
    font-size: 1.25rem;
    letter-spacing: calc(-0.21 / 20 * 1em);
    line-height: 1.2;
}

.scouting-priority__controls {
    display: flex;
    flex-direction: row;
    align-items: center;
    text-decoration: none;
}

.scouting-priority__controls a{
    text-decoration: none;
}
.construct-list .stagegate popover-toggle summary {
    color: var(--accent-base);
}
.construct-list > .stagegate .p-name,
.construct-list > .stagegate .hint {
    padding: 0.25rem 0;
}
.construct-list > .stagegate .p-name {
    color: var(--gray-dark);
}
.construct-list > .stagegate .u-url {
    align-items: center;
    display: grid;
    grid-gap: 0.625rem;
    grid-template-columns: var(--icon-size) 1fr min-content;
    min-height: var(--icon-size);
    text-decoration: none;
}
.construct-list .stagegate-meta {
    display: grid;
    grid-auto-flow: column;
    grid-column: 2;
    grid-gap: 0.625rem;
    grid-row: 2;
    justify-content: start;
}
.construct-list .stagegate-meta > *:empty {
    display: none;
}
.construct-list > .stagegate--with-meta .hint,
.construct-list > .stagegate--with-meta .u-logo {
    grid-row: 1 / span 2;
}
.embedded-stagegate {
    align-items: center;
    display: flex;
    flex-direction: row;
    justify-content: space-between; /* Push items to the ends of the container */

}

.embedded-stagegate .stagegate__name {
    color: currentColor;
    display: block;
    text-decoration: none;
}
.embedded-stagegate .stagegate__name + br {
    display: none;
}
.embedded-stagegate .stagegate__body {
    justify-self: start;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}

/* Read-only category pill shown on the stagegate row (assignment still happens
   in the 3-dots popover). */
.stagegate__category-badge {
    display: inline-block;
    padding: 0.05rem 0.5rem;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.6;
    white-space: nowrap;
}

.embedded-stagegate--detailed {
    align-items: start;
}
.embedded-stagegate--detailed .stagegate__name {
    font-size: 1.25rem;
    letter-spacing: calc(-0.21 / 20 * 1em);
    line-height: 1.2;
}
.construct-list .startup popover-toggle summary {
    color: var(--accent-base);
}
.construct-list > .startup .p-name,
.construct-list > .startup .hint {
    padding: 0.25rem 0;
}
.construct-list > .startup .p-name {
    color: var(--gray-dark);
}
.construct-list > .startup .u-url {
    align-items: center;
    display: grid;
    grid-gap: 0.625rem;
    grid-template-columns: var(--icon-size) 1fr min-content;
    min-height: var(--icon-size);
    text-decoration: none;
}
.construct-list .startup-meta {
    display: grid;
    grid-auto-flow: column;
    grid-column: 2;
    grid-gap: 0.625rem;
    grid-row: 2;
    justify-content: start;
}
.construct-list .startup-meta > *:empty {
    display: none;
}
.construct-list > .startup--with-meta .hint,
.construct-list > .startup--with-meta .u-logo {
    grid-row: 1 / span 2;
}

.embedded-startup {
    align-items: center;
    display: grid;
    grid-auto-columns: var(--icon-size, 3.75rem) 1fr min-content;
    grid-auto-flow: column;
    grid-gap: 0.625rem;
}
.embedded-startup .startup__summary {
    font-size: 0.875rem;
    letter-spacing: calc(-0.15 / 14 * 1em);
    line-height: calc(8 / 7);
}
.embedded-startup .startup__summary p:first-child {
    margin-top: 0;
}
.embedded-startup .startup__name {
    color: currentColor;
    display: block;
    text-decoration: none;
}
.embedded-startup .startup__name + br {
    display: none;
}
.embedded-startup .startup__body {
    justify-self: start;
}

.embedded-startup .startup__body .p-name::before {
    color: var(--gray-light);
    content: attr(data-pagetype);
    font: normal 0.875rem / 1.15 var(--font-family);
    letter-spacing: calc(-0.15 / 56 * 1em);
}

.embedded-startup--detailed {
    align-items: start;
}
.embedded-startup--detailed .startup__name {
    font-size: 1.25rem;
    letter-spacing: calc(-0.21 / 20 * 1em);
    line-height: 1.2;
}



.startup-icon-with-hover {
    width: 4rem;
}

.startup-icon-with-hover .b-name {
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: calc(-0.15 / 14* 1em);
    line-height: calc(8 / 7);
    text-decoration: none;
    text-transform: uppercase;
    color: var(--accent-darker);
}

.startup-icon-with-hover .b-stats {
    color: var(--gray-dark);
}

.chat-bubble {
    all: unset; /* Removes inherited styles */ !important;
    width: 20px; /* Set your desired width */
    height: 20px; /* Set your desired height */
    display: inline-block; /* Ensures it behaves like an icon */
}
.construct-list > .task {
    align-items: center;
    display: grid;
    grid-gap: 0.625rem;
    grid-template-columns: var(--icon-size) 1fr 1.25rem;
}

.partner_responses_for_task {
    margin: 10px;
    padding-left: 5px;
    border-left: 5px solid var(--accent-darker);
}


.task-attachment {
    display: flex;
    align-items: center; /* Ensures the whole attachment div aligns properly */
}

.task-attachment a {
    display: flex;
    align-items: center; /* Ensures icon and filename are aligned */
}

.task-attachment .file__filename {
    display: flex;
    align-items: center;
}
.embedded-user {
    align-items: center;
    display: grid;
    grid-auto-columns: var(--icon-size) 1fr min-content;
    grid-auto-flow: column;
    grid-gap: 0.625rem;

}
.embedded-user .u-photo {
    border-radius: calc(var(--icon-size) / 2);
}

/* Activity status sits in a min-content grid column — without nowrap it
   wraps at every space into a one-word-wide stack. */
.embedded-user .user-activity {
    white-space: nowrap;
    justify-self: end;
    font-size: 0.8rem;
    color: #888;
}
main[data-controller~="contracts"] {
    display: grid;
    grid-auto-flow: row dense;
    grid-auto-rows: min-content; /* Set the row height to the minimum content height */
    grid-gap: 2.5rem;
    grid-template-columns: 2fr 1fr;
}

.contract-attributes {

}

.status-completed {
    background-color: green;
    color: white;
    padding: 5px;
}

.status-late {
    background-color: red;
    color: white;
    padding: 5px;
}

.status-pending {
    background-color: yellow;
    color: black;
    padding: 5px;
}

.notes-container {
    border: 1px solid #ccc; /* Gray border for the box */
    padding: 10px;
    background-color: #f9f9f9; /* Light background color */
    margin-top: 10px;
}

.notes-placeholder {
    color: #999; /* Gray color for placeholder text */
}
/* --- Curation panel + site description + admin internals (Task 9) -----------
   Namespaced .curation-* / .admin-internals-* per the styling convention; the
   admin section header uses <header class="intel-section__header"> (defined in
   startup_intelligence.css) to opt out of the unscoped `header` rule in
   components/header.css that otherwise paints every <header> element black.
   -------------------------------------------------------------------------- */

.curation-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem 1.5rem;
  margin: 0.75rem 0;
  padding: 0.75rem 1rem;
  background: var(--teal-wash);
  border: 1px solid var(--teal-rule);
  border-radius: 8px;
}

.curation-panel fieldset {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border: none;
  margin: 0;
  padding: 0;
}

.curation-panel fieldset legend {
  padding: 0;
  margin-bottom: 0.15rem;
}

.curation-panel label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--text);
  white-space: nowrap;
}

.curation-eyebrow {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.curation-site-description {
  color: var(--ink);
  border-left: 3px solid var(--teal-rule);
  padding: 0.15rem 0 0.15rem 0.75rem;
  margin: 0.75rem 0;
}

.curation-suggestion {
  margin: 1rem 0;
}

.curation-view-toggle {
  font-size: 0.8rem;
  margin: 0.5rem 0 0;
}

.admin-internals {
  background: var(--pill-track);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.admin-internals h3 {
  margin: 1rem 0 0.35rem;
}

.admin-internals h3:first-of-type {
  margin-top: 0.25rem;
}

.admin-internals__pre {
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
  white-space: pre-wrap;
  word-break: break-word;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  max-height: 16rem;
  overflow-y: auto;
}

.admin-internals__meta {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.admin-internals table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  margin: 0.25rem 0 0.75rem;
}

.admin-internals th,
.admin-internals td {
  text-align: left;
  padding: 0.2rem 0.5rem;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}

.admin-internals ul,
.admin-internals ol {
  margin: 0 0 0.5rem;
  padding-left: 1.25rem;
  font-size: 0.85rem;
}

.admin-internals__badge {
  display: inline-block;
  background: var(--teal-wash);
  color: var(--teal-ink);
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.05rem 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.admin-internals__badge--demoted {
  background: var(--amber-wash);
  color: var(--amber-ink);
}
ul {
    margin: 0;
    padding: 0;
}
/* Enhanced Page Header */
.page-header--enhanced {
    /*background: linear-gradient(135deg, #91c4c9 20%, #764ba2 100%);*/
    color: black;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.page-title {
    font: normal 2.25rem / 1.2 var(--font-family);
    grid-column: 1;
    letter-spacing: calc(-0.15 / 56 * 1em);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.page-subtitle {
    font-size: 1.1rem;
    margin: 0.5rem 0 0 0;
    opacity: 0.9;
    font-weight: 300;
}

.dashboard-logo {
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem;
    backdrop-filter: blur(10px);
}

/* Dashboard Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2rem;
    align-items: start;
}

.dashboard-sidebar {
    position: sticky;
    top: 2rem;
}

.dashboard-main {
    min-width: 0;
}

/* Stats Section */
.stats-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.stats-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.stat-card {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

/* Platforms Section */
.platforms-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

/* Stagegates Section - Match platforms styling */
.stagegates-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    margin-top: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.platform-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Enhanced Platform List Styling */
.platform-list .construct-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.platform-list .embedded-platform {
    border-top: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 8px;
    border: 1px solid #f3f4f6;
    background: white;
    transition: all 0.2s ease;
}

.platform-list .embedded-platform:hover {
    border-color: #e5e7eb;
    background: #f9fafb;
    transform: translateX(2px);
}

.platform-list .embedded-platform > a {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    text-decoration: none;
    color: inherit;
    min-height: auto;
}

.platform-list .embedded-platform .u-logo {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 6px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    object-fit: cover;
    flex-shrink: 0;
}

.platform-list .embedded-platform .p-name {
    color: #374151;
    font-weight: 500;
    font-size: 0.875rem;
    text-align: left;
    margin: 0;
    line-height: 1.25;
}

.platform-list .embedded-platform .hint {
    color: #6b7280;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: right;
    white-space: nowrap;
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.platform-list .embedded-platform:hover .hint {
    background: #e5e7eb;
    color: #374151;
    border-color: #d1d5db;
}

.platform-list .embedded-platform:hover .p-name {
    color: #1f2937;
}

/* Enhanced Stagegate List Styling - Match platforms */
.stagegates-section .construct-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stagegates-section .stagegate {
    border-top: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 8px;
    border: 1px solid #f3f4f6;
    background: white;
    transition: all 0.2s ease;
}

.stagegates-section .stagegate:hover {
    border-color: #e5e7eb;
    background: #f9fafb;
    transform: translateX(2px);
}

.stagegates-section .stagegate > a {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    text-decoration: none;
    color: inherit;
    min-height: auto;
}

.stagegates-section .stagegate .u-logo {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 6px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    object-fit: cover;
    flex-shrink: 0;
}

.stagegates-section .stagegate .p-name {
    color: #374151;
    font-weight: 500;
    font-size: 1rem;
    text-align: left;
    margin: 0;
    line-height: 1.25;
    padding: 0.25rem 0 0.25rem 0.5rem;
}

.stagegates-section .stagegate .hint {
    color: #6b7280;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: right;
    white-space: nowrap;
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.stagegates-section .stagegate:hover .hint {
    background: #e5e7eb;
    color: #374151;
    border-color: #d1d5db;
}

.stagegates-section .stagegate:hover .p-name {
    color: #1f2937;
}

/* Position stagegate controls on the right */
.stagegates-section .embedded-stagegate {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stagegate__controls {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    flex-direction: row !important;
}

/* Group arrows vertically as a unit */
.stagegate__arrows {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stagegate__control {
    display: block !important;
    text-decoration: none;
    padding: 0.125rem 0.25rem;
    font-size: 0.75rem;
    line-height: 1;
    text-align: center;
}

/* Stagegate 3-dot menu styling */
.stagegate__menu {
    position: relative;
}

.stagegate__menu-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--accent-darker);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    line-height: 1;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stagegate__menu-toggle:hover {
    background: #f3f4f6;
    color: #374151;
}

.stagegate__menu-popup {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 1000;
    min-width: 120px;
    overflow: hidden;
}

.stagegate__menu-popup.hidden {
    display: none;
}

.menu-item {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: #374151;
    transition: background-color 0.2s ease;
}

.menu-item:hover {
    background: #f9fafb;
}

.menu-item--danger {
    color: #dc2626;
}

.menu-item--danger:hover {
    background: #fef2f2;
}

/* Stagegate Modal Styling */
.stagegate-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stagegate-modal.hidden {
    display: none;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    min-width: 400px;
    max-width: 500px;
    position: relative;
    z-index: 2001;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1.5rem 0 1.5rem;
    margin-bottom: 1rem;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.modal-body {
    padding: 0 1.5rem 1.5rem 1.5rem;
}

.modal-body .field {
    margin-bottom: 1rem;
}

.modal-body .field label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #374151;
    font-size: 0.875rem;
}

.modal-body .input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.875rem;
    transition: border-color 0.2s ease;
}

.modal-body .input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.modal-body .actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.modal-body .warning-text {
    color: #dc2626;
    font-size: 0.875rem;
    margin: 0.5rem 0 1rem 0;
}

.button--danger {
    background: #dc2626;
    border-color: #dc2626;
    color: white;
}

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

main[data-controller~="dashboards"] {
    padding: 0;
}
main[data-controller~="dashboards"][data-action~="show"] {
    padding: 0;
}



/* Enhanced Tabs */
.enhanced-tabs {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.enhanced-tab-header {
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    padding: 0;
}

.enhanced-tab-nav {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.enhanced-tab-nav::-webkit-scrollbar {
    display: none;
}

.enhanced-tab-link {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.2s ease;
    min-width: 0;
}

.enhanced-tab-link:hover {
    background: #e5e7eb;
    color: #374151;
}

.enhanced-tab-link.active {
    background: white;
    color: var(--accent-darker);
    border-bottom-color: var(--accent-darker);
    font-weight: 600;
}

.tab-org-name {
    font-size: 0.875rem;
}

.tab-task-count {
    background: #ef4444;
    color: white;
    /* A pill, not a circle: counts run to three digits ("138"). */
    border-radius: 999px;
    flex-shrink: 0;
    min-width: 20px;
    padding: 0 6px;
    box-sizing: border-box;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.enhanced-tab-content {
    padding: 0;
}

.enhanced-tab-pane {
    padding: 1.5rem;
}

.enhanced-tab-pane.hidden {
    display: none;
}

/* Org rail (seamless dashboard): the org tabs run down the left of the card,
   one org per row, beside the selected org's pane. A horizontal strip let the
   buttons shrink below their names (min-width: 0 + nowrap) until the labels
   overlapped. The live-stream tags between header and content render nothing. */
.enhanced-tabs--side {
    display: flex;
    align-items: stretch;
}

.enhanced-tabs--side > .enhanced-tab-header {
    flex: 0 0 auto;
    width: max-content;
    max-width: 15rem;
    border-bottom: 0;
    border-right: 1px solid var(--line);
}

.enhanced-tabs--side > .enhanced-tab-content {
    flex: 1 1 auto;
    min-width: 0;
}

.enhanced-tabs--side .enhanced-tab-nav {
    flex-direction: column;
    overflow: visible;
    padding: 0.5rem 0;
}

.enhanced-tabs--side .enhanced-tab-link {
    justify-content: space-between;
    width: 100%;
    padding: 0.625rem 1.25rem 0.625rem 1rem;
    border-bottom: 0;
    border-left: 3px solid transparent;
    text-align: left;
    white-space: normal;
}

/* The selected org covers the rail's right border, joining its pane. */
.enhanced-tabs--side .enhanced-tab-link.active {
    border-left-color: var(--teal-ink);
    margin-right: -1px;
}

@media (max-width: 768px) {
    .enhanced-tabs--side {
        flex-direction: column;
    }

    .enhanced-tabs--side > .enhanced-tab-header {
        width: auto;
        max-width: none;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .enhanced-tabs--side .enhanced-tab-link.active {
        margin-right: 0;
    }
}

/* Section Headers */
.section-header--enhanced {
    background: #f8fafc;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.section-header__content {
    flex: 1;
}

.section-header__actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.section-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0.25rem 0 0 0;
}

/* Tasks Section */
.tasks-section {
    margin-bottom: 2rem;
}

/* Collapsible Tasks Section */
.tasks-collapsible {
    background: #fffbeb;
    border: 1px solid #f3f4f6;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.tasks-toggle {
    width: 100%;
    background: #fef3c7;
    border: none;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f59e0b;
}

.tasks-toggle:hover {
    background: #fde68a;
}

.tasks-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tasks-right::after {
    content: "▼";
    font-size: 0.8rem;
    color: #92400e;
    transition: transform 0.2s ease;
}

.tasks-toggle.collapsed .tasks-right::after {
    transform: rotate(-90deg);
}

.tasks-title {
    font-size: 1rem;
    font-weight: 600;
    color: #92400e;
    margin: 0;
}

.tasks-count {
    font-size: 0.875rem;
    color: #92400e;
    background: #fbbf24;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
}

.tasks-content {
    background: white;
    border-top: 1px solid #f3f4f6;
}

.tasks-content.hidden {
    display: none;
}

.tasks-list {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
}

/* Compact Task Block Styling */
.task__wrapper {
    background: white;
    border: 1px solid darkgray;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    margin: 0 !important;
}

.task__wrapper + .task__wrapper {
    margin-top: 0.75rem !important;
}

.task__header {
    background: #f8fafc;
    margin: -1rem -1rem 1rem -1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px 8px 0 0;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.task__header h3 {
    color: #374151;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.task__header .timestamp {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0;
    font-weight: 500;
}

.task__header .timestamp::before {
    content: "•";
    margin-right: 0.25rem;
    color: #9ca3af;
}

/* Compact Task Content */
.task {
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

/* Compact Startup Details */
.task .startup-details {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.75rem;
}

/* Compact Startup Details in Task Context */
.task .startup-details .embedded-startup--detailed {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
    align-items: start;
}

.task .startup-details .u-logo {
    width: 4rem;
    height: 3rem;
    border-radius: 4px;
    object-fit: contain;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.task .startup-details .startup__name {
    font-size: 1rem !important;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: #374151;
    text-decoration: none;
}

.task .startup-details .startup__name:hover {
    color: #1f2937;
    text-decoration: underline;
}

.task .startup-details .startup__summary {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.4;
}

.task .startup-details .startup__summary p {
    margin: 0 0 0.5rem 0;
}

.task .startup-details .startup__summary p:last-child {
    margin-bottom: 0;
}

/* Collapsible Partner Task Section */
.task .partner-task-info {
    background: #fffbeb;
    border: 1px solid #f3f4f6;
    border-radius: 6px;
    overflow: hidden;
}

.partner-task-toggle {
    width: 100%;
    background: #fef3c7;
    border: none;
    padding: 0.5rem 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    color: #92400e;
    text-transform: uppercase;
    transition: background-color 0.2s ease;
}

.partner-task-toggle:hover {
    background: #fde68a;
}

.partner-task-toggle::after {
    content: "▼";
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}

.partner-task-toggle.collapsed::after {
    transform: rotate(-90deg);
}

.partner-task-content {
    padding: 0.75rem;
    border-top: 1px solid #f3f4f6;
    background: white;
}

.partner-task-content.hidden {
    display: none;
}

/* Compact Response Form Styling */
.task .seamless-response-form {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    padding: 0.75rem;
}

.task .seamless-response-form h4 {
    color: #15803d;
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    text-transform: uppercase;
}

.task .field {
    margin-bottom: 0.75rem;
}

.task .field label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #374151;
    font-size: 0.875rem;
}

.task .field select,
.task .field textarea,
.task .field input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.875rem;
    transition: border-color 0.2s ease;
}

.task .field select:focus,
.task .field textarea:focus,
.task .field input:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.1);
}

.task .field textarea {
    min-height: 60px;
    resize: vertical;
}

.task .actions {
    margin-top: 0.75rem;
}

.task .actions input[type="submit"] {
    background: #22c55e;
    border: 1px solid #22c55e;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.task .actions input[type="submit"]:hover {
    background: #16a34a;
    border-color: #16a34a;
}

/* Compact Task Completed Styling */
.task-completed {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    padding: 0.75rem;
}

.completion-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: #dcfce7;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.completion-icon {
    font-size: 1rem;
}

.completion-text {
    font-weight: 600;
    color: #166534;
    font-size: 0.875rem;
}

.completion-date {
    font-size: 0.75rem;
    color: #16a34a;
    margin-left: auto;
}

.response-content {
    background: white;
    border: 1px solid #d1fae5;
    border-radius: 4px;
    padding: 0.5rem;
    font-size: 0.875rem;
    color: #166534;
}

/* Compact Task Attachments Styling */
.task-attachments {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.75rem;
}

.task-attachments h4 {
    color: #374151;
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    text-transform: uppercase;
}

.attachments {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.25rem;
}

.attachments li {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.attachments li::before {
    content: "📄";
    font-size: 0.9rem;
    flex-shrink: 0;
}

.attachments a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    word-break: break-all;
}

.attachments a:hover {
    text-decoration: underline;
}

.no-tasks-message {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
    font-style: italic;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px dashed #d1d5db;
}

/* Pipeline Section */
.startup-pipeline-section {
    margin-top: 2rem;
}

/* Enhanced Table with Integrated Header */
.enhanced-table-container {
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.table-header {
    background: #f8fafc;
    border-bottom: 2px solid #e5e7eb;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin: 0;
}

.table-header__content {
    flex: 1;
}

.pipeline-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
}

.pipeline-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0.25rem 0 0 0;
}

.table-header__actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.enhanced-startup-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.enhanced-startup-table thead {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.enhanced-startup-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    border-right: 1px solid #f3f4f6;
}

.enhanced-startup-table th:last-child {
    border-right: none;
}

.enhanced-startup-table td {
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
    border-right: 1px solid #f9fafb;
    vertical-align: middle;
    color: #4b5563;
}

/* Startup name styling */
.enhanced-startup-table .p-name {
    color: #4F4C4A;
    text-decoration: none;
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
    transition: color 0.2s ease;
}

.enhanced-startup-table .p-name:hover {
    color: #3b82f6;
    text-decoration: none;
}

.enhanced-startup-table td:last-child {
    border-right: none;
}

.enhanced-startup-table tbody tr:hover {
    background: #f9fafb;
}

.enhanced-startup-table tbody tr:last-child td {
    border-bottom: none;
}

/* Column specific styles */
.startup-column {
    width: 20%;
}

.topics-column {
    width: 15%;
}

.status-column {
    width: 12%;
}

.contact-column, .deck-column, .meeting-column {
    width: 8%;
    text-align: center;
}

.notes-column {
    width: 29%;
}

.empty-pipeline-message {
    text-align: center;
    padding: 3rem 2rem;
    color: #6b7280;
    font-style: italic;
    background: #f9fafb;
}

/* Org Tab Container */
.org-tab-container {
    background: white;
}

.org-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 1.25rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.org-header__logo {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
}

.org-header__logo-img {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: contain;
}

.org-header__name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-color, #111827);
    text-decoration: none;
    margin-right: auto;
}

.org-header__link {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-darker);
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.15s ease;
}

.org-header__link:hover {
    opacity: 0.7;
}

/* Button Styles */
.button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid;
    transition: all 0.2s ease;
}

.button--primary {
    background: var(--accent-darker);
    border-color: var(--accent-darker);
    color: white;
}

.button--primary:hover {
    background: #43bcc5;
    border-color: #43bcc5;
}

.button--outline {
    background: white;
    border-color: #d1d5db;
    color: #374151;
}

.button--outline:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.button--small {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
}

.empty-state {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 1rem 0;
}

.partners-list__table {
    --icon-size: 2.75rem;
    border-collapse: collapse;
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: calc(-0.13 / 12 * 1em);
    line-height: calc(5 / 4);
    width: 100%;
}

.partners-list {
 }

.partners-list col.icon {
    width: var(--icon-size);
}
.partners-list .numeric {
    text-align: right;
}
.partners-list a,
.partners-list img {
    display: block;
}
.partners-list a {
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: calc(-0.15 / 14 * 1em);
    line-height: calc(8 / 7);
    text-decoration: none;
    text-transform: uppercase;
}
.partners-list td {
    border-top: solid 1px var(--accent-lighter);
    color: var(--gray-base);
    padding: 0.625rem 0 0.625rem;
    vertical-align: middle;
}
/*.partners-list tr td:first-child {*/
/*    border-top: none;*/
/*}*/

.partners-list th + th,
.partners-list td + td {
    padding-left: 0.625rem;
}
.partners-list th {
    text-align: left;
}

.partners-list .p-name {
    color: var(--gray-dark);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: calc(-0.17 / 16 * 1em);
    line-height: calc(19 / 16);
    text-transform: none;
}

.partners-list .form__liner {
    min-width: 250px;
    max-width: 500px;
    left: 110px;
    top: -270px;
}
.partners-list input {
    width: 100%;
}
.hidden-headers {
    height: 0;
    padding: 0;
    margin: 0;
    border: none;
    visibility: hidden;
    line-height: 0;
}
.hidden-headers th {
    height: 0;
    padding: 0;
    margin: 0;
    border: none;
    visibility: hidden;
    line-height: 0;
}
.col-contract-name {
    width: 100px;
}

.partners-list .dropdown-content {
    display: none;
}

.partners-list .custom-checkbox{
    width: 25px;
}

.header_buttons {
    align-items: center;
    align-self: center;
    color: var(--accent-darker);
    display: flex;
    font-size: 0.875rem;
    font-weight: 700;
    justify-self: end;
    min-height: 40px;
    min-width: 40px;
    text-decoration: none;
    text-transform: uppercase;
}

.dropdown-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5em;
    transform: rotate(0deg);
    transition: transform 0.3s ease;
}

.dropdown-btn.open {
    transform: rotate(90deg);
}

.scout-instructions {
    font-style: italic;
    margin-bottom: 1rem;
}

.platform_topics_container {
    display: grid;
    grid-gap: 2rem 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    justify-content: start;
    margin-top: 2rem;
    scroll-margin-top: 8rem;
}

.startup-icon-list {
    list-style: none; /* Removes bullet points */
    padding: 5px;
    display: grid; /* Use grid layout */
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); /* Responsive columns */
    grid-gap: 1rem; /* Space between grid items */
    border-bottom: solid 1px var(--accent-base);
}

.startup-icon-list .startup-icon-with-hover{
    margin: 5px;
}

.platform_topics_container .b-name {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent-darker);
}

.field--conditional {
    display: none;
}

/* Under Review Section Styling */
.under-review-section {
    margin-bottom: 1.5rem;
}

.under-review-collapsible {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    overflow: visible; /* Changed from hidden to visible for popup visibility */
    position: relative;
    z-index: 10;
}

.under-review-toggle {
    width: 100%;
    background: #ffedd5;
    border: none;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #fed7aa;
}

.under-review-toggle:hover {
    background: #fdba74;
}

.under-review-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.under-review-left h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #c2410c;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.under-review-count {
    font-size: 0.875rem;
    color: #c2410c;
    background: #fb923c;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 600;
}

.under-review-right .toggle-icon {
    font-size: 0.8rem;
    color: #c2410c;
    transition: transform 0.2s ease;
}

.under-review-toggle.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.under-review-content {
    background: white;
    border-top: 1px solid #fed7aa;
    padding: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.under-review-content.hidden {
    display: none;
}

/* Grid layout for under review startups */
.under-review-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Compact startup cards for under review */
.under-review-startup {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.75rem;
    position: relative;
    transition: all 0.2s ease;
    cursor: pointer;
}

.under-review-startup:hover {
    border-color: #fb923c;
    box-shadow: 0 2px 8px rgba(251, 146, 60, 0.15);
    transform: translateY(-2px);
}

.under-review-startup .u-logo {
    width: 100%;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    pointer-events: none;
}

.under-review-startup .startup-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.1em; /* Ensure consistent height */
    pointer-events: none;
}

/* Popup that escapes container bounds */
.startup-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.startup-popup.hidden {
    display: none;
}

.popup-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.popup-content {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    padding: 1.5rem;
    min-width: 300px;
    max-width: 400px;
    position: relative;
    z-index: 1001;
    max-height: 80vh;
    overflow-y: auto;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.popup-header h6 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
}

.popup-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.popup-close:hover {
    background: #f3f4f6;
    color: #374151;
}

/* Approval buttons styling */
.approval-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.approve-btn {
    background: #16a34a;
    color: white;
    border: 1px solid #16a34a;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.approve-btn:hover {
    background: #15803d;
    border-color: #15803d;
}

.reject-btn {
    background: #dc2626;
    color: white;
    border: 1px solid #dc2626;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.reject-btn:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}

/* Fix for popover-toggle z-index issues */
popover-toggle {
    position: relative;
    z-index: 1050;
}

popover-toggle details[open] {
    z-index: 1050;
}

popover-toggle .details__liner {
    position: absolute;
    z-index: 1051;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 280px 1fr;
        gap: 1.5rem;
    }
    
    .page-title {
        font-size: 1.75rem;
    }
}

@media (max-width: 968px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .dashboard-sidebar {
        position: static;
        order: 2;
    }
    
    .dashboard-main {
        order: 1;
    }
    
    .page-header--enhanced {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .section-header--enhanced {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .section-header__actions {
        flex-direction: column;
        width: 100%;
    }
    
    .enhanced-tab-nav {
        flex-direction: column;
    }
    
    .enhanced-tab-link {
        justify-content: space-between;
        padding: 1rem;
    }
    
    .pipeline-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .pipeline-header__actions {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .page-title {
        font-size: 1.25rem;
    }

    .enhanced-table-container {
        overflow-x: auto;
    }
    
    .enhanced-startup-table {
        min-width: 600px;
    }
    
    .enhanced-startup-table th,
    .enhanced-startup-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }
    
    /* Under review grid responsive */
    .under-review-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Task Block Responsive */
    .task__wrapper {
        padding: 0.75rem;
    }
    
    .task__header {
        margin: -0.75rem -0.75rem 0.75rem -0.75rem;
        padding: 0.5rem 0.75rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .task__header h3 {
        font-size: 0.875rem;
    }
    
    .task__header .timestamp {
        font-size: 0.8rem;
    }
    
    .task .field select,
    .task .field textarea,
    .task .field input {
        padding: 0.4rem;
        font-size: 0.875rem;
    }
    
    .task .startup-details .embedded-startup--detailed {
        grid-template-columns: auto 1fr;
        gap: 0.5rem;
    }
    
    .task .startup-details .startup__name {
        font-size: 0.875rem !important;
    }
    
    .task .startup-details .startup__summary {
        font-size: 0.8rem;
    }
    
    .completion-badge {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .completion-date {
        margin-left: 0;
    }
    
    /* Platform List Mobile */
    .platform-list .embedded-platform > a {
        padding: 0.6rem;
        gap: 0.6rem;
    }
    
    .platform-list .embedded-platform .u-logo {
        width: 2rem;
        height: 2rem;
    }
    
    .platform-list .embedded-platform .p-name {
        font-size: 0.8rem;
    }
    
    .platform-list .embedded-platform .hint {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
    }
}

@media (max-width: 480px) {
    .under-review-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .startup-popup {
        min-width: 280px;
        max-width: 320px;
    }
}

/* Nested Tabs (Pipeline / Table) */
.nested-tabs {
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.nested-tab-header {
    display: flex;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    padding: 0;
}

.nested-tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 0.875rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
    position: relative;
}

.nested-tab-btn:hover {
    background: #e5e7eb;
    color: #374151;
}

.nested-tab-btn.active {
    background: white;
    color: var(--accent-darker);
    border-bottom-color: var(--accent-darker);
    font-weight: 600;
}

.nested-tab-btn:first-child {
    border-right: 1px solid #e5e7eb;
}

.nested-tab-content {
    padding: 0;
}

.nested-tab-pane {
    padding: 1rem;
}

.nested-tab-pane.hidden,
.nested-tab-pane:not(.active) {
    display: none;
}

/* Adjust pipeline styling within nested tabs */
.nested-tab-pane .pipeline-full-width {
    margin: 0;
}

.nested-tab-pane .enhanced-table-container {
    border: none;
    box-shadow: none;
}

.nested-tab-pane .table-header {
    border-radius: 0;
}

/* Startup Section */
.startup-section {
    margin-top: 2rem;
}

/* Focus area sections in startup popup */
.focus-area-section {
    padding: 0.75rem 0;
}

.focus-area-section.bordered {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}

.focus-area-section-header {
    font-size: 0.75rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #e5e7eb;
}

.focus-area-divider {
    margin: 0.75rem 0;
    border: 0;
    border-top: 1px dashed #d1d5db;
}

/* Tag styling in popup */
.tag-assignment-section {
    margin-top: 0.5rem;
}

.tag-assignment-section label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #374151;
    display: block;
    margin-bottom: 0.25rem;
}

.assigned-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    background: #e0f2fe;
    color: #0369a1;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 500;
}

.tag-pill--removable {
    padding-right: 0.25rem;
}

.tag-pill button {
    background: none;
    border: none;
    color: #0369a1;
    font-size: 0.875rem;
    cursor: pointer;
    margin-left: 0.25rem;
    padding: 0 0.125rem;
    line-height: 1;
}

.tag-pill button:hover {
    color: #dc2626;
}

.add-tag-section {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.add-tag-section select {
    flex: 1;
    font-size: 0.75rem;
    padding: 0.25rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
}

.add-tag-section button {
    background: var(--accent-darker);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-tag-section button:hover {
    background: #43bcc5;
}

/* Pipeline Drag-and-Drop Styles */
.pipeline-startup-card {
    cursor: grab;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    position: relative;
}

.pipeline-startup-card:active {
    cursor: grabbing;
}

/* Ghost element (placeholder where item will drop) */
.pipeline-ghost {
    opacity: 0.4;
    background: #e0f2fe !important;
    border: 2px dashed var(--accent-darker) !important;
    border-radius: 8px;
}

/* Currently selected/grabbed item */
.pipeline-chosen {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    transform: scale(1.02) rotate(1deg);
    z-index: 100;
}

/* Item being dragged */
.pipeline-drag {
    opacity: 0.9;
}

/* Saving state after drop */
.pipeline-saving {
    opacity: 0.6;
    pointer-events: none;
}

.pipeline-saving::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--accent-darker);
    border-top-color: transparent;
    border-radius: 50%;
    animation: pipeline-spin 0.8s linear infinite;
}

@keyframes pipeline-spin {
    to { transform: rotate(360deg); }
}

/* Column highlight when dragging over */
.pipeline-column-content.sortable-chosen-column {
    background: rgba(91, 192, 190, 0.1);
    border: 2px dashed var(--accent-darker);
}

/* Pipeline loading states - show immediately with CSS defaults, JS refines */
/* Set initial column sizing via CSS - provides reasonable layout before JS calculates exact widths */
.pipeline-container.pipeline-loading .pipeline-header,
.pipeline-container.pipeline-loading .pipeline-column-content {
    min-width: 200px;
    flex: 1 1 200px;
}

/* Smooth transition when JS updates the layout */
.pipeline-container.pipeline-ready .pipeline-header,
.pipeline-container.pipeline-ready .pipeline-column-content {
    transition: min-width 0.15s ease, flex 0.15s ease;
}

/* Auto-scroll edge indicators when dragging */
.pipeline-content {
    position: relative;
}

/* Show scroll indicators when dragging is active */
.pipeline-full-width.is-dragging .pipeline-content::before,
.pipeline-full-width.is-dragging .pipeline-content::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 30%;
    pointer-events: none;
    z-index: 50;
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* Left edge gradient */
.pipeline-full-width.is-dragging .pipeline-content::before {
    left: 0;
    background: linear-gradient(to right, rgba(91, 192, 190, 0.3), transparent);
}

/* Right edge gradient */
.pipeline-full-width.is-dragging .pipeline-content::after {
    right: 0;
    background: linear-gradient(to left, rgba(91, 192, 190, 0.3), transparent);
}

/* Show indicators when scrolling in that direction */
.pipeline-full-width.is-dragging.scroll-left .pipeline-content::before,
.pipeline-full-width.is-dragging.scroll-right .pipeline-content::after {
    opacity: 1;
}

/* Pulse animation for active scroll indicators */
@keyframes scroll-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

.pipeline-full-width.is-dragging.scroll-left .pipeline-content::before,
.pipeline-full-width.is-dragging.scroll-right .pipeline-content::after {
    animation: scroll-pulse 0.6s ease-in-out infinite;
}

/* Skeleton Loading Placeholders */
.skeleton-org-tab {
    padding: 1.5rem;
}

.skeleton-header {
    height: 2rem;
    width: 40%;
    background: #e5e7eb;
    border-radius: 6px;
    margin-bottom: 2rem;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-pipeline {
    display: flex;
    gap: 1rem;
}

.skeleton-column {
    flex: 1;
    height: 300px;
    background: #f3f4f6;
    border-radius: 8px;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-column:nth-child(2) {
    animation-delay: 0.2s;
}

.skeleton-column:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes skeleton-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ---- Stagegate Categories manager (partner org page + partner dashboard) ---- */
.sg-categories {
    padding: 0.5rem 0 0;
    /* Query container so the rows below can restack based on the categories
       column's real width, not the viewport. */
    container-type: inline-size;
}
.sg-cat-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    margin-bottom: 0.85rem;
    cursor: pointer;
}
.sg-cat-toggle__input {
    width: auto;
    flex: 0 0 auto;
}
.sg-cat-list {
    margin: 0 0 0.85rem;
    max-height: 200px;
    overflow-y: auto;
}
.sg-cat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.sg-cat-color,
.sg-cat-add__color {
    width: 1.6rem;
    height: 1.6rem;
    padding: 0;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: none;
    cursor: pointer;
    flex: 0 0 auto;
}
.sg-cat-name {
    flex: 1 1 auto;
    font-size: 0.9rem;
    color: #1f2937;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sg-cat-actions {
    display: flex;
    gap: 0.4rem;
    flex: 0 0 auto;
}
.sg-cat-edit,
.sg-cat-delete {
    background: none;
    border: none;
    font-size: 0.78rem;
    cursor: pointer;
    padding: 0.1rem 0.25rem;
}
.sg-cat-edit { color: #02619B; }
.sg-cat-delete { color: #b42318; }
.sg-cat-empty {
    color: #6b7280;
    font-size: 0.85rem;
    font-style: italic;
}
.sg-cat-add {
    display: flex;
    flex-wrap: wrap; /* let the Add button drop to its own line instead of
                        overflowing the box when the column gets narrow */
    gap: 0.5rem;
    align-items: center;
}
.sg-cat-add__name {
    flex: 1 1 100px;
    min-width: 0; /* allow the input to shrink so the row never overflows */
}
.sg-cat-add .button {
    flex: 0 0 auto;
}

/* When the categories column gets narrow, restack each row: color + name on
   the first line (name stays readable), rename/delete on a second line. */
@container (max-width: 215px) {
    .sg-cat-item {
        flex-wrap: wrap;
        row-gap: 0.15rem;
    }
    .sg-cat-name {
        flex: 1 1 auto;
    }
    .sg-cat-actions {
        flex: 0 0 100%;
        justify-content: flex-end;
    }
}

/* Category dropdown inside the stagegate 3-dots popover */
.menu-item--category {
    padding: 0.5rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    border-top: 1px solid #f0f0f0;
    cursor: default;
}
.menu-item--category:hover {
    background: transparent;
}
.stagegate-category-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.stagegate-category-select {
    min-width: 150px;
    width: 100%;
    font-size: 0.8rem;
    padding: 0.3rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
}
main[data-controller~="operating-status-flags"] .dh-stats {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  padding: 0;
}
main[data-controller~="operating-status-flags"] .dh-stat {
  text-align: center;
}
main[data-controller~="operating-status-flags"] .dh-stat__count {
  display: block;
  font-size: 1.5rem;
  font-weight: 600;
}
main[data-controller~="operating-status-flags"] .dh-stat__label {
  font-size: 0.8rem;
  color: var(--text-muted);
}
main[data-controller~="operating-status-flags"] .dh-flag {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
main[data-controller~="operating-status-flags"] .dh-flag__proposed {
  font-size: 0.75rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--red-wash);
  color: var(--red-ink);
  text-transform: capitalize;
}
main[data-controller~="operating-status-flags"] .dh-flag__proposed--acquired {
  background: var(--amber-wash);
  color: var(--amber-ink);
}
main[data-controller~="operating-status-flags"] .dh-flag__evidence,
main[data-controller~="operating-status-flags"] .dh-flag__meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}
main[data-controller~="operating-status-flags"] .dh-empty {
  color: var(--text-muted);
}
.startup-status-badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  background: var(--red-wash);
  color: var(--red-ink);
}
.startup-status-badge--acquired {
  background: var(--amber-wash);
  color: var(--amber-ink);
}
/* ============================================================================
   Design tokens — the site's consolidated visual vocabulary.

   Introduced with the default-platform-page redesign (phase 1). Nothing here
   styles an element; files opt in by consuming the custom properties. Later
   phases (focus area page, dashboards, startup pages) adopt the same tokens
   so the whole app converges on one system.

   Direction: "ink + teal" — a dark teal-biased ink for headings/strong text,
   a deep readable teal for everything interactive (the old pale #6fc4cb on
   white failed contrast), the pale brand teals demoted to rules and washes.
   ========================================================================= */

:root {
    /* --- text --- */
    --ink: #22343a;            /* headings, strong text (teal-biased near-black) */
    --text: #313131;           /* body (matches --gray-dark) */
    --text-muted: #5c6169;     /* secondary text, quiet button labels */
    --text-faint: #868d96;     /* meta, hints, empty states */

    /* --- interactive teal (the readability fix) --- */
    --teal-ink: #2f7e86;       /* links, buttons, active tabs */
    --teal-ink-hover: #266b72;

    /* --- brand teals (decoration only: rules, rings, washes) --- */
    /* base.css --accent-* keep their historical roles; these aliases mark the
       demotion: never use them for text or controls in redesigned surfaces. */
    --teal-rule: #b2e0e4;      /* = --accent-base: the signature hairline */
    --teal-ring: #d8eff1;      /* = --accent-lighter: logo rings, hovers */
    --teal-wash: #f6fcfc;      /* = --accent-lightest: tinted grounds */

    /* --- neutrals (ONE ramp; replaces ~14 ad-hoc greys) --- */
    --line: #dee2e6;           /* primary border */
    --line-soft: #e8ebee;      /* dividers, card edges */
    --wash: #f6f7f8;           /* washed backgrounds (heads, feet, tracks) */
    --pill-track: #eef0f2;     /* pill + progress-bar tracks */

    /* --- semantics --- */
    --amber-ink: #c2410c;      /* "needs decision" text */
    --amber-line: #fed7aa;
    --amber-wash: #fff7ed;
    --amber-accent: #f59e0b;   /* stripes, count pills */

    --green-ink: #166534;
    --green-accent: #16a34a;   /* commit/tick actives */
    --green-accent-hover: #15803d;
    --green-wash: #dcfce7;
    --green-line: #86efac;

    --red-ink: #b91c1c;
    --red-wash: #fee2e2;
    --red-line: #fca5a5;

    --blue-ink: #1d4ed8;       /* presence / live-update signals */
    --blue-wash: #eff6ff;
    --blue-line: #bfdbfe;

    /* --- shape --- */
    --radius-ctl: 5px;         /* buttons, inputs, small controls */
    --radius-item: 6px;        /* cards inside lists (review cards, files) */
    --radius-card: 8px;        /* panels, standalone cards */
    --radius-pill: 999px;

    /* --- elevation --- */
    --shadow-card: 0 1px 2px rgba(17, 24, 39, 0.06);
    --shadow-pop: 0 10px 24px rgba(17, 24, 39, 0.14);

    /* --- type --- */
    --font-ui: 'Overpass Var', Overpass, sans-serif;
    --fs-meta: 0.75rem;        /* 12px: chips, counts, fine print */
    --fs-ui: 0.8125rem;        /* 13px: buttons, tabs, controls */
    --fs-body-sm: 0.875rem;    /* 14px */
}

/* Variable Overpass under an ALIAS family, consumed only via --font-ui.
   Deliberately NOT the same family name as the static faces: with statics at
   300/400/700, today's font-weight:600 resolves to the 700 face everywhere —
   a same-family variable face would silently lighten every existing 600
   (FLITE uses them heavily and must stay visually unchanged this phase). */
@font-face {
    font-family: 'Overpass Var';
    src: url(/assets/Overpass_wght_latin-2d260db64997419f862259988f872901d0d43862ba43999e6ed3d9abfee315a1.woff2) format('woff2-variations');
    font-weight: 300 900;
    font-display: swap;
    unicode-range: U+0020-007F, U+00A0-00FF;
}
/* The company page's staff-only Edit history (startups/_edit_history,
   startup_edit_histories/show). Spans both columns of the page grid. */
#edit_history { grid-column: 1 / -1; min-width: 0; font-family: var(--font-ui); color: var(--text); }
#edit_history > details > summary { cursor: pointer; color: var(--teal-ink); font-size: var(--fs-ui); margin: 4px 0 12px; }

#edit_history .edit-history__bar { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; margin: 0 0 12px; font-size: var(--fs-ui); }
#edit_history .edit-history__list { list-style: none; margin: 0; padding: 0; }
#edit_history .edit-history__entry { padding: 12px 0; border-top: 1px solid var(--line); }
#edit_history .edit-history__meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; margin: 0 0 6px; font-size: var(--fs-ui); }
#edit_history .edit-history__action { font-weight: 700; }
#edit_history .edit-history__action--created { color: var(--green-ink); }
#edit_history .edit-history__action--destroyed { color: var(--red-ink); }
/* Fixed columns, so Before and After line up from one entry to the next. */
#edit_history .edit-history__table { table-layout: fixed; }
#edit_history .edit-history__table .edit-history__field { width: 12rem; }
#edit_history .edit-history__table td { overflow-wrap: anywhere; }
#edit_history .edit-history__values > summary { cursor: pointer; color: var(--teal-ink); font-size: var(--fs-ui); }

/* A long value: its start, then the whole text when opened. */
#edit_history .edit-history__fold > summary { cursor: pointer; list-style: none; }
#edit_history .edit-history__fold > summary::-webkit-details-marker { display: none; }
#edit_history .edit-history__more,
#edit_history .edit-history__less { color: var(--teal-ink); white-space: nowrap; }
#edit_history .edit-history__less,
#edit_history .edit-history__fold[open] .edit-history__start,
#edit_history .edit-history__fold[open] .edit-history__more { display: none; }
#edit_history .edit-history__fold[open] .edit-history__less { display: inline; }
/* Enrichment console (spec §8). Token-native from birth — every colour comes
   from design_tokens.css, and every class is namespaced so require_tree can't
   leak these rules into another page. */

.enrichment-start__form { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; font-size: 0.9rem; color: var(--text); }
.enrichment-grades { display: flex; gap: 0.5rem; margin-top: 0.75rem; }
.enrichment-settings__form { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; font-size: 0.9rem; color: var(--text); }
.enrichment-settings__form .curation-eyebrow { flex-basis: 100%; }
.grade-pill { background: var(--pill-track); color: var(--text-muted); border-radius: 999px; font-size: 0.75rem; font-weight: 600; padding: 0.1rem 0.6rem; }
.grade-pill--rich { background: var(--green-wash); color: var(--green-ink); }
.grade-pill--thin { background: var(--amber-wash); color: var(--amber-ink); }
.grade-pill--dark { background: var(--red-wash); color: var(--red-ink); }
.enrichment-run-row, .enrichment-residue-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.45rem 0.25rem; border-bottom: 1px solid var(--line-soft); font-size: 0.9rem; }
.enrichment-meta { color: var(--text-faint); font-size: 0.8rem; }
.enrichment-hint { color: var(--text-faint); font-size: 0.85rem; }
.enrichment-worklist { list-style: none; padding: 0; margin: 0; }
.run-status { border-radius: 999px; font-size: 0.7rem; font-weight: 650; text-transform: uppercase; letter-spacing: 0.04em; padding: 0.1rem 0.55rem; }
.run-status--queued { background: var(--pill-track); color: var(--text-muted); }
.run-status--running { background: var(--blue-wash); color: var(--blue-ink); }
.run-status--finished { background: var(--green-wash); color: var(--green-ink); }
.run-status--cancelled { background: var(--red-wash); color: var(--red-ink); }

/* Noise-phrase management + boilerplate candidates (Task 11). */
.noise-add-form { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; font-size: 0.9rem; color: var(--text); margin-bottom: 0.75rem; }
.noise-add-form label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.8rem; color: var(--text-muted); }
.noise-phrase-table, .noise-candidate-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.noise-phrase-table th, .noise-candidate-table th { text-align: left; color: var(--text-muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em; padding: 0.3rem 0.5rem; border-bottom: 1px solid var(--line-soft); }
.noise-phrase-table td, .noise-candidate-table td { padding: 0.35rem 0.5rem; border-bottom: 1px solid var(--line-soft); color: var(--text); vertical-align: top; }
.noise-hint { color: var(--text-faint); font-size: 0.85rem; }
.noise-examples { color: var(--text-faint); font-size: 0.8rem; }
.noise-candidate-actions { display: flex; gap: 0.4rem; white-space: nowrap; }
.noise-delete-btn, .noise-ignore-btn { background: none; border: 1px solid var(--line-soft); color: var(--text-muted); }
.noise-promote-btn { background: var(--teal-wash); border: 1px solid var(--teal-rule); color: var(--teal-ink); }

/* The enrichment review pages (review spec 2026-10-05 §3, §5.6, §6, §7):
   the runs list, a run's page (strip, tabs, Details), the all-runs page, and
   the Decisions, Changes and Could not read tabs they share. The UI kit
   supplies the page head, section heads, tabs, pills, counts, buttons and
   figures; these are the parts it has no equivalent for. Tokens only. */

/* Runs list */
.ui-kit .enrich-runs__link { font-weight: 700; color: var(--teal-ink); text-underline-offset: 3px; }
.ui-kit .enrich-runs__link + .ui-faint { display: block; margin-top: 2px; }

/* A run's summary strip */
.ui-kit .intel-page dl.enrich-strip { margin: 0 0 20px; padding: 4px 16px; border: 1px solid var(--line); border-radius: var(--radius-card); background: white; }
.ui-kit .intel-page .enrich-strip .intel-figure { padding: 10px 20px 10px 0; margin-right: 20px; }
.ui-kit .intel-page .enrich-strip .intel-figure:last-child { border-right: 0; }
.ui-kit .intel-page .enrich-strip .intel-figure dd small { margin-left: 4px; font-size: var(--fs-meta); color: var(--text-muted); }
.ui-kit .intel-page .enrich-strip .intel-figure.is-attn dd { color: var(--amber-ink); }
.ui-kit .enrich-tabs { overflow-y: hidden; }
.ui-kit .enrich-tabs .ui-tab { display: inline-flex; align-items: center; gap: 6px; }

/* Details: the report's blocks, collapsed but the first */
.ui-kit .enrich-details { display: flex; flex-direction: column; gap: 12px; }
.ui-kit .enrich-details__block { padding: 0 16px; border: 1px solid var(--line-soft); border-radius: var(--radius-card); background: white; }
.ui-kit .enrich-details__block > summary { cursor: pointer; padding: 12px 0; font: 650 var(--fs-ui) / 1.2 var(--font-ui); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink); }
.ui-kit .enrich-details__block .intel-figures { padding-bottom: 8px; }
.ui-kit .enrich-details__block h4 { margin: 10px 0 4px; font: 650 0.6875rem / 1.2 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.ui-kit .enrich-details__block ul { margin: 0 0 12px; padding-left: 18px; font-size: var(--fs-body-sm); color: var(--text); }
.ui-kit .enrich-details__block > p { margin: 0 0 8px; }

/* Filters and chips. The Decisions and Could not read tabs end their chip
   row with the run, still-open and company fields (enrich-scope). */
.ui-kit .enrich-scope { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 0 auto; }
.ui-kit .enrich-scope input[type=search] { width: 200px; }
.ui-kit .enrich-scope input[type=checkbox] { width: 15px; height: 15px; margin: 0; accent-color: var(--teal-ink); }
.ui-kit .enrich-kind { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: white; color: var(--text-muted); font: 600 var(--fs-meta) / 1 var(--font-ui); text-decoration: none; }
.ui-kit .enrich-kind:hover { border-color: var(--teal-rule); color: var(--ink); }
.ui-kit .enrich-kind[aria-current] { background: var(--ink); border-color: var(--ink); color: white; }
.ui-kit .enrich-kind[aria-current] .ui-count { background: transparent; color: inherit; }

/* The Changes tab as a ledger (review ledger spec 2026-10-10 §3, boards
   Main, Filtered, Anatomy): three filter rows, one group per company with a
   header on the wash ground, then a table of write rows on a four-column
   grid (Field · Before · Written by this run · Review). */
.ui-kit .enrich-ledger__form, .ui-kit .enrich-ledger__post { display: none; }
.ui-kit .enrich-ledger__filters { margin: 0 0 6px; }
.ui-kit .enrich-ledger__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 10px; }
.ui-kit .enrich-ledger__eyebrow { margin-right: 4px; font: 700 var(--fs-ui) / 1.2 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); }
.ui-kit .enrich-ledger__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ui-kit .enrich-ledger__field { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-ui); color: var(--text-muted); }
.ui-kit .enrich-ledger__field input[type=search], .ui-kit .enrich-ledger__field select { height: 30px; min-width: 0; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius-ctl); background: white; font: 400 var(--fs-body-sm) var(--font-ui); color: var(--text); }
.ui-kit .enrich-ledger__search { margin-left: auto; }
.ui-kit .enrich-ledger__search input[type=search] { width: 200px; }
.ui-kit .enrich-ledger__sep { width: 1px; height: 20px; margin: 0 4px; background: var(--line); }
.ui-kit .enrich-ledger__more { position: relative; }
.ui-kit .enrich-ledger__more-panel { display: flex; flex-direction: column; gap: 8px; width: 18rem; }
.ui-kit .enrich-ledger__more-panel .enrich-ledger__field { justify-content: space-between; }
.ui-kit .enrich-ledger__bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-left: auto; }
.ui-kit .enrich-ledger__bulk .ui-disclosure { position: relative; }
.ui-kit .enrich-ledger__bulk .ui-disclosure__panel { left: auto; right: 0; width: 28rem; max-width: calc(100vw - 32px); font-size: var(--fs-body-sm); }
.ui-kit .enrich-ledger__bulk .ui-disclosure__panel form + p { margin-top: 12px; }
.ui-kit .enrich-ledger__also { margin: 0 0 10px; font-size: var(--fs-ui); color: var(--text-muted); }

/* A company's group */
.ui-kit .enrich-co { margin: 0 0 14px; border: 1px solid var(--line); border-radius: var(--radius-card); background: white; overflow: hidden; }
.ui-kit .enrich-co__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); background: var(--wash); }
.ui-kit .enrich-co__name { margin: 0; font: 600 1rem / 1.2 var(--font-ui); color: var(--ink); }
.ui-kit .enrich-co__name a { color: inherit; text-decoration: none; }
.ui-kit .enrich-co__name a:hover { color: var(--teal-ink); }
.ui-kit .enrich-co__site { font-size: var(--fs-ui); overflow-wrap: anywhere; }
.ui-kit .enrich-co__site a { color: var(--teal-ink); text-decoration: none; }
.ui-kit .enrich-co__line { font-size: var(--fs-body-sm); color: var(--text); }
.ui-kit .enrich-co__line b { font-weight: 600; color: var(--green-ink); }
.ui-kit .enrich-co__line.is-red { color: var(--red-ink); }
.ui-kit .enrich-co__line.is-amber { color: var(--amber-ink); }
.ui-kit .enrich-co__line.is-blue { color: var(--blue-ink); }
.ui-kit .enrich-co__decide { text-decoration: none; }
.ui-kit .enrich-co__links { margin: 0; font-size: var(--fs-meta); color: var(--text-faint); }
.ui-kit .enrich-co__head > .enrich-co__links { margin-left: auto; }
/* Evidence sits with the bulk button at the header's right; open, it takes
   the header's full width under the rest, and the bulk button holds the
   right edge. */
.ui-kit .enrich-co__evidence { order: 1; margin-left: auto; }
.ui-kit .enrich-co__bulk { order: 2; margin: 0; }
.ui-kit .enrich-co__evidence > summary { list-style: none; }
.ui-kit .enrich-co__evidence > summary::-webkit-details-marker { display: none; }
.ui-kit .enrich-co__evidence .enrich-co__hide,
.ui-kit .enrich-co__evidence[open] .enrich-co__show { display: none; }
.ui-kit .enrich-co__evidence[open] .enrich-co__hide { display: inline; }
.ui-kit .enrich-co__evidence[open] { order: 3; flex-basis: 100%; margin-left: 0; }
.ui-kit .enrich-co__head:has(> .enrich-co__evidence[open]) .enrich-co__bulk { margin-left: auto; }
.ui-kit .enrich-co__evidence-body { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; padding: 12px 0 2px; border-top: 1px solid var(--line-soft); font-size: var(--fs-body-sm); color: var(--text-muted); }
.ui-kit .enrich-co__evidence-body .pass-co__steps { margin: 0; }
.ui-kit .enrich-co__evidence-body .pass-co__judgment { margin: 0; }
.ui-kit .enrich-co__hidden { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0; padding: 8px 16px; border-top: 1px solid var(--line-soft); font-size: var(--fs-ui); color: var(--text-faint); }
.ui-kit .enrich-co--light .enrich-co__head { padding: 10px 16px; }

/* The write rows */
.ui-kit .enrich-ledger__table turbo-frame { display: block; }
.ui-kit .enrich-ledger__table--boxed { margin: 0 0 12px; border: 1px solid var(--line); border-radius: var(--radius-card); background: white; overflow: hidden; }
.ui-kit .enrich-row { display: grid; grid-template-columns: 168px minmax(0, 1fr) minmax(0, 1.35fr) 268px; gap: 0 16px; align-items: start; padding: 10px 16px; border-top: 1px solid var(--line-soft); font-size: var(--fs-body-sm); line-height: 1.35; color: var(--text); }
.ui-kit .enrich-row--head { padding: 8px 16px; border-top: 0; font: 700 0.6875rem / 1.2 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); }
.ui-kit .enrich-row.is-done { background: var(--wash); }
.ui-kit .enrich-row.is-editing { background: var(--teal-wash); }
.ui-kit .enrich-row__field { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ui-kit .enrich-row__field strong { font-weight: 600; color: var(--ink); }
.ui-kit .enrich-row__field small { font: 400 0.6875rem / 1.2 var(--font-ui); color: var(--text-faint); }
.ui-kit .enrich-row__field small a { color: var(--text-faint); }
.ui-kit .enrich-row__field small a:hover { color: var(--text); }
.ui-kit .enrich-row__val { min-width: 0; overflow-wrap: anywhere; }
.ui-kit .enrich-row__val em { font-style: italic; color: var(--text-faint); }
.ui-kit .enrich-row__wide { grid-column: 2 / -1; }
.ui-kit .enrich-row__after.is-struck { color: var(--text-faint); text-decoration: line-through; }
.ui-kit .enrich-row__pair { display: block; margin-bottom: 4px; }
.ui-kit .enrich-row__q { display: block; margin-top: 4px; font-size: var(--fs-meta); font-style: italic; color: var(--text-faint); }
.ui-kit .enrich-row__src { font-style: normal; }
.ui-kit .enrich-row__drift { display: block; margin-top: 4px; font-size: var(--fs-meta); color: var(--amber-ink); }
.ui-kit .enrich-row__now { display: block; margin-top: 4px; color: var(--text); }
.ui-kit .enrich-row__note { display: block; font-size: var(--fs-meta); color: var(--text-faint); }
.ui-kit .enrich-row__logo { display: inline-flex; align-items: center; gap: 10px; }
.ui-kit .enrich-row__review { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.ui-kit .enrich-row__state { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--fs-meta); color: var(--text-faint); }
.ui-kit .enrich-row__btns { display: flex; flex-wrap: wrap; gap: 4px; }
.ui-kit .enrich-row__btns form { margin: 0; }
.ui-kit .enrich-row__btns .ui-btn[disabled] { opacity: 0.45; cursor: default; }
/* A long value: the cut shows until Show all opens the row (enrichment-value). */
.ui-kit .enrich-pn__more { display: none; }
.ui-kit .is-open .enrich-pn__more { display: inline; }
.ui-kit .is-open .enrich-pn__cut { display: none; }
.ui-kit .enrich-pn__toggle { margin-top: 4px; padding-left: 0; }
.ui-kit .enrich-logo__img { flex: none; width: 48px; height: 48px; object-fit: contain; border: 1px solid var(--line-soft); border-radius: var(--radius-item); }
.ui-kit .enrich-resolved { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--fs-meta); color: var(--text-muted); }
.ui-kit .enrich-editor { display: flex; flex-direction: column; gap: 8px; margin: 0 16px 12px 200px; padding: 10px; border: 1px solid var(--teal-rule); border-radius: var(--radius-item); background: var(--teal-wash); }
.ui-kit .enrich-editor textarea, .ui-kit .enrich-editor input[type=text] { width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius-ctl); background: white; font: 400 var(--fs-body-sm) / 1.45 var(--font-ui); }
.ui-kit .enrich-editor__btns { display: flex; justify-content: flex-end; gap: 6px; }

/* Decisions (review ledger spec 2026-10-10 §4, board Decisions): one
   light heading per kind, then a card per decision on the Changes tab's
   group box (enrich-co): its header on the amber wash while open, grey once
   answered; Our record beside What the site says; the reason; the footer's
   buttons with what else the run wrote on the right. */
.ui-kit .enrich-dgroup { margin: 0 0 18px; }
.ui-kit .enrich-dgroup__head { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.ui-kit .enrich-dgroup__head h2 { margin: 0; font: 600 var(--fs-body-sm) / 1.2 var(--font-ui); color: var(--text-muted); }
.ui-kit .enrich-dcard__body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 24px; padding: 14px 16px; }
.ui-kit .enrich-dcard__body--flat { padding: 0; margin: 0 0 12px; }
.ui-kit .enrich-dcard__side { min-width: 0; }
.ui-kit .enrich-dcard__side h4 { margin: 0 0 8px; font: 700 0.6875rem / 1.2 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); }
.ui-kit .enrich-dcard__side dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; margin: 0; font-size: var(--fs-body-sm); }
.ui-kit .enrich-dcard__side dt { color: var(--text-faint); }
.ui-kit .enrich-dcard__side dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.ui-kit .enrich-dcard__side dd.hi { font-weight: 600; color: var(--amber-ink); }
.ui-kit .enrich-dcard__side dd.same { color: var(--text-faint); }
/* The card (decision card rework 2026-10-11): head, the question and why
   it was held, one comparison table, the choices each beside what it does,
   then a bar whose panels open under it. Amber only on the pill and the
   "not written" words; the card itself stays white while open. */
.ui-kit .enrich-dcard.is-done { background: var(--wash); }
.ui-kit .enrich-dcard label { font-size: inherit; letter-spacing: inherit; line-height: inherit; }
.ui-kit .enrich-dcard__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 14px 20px 0; }
.ui-kit .enrich-dcard__raised { margin-left: auto; font-size: var(--fs-meta); color: var(--text-faint); font-variant-numeric: tabular-nums; }
.ui-kit .enrich-dcard__ask { padding: 8px 20px 16px; }
.ui-kit .enrich-dcard__ask p { margin: 0; }
.ui-kit .enrich-dcard__question { max-width: 72ch; font: 400 1.125rem / 1.35 var(--font-ui); letter-spacing: -0.006em; color: var(--ink); text-wrap: pretty; }
.ui-kit .enrich-dcard__question b { font-weight: 650; }
.ui-kit .enrich-dcard.is-done .enrich-dcard__question { color: var(--text-muted); }
.ui-kit .enrich-dcard__why { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; max-width: 110ch; margin-top: 6px !important; font-size: var(--fs-ui); color: var(--text-muted); }
.ui-kit .enrich-dcard__why q { font-style: italic; color: var(--text-faint); }
.ui-kit .enrich-dcard__held { font-weight: 600; color: var(--amber-ink); }
/* Our record beside the site, a row per part. */
.ui-kit .enrich-dcmp { width: calc(100% - 40px); margin: 0 20px; border-collapse: collapse; table-layout: fixed; font-size: var(--fs-body-sm); line-height: 1.4; }
.ui-kit .enrich-dcmp thead th { padding: 0 16px 6px 0; border-bottom: 1px solid var(--line); text-align: left; font: 700 0.6875rem / 1.2 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); }
.ui-kit .enrich-dcmp thead th:first-child { width: 7.5rem; }
.ui-kit .enrich-dcmp tbody th { padding: 8px 16px 8px 0; text-align: left; vertical-align: top; font-weight: 400; color: var(--text-faint); }
.ui-kit .enrich-dcmp td { min-width: 0; padding: 8px 16px 8px 0; vertical-align: top; overflow-wrap: anywhere; color: var(--text); }
.ui-kit .enrich-dcmp tbody tr + tr > * { border-top: 1px solid var(--line-soft); }
.ui-kit .enrich-dcmp td.hi { font-weight: 600; color: var(--amber-ink); }
.ui-kit .enrich-dcmp td.hi a { color: inherit; text-decoration: underline; text-decoration-color: var(--amber-line); text-underline-offset: 3px; }
.ui-kit .enrich-dcmp td.same { color: var(--text-faint); }
.ui-kit .enrich-dcmp__note { font-size: var(--fs-meta); font-weight: 400; color: var(--text-faint); }
.ui-kit .enrich-dcmp__list { margin: 0; padding-left: 16px; }
.ui-kit .enrich-dcmp__logo { display: block; width: 48px; height: 48px; object-fit: contain; border: 1px solid var(--line-soft); border-radius: var(--radius-item); }
.ui-kit .enrich-dcmp__list q { font-style: italic; }
/* The choices: a button beside what it does. */
.ui-kit .enrich-dcard__answer { margin: 16px 20px 0; padding: 16px 0 18px; border-top: 1px solid var(--line); }
.ui-kit .enrich-dcard__answer > .enrich-changes__msg { margin: 0 0 10px; }
.ui-kit .enrich-dcard__takeform { display: none; }
.ui-kit .enrich-dopts { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: 8px 16px; }
.ui-kit .enrich-dopt { display: contents; }
.ui-kit .enrich-dopt > .ui-btn { justify-self: start; }
.ui-kit .enrich-dopt__effect { margin: 0; font-size: var(--fs-ui); line-height: 1.4; color: var(--text-muted); }
.ui-kit .enrich-dopt__moves { display: none; }
.ui-kit .enrich-dopt__effect:has(input[data-move-website]:checked) .enrich-dopt__stays { display: none; }
.ui-kit .enrich-dopt__effect:has(input[data-move-website]:checked) .enrich-dopt__moves { display: inline; color: var(--ink); }
.ui-kit .enrich-dopt__logo-stays { display: none; }
.ui-kit .enrich-dopt__effect:has(input[name=keep_logo]:checked) .enrich-dopt__logo-goes { display: none; }
.ui-kit .enrich-dopt__effect:has(input[name=keep_logo]:checked) .enrich-dopt__logo-stays { display: inline; color: var(--ink); }
.ui-kit .enrich-dopt__mod { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; color: var(--text); cursor: pointer; }
.ui-kit .enrich-dopt__mod input[type=checkbox] { width: 14px; height: 14px; margin: 0; accent-color: var(--teal-ink); }
.ui-kit .enrich-dopt__pick { height: 26px; max-width: 16rem; padding: 0 24px 0 6px; border: 1px solid var(--line); border-radius: var(--radius-ctl); font-size: var(--fs-meta); }
.ui-kit .enrich-dopts__head { grid-column: 1 / -1; margin: 10px 0 0; font: 700 0.6875rem / 1.2 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); }
.ui-kit .enrich-dopts__head:first-child { margin-top: 0; }
.ui-kit .enrich-dtake { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 7px 10px 7px 12px; border-radius: var(--radius-ctl); background: var(--wash); font-size: var(--fs-ui); }
.ui-kit .enrich-dtake__label { font-weight: 600; color: var(--text-muted); }
.ui-kit .enrich-dtake__list { flex: 1 1 20rem; min-width: 0; color: var(--text); }
.ui-kit .enrich-dtake__list.is-empty { color: var(--amber-ink); }
.ui-kit .enrich-dtake__choose { align-self: center; font-size: var(--fs-ui); }
/* The acquired card's one form (spec 2026-10-19): a row per part, its
   label in the left column; Absorbed and the acquirer go under "No: not
   acquired", where the data goes under Don't link. */
.ui-kit .enrich-dans { display: grid; gap: 10px; }
.ui-kit .enrich-dans__row { position: relative; display: grid; gap: 4px; min-width: 0; margin: 0; padding: 0 0 10px calc(7.5rem + 16px); border: 0; border-bottom: 1px solid var(--line-soft); font-size: var(--fs-ui); }
.ui-kit .enrich-dans__row > legend { position: absolute; top: 0; left: 0; width: 7.5rem; padding: 0; color: var(--text-faint); }
.ui-kit .enrich-dans__row > label, .ui-kit .enrich-dans__items { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--text); cursor: pointer; }
.ui-kit .enrich-dans__row input[type=radio], .ui-kit .enrich-dans__row input[type=checkbox] { width: 14px; height: 14px; margin: 0; accent-color: var(--teal-ink); }
.ui-kit .enrich-dans__note { font-size: var(--fs-meta); color: var(--text-faint); }
.ui-kit .enrich-dans__onto { display: inline-flex; align-items: center; gap: 6px; }
.ui-kit .enrich-dans__items { gap: 4px 14px; padding-left: 22px; font-size: var(--fs-meta); color: var(--text-muted); }
.ui-kit .enrich-dans__items label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.ui-kit .enrich-dans:has(input[name="answer[acquired]"][value=no]:checked) :is(.enrich-dans__absorbed, .enrich-dans__acquirer, .enrich-dans__onto) { display: none; }
.ui-kit .enrich-dans:has(input[name="answer[acquirer]"][value=none]:checked) .enrich-dans__onto { display: none; }
.ui-kit .enrich-dans:has(input[name="answer[take_data]"][type=checkbox]:not(:checked)) .enrich-dans__items { opacity: 0.55; }
.ui-kit .enrich-dans__go { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.ui-kit .enrich-dans__go .enrich-dopt__effect { flex: 1 1 18rem; }
.ui-kit .enrich-dopts--done { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
/* Choose data: the ticks in a popover anchored under its button, so
   opening it moves nothing on the page. */
.ui-kit .enrich-dpick { inset: auto; top: anchor(bottom); right: anchor(right); position-try-fallbacks: flip-block; width: min(36rem, calc(100vw - 32px)); max-height: min(30rem, 70vh); margin: 6px 0; padding: 0; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-card); background: white; color: var(--text); box-shadow: 0 10px 28px rgba(34, 52, 58, 0.16), 0 2px 6px rgba(34, 52, 58, 0.08); }
.ui-kit .enrich-dpick__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 16px 10px; border-bottom: 1px solid var(--line-soft); font-size: var(--fs-ui); }
.ui-kit .enrich-dpick__head h4 { margin: 0; font: 700 0.6875rem / 1.2 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); }
.ui-kit .enrich-dpick__allnone { padding: 0; border: 0; background: none; font: 600 var(--fs-ui) / 1.2 var(--font-ui); letter-spacing: 0; text-transform: none; color: var(--teal-ink); cursor: pointer; }
.ui-kit .enrich-dpick__allnone:hover { text-decoration: underline; }
.ui-kit .enrich-dpick__items { margin: 0; padding: 6px 16px; list-style: none; font-size: var(--fs-body-sm); }
.ui-kit .enrich-dpick__items > li { padding: 7px 0; }
.ui-kit .enrich-dpick__items > li + li { border-top: 1px solid var(--line-soft); }
.ui-kit .enrich-dpick__items label { display: grid; grid-template-columns: 16px 7rem minmax(0, 1fr); align-items: baseline; gap: 0 10px; cursor: pointer; }
.ui-kit .enrich-dpick__items input[type=checkbox] { width: 15px; height: 15px; margin: 0; align-self: start; margin-top: 2px; accent-color: var(--teal-ink); }
.ui-kit .enrich-dpick__name { font-weight: 600; color: var(--ink); }
.ui-kit .enrich-dpick__val { min-width: 0; font-size: var(--fs-ui); color: var(--text-muted); overflow-wrap: anywhere; }
.ui-kit .enrich-dpick__logo { border-radius: 4px; }
.ui-kit .enrich-dpick__fields { margin: 4px 0 0 calc(16px + 7rem + 20px); padding: 0; list-style: none; font-size: var(--fs-ui); color: var(--text); }
.ui-kit .enrich-dpick__foot { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line-soft); background: white; font-size: var(--fs-meta); color: var(--text-faint); }
/* The bar and its panels. */
.ui-kit .enrich-dcard__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; padding: 9px 20px; border-top: 1px solid var(--line-soft); background: var(--wash); font-size: var(--fs-ui); color: var(--text-faint); }
.ui-kit .enrich-dcard__toggle { display: inline-flex; align-items: center; gap: 7px; padding: 2px 0; border: 0; background: none; font: 600 var(--fs-ui) / 1.2 var(--font-ui); letter-spacing: 0; text-transform: none; color: var(--teal-ink); cursor: pointer; }
.ui-kit .enrich-dcard__toggle::after { content: ""; width: 6px; height: 6px; margin-top: -3px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); transition: transform 0.15s ease-out, margin 0.15s ease-out; }
.ui-kit .enrich-dcard__toggle[aria-expanded=true]::after { margin-top: 3px; transform: rotate(-135deg); }
.ui-kit .enrich-dcard__toggle:hover { color: var(--teal-ink-hover); }
.ui-kit .enrich-dcard__toggle:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 2px; border-radius: 2px; }
.ui-kit .enrich-dcard__also { margin-left: auto; }
.ui-kit .enrich-dcard__panel { display: flex; flex-direction: column; gap: 10px; padding: 14px 20px 16px; border-top: 1px solid var(--line-soft); font-size: var(--fs-body-sm); color: var(--text-muted); }
.ui-kit .enrich-dcard__panel[hidden] { display: none; }
.ui-kit .enrich-dcard__panel p { margin: 0; }
.ui-kit .enrich-dcard__panel h4 { margin: 0 0 4px; font: 700 0.6875rem / 1.2 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); }
.ui-kit .enrich-dcard__panel .enrich-ledger__table { margin: 0; }
.ui-kit .enrich-dcard__links { font-size: var(--fs-meta); color: var(--text-faint); }

/* Could not read */
.ui-kit .enrich-bulk { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-card); background: white; box-shadow: var(--shadow-card); }
.ui-kit .enrich-bulk label { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-ui); color: var(--text-muted); }
.ui-kit .enrich-bulk__sum { margin-right: auto; font-size: var(--fs-ui); color: var(--text-muted); }
.ui-kit .enrich-bulk__sum b { color: var(--ink); }
.ui-kit .enrich-bulk__confirm { position: relative; }
.ui-kit .enrich-bulk__confirm > .ui-disclosure__panel { left: auto; width: 24rem; max-width: calc(100vw - 32px); font-size: var(--fs-body-sm); }
.ui-kit .enrich-unread__line { margin: 0 0 10px; font-size: var(--fs-ui); color: var(--text-muted); }
.ui-kit .enrich-unread__meta { font-size: var(--fs-meta); color: var(--text-faint); }
.ui-kit .enrich-unread__all { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; font-size: var(--fs-ui); color: var(--text-muted); }
.ui-kit .enrich-unread__none { margin: 0; padding: 10px 16px; font-size: var(--fs-ui); color: var(--text-faint); }
.ui-kit .enrich-unread__section .ui-table-wrap { margin: 0; border: 0; border-radius: 0; }
.ui-kit .enrich-unread__table tbody tr:last-child td { border-bottom: 0; }
.ui-kit .enrich-unread__table { width: 100%; border-collapse: collapse; font-size: var(--fs-body-sm); }
.ui-kit .enrich-unread__table th { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; font: 650 0.6875rem / 1.2 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); white-space: nowrap; }
.ui-kit .enrich-unread__table td { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.ui-kit .enrich-unread__table .is-check { width: 28px; padding-right: 0; }
.ui-kit .enrich-unread__table tr.is-off td { color: var(--text-faint); }
.ui-kit .enrich-unread__name { font-weight: 700; color: var(--ink); text-decoration: none; }
.ui-kit .enrich-unread__site { font-size: var(--fs-ui); color: var(--text-muted); }
.ui-kit .enrich-unread__text { max-width: 40ch; font-size: var(--fs-ui); color: var(--text-muted); overflow-wrap: anywhere; }
.ui-kit .enrich-unread__acts { display: flex; justify-content: flex-end; gap: 6px; }
.ui-kit .enrich-unread__acts form { margin: 0; }
.ui-kit .enrich-unread__form { display: none; }

/* The read steps (scraper → Claude's fetch → Haiku → outcome) of a run's
   row, in a Changes-tab group's Evidence and on the company page's card;
   the judgment beside them is laid out by the lab's classes
   (ui_kit_enrichment_lab.css: the lab-path__* rules are scoped to the kit,
   not the lab page). */
.ui-kit .pass-co { margin-bottom: 12px; }
.ui-kit .pass-co__steps { margin: 0 0 10px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-body-sm); color: var(--text); }
.ui-kit .pass-co__step { padding: 4px 10px; border-left: 3px solid var(--line); background: var(--wash); border-radius: 0 var(--radius-item) var(--radius-item) 0; overflow-wrap: anywhere; }
.ui-kit .pass-co__step.is-green { border-left-color: var(--green-ink); }
.ui-kit .pass-co__step.is-amber { border-left-color: var(--amber-accent); background: var(--amber-wash); }
.ui-kit .pass-co__step.is-red { border-left-color: var(--red-ink); background: var(--red-wash); }
.ui-kit .pass-co__step.is-blue { border-left-color: var(--blue-ink); }
.ui-kit .pass-co__step-label { display: inline-block; min-width: 7.5rem; font: 650 var(--fs-meta) / 1.2 var(--font-ui); letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); }
.ui-kit .pass-co__judgment { margin: 0 0 10px; padding-left: 12px; border-left: 2px solid var(--teal-rule); }

/* A row's messages after a control */
.ui-kit .enrich-changes__msg { flex-basis: 100%; margin: 0; font-size: var(--fs-meta); color: var(--text-muted); }
.ui-kit .enrich-changes__msg--bad { color: var(--red-ink); }

/* Taxonomy page (descriptors spec 2026-10-07 §7): kind switch, add form, one
   tree per root; each row indented by its depth, the row a run page named
   outlined. */
.ui-kit .taxo-kinds { display: inline-flex; gap: 6px; }
.ui-kit .taxo-meta { color: var(--text-muted); font-size: var(--fs-meta); }
.ui-kit .taxo-group { margin-bottom: 8px; }
.ui-kit .taxo-group > summary .taxo-meta { margin-left: 8px; text-transform: none; letter-spacing: 0; font-weight: 400; }
.ui-kit .taxo-rows { padding-bottom: 8px; }
.ui-kit .taxo-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 8px 6px 8px calc(6px + var(--taxo-depth, 0) * 20px); border-top: 1px solid var(--line-soft); border-radius: var(--radius-item); }
.ui-kit .taxo-row.is-off .taxo-name { color: var(--text-faint); }
.ui-kit .taxo-row[data-highlight="true"] { outline: 2px solid var(--teal-rule); outline-offset: -2px; background: var(--teal-wash); }
.ui-kit .taxo-row__who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; min-width: 0; }
.ui-kit .taxo-name { color: var(--ink); font-weight: 600; font-size: var(--fs-body-sm); }
.ui-kit .taxo-row__facts { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.ui-kit .taxo-row__facts form { margin: 0; }
.ui-kit .taxo-ext { font-family: ui-monospace, monospace; font-size: 0.6875rem; color: var(--text-faint); }
.ui-kit .taxo-count { min-width: 2.5em; text-align: right; color: var(--text); font-size: var(--fs-body-sm); }
.ui-kit .taxo-inline { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin: 0; }
.ui-kit .taxo-inline input[type="text"] { flex: 1 1 auto; max-width: 420px; font-size: var(--fs-body-sm); }
.ui-kit .taxo-msg { grid-column: 1 / -1; margin: 0; font-size: var(--fs-body-sm); color: var(--green-ink); }
.ui-kit .taxo-msg--bad { color: var(--red-ink); }
.ui-kit .taxo-add { padding: 12px 16px; border: 1px solid var(--line-soft); border-radius: var(--radius-card); background: white; }
.ui-kit .taxo-add__title { margin: 0 0 8px; font: 650 var(--fs-ui) / 1.2 var(--font-ui); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink); }
.ui-kit .taxo-add__fields { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.ui-kit .taxo-add__fields label { display: flex; flex-direction: column; gap: 4px; }
.ui-kit .taxo-add .taxo-msg { margin-bottom: 8px; }
/* A row's edit page (2026-10-10): the fields stacked, Save and Cancel below. */
.ui-kit .taxo-edit { max-width: 560px; }
.ui-kit .taxo-edit__fields { display: flex; flex-direction: column; gap: 12px; }
.ui-kit .taxo-edit__fields label { display: flex; flex-direction: column; gap: 4px; }
.ui-kit .taxo-edit__fields .taxo-edit__check { flex-direction: row; align-items: center; gap: 8px; font-size: var(--fs-body-sm); }
.ui-kit .taxo-edit__note { margin-bottom: 10px; color: var(--text-muted); }
.ui-kit .taxo-edit__actions { display: flex; gap: 8px; margin-top: 14px; }

/* The Words tab (2026-10-10): one table row per word; its companies open in
   place, each with its quote and Remove; the actions on one line. */
.ui-kit .enrich-words__word { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.ui-kit .enrich-words__word small { color: var(--text-muted); font-size: var(--fs-meta); }
.ui-kit .enrich-words__companies details > summary { cursor: pointer; }
.ui-kit .enrich-words__companies ul { margin: 6px 0 0; padding: 0; list-style: none; }
.ui-kit .enrich-words__companies li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 4px 0; border-top: 1px solid var(--line-soft); }
.ui-kit .enrich-words__companies li form { margin: 0 0 0 auto; }
.ui-kit .enrich-words__quote { color: var(--text-muted); font-size: var(--fs-meta); }
.ui-kit .enrich-words__companies p { margin: 4px 0 0; font-size: var(--fs-meta); }
.ui-kit .enrich-words__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.ui-kit .enrich-words__actions form { margin: 0; }
.ui-kit .enrich-ledger__search label { display: inline-flex; align-items: center; gap: 8px; }

/* The start form (2026-10-10): one card, the companies on the left, the
   budget on the right ending in the live estimate, and a washed foot whose
   one button carries the same estimate. Stacks under 720px. */
.ui-kit .ui-card.pass-launch { padding: 0; }
.ui-kit .pass-launch__cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.ui-kit .pass-launch__col { display: flex; flex-direction: column; gap: 20px; min-width: 0; padding: 18px 20px 20px; }
.ui-kit .pass-launch__col--budget { border-left: 1px solid var(--line-soft); }
.ui-kit .pass-launch__group { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.ui-kit .pass-launch__group legend {
    margin: 0 0 8px;
    padding: 0;
    font: 650 0.6875rem / 1.2 var(--font-ui);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.ui-kit .intel-page .pass-launch__choice.intel-choice { align-items: baseline; white-space: normal; }
.ui-kit .pass-launch__choice input[type=radio],
.ui-kit .pass-launch__choice input[type=checkbox] { flex: none; margin: 0; accent-color: var(--teal-ink); }
.ui-kit .pass-launch__option small {
    display: block;
    margin-top: 2px;
    font-size: var(--fs-meta);
    line-height: 1.35;
    color: var(--text-muted);
}
.ui-kit .pass-launch__choice .ui-count { margin-left: 2px; }
.ui-kit .pass-launch__count { width: 15ch; margin-left: 4px; }
.ui-kit .pass-launch__ids { width: 100%; min-height: 2.75rem; resize: vertical; font-variant-numeric: tabular-nums; }
.ui-kit .pass-launch__fill { margin-top: 0.375rem; }
.ui-kit .pass-launch__group .ui-field__hint { margin-top: 2px; }
.ui-kit .pass-launch__fields { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: 12px 16px; align-items: start; }
.ui-kit .pass-launch__estimate { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.ui-kit .pass-launch__estimate > p { margin: 0; font: 400 var(--fs-body-sm) / 1.5 var(--font-ui); color: var(--text); }
.ui-kit .pass-launch__estimate strong { font-weight: 650; color: var(--ink); }
.ui-kit .pass-launch__estimate [data-figure=estimate] { font-size: 1.125rem; }
.ui-kit .pass-launch__how { margin-top: 8px; }
.ui-kit .pass-launch__how > summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    border-radius: var(--radius-ctl);
    font: 600 var(--fs-meta) / 1.4 var(--font-ui);
    color: var(--teal-ink);
    cursor: pointer;
}
.ui-kit .pass-launch__how > summary::-webkit-details-marker { display: none; }
.ui-kit .pass-launch__how > summary::after {
    content: "";
    width: 5px;
    height: 5px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.15s ease-out;
}
.ui-kit .pass-launch__how[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
.ui-kit .pass-launch__how > summary:hover { color: var(--teal-ink-hover); }
.ui-kit .pass-launch__how > summary:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 2px; }
.ui-kit .pass-launch__how p { max-width: 70ch; margin: 8px 0 0; font-size: var(--fs-meta); line-height: 1.5; color: var(--text-muted); }
.ui-kit .pass-launch__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    padding: 12px 20px;
    border-top: 1px solid var(--line-soft);
    border-radius: 0 0 var(--radius-card) var(--radius-card);
    background: var(--wash);
}
.ui-kit .pass-launch__foot .ui-btn { font-variant-numeric: tabular-nums; }
.ui-kit .pass-launch__warn { margin: 0; font-size: var(--fs-meta); font-weight: 600; color: var(--amber-ink); }

@media (max-width: 720px) {
  .ui-kit .pass-launch__cols, .ui-kit .pass-launch__fields { grid-template-columns: minmax(0, 1fr); }
  .ui-kit .pass-launch__col { padding: 16px; }
  .ui-kit .pass-launch__col--budget { border-left: 0; border-top: 1px solid var(--line-soft); }
  .ui-kit .pass-launch__foot { padding: 12px 16px; }
  .ui-kit .pass-launch__foot .ui-btn { flex: 1 1 100%; justify-content: center; }
}

@media (max-width: 760px) {
  .ui-kit .enrich-row, .ui-kit .enrich-dcard__body { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .ui-kit .enrich-row--head { display: none; }
  .ui-kit .enrich-ledger__search, .ui-kit .enrich-ledger__bulk { margin-left: 0; }
  .ui-kit .enrich-editor { margin: 0 16px 12px; }
  .ui-kit .enrich-scope, .ui-kit .enrich-dcard__also { margin-left: 0; }
  .ui-kit .enrich-dopts { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .ui-kit .enrich-dopt__effect { margin-bottom: 8px; }
  .ui-kit .enrich-scope input[type=search] { width: 100%; }
  .ui-kit .taxo-row { grid-template-columns: minmax(0, 1fr); }
  .ui-kit .taxo-row__facts { justify-content: flex-start; flex-wrap: wrap; }
}

/* The company page keeps its existing columns; its staff review panel spans
   both and opts only that section into the shared row styles. */
#enrichment { grid-column: 1 / -1; min-width: 0; font-family: var(--font-ui); color: var(--text); }
/* ============================================================
   FLITE brand blue — remap the app's teal accent to the FLITE
   dark blue (the same palette the public proposal form uses) on
   every FLITE surface: the seamless dashboard, the reviewer
   dashboard, the proposal popovers, and the presenter/reviewer
   modes. Scoped to those wrappers so non-FLITE platforms keep the
   teal accent. All var(--accent-*) usages below flip automatically.
   ============================================================ */
.flite-platform,
.flite-reviewer,
.flite-presenter,
.proposal-overlay-wrapper,
.flite-settings,
.flite-modal-overlay,
.page-header--flite,
.under-review-item__topic {
    --accent-darker:   #02619b; /* primary dark blue (was #6fc4cb) */
    --accent-base:     #72bbdc; /* light blue        (was #b2e0e4) */
    --accent-mid:      #2f85b5; /* the light blue deepened for TEXT use —
                                   #72bbdc itself is too pale to read on white */
    --accent-lighter:  #cfe6f4; /* light tint         (was #d8eff1) */
    --accent-lightest: #eef6fc; /* near-white tint    (was #f6fcfc) */
    --accent-hover:    #024d7c; /* deeper blue for hover / press    */
}

/* .button--primary hover is a hardcoded teal in shared CSS — deepen it to the
   FLITE blue on FLITE surfaces (rest state already flips via --accent-darker). */
.flite-platform .button--primary:hover,
.flite-reviewer .button--primary:hover,
.proposal-overlay-wrapper .button--primary:hover,
.flite-settings .button--primary:hover,
.page-header--flite .button--primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

/* Header actions (Advance Round / Settings) sit level with the TOP of the
   logo/title instead of dropping to the header's last-baseline row. */
.page-header--flite .actions {
    align-self: start;
}

/* Active-round subtitle stacked under the FLITE program logo/title. */
.page-header--flite .page-header__flite-subline {
    display: block;
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--flite-muted);
    margin-top: 0.125rem;
}
.page-header--flite .page-header__flite-dates {
    display: block;
    font-size: 0.65rem;
    font-weight: 400;
    color: var(--flite-faint);
    margin-top: 0.0625rem;
}
/* Buffer between the active round's date line and the Next Round pair, so the
   two label+date pairs read as separate blocks. */
.page-header--flite .page-header__flite-subline--next {
    margin-top: 0.45rem;
}

/* ============================================================
   FLITE semantic tokens — ONE status palette + ONE gray ramp.
   Declared at :root (NOT inside .flite-platform) because shared
   partials (pipeline CRM cards) also render on non-FLITE pages.
   Every FLITE badge/banner/status color should reference these —
   never a raw hex. Pastel bg + dark fg is the single badge
   language across all surfaces.
   ============================================================ */
:root {
    /* good / active / approved / voted */
    --flite-status-good-bg:      #dcfce7;
    --flite-status-good-fg:      #166534;
    /* warn / pending / saved-for-later / private */
    --flite-status-warn-bg:      #fef3c7;
    --flite-status-warn-fg:      #92400e;
    /* info / under-review / partner-visible — FLITE brand tint */
    --flite-status-info-bg:      #e3f1f9;
    --flite-status-info-fg:      #02619b;
    /* danger / rejected / destructive */
    --flite-status-danger-bg:    #fee2e2;
    --flite-status-danger-fg:    #991b1b;
    /* neutral / round labels / archived */
    --flite-status-neutral-bg:   #f3f4f6;
    --flite-status-neutral-fg:   #6b7280;
    /* completed */
    --flite-status-completed-bg: #e0e7ff;
    --flite-status-completed-fg: #3730a3;

    /* FLITE gray ramp (the Tailwind grays these surfaces already use —
       deliberately distinct from base.css --gray-* which are different hues). */
    --flite-ink:   #1f2937;
    --flite-text:  #374151;
    --flite-muted: #6b7280;
    --flite-faint: #9ca3af;
    --flite-line:  #e5e7eb;
    --flite-wash:  #f9fafb;

    /* Action-feedback text tones (JS status messages, links-as-actions). */
    --flite-ok:  #059669;
    --flite-err: #dc2626;
}

/* Status text for JS-driven inline messages (saving / saved / error). */
.flite-status-text--ok    { color: var(--flite-ok); }
.flite-status-text--err   { color: var(--flite-err); }
.flite-status-text--muted { color: var(--flite-muted); }

/* Right-aligned action cluster inside a section header. */
.flite-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Pipeline header variant: the mode buttons on ONE row in two groups —
   reading tools (PDF, Reviewer Mode) left, the presenter pair right — with a
   wider gap between the groups than within them, so Presenter Settings stays
   beside the mode it configures. Wraps to two rows only when the header is
   genuinely too narrow. */
.flite-header-actions--modes {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem 1.25rem;
}
.flite-header-actions--modes .flite-actions-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Keep a button_to's generated <form> from forcing its own block line. */
.flite-inline-form {
    display: inline;
}

/* ============================================================
   FLITE unified button — ONE quiet control for every FLITE
   action (dashboard headers, proposal popover, modals). At rest
   it's an uppercase word inside a whisper-hairline outline, so
   buttons sitting side by side stay distinct and never bleed
   together. On hover it fills with its tone — the same "lights
   up into a button" feel as the popover Archive / Edit controls.
   Tone (default blue / warn / danger / muted) lives in the text
   and the hover fill; the resting outline stays neutral.
   ============================================================ */
.flite-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    padding: 0.32rem 0.65rem;
    border: 1px solid var(--flite-line);
    border-radius: 6px;
    background: transparent;
    color: var(--accent-darker);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.flite-btn:hover {
    background: var(--accent-lightest);
    border-color: var(--accent-base);
    color: var(--accent-darker);
}
.flite-btn:focus-visible {
    outline: 2px solid var(--accent-base);
    outline-offset: 1px;
}
.flite-btn:disabled,
.flite-btn.is-disabled {
    color: var(--flite-faint);
    background: transparent;
    border-color: var(--flite-line);
    opacity: 0.65;
    cursor: not-allowed;
    pointer-events: none;
}

/* When a .flite-btn is an <a> inside a section header (Reviewer/Presenter Mode,
   View Rejected), the global `.section__header a` rule would otherwise force its
   own larger uppercase-link font/tracking — pin the button's own metrics back. */
.section__header a.flite-btn {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.2;
}

/* Tones — text color at rest, matching tint fill + border on hover. */
.flite-btn--danger { color: var(--flite-status-danger-fg); }
.flite-btn--danger:hover {
    background: var(--flite-status-danger-bg);
    border-color: var(--flite-status-danger-fg);
    color: var(--flite-status-danger-fg);
}
.flite-btn--warn { color: var(--flite-status-warn-fg); }
.flite-btn--warn:hover {
    background: var(--flite-status-warn-bg);
    border-color: var(--flite-status-warn-fg);
    color: var(--flite-status-warn-fg);
}
.flite-btn--muted { color: var(--flite-muted); }
.flite-btn--muted:hover {
    background: var(--flite-wash);
    border-color: var(--flite-faint);
    color: var(--flite-text);
}

/* Solid emphasis — the single commit action in a context (a modal's submit,
   a first-run CTA). Same shape and size; filled so a real commit stands out
   from the quiet ghost buttons around it. */
.flite-btn--solid {
    background: var(--accent-darker);
    border-color: var(--accent-darker);
    color: #fff;
}
.flite-btn--solid:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
}
.flite-btn--solid.flite-btn--danger {
    background: var(--flite-status-danger-fg);
    border-color: var(--flite-status-danger-fg);
    color: #fff;
}
.flite-btn--solid.flite-btn--danger:hover {
    background: #7f1d1d;
    border-color: #7f1d1d;
    color: #fff;
}

/* Rails submit_tag / form.submit render <input type="submit">, and the base
   `input[type="submit"]` attribute selector (0,1,1) outguns `.flite-btn`
   (0,1,0) — mirror the button reset at matching specificity so submits look
   identical to button/link .flite-btns. */
input[type="submit"].flite-btn {
    background: transparent;
    border: 1px solid var(--flite-line);
    border-radius: 6px;
    color: var(--accent-darker);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 0.32rem 0.65rem;
}
input[type="submit"].flite-btn:hover {
    background: var(--accent-lightest);
    border-color: var(--accent-base);
    color: var(--accent-darker);
}
input[type="submit"].flite-btn--solid {
    background: var(--accent-darker);
    border-color: var(--accent-darker);
    color: #fff;
}
input[type="submit"].flite-btn--solid:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
}
input[type="submit"].flite-btn--danger { color: var(--flite-status-danger-fg); }
input[type="submit"].flite-btn--danger:hover {
    background: var(--flite-status-danger-bg);
    border-color: var(--flite-status-danger-fg);
    color: var(--flite-status-danger-fg);
}
/* Solid danger commit (the Advance-Round modal submit) — without this
   compound, the plain --danger rule painted red TEXT over the --solid
   background. Mirrors .flite-btn--solid.flite-btn--danger. */
input[type="submit"].flite-btn--solid.flite-btn--danger {
    background: var(--flite-status-danger-fg);
    border-color: var(--flite-status-danger-fg);
    color: #fff;
}
input[type="submit"].flite-btn--solid.flite-btn--danger:hover {
    background: #7f1d1d;
    border-color: #7f1d1d;
    color: #fff;
}

/* ============================================
   Post-approval submission alert banner
   New proposals that landed after a startup was
   already approved into the pipeline. Warn-toned.
   ============================================ */
.flite-post-approval-banner {
    background: var(--flite-status-warn-bg);
    border: 1px solid #f59e0b;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}
.flite-post-approval-banner__title {
    color: var(--flite-status-warn-fg);
    font-weight: 700;
}
.flite-post-approval-banner__hint {
    color: var(--flite-status-warn-fg);
    font-size: 0.8125rem;
    margin-top: 0.25rem;
}
.flite-post-approval-banner__list {
    margin: 0.5rem 0 0;
    padding: 0;
    list-style: none;
    color: var(--flite-status-warn-fg);
    font-size: 0.8125rem;
}
.flite-post-approval-banner__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.25rem;
    border-top: 1px solid #fde68a;
    cursor: pointer;
}
.flite-post-approval-banner__item-main {
    flex: 1;
}
.flite-post-approval-banner__cue {
    color: var(--flite-status-warn-fg);
    font-size: 0.75rem;
    font-style: italic;
}
.flite-post-approval-banner__more {
    padding: 0.25rem 0;
    font-style: italic;
}
.flite-post-approval-banner__archive.button {
    background: var(--flite-status-warn-fg);
    color: #fff;
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border: none;
    border-radius: 3px;
}

/* "Keep" sits beside Archive as the non-destructive half of the decision, so
   it reads as the quieter option rather than a second warning-coloured action. */
.flite-post-approval-banner__keep.button {
    background: #fff;
    color: var(--flite-status-warn-fg);
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border: 1px solid var(--flite-status-warn-fg);
    border-radius: 3px;
    margin-right: 0.375rem;
}

/* ============================================
   FLITE Platform Page — Layout
   ============================================ */

.flite-platform {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    width: 100%;
    grid-column: 1 / -1;
}

/* Override the parent platforms grid forcing sections to column 1 */
.flite-platform section {
    grid-column: auto;
}

/* ============================================================
   Page structure — four groups, two heading tiers.
   Reading order: what needs a decision (Under Review + Saved),
   the round in motion (Pipeline), outcomes (Active / Upcoming
   projects), then the archive (Repository, Files) closed by
   default. Rhythm: 1rem inside a group, 3rem between groups,
   so proximity says what belongs together instead of seven
   identical mastheads with one repeated interval.
   ============================================================ */
.flite-platform {
    gap: 1.5rem; /* banner → first group; groups own the rest of the rhythm */
}

/* B6: the lab's sections (_flite_workspace_tabs) — a quiet underline row
   above everything else; Rounds (this page) carries the rule. */
.flite-lab-tabs {
    display: flex;
    align-items: flex-end;
    gap: 1.25rem;
    border-bottom: 1px solid var(--line-soft);
    font-size: var(--fs-meta);
}
.flite-lab-tabs__tab {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
    padding: 0.35rem 0.1rem 0.45rem;
    margin-bottom: -1px; /* the current tab's rule covers the row's */
    border-bottom: 2px solid transparent;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
}
.flite-lab-tabs a.flite-lab-tabs__tab:hover {
    color: var(--ink);
}
.flite-lab-tabs a.flite-lab-tabs__tab:focus-visible {
    outline: 2px solid var(--accent-darker);
    outline-offset: 2px;
}
.flite-lab-tabs__tab.is-current {
    color: var(--accent-darker);
    border-bottom-color: var(--accent-darker);
}
.flite-lab-tabs__count {
    font-weight: 400;
    color: var(--text-faint);
}
.flite-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.flite-group + .flite-group {
    margin-top: 1.5rem; /* + the 1.5rem flex gap = 3rem between groups */
}
.flite-platform .flite-group section,
.flite-platform .flite-group .section {
    margin-bottom: 0; /* section.css's 1.25rem would double the group gap */
}

/* Section headers: every section uses the eyebrow (Mark, 2026-09-07) — small,
   strong, uppercase, on a 1px hairline, the site system's section recipe. The
   base rule below still dresses any header that lacks the modifier. */
.flite-platform .section__header {
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
}
.flite-platform .section__header--eyebrow {
    border-bottom: 1px solid var(--flite-line);
    margin-bottom: 0.5rem;
    padding-bottom: 0.375rem;
}
.flite-platform .section__header--eyebrow h2 {
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.2;
    color: var(--flite-ink);
}
.flite-platform .section__header--eyebrow .flite-count {
    margin-left: 0.375rem;
}

/* Under Review and Previously Saved share a row; the left header holds
   buttons, so both take the same minimum height and their rules meet. */
.flite-ur-saved-row .section__header--eyebrow {
    min-height: 2.25rem;
}

/* The one count that owes a decision — amber, per the site system; every
   other count stays the quiet blue outline. */
.flite-count.flite-count--decision {
    background: var(--amber-accent);
    border-color: var(--amber-accent);
    color: #fff;
}


/* Empty states: a quiet line under the heading, not a dashed box the height
   of a row. The ids and inline display toggles are untouched, so the JS and
   turbo streams that show/hide them keep working. */
.flite-platform .flite-group .flite-empty,
.flite-platform .flite-group .flite-empty--small {
    background: transparent;
    border: 0;
    border-radius: 0;
    color: var(--flite-muted);
    font-size: 0.8125rem;
    margin: 0;
    padding: 0.125rem 0 0.25rem;
    text-align: left;
}

/* Pipeline board sizes to its content at the projector floor instead of the
   shared 400px kanban minimum — one approved startup no longer buys 450px of
   white. Overrides application.css under the FLITE scope; source rules stay
   untouched (they render other surfaces from cached fragments). */
.flite-platform .pipeline-columns,
.flite-platform .pipeline-column-content {
    min-height: 7rem;
}
.flite-platform .pipeline-container {
    border: 1px solid var(--flite-line);
    box-shadow: var(--shadow-card);
}

/* Archive disclosures (Project Repository, Files): the eyebrow is the summary. */
.flite-disclosure {
    display: block;
}
.flite-disclosure__summary {
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.flite-disclosure__summary::-webkit-details-marker {
    display: none;
}
.flite-disclosure__summary::marker {
    content: "";
}
.flite-disclosure__summary:hover h2 {
    color: var(--accent-darker);
}
.flite-disclosure__summary:focus-visible {
    outline: 2px solid var(--accent-base);
    outline-offset: 2px;
}
.flite-disclosure__chevron {
    width: 0.5rem;
    height: 0.5rem;
    margin: 0 0.25rem 0.1875rem 0;
    border-right: 1.5px solid var(--flite-muted);
    border-bottom: 1.5px solid var(--flite-muted);
    flex-shrink: 0;
    transform: rotate(45deg);
    transition: transform 0.15s ease;
}
.flite-disclosure[open] > .flite-disclosure__summary .flite-disclosure__chevron {
    margin-bottom: -0.125rem;
    transform: rotate(-135deg);
}
.flite-disclosure__body {
    padding-top: 0.25rem;
}
.flite-disclosure__actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.5rem;
}

/* Sidebar info block */
.flite-sidebar-info {
    font-size: 0.8125rem;
    color: var(--gray-base);
    padding: 0.625rem 0.75rem;
    background: var(--accent-lightest);
    border: 1px solid var(--accent-lighter);
    border-radius: 6px;
    line-height: 1.4;
}

.flite-sidebar-info strong {
    color: var(--gray-dark);
}

/* Inline advance round form in page header */
.flite-advance-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.flite-advance-inline input[type="text"] {
    font-size: 0.8125rem;
    padding: 0.375rem 0.5rem;
    border: 1px solid var(--gray-lighter, #d1d5db);
    border-radius: 4px;
    width: 160px;
}

/* "Go to round" link in repo tabs */
.flite-repo-round-link {
    display: inline-block;
    font-size: 0.8125rem;
    color: var(--accent-darker);
    text-decoration: none;
    margin-bottom: 0.75rem;
}

.flite-repo-round-link:hover {
    text-decoration: underline;
}

/* --- Section empty states --- */
.flite-platform .flite-empty {
    color: var(--gray-light);
    font-size: 0.8125rem;
    padding: 1.25rem 0;
    text-align: center;
    border: 1px dashed var(--gray-lighter);
    border-radius: 6px;
    margin-top: 0.25rem;
}

/* ============================================
   Active Projects & Upcoming Projects
   Compact horizontal scroll strip
   ============================================ */
/* (View-Rejected now uses the unified .flite-btn .flite-btn--danger.) */

/* Under Review + Previously Saved row */
.flite-ur-saved-row {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 1.25rem;
    align-items: start;
}

main[data-controller~="platforms"] .flite-ur-saved-row > section {
    grid-column: auto;
}

.flite-ur-section {
    min-width: 0;
}

.flite-saved-section {
    min-width: 0;
    border-left: 2px solid var(--accent-lighter, #e0e7ff);
    padding-left: 1.25rem;
}

.flite-saved-strip {
    --saved-chip-h: var(--flite-chip-h, 3.875rem);
    --saved-chip-gap: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: var(--saved-chip-gap);
    min-height: 80px;
    /* Exactly 5 chips visible: 5 chips + 4 gaps + top/bottom padding. */
    max-height: calc((var(--saved-chip-h) * 5) + (var(--saved-chip-gap) * 4) + 0.75rem);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.375rem 0;
    scrollbar-gutter: stable;
}

.flite-saved-strip .flite-project-chip {
    min-width: 0;
    width: min(var(--flite-chip-w, 280px), 100%);
    /* min-height (not a fixed height) so a wrapped long name grows the chip
       instead of spilling out its bottom; the strip scrolls to hold overflow. */
    min-height: var(--saved-chip-h);
    flex-shrink: 0;
    box-sizing: border-box;
}

.flite-save-ghost {
    opacity: 0.4;
    background: var(--accent-lightest, #eef2ff);
}

.flite-empty--small {
    font-size: 0.75rem;
    color: var(--flite-faint);
    padding: 1rem;
    text-align: center;
    border: 2px dashed var(--flite-line);
    border-radius: 8px;
    grid-column: 1 / -1;
    /* In a flex-wrap parent (`.flite-project-strip`), force the empty state
       to claim a full row instead of sizing to its text. */
    flex: 1 1 100%;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 1024px) {
    .flite-ur-saved-row {
        grid-template-columns: 1fr;
    }
    .flite-saved-section {
        border-left: none;
        border-top: 2px solid var(--accent-lighter, #e0e7ff);
        padding-left: 0;
        padding-top: 1rem;
    }
}

/* ============================================================
   Chip cards — ONE recipe (2026-09 polish). Every startup/project card on
   the FLITE page (Active, Under Review, Saved, Upcoming, Repository, and the
   pipeline board) is the same 280px, three-line card: logo | name / title /
   badges row. Widths come from these fixed tracks, never from a per-section
   measurement, so sections line up with each other.
   ============================================================ */
.flite-platform,
.flite-reviewer {
    --flite-chip-w: 280px;
    --flite-chip-h: 3.875rem; /* logo + three lines + padding */
}

.flite-project-strip {
    display: grid;
    grid-template-columns: repeat(auto-fill, var(--flite-chip-w, 280px));
    justify-content: start;
    gap: 0.625rem;
    padding: 0.375rem 0 0.625rem;
    min-height: 40px;
}

.flite-project-strip > .flite-project-chip {
    min-width: 0;
}

.flite-project-strip::-webkit-scrollbar {
    height: 4px;
}

.flite-project-strip::-webkit-scrollbar-thumb {
    background: var(--accent-base);
    border-radius: 2px;
}

.flite-project-chip {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    /* Uniform floor so every chip is the same height regardless of how much
       metadata (badges/tags) it carries — the logo (36px) + vertical padding
       sets the baseline; content is centered against it. */
    min-height: var(--flite-chip-h, 3.875rem);
    padding: 0.375rem 0.75rem 0.375rem 0.375rem;
    background: #fff;
    border: 1px solid var(--flite-line);
    border-radius: 6px;
    text-decoration: none;
    color: var(--gray-dark);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.flite-project-chip:hover {
    border-color: var(--accent-darker);
    box-shadow: 0 2px 8px rgba(2, 97, 155, 0.15);
    color: var(--gray-dark);
    text-decoration: none;
}

.flite-project-chip__logo {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    object-fit: contain;
    background: var(--gray-lightest);
    flex-shrink: 0;
}

.flite-project-chip__info {
    display: flex;
    flex-direction: column;
    gap: 0.0625rem;
    min-width: 0;
}

.flite-project-chip__startup {
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.25;
    /* One line, ellipsis on overflow (full name in the title tooltip + popover).
       Keeps every chip the same height no matter how long the startup name is. */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    min-width: 0;
}

/* Second line: the project's or newest proposal's short title. Always
   rendered (empty when there is none) so every card keeps the same three-line
   height. */
.flite-project-chip__project {
    font-size: 0.6875rem;
    color: var(--flite-muted);
    line-height: 1.2;
    white-space: nowrap;
    display: block;
    min-height: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* ============================================================
   Chip badges — ONE recipe (2026-09 polish). Every badge that rides a
   FLITE chip or pipeline card (status, round, member count, new-proposal
   flag, platform tags, vote count) is the site system's chip token:
   0.6875rem / 600 / line-height 1.6 / full pill / sentence case. Only the
   colour changes with meaning; size, shape and casing never do.
   ============================================================ */
.flite-project-chip__badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.125rem;
    padding: 0 0.4375rem;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.6;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
    border-radius: 999px;
    vertical-align: middle;
    margin-left: 0.25rem;
}

.flite-project-chip__badge--active {
    background: var(--flite-status-good-bg);
    color: var(--flite-status-good-fg);
}

.flite-project-chip__badge--pending {
    background: var(--flite-status-warn-bg);
    color: var(--flite-status-warn-fg);
}

.flite-project-chip__badge--new {
    background: var(--flite-status-info-bg);
    color: var(--flite-status-info-fg);
}

/* Rejected chips (the Rejected Startups page). Muted rather than alarming —
   the page is entirely rejections, so a wall of red carries no information. */
.flite-project-chip__badge--rejected {
    background: var(--flite-status-danger-bg);
    color: var(--flite-status-danger-fg);
}
.flite-project-chip__badge--neutral {
    background: var(--flite-status-neutral-bg);
    color: var(--flite-status-neutral-fg);
}

.flite-project-chip--rejected {
    border-left: 3px solid #fca5a5;
}

.flite-project-chip__badge--completed {
    background: var(--flite-status-completed-bg);
    color: var(--flite-status-completed-fg);
}

.flite-project-chip__round-badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.125rem;
    padding: 0 0.4375rem;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.6;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
    border-radius: 999px;
    vertical-align: middle;
    margin-left: 0.25rem;
    background: var(--flite-status-neutral-bg);
    color: var(--flite-status-neutral-fg);
}

/* B6: the lab topic that sent a company into the round — the round badge's
   sibling, in the page's accent (FLITE blue inside .flite-platform). */
.flite-project-chip__topic-badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.125rem;
    padding: 0 0.4375rem;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.6;
    white-space: nowrap;
    border-radius: var(--radius-pill);
    vertical-align: middle;
    margin-left: 0.25rem;
    background: var(--accent-lightest);
    color: var(--accent-darker);
}

/* B6: a group heading in the Under Review strip ("Guest experience · 2",
   "No topic yet · 3"). A sibling of the chips in the strip's grid, spanning
   the full row so each group starts its own line. */
.flite-project-strip > .flite-ur-group-label {
    grid-column: 1 / -1;
    font-size: var(--fs-meta);
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.flite-project-strip > .flite-ur-group-label:first-child {
    margin-top: 0;
}

/* "No topic yet" is always the last label; hidden until a chip follows it
   (one rendered under it, or a manual add / restore appended after it). */
.flite-project-strip > .flite-ur-group-label--untopiced:not(:has(~ .flite-project-chip)) {
    display: none;
}

/* B6: the topic label on a FLITE round's own Under Review grid; a link
   for staff. The round page's grid sits outside the FLITE wrappers, so the
   label is itself in the FLITE accent scope (top of this file). */
.under-review-item__topic {
    font-size: var(--fs-meta);
    color: var(--accent-darker);
    text-decoration: none;
}

a.under-review-item__topic:hover {
    text-decoration: underline;
}

/* B6: the topic a company was sent from, under the viewer's heading. */
.proposal-overlay__heading {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.proposal-overlay__origin {
    margin: 0;
    font-size: var(--fs-meta);
    color: var(--text-muted);
}

.proposal-overlay__origin a {
    color: var(--accent-darker);
}

/* Loud flag on an active-project chip: a new proposal arrived for an
   already-approved startup (points the reader at the post-approval banner). */
.flite-project-chip__new-proposal-badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.125rem;
    padding: 0 0.4375rem;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.6;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
    border-radius: 999px;
    vertical-align: middle;
    margin-left: 0.25rem;
    background: var(--amber-accent, #f59e0b);
    color: #fff;
    font-weight: 700;
}

/* (The "From: Round X" restored marker is now an inline round badge in the info
   row, rendered after the tags — see _flite_under_review_chip.) */

/* Repo mode — cards fill grid cells instead of being inline chips */
.flite-project-chip--repo {
    min-width: 0;
    width: 100%;
    align-items: flex-start;
}

/* ============================================
   FLITE Pipeline — match cards to chip style
   ============================================ */
.flite-platform .pipeline-column-content .startup {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    min-height: auto;
    min-width: 0;
    /* Columns grow to share the board width, but the card stays a uniform
       chip size (centered in its column) — matching the other sections'
       chips no matter how many stagegate columns are visible. */
    width: min(var(--flite-chip-w, 280px), 100%);
    max-width: none;
    min-height: var(--flite-chip-h, 3.875rem);
    justify-self: start;
    padding: 0.375rem 0.75rem 0.375rem 0.375rem;
    gap: 0.5rem;
    border-radius: 6px;
    box-shadow: none;
    border: 1px solid var(--flite-line);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.flite-platform .pipeline-column-content .startup:hover {
    transform: none;
    border-color: var(--accent-darker);
    box-shadow: 0 2px 8px rgba(2, 97, 155, 0.15);
}

/* Card link wrapper — horizontal layout matching chip */
.flite-platform .pipeline-column-content .startup-card-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-align: left;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.flite-platform .pipeline-column-content .startup-card-link:hover {
    transform: none;
}

.flite-platform .pipeline-column-content .startup .u-logo {
    width: 36px;
    height: 36px;
    margin: 0;
    border-radius: 4px;
    object-fit: contain;
    background: var(--gray-lightest);
    flex-shrink: 0;
    display: block;
}

.flite-platform .pipeline-column-content .startup .startup__body {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.0625rem;
    min-width: 0;
    width: auto;
    justify-self: start;
    padding-right: 1.5rem;
}

.flite-platform .pipeline-column-content .startup .startup__name {
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.25;
    text-align: left;
    margin: 0;
    padding: 0;
    /* Match the strip chip: one line, ellipsis (full name in the popover). */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.flite-platform .pipeline-column-content .startup .startup__subtopic {
    font-size: 0.6875rem;
    text-align: left;
    color: var(--gray-base);
}

.flite-platform .pipeline-column-content .startup .startup__approval-comment {
    font-size: 0.6875rem;
}

.flite-platform .pipeline-column-content .startup .startup__tags {
    margin-top: 0.125rem;
}

/* The card's own badges follow the chip recipe above; the source rules in
   focus_areas.css only ever render in FLITE mode, but stay untouched. */
.flite-platform .pipeline-column-content .startup .startup__vote-count {
    display: inline-flex;
    align-items: center;
    min-height: 1.125rem;
    padding: 0 0.4375rem;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.6;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
    border-radius: 999px;
    vertical-align: middle;
    margin-left: 0.25rem;
    margin: 0;
    background: var(--flite-status-neutral-bg);
    color: var(--flite-status-neutral-fg);
    font-variant-numeric: tabular-nums;
}

/* The card's badges row: vote pill + tags on one line, like the chips. The
   tags container keeps its own element (JS toggles it by data-startup-id) but
   lays its pills straight into the row. */
.flite-platform .pipeline-column-content .startup .flite-project-chip__tags .startup__tags {
    display: contents;
}

.flite-platform .pipeline-column-content .startup .startup__new-proposal-badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.125rem;
    padding: 0 0.4375rem;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.6;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
    border-radius: 999px;
    vertical-align: middle;
    margin-left: 0.25rem;
    background: var(--amber-accent, #f59e0b);
    color: #fff;
    font-weight: 700;
}

/* ============================================
   FLITE Reviewer
   ============================================ */

/* Progress bar */
.flite-reviewer__progress {
    margin-bottom: 1.25rem;
    padding: 0.75rem 1rem;
    background: var(--flite-wash);
    border: 1px solid var(--flite-line);
    border-radius: 8px;
}

.flite-reviewer__progress-text {
    font-size: 0.8125rem;
    color: var(--flite-text);
    display: block;
    margin-bottom: 0.5rem;
}

.flite-reviewer__progress-bar {
    height: 6px;
    background: var(--flite-line);
    border-radius: 3px;
    overflow: hidden;
}

.flite-reviewer__progress-fill {
    height: 100%;
    background: var(--accent-darker);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Chip vote badges */
.flite-reviewer__vote-badge {
    display: inline-block;
    font-size: 0.5625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.0625rem 0.3125rem;
    border-radius: 3px;
    margin-left: 0.25rem;
}

.flite-reviewer__vote-badge--complete {
    background: var(--flite-status-good-bg);
    color: var(--flite-status-good-fg);
}

.flite-reviewer__vote-badge--none {
    background: var(--flite-status-danger-bg);
    color: var(--flite-status-danger-fg);
}

/* Completed chip */
.flite-reviewer__chip--complete {
    border-color: #a7f3d0;
    background: #f0fdf4;
}

/* Reviewer dialog — add row for nav header */
.flite-reviewer__dialog {
    grid-template-rows: auto 1fr;
}

.flite-reviewer__dialog .proposal-overlay__startup {
    border-radius: 0 0 0 12px;
}

.flite-reviewer__dialog .proposal-overlay__content {
    border-radius: 0 0 12px 0;
}

/* Navigation header — spans full width across both columns */
.flite-reviewer__nav-header {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 12px 12px 0 0;
    flex-shrink: 0;
}

.flite-reviewer__nav-arrow {
    background: none;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    cursor: pointer;
    color: #374151;
    transition: all 0.15s;
    flex-shrink: 0;
}

.flite-reviewer__nav-arrow:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.flite-reviewer__nav-info {
    text-align: center;
    font-size: 0.875rem;
    color: #1f2937;
    min-width: 0;
}

.flite-reviewer__nav-progress {
    display: block;
    font-size: 0.7rem;
    color: #6b7280;
    margin-top: 0.125rem;
}

/* Vote section in popover */
.flite-reviewer__vote-section {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 2px solid var(--accent-lighter, #e0e7ff);
}

.flite-reviewer__vote-section--top {
    margin-top: 0;
    padding: 1rem;
    background: #fefce8;
    border: 1px solid #fde68a;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-top: none;
}

.flite-reviewer__vote-section h4 {
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
    color: #374151;
}

/* Vote form */
.flite-vote-form__current {
    padding: 0.75rem;
    background: #f0f9ff;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.flite-vote-form__current-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #374151;
    display: block;
    margin-bottom: 0.25rem;
}

.flite-vote-form__current-comment {
    font-size: 0.8rem;
    color: #6b7280;
    font-style: italic;
    margin: 0.25rem 0 0.5rem;
}

.flite-vote-form__stars {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.flite-vote-form__stars--display {
    margin-bottom: 0.25rem;
}

.flite-vote-form__star {
    font-size: 1.25rem;
    color: #d1d5db;
    line-height: 1;
}

.flite-vote-form__star--filled {
    color: #f59e0b;
}

.flite-vote-form__star-btn {
    background: none;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 0.375rem 0.625rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.125rem;
    transition: all 0.15s;
}

.flite-vote-form__star-btn:hover {
    background: #fffbeb;
    border-color: #f59e0b;
}

.flite-vote-form__star-btn--selected {
    background: #fffbeb;
    border-color: #f59e0b;
}

.flite-vote-form__star-btn--selected .flite-vote-form__star {
    color: #f59e0b;
}

.flite-vote-form__star-label {
    font-size: 0.625rem;
    color: #6b7280;
}

.flite-vote-form__comment {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.8rem;
    resize: vertical;
    margin-bottom: 0.5rem;
}

.flite-vote-form__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* (Submit button now uses .flite-btn .flite-btn--solid for its sizing.) */

.flite-vote-form__status {
    font-size: 0.75rem;
}

.flite-vote-form__edit-btn {
    margin-top: 0.5rem;
}

/* ============================================
   Round Card Layout (Project Viewer)
   Quiet shell: neutral border + colored 3px left accent stripe.
   Sealed history rounds collapse to a one-line header.
   Inner sections are flat (no nested cards) — subtle dividers only.
   ============================================ */
.round-card {
    border: 1px solid #e5e7eb;
    border-left: 3px solid #d1d5db;
    border-radius: 6px;
    margin-bottom: 0.625rem;
    background: #ffffff;
    overflow: hidden;
}

.round-card--active    { border-left-color: #10b981; }
.round-card--pending   { border-left-color: #f59e0b; }
.round-card--review    { border-left-color: var(--accent-base, #72bbdc); }
.round-card--saved     { border-left-color: #fb923c; }
.round-card--completed { border-left-color: #3b82f6; }
.round-card--archived  { border-left-color: #9ca3af; }

.round-card__header {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.5rem 0.75rem;
    background: #fff;
}

.round-card__header-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.round-card__header--collapsible {
    cursor: pointer;
    transition: background 0.1s;
}

/* "Add proposal" button pinned to the right of the round header row. */
.round-card__header-action {
    margin-left: auto;
    flex-shrink: 0;
}

.round-card__header--collapsible:hover {
    background: #f9fafb;
}

.round-card__context {
    font-size: 0.7rem;
    color: #6b7280;
    line-height: 1.35;
    padding-left: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    align-items: baseline;
}

.round-card--sealed .round-card__context {
    color: #9ca3af;
}

.round-card__context-entry {
    color: #4b5563;
}

.round-card__context-sep {
    color: #d1d5db;
}

.round-card__context-outcome {
    color: #6b7280;
    font-style: italic;
}

.round-card--archived .round-card__context-outcome {
    color: #b91c1c;
    font-style: normal;
}

/* Retroactive-decision history ("Originally accepted for a project → Saved").
   Carries a title tooltip with the reasons staff gave, so the line stays short. */
.round-card__context-retro {
    color: #92400e;
    font-style: italic;
    cursor: help;
}

.round-card__name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1f2937;
}

.round-card__badge {
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
}

/* Unified pastel status ramp (was solid saturated fills — visually loud and a
   second badge language next to the chips' pastels). */
.round-card__badge--active    { background: var(--flite-status-good-bg);      color: var(--flite-status-good-fg); }
.round-card__badge--pending   { background: var(--flite-status-warn-bg);      color: var(--flite-status-warn-fg); }
.round-card__badge--completed { background: var(--flite-status-completed-bg); color: var(--flite-status-completed-fg); }
.round-card__badge--saved     { background: var(--flite-status-warn-bg);      color: var(--flite-status-warn-fg); }
.round-card__badge--review    { background: var(--flite-status-info-bg);      color: var(--flite-status-info-fg); }
.round-card__badge--archived  { background: var(--flite-status-neutral-bg);   color: var(--flite-status-neutral-fg); }

.round-card__summary {
    font-size: 0.75rem;
    color: #6b7280;
    margin-left: 0.25rem;
}

.round-card__save-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.6875rem;
    color: #b45309;
    background: #fff7ed;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    cursor: help;
}

.round-card__save-indicator-count {
    font-weight: 600;
}

.round-card__body {
    padding: 0.5rem 0.75rem 0.625rem;
    border-top: 1px solid #f3f4f6;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.round-card__chevron {
    font-size: 0.6rem;
    color: #9ca3af;
    flex-shrink: 0;
    width: 11px;
    text-align: center;
}

/* --- Project section (still its own collapsible block) --- */
.round-card__section {
    border: 1px solid #f3f4f6;
    border-radius: 5px;
    background: #fff;
    overflow: hidden;
}

.round-card__section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.625rem;
    cursor: pointer;
    transition: background 0.1s;
}

.round-card__section-header:hover {
    background: #f9fafb;
}

.round-card__section-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1f2937;
}

.round-card__section-meta {
    font-size: 0.6875rem;
    color: #9ca3af;
    margin-left: auto;
}

.round-card__section-content {
    padding: 0.625rem 0.75rem;
    border-top: 1px solid #f3f4f6;
}

/* --- Combined proposals section (flat — no nested card per proposal) --- */
.round-card__proposals {
    display: flex;
    flex-direction: column;
}

.round-card__proposals > .round-card__proposal-row:not(:first-child) {
    border-top: 1px solid #f3f4f6;
}

/* Focal project section in the project reader: header only, never collapsible. */
.round-card__section--focal .round-card__section-header {
    cursor: default;
}

.round-card__section--focal .round-card__section-header:hover {
    background: transparent;
}

/* A project's own proposals read as indented under its header. */
.round-card__proposals--project {
    margin: 0 0 0.5rem 0.75rem;
}

/* When a plain proposals container directly follows a project's own group,
   keep a hairline on its first row so the two don't visually run together. */
.round-card__proposals--project + .round-card__proposals > .round-card__proposal-row:first-child {
    border-top: 1px solid #f3f4f6;
}

.round-card__proposal-row {
    background: #fff;
}

.round-card__proposal-row--primary {
    background: #fffaf0;
    border-radius: 4px;
    margin-bottom: 0.25rem;
    border-top: none !important;
}

.round-card__proposal-row--archived {
    opacity: 0.75;
}

.round-card__proposal-row-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.625rem;
    cursor: pointer;
    transition: background 0.1s;
}

.round-card__proposal-row-header:hover {
    background: #f9fafb;
}

.round-card__primary-marker {
    color: #f59e0b;
    font-size: 0.875rem;
    flex-shrink: 0;
    width: 11px;
    text-align: center;
}

.round-card__proposal-row-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.round-card__proposal-row-short-title {
    font-weight: 500;
    color: #6b7280;
    font-style: italic;
}

.round-card__proposal-row-meta {
    font-size: 0.6875rem;
    color: var(--flite-faint);
    margin-left: auto;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.35;
    flex-shrink: 0;
    max-width: 55%;
}
.round-card__proposal-row-submitter {
    color: var(--flite-text);
    font-weight: 600;
}
.round-card__proposal-row-subline {
    word-break: break-word;
}
.round-card__proposal-row-edited {
    font-style: italic;
    color: var(--flite-faint);
    cursor: help;
}

.round-card__proposal-row-content {
    padding: 0.25rem 0.625rem 0.625rem;
}

.round-card__proposal-row--primary .round-card__proposal-row-content {
    padding-top: 0.25rem;
}

/* --- Archived fold (Gmail-style "+ N archived" disclosure) --- */
.round-card__archived-fold {
    border-top: 1px dashed #e5e7eb;
    margin-top: 0.25rem;
}

.round-card__archived-fold-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.625rem;
    cursor: pointer;
    color: #6b7280;
    font-size: 0.75rem;
    transition: background 0.1s;
}

.round-card__archived-fold-header:hover {
    background: #f9fafb;
    color: #374151;
}

.round-card__archived-fold-label {
    font-weight: 500;
}

.round-card__archived-fold-content > .round-card__proposal-row {
    border-top: 1px solid #f3f4f6;
}

/* --- Inline badges within proposal titles --- */
.round-card__carried-badge {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    background: var(--flite-status-info-bg);
    color: var(--flite-status-info-fg);
}

.round-card__empty {
    font-size: 0.8125rem;
    color: #9ca3af;
    font-style: italic;
    padding: 0.25rem 0.25rem 0;
    margin: 0;
}

/* --- Compress proposal content spacing when inline in a round row --- */
.round-card__proposal-row-content .proposal-overlay__archived-banner,
.round-card__proposal-row-content .proposal-overlay__meta {
    margin-bottom: 0.6rem;
}

.round-card__proposal-row-content .proposal-overlay__tags {
    margin-bottom: 0.6rem;
}

.round-card__proposal-row-content .proposal-overlay__votes--top {
    margin-bottom: 0.6rem;
    padding: 0.5rem 0.625rem;
}

.round-card__proposal-row-content .proposal-overlay__fields {
    margin-bottom: 0.6rem;
}

.round-card__proposal-row-content .proposal-overlay__field {
    margin-bottom: 0.75rem;
}

.round-card__proposal-row-content .proposal-overlay__actions {
    padding: 0.5rem 0;
    margin-bottom: 0;
}

.round-card__proposal-row-content .project-viewer__proposal-primary-bar {
    margin-bottom: 0.5rem;
}

/* ============================================
   Archived Proposal Styles
   ============================================ */
.proposal-overlay__tab--archived {
    opacity: 0.6;
    font-style: italic;
    font-size: 0.7rem;
}

.proposal-overlay__tab-divider {
    font-size: 0.6rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.5rem;
    align-self: center;
    border-left: 1px solid #e5e7eb;
    margin-left: 0.25rem;
}

.proposal-overlay__archived-banner {
    padding: 0.5rem 0.75rem;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 6px;
    font-size: 0.8rem;
    color: #92400e;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ============================================
   Advance Round Modal
   ============================================ */
.flite-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    /* Above the global `popover-toggle { z-index: 1050 }` (dashboards.css) —
       at 1000 the Under Review "Add" button painted through the modal. */
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flite-modal {
    background: #fff;
    border-radius: 0.75rem;
    padding: 1.5rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.flite-modal h3 {
    margin: 0 0 0.25rem;
    font-size: 1.125rem;
}

.flite-modal__subtitle {
    color: var(--flite-muted);
    font-size: 0.8rem;
    margin: 0 0 1rem;
}

/* Round summary box at the top of the Advance-Round modal. */
.flite-modal__info {
    font-size: 0.8rem;
    color: var(--flite-text);
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: var(--flite-wash);
    border-radius: 4px;
}

.flite-modal__input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.flite-modal__project-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    padding: 0.5rem;
    margin-bottom: 1rem;
}

.flite-modal__project-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.25rem;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    font-size: 0.8rem;
}

.flite-modal__project-item:last-child {
    border-bottom: none;
}

.flite-modal__project-item input[type="checkbox"] {
    flex-shrink: 0;
}

.flite-modal__empty {
    color: #9ca3af;
    font-size: 0.8rem;
    text-align: center;
    padding: 1rem 0;
}

.flite-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding-top: 0.5rem;
}

/* Application-link recipient picker. Opened from the "No Proposal Submitted"
   panel inside the proposal popover, so it needs the same above-the-popover
   tier as the PDF viewer (.proposal-overlay-wrapper is z-index 9999999). */
.flite-send-link-modal {
    z-index: 10000000;
}

.flite-send-link-modal__choices {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.flite-send-link-modal__choice {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    cursor: pointer;
}

.flite-send-link-modal__choice:hover {
    background: var(--flite-wash);
}

.flite-send-link-modal__error {
    margin: 0 0 0.75rem;
    font-size: 0.8rem;
    color: var(--flite-err);
}

/* ============================================
   Under Review — Grid
   ============================================ */
.flite-review-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.625rem;
    padding: 0.375rem 0;
}

@media (max-width: 1200px) {
    .flite-review-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 900px) {
    .flite-review-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 600px) {
    .flite-review-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 400px) {
    .flite-review-grid { grid-template-columns: 1fr; }
}

/* ============================================
   Under Review — Card
   ============================================ */
.flite-review-card {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--gray-lighter, #ccc);
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    color: var(--gray-dark);
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.flite-review-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-base);
}

/* --- Card header: logo + name --- */
.flite-review-card__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 0.5rem 0;
    flex-shrink: 0;
}

.flite-review-card__logo {
    width: 72px;
    height: 72px;
    border-radius: 6px;
    object-fit: contain;
    background: var(--gray-lightest, #fafafa);
    box-shadow: inset 0 0 0 1px var(--accent-lighter);
    flex-shrink: 0;
}

.flite-review-card__name {
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
    margin-top: 0.375rem;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Card body: proposals / badge area --- */
.flite-review-card__body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0.25rem 0.5rem 0.5rem;
    flex-shrink: 0;
}

/* Single-proposal status badge */
.flite-review-card__status {
    display: inline-block;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.1875rem 0.5rem;
    border-radius: 10px;
    background: var(--accent-lightest);
    color: var(--accent-darker);
    border: 1px solid var(--accent-base);
}

/* Tags row — evenly spaced */
.flite-review-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    justify-content: space-evenly;
    margin-top: 0.3125rem;
    width: 100%;
}

/* ============================================
   Multi-Proposal — Columns with pill + tags
   ============================================ */
.flite-review-card__proposal-columns {
    display: flex;
    justify-content: space-evenly;
    width: 100%;
    gap: 0.25rem;
}

.flite-review-card__proposal-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
    min-width: 0;
}

.flite-review-card__pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: 50%;
    background: var(--accent-lightest);
    color: var(--accent-darker);
    border: 1px solid var(--accent-base);
    flex-shrink: 0;
}

.flite-review-card__pill--hidden {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
    opacity: 0.55;
    text-decoration: line-through;
}

/* Tags inside a proposal column */
.flite-review-card__proposal-col .flite-review-card__tags {
    margin-top: 0;
    justify-content: center;
}

/* Hidden status badge for single proposals */
.flite-review-card__status--hidden {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
    opacity: 0.7;
}

/* ============================================
   Project Repository
   Card grid with vertical scroll
   ============================================ */
.flite-repo-grid {
    display: grid;
    /* Same track sizing as .flite-project-strip so repository cards read as the
       same compact chip as every other section, not wide full-row bars. */
    grid-template-columns: repeat(auto-fill, var(--flite-chip-w, 280px));
    justify-content: start;
    gap: 0.625rem;
    max-height: 26rem;
    overflow-y: auto;
    padding: 0.375rem 0.25rem 0.375rem 0;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-base) transparent;
}

.flite-repo-grid::-webkit-scrollbar {
    width: 4px;
}

.flite-repo-grid::-webkit-scrollbar-thumb {
    background: var(--accent-base);
    border-radius: 2px;
}

.flite-repo-card {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.75rem;
    background: #fff;
    border: 1px solid var(--gray-lighter);
    border-radius: 6px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.flite-repo-card:hover {
    border-color: var(--accent-base);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.flite-repo-card__logo {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: contain;
    background: var(--gray-lightest);
    flex-shrink: 0;
}

.flite-repo-card__body {
    min-width: 0;
    flex: 1;
}

.flite-repo-card__startup {
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.0625rem;
}

.flite-repo-card__startup a {
    color: var(--gray-dark);
    text-decoration: none;
}

.flite-repo-card__startup a:hover {
    color: var(--accent-darker);
}

.flite-repo-card__project {
    font-size: 0.75rem;
    color: var(--gray-base);
    margin-bottom: 0.125rem;
}

.flite-repo-card__project a {
    color: var(--gray-base);
    text-decoration: none;
}

.flite-repo-card__project a:hover {
    color: var(--accent-darker);
}

.flite-repo-card__meta {
    font-size: 0.6875rem;
    color: var(--gray-light);
}

/* (repo grid now uses auto-fill minmax like .flite-project-strip — it reflows
   to fewer columns on narrow viewports on its own, no breakpoints needed.) */

/* ============================================
   Tabs override for repository
   Remove max-width constraints
   ============================================ */
.flite-platform .tabs,
.flite-platform .tabs--wide,
.flite-reviewer .tabs,
.flite-reviewer .tabs--wide {
    max-width: 100%;
    width: 100%;
    min-width: 0;
}

/* The reviewer dashboard isn't wrapped by `.flite-platform`, which means it
   doesn't escape the platforms-page grid (`main[data-controller~="platforms"]`
   is `grid-template-columns: 2fr 1fr`). Span both columns so the reviewer
   gets the full main width, mirroring the seamless `.flite-platform` rule.
   Cap to that full width and let `.tab-nav`'s `overflow-x: auto` handle the
   round-tabs horizontal scroll. */
.flite-reviewer {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
}

/* ============================================
   Section count badge in headers
   ============================================ */
.flite-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    font-weight: 700;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.3125rem;
    border-radius: 10px;
    background: var(--accent-lightest);
    color: var(--accent-darker);
    border: 1px solid var(--accent-base);
    margin-left: 0.25rem;
    vertical-align: middle;
    line-height: 1;
    /* 'Overpass Badge' (fonts.css) is Overpass with corrected vertical metrics —
       plain Overpass renders digits visibly high in this tight box. Zeroed
       letter-spacing undoes the h2's negative tracking (nudges the digit left). */
    font-family: 'Overpass Badge', var(--font-family);
    letter-spacing: 0;
}

/* ============================================
   Round label in section headers
   ============================================ */
a.flite-round-label,
.flite-round-label {
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--gray-light);
    text-transform: none;
    margin-left: 0.375rem;
    text-decoration: none;
}

a.flite-round-label:hover {
    color: var(--accent-darker);
    text-decoration: underline;
}

/* ============================================
   Read-only FLITE entries on the seamless dashboard /
   org pages (aggregated per-round cards + table rows).
   Round badge shares the neutral round-label language.
   ============================================ */
.flite-round-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    background: var(--flite-status-neutral-bg);
    color: var(--flite-status-neutral-fg);
    border-radius: 999px;
    padding: 0.1rem 0.5rem;
    margin-top: 0.25rem;
    vertical-align: middle;
}
.flite-entry-card {
    cursor: pointer;
}
.flite-entry-card__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.25rem;
}
.flite-entry-row__cell-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* ============================================
   Proposal Overlay — Fullscreen modal
   ============================================ */

/* Wrapper appended to body — must sit above header and all other layers */
.proposal-overlay-wrapper {
    position: fixed;
    inset: 0;
    z-index: 9999999;
}

.proposal-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Backdrop — click to close */
.proposal-overlay__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
    cursor: pointer;
}

/* The dialog box */
.proposal-overlay__dialog {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 280px 1fr;
    width: calc(100vw - 200px);
    height: calc(100vh - 80px);
    max-width: 1400px;
    margin: 40px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: visible;
}

/* --- Startup Info Sidebar --- */
.proposal-overlay__startup {
    display: flex;
    flex-direction: column;
    padding: 1.75rem 1.5rem;
    background: var(--gray-lightest, #f9fafb);
    border-right: 1px solid var(--gray-lighter, #e5e7eb);
    overflow-y: auto;
    border-radius: 12px 0 0 12px;
}

.proposal-overlay__startup-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--gray-lighter, #e5e7eb);
}

.proposal-overlay__logo {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--gray-lighter, #e5e7eb);
    margin-bottom: 0.75rem;
}

.proposal-overlay__startup-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-dark, #1f2937);
    margin: 0;
    line-height: 1.3;
}

.proposal-overlay__short-title {
    font-size: 0.95rem;
    font-style: italic;
    font-weight: 500;
    color: var(--accent-darker, #02619b);
    line-height: 1.3;
    margin: 0.25rem 0 0;
}

/* Definition list for startup details */
.proposal-overlay__details {
    margin: 0;
    padding: 0;
    flex: 1;
}

.proposal-overlay__details dt {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-light, #6b7280);
    margin-bottom: 0.125rem;
}

.proposal-overlay__details dd {
    font-size: 0.8125rem;
    color: var(--gray-dark, #1f2937);
    margin: 0 0 1rem;
    line-height: 1.5;
    word-break: break-word;
}

.proposal-overlay__details dd a {
    color: var(--accent-darker);
    text-decoration: none;
}

.proposal-overlay__details dd a:hover {
    text-decoration: underline;
}

.proposal-overlay__contact-email {
    font-size: 0.75rem;
    color: var(--gray-light, #6b7280);
}

/* Full-width .flite-btn under the sidebar identity block. */
.proposal-overlay__profile-link {
    margin-top: 0.75rem;
    width: 100%;
}

/* --- Review Section --- */
.proposal-overlay__review {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-lighter, #e5e7eb);
}

.proposal-overlay__review-heading {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gray-dark, #1f2937);
    margin: 0 0 0.5rem;
}

.proposal-overlay__review-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* Re-add for Review — the rejected page's one action, in the sidebar slot
   Approve/Reject occupy for under-review startups. */
.proposal-overlay__review .button--readd {
    width: 100%;
    background: #059669;
    color: #fff;
    border: none;
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
}

.proposal-overlay__review .button--readd:hover {
    background: #047857;
}

.proposal-overlay__review-actions .button--approve {
    flex: 1;
    background: #059669;
    color: #fff;
    border: none;
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
}

.proposal-overlay__review-actions .button--approve:hover {
    background: #047857;
}

.proposal-overlay__review-actions .button--reject {
    flex: 1;
    background: #dc2626;
    color: #fff;
    border: none;
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
}

.proposal-overlay__review-actions .button--reject:hover {
    background: #b91c1c;
}

.proposal-overlay__review-status {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.75rem;
}

/* --- Project Viewer --- */
.project-viewer__meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

/* Unified status ramp (was a foreign Bootstrap-alert palette). */
.project-viewer__status--pending { background: var(--flite-status-warn-bg); color: var(--flite-status-warn-fg); }
.project-viewer__status--active { background: var(--flite-status-good-bg); color: var(--flite-status-good-fg); }
.project-viewer__status--completed { background: var(--flite-status-completed-bg); color: var(--flite-status-completed-fg); }

.project-viewer__round {
    font-size: 0.8rem;
    color: var(--gray-mid, #6b7280);
    background: var(--gray-lightest, #f3f4f6);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.project-viewer__date {
    font-size: 0.8rem;
    color: var(--gray-mid, #6b7280);
}

.project-viewer__detail-field {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-bottom: 0.6rem;
    max-width: 260px;
}

.project-viewer__detail-field label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--gray-base, #6b7280);
}

.project-viewer__detail-field input {
    font-size: 0.85rem;
    padding: 0.4rem 0.5rem;
    border: 1px solid var(--accent-base, #72bbdc);
    border-radius: 4px;
    font-family: inherit;
}

.project-viewer__section {
    margin-bottom: 1.25rem;
}

.project-viewer__section h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gray-dark, #1f2937);
    margin: 0 0 0.5rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--gray-lighter, #e5e7eb);
}

.project-viewer__section p {
    font-size: 0.85rem;
    color: var(--gray-dark, #374151);
    margin: 0;
}

/* Project images */
.project-viewer__images {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
}

.project-viewer__image-item {
    border: 1px solid var(--gray-lighter, #e5e7eb);
    border-radius: 6px;
    overflow: hidden;
}

.project-viewer__image {
    display: block;
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
}

/* Compact inline sibling of .flite-btn — the borderless "Edit" toggles that sit
   next to a project-detail heading. No resting outline (each is alone beside its
   label, so there's nothing to bleed into); still lights up on hover. */
.project-viewer__edit-btn {
    background: none;
    border: none;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent-darker);
    cursor: pointer;
    padding: 0.15rem 0.4rem;
    margin-left: 0.375rem;
    border-radius: 4px;
    vertical-align: middle;
    transition: background 0.15s ease;
}

.project-viewer__edit-btn:hover {
    background: var(--accent-lightest, #f0fdfa);
}

.project-viewer__edit-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

.project-viewer__notes-input {
    width: 100%;
    min-height: 80px;
    font-size: 0.85rem;
    padding: 0.5rem;
    border: 1px solid var(--gray-lighter, #d1d5db);
    border-radius: 4px;
    resize: vertical;
    font-family: inherit;
}

.project-viewer__notes-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.375rem;
}

.project-viewer__notes-status {
    font-size: 0.75rem;
    display: block;
    margin-top: 0.25rem;
}

.project-viewer__proposal-status {
    margin-left: 0.5rem;
    font-size: 0.8rem;
}

.project-viewer__partners {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.project-viewer__partner-badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    background: var(--accent-light, #e0f2fe);
    color: var(--accent-dark, #0369a1);
    border-radius: 4px;
}

.project-viewer__files {
    list-style: none;
    padding: 0;
    margin: 0;
}

.project-viewer__file {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0;
    border-bottom: 1px solid var(--gray-lighter, #f3f4f6);
    font-size: 0.8rem;
}

.project-viewer__file-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.project-viewer__file-name {
    flex: 1;
    color: var(--gray-dark, #374151);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-viewer__file-type {
    font-size: 0.7rem;
    color: var(--gray-mid, #6b7280);
    background: var(--gray-lightest, #f3f4f6);
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
}

.project-viewer__file-link {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent-darker);
    text-decoration: none;
    text-transform: uppercase;
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    flex-shrink: 0;
    transition: background 0.15s ease;
}

.project-viewer__file-link:hover {
    background: var(--accent-lightest, #f0fdfa);
}

.project-viewer__file-delete {
    background: none;
    border: none;
    color: var(--gray-light, #9ca3af);
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    flex-shrink: 0;
    transition: color 0.15s ease, background 0.15s ease;
}

.project-viewer__file-delete:hover {
    color: #dc2626;
    background: #fef2f2;
}

.project-viewer__empty {
    font-size: 0.8rem;
    color: var(--gray-mid, #6b7280);
    margin: 0 0 0.75rem;
}

.project-viewer__upload {
    margin-top: 0.5rem;
}

.project-viewer__upload-row {
    display: flex;
    gap: 0.375rem;
    align-items: center;
    max-width: 90%;
}

.project-viewer__file-input {
    flex: 1;
    font-size: 0.75rem;
    min-width: 0;
}

.project-viewer__type-select {
    font-size: 0.75rem;
    padding: 0.25rem 0.375rem;
    border: 1px solid var(--gray-lighter, #d1d5db);
    border-radius: 4px;
    min-width: 130px;
}

.project-viewer__upload-status {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
}

/* Text-style tabs (for Project/Proposal toggle) — same sizing, labels fit naturally */
.proposal-overlay__tabs--text button {
    font-size: 0.75rem;
}

/* Make project chips clickable */
.flite-project-chip {
    cursor: pointer;
}

.flite-repo-card {
    cursor: pointer;
}

/* --- Proposal Content Area --- */
.proposal-overlay__content {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    border-radius: 0 12px 12px 0;
}

.proposal-overlay__panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
}

.proposal-overlay__content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid var(--gray-lighter, #e5e7eb);
    flex-shrink: 0;
}

/* Header-right actions in the reader (Send Application Link + its status).
   The header is already a space-between flex row, so this simply anchors right. */
.proposal-overlay__header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    margin-left: 1rem;
}

.proposal-overlay__content-header h2 {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
    color: var(--gray-dark, #1f2937);
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.project-viewer__header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0;
}

/* Multi-startup projects: one pill per member beside the reader title. The
   header is a space-between flex row, so the auto right margin keeps the strip
   next to the title while the actions stay anchored right. Without the active
   rule the switcher gives no feedback about which member is being shown. */
.project-viewer__members-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem;
    margin: 0 auto 0 0.75rem;
    min-width: 0;
}

/* Base pill shape — compact and rounded, distinct from a full .flite-btn
   rectangle, since several of these sit side by side in the members strip. */
.member-pill {
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    text-transform: none;
    letter-spacing: normal;
}

/* Solid fill so the active member reads clearly against :hover's light wash
   (background: --accent-lightest / border: --accent-base / text:
   --accent-darker) — the exact rule .flite-btn:hover already uses. */
.member-pill--active {
    background: var(--accent-darker);
    border-color: var(--accent-darker);
    color: #fff;
}

.project-viewer__proposal-select {
    font-size: 0.7rem;
    padding: 0.2rem 0.375rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    margin-left: auto;
    color: #374151;
}

.project-viewer__proposal-primary-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.project-viewer__primary-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: #b45309;
    background: #fef3c7;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.project-viewer__proposal-round {
    font-size: 0.7rem;
    color: #6b7280;
}

.project-viewer__proposal-link-select {
    font-size: 0.75rem;
    padding: 0.2rem 0.35rem;
    border: 1px solid var(--gray-light, #cbd5e1);
    border-radius: 4px;
    max-width: 16rem;
}

.proposal-overlay__tab--primary {
    font-weight: 700;
}

/* Tab buttons — hang off right edge of dialog, connected flush */
.proposal-overlay__tabs {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: absolute;
    right: 0;
    top: 4.25rem;
    transform: translateX(100%);
    z-index: 3;
}

.proposal-overlay__tabs button {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--accent-base);
    border-left: none;
    border-radius: 0 6px 6px 0;
    background: #fff;
    color: var(--accent-darker);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
    white-space: nowrap;
    box-shadow: 4px 2px 8px rgba(0, 0, 0, 0.08);
}

.proposal-overlay__tabs button + button {
    border-top: none;
}

.proposal-overlay__tabs button:hover {
    background: var(--accent-lightest);
}

.proposal-overlay__tabs button.active {
    background: var(--accent-darker);
    color: #fff;
    border-color: var(--accent-darker);
}

/* Hidden proposal tab — strikethrough number + muted style */
.proposal-overlay__tab--hidden {
    opacity: 0.45;
    text-decoration: line-through;
    border-style: dashed;
}

.proposal-overlay__tab--hidden.active {
    opacity: 0.65;
    text-decoration: line-through;
}

/* Hidden badge in proposal meta row */
.proposal-overlay__hidden-badge {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.25rem 0.625rem;
    border-radius: 10px;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* Spacer pushes hide button to the right in meta row */
.proposal-overlay__meta-spacer {
    flex: 1;
}


.proposal-overlay__hidden-warning svg {
    flex-shrink: 0;
}

/* Archive button (seamless-initiated, user-archived lifecycle) */
/* Tools strip: tag pills + "+ Add tag" on the left, Archive/Delete actions
   right-aligned on the same row. No "Tags" label — the pills speak for
   themselves and the add-affordance is labelled "+ Add tag". */
.proposal-overlay__tools {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.1rem;
}

.proposal-overlay__tools > .proposal-overlay__tags {
    flex: 1 1 auto;
    min-width: 0;
    margin-bottom: 0;
}

.proposal-overlay__eyebrow {
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--flite-muted);
}

.proposal-overlay__tools-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.proposal-overlay__action-form {
    display: inline;
    margin: 0;
}

.proposal-overlay__tags-empty {
    font-size: 0.75rem;
    font-style: italic;
    color: var(--flite-faint);
}

/* (Archive / Delete now use the unified .flite-btn .flite-btn--warn / --danger.) */

/* Archive-source indicator in the meta row (system vs user) */
.proposal-overlay__archive-source {
    display: inline-block;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    background: #f3f4f6;
    color: #6b7280;
}

.proposal-overlay__archive-source--user {
    background: #fee2e2;
    color: #991b1b;
}

.proposal-overlay__archive-source--system {
    background: #e0f2fe;
    color: #075985;
}

/* Scrollable proposal body */
.proposal-overlay__scroll {
    flex: 1;
    overflow-y: auto;
    padding: 1.75rem;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-base) transparent;
}

.proposal-overlay__scroll::-webkit-scrollbar {
    width: 6px;
}

.proposal-overlay__scroll::-webkit-scrollbar-thumb {
    background: var(--accent-base);
    border-radius: 3px;
}

.proposal-overlay__no-proposal {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--gray-mid, #6b7280);
    font-size: 0.95rem;
}

/* Proposal metadata row */
.proposal-overlay__meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

/* Actions-only variant (submitter identity moved to the row header): keep the
   Archive/Delete buttons compact and right-aligned. */
.proposal-overlay__meta--actions {
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.proposal-overlay__status-badge {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.25rem 0.625rem;
    border-radius: 10px;
    background: var(--accent-lightest);
    color: var(--accent-darker);
    border: 1px solid var(--accent-base);
}

.proposal-overlay__submitted {
    font-size: 0.8125rem;
    color: var(--gray-light, #6b7280);
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
}

.proposal-overlay__submitted strong {
    color: var(--gray-dark, #1f2937);
}

.proposal-overlay__submitter-email {
    font-size: 0.75rem;
    color: #9ca3af;
}

.proposal-overlay__archived-banner-label {
    font-weight: 600;
    color: #92400e;
}

/* Stands in for the Make Active button when reuse is refused (a project's
   primary proposal), so the banner explains itself instead of just going quiet. */
.proposal-overlay__archived-banner-note {
    font-size: 0.8rem;
    color: #92400e;
    max-width: 34rem;
}

/* Proposal fields (key/value pairs) */
.proposal-overlay__fields {
    /* Breathing room between the Notes box above and the tab bar. */
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Highlights / More Details tabs inside a proposal popover. Own namespace so it
   never collides with the viewer's .proposal-overlay__tabs proposal-switcher
   (which is absolutely positioned off the dialog edge). Active state is driven
   by aria-selected (set by the shared presenter-tabs Stimulus controller). */
.flite-body-tabs__nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--gray-lightest, #e5e7eb);
}

/* "Edit proposal" toggle: right-aligned in the tab bar so it clearly acts on the
   answers below, not the notes above. (Bare-header variant when there are no
   tabs.) */
.flite-body-tabs__edit {
    margin-left: auto;
    align-self: center;
    margin-bottom: 0.35rem;
}

.flite-body-tabs__bare-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.75rem;
}

.flite-body-tabs__tab {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    padding: 0.5rem 0;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-base, #6b7280);
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.flite-body-tabs__tab:hover {
    color: var(--gray-dark, #111827);
}

.flite-body-tabs__tab[aria-selected="true"] {
    color: var(--gray-dark, #111827);
    border-bottom-color: var(--accent-base, #72bbdc);
}

.flite-body-tabs__panel[hidden] {
    display: none;
}

/* --- Proposal "Slide" tab: a presentation one-pager composed from the
   platform's assigned slide slots + the startup's company facts. --- */
.flite-slide {
    padding: 1.25rem 1.5rem 1.5rem;
    color: #374151;
    font-size: 0.9rem;
    line-height: 1.5;
}
.flite-slide__header {
    border-bottom: 2px solid var(--accent-lighter);
    padding-bottom: 0.6rem;
    margin-bottom: 1rem;
}
.flite-slide__title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-darker);
    line-height: 1.2;
    /* base.css sets h1–h6 to uppercase; the slide title is mixed-case. */
    text-transform: none;
}
.flite-slide__sep {
    color: var(--accent-base);
    font-weight: 400;
    margin: 0 0.4rem;
}
.flite-slide__project {
    font-style: italic;
    font-weight: 700;
}
.flite-slide__lead {
    color: #4b5563;
    margin-bottom: 0.85rem;
    font-size: 0.875rem;
}
.flite-slide__lead-tag {
    font-weight: 700;
    color: var(--accent-darker);
}
.flite-slide__prose {
    margin: 0 0 0.4rem;
}
.flite-slide__prose:last-child,
.flite-slide__lead p:last-child,
.flite-slide__item-body p:last-child {
    margin-bottom: 0;
}
/* simple_format wraps answers in <p>, whose default browser margin opened a
   blank line between a label and its text. Keep paragraphs tight on the slide. */
.flite-slide p {
    margin: 0 0 0.35rem;
}
.flite-slide p:last-child {
    margin-bottom: 0;
}

.flite-slide__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem 2rem;
    margin-top: 0.25rem;
}
.flite-slide__col {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}
.flite-slide__item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}
.flite-slide__icon {
    flex: 0 0 auto;
}
.flite-slide__icon-img {
    width: 2.25rem;
    height: 2.25rem;
    display: block;
    /* Custom PNG icons keep their aspect ratio inside the fixed box. */
    object-fit: contain;
}
.flite-slide__item-body {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.85rem;
    padding-top: 0.2rem;
}
.flite-slide__facts {
    margin: 0;
}
.flite-slide__fact {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.2rem;
}
.flite-slide__fact dt {
    font-weight: 700;
    color: var(--accent-darker);
    min-width: 5.25rem;
    flex: 0 0 auto;
}
.flite-slide__fact dd {
    margin: 0;
}
.flite-slide__figure {
    margin-bottom: 0.3rem;
}
.flite-slide__figure:last-child {
    margin-bottom: 0;
}
.flite-slide__figure + .flite-slide__figure {
    margin-top: 0.5rem;
}
.flite-slide__figure-label {
    display: block;
    font-weight: 700;
    color: var(--accent-darker);
    margin-bottom: 0.15rem;
}
.flite-slide__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 1.25rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--accent-lighter);
}

/* --- Slide media: proposal file uploads shown inline below the content.
   Images click through to the fullscreen attachment viewer; videos play in
   place; PDF decks embed the browser's viewer for in-place paging. --- */
.flite-slide__media {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--accent-lighter);
}

/* Each media item spans the full available width, like the embedded deck. */
.flite-slide__media-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.flite-slide__media-item {
    display: block;
    width: 100%;
    border: 1px solid var(--flite-line);
    border-radius: 8px;
    background: var(--flite-wash);
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.flite-slide__media-item:hover {
    border-color: var(--accent-base);
    box-shadow: 0 2px 8px rgba(2, 97, 155, 0.15);
}

.flite-slide__media-img {
    display: block;
    width: 100%;
    max-height: 480px;
    object-fit: contain;
}

.flite-slide__media-video {
    display: block;
    width: 100%;
    max-height: 480px;
    border: 1px solid var(--flite-line);
    border-radius: 8px;
    background: #000;
}

.flite-slide__deck {
    border: 1px solid var(--flite-line);
    border-radius: 8px;
    overflow: hidden;
}

.flite-slide__deck-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.45rem 0.75rem;
    background: var(--flite-wash);
    border-bottom: 1px solid var(--flite-line);
}

.flite-slide__deck-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--flite-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flite-slide__deck-expand {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--accent-darker);
    text-decoration: none;
    flex-shrink: 0;
}

.flite-slide__deck-expand:hover { text-decoration: underline; }

.flite-slide__deck-frame {
    display: block;
    width: 100%;
    height: 34rem;
    border: none;
    background: #fff;
}

/* Linked media (YouTube / Vimeo / Loom / Drive / Dropbox / LinkedIn) — same
   full-width card chrome as the deck, with a 16:9 player frame. */
.flite-slide__embed {
    border: 1px solid var(--flite-line);
    border-radius: 8px;
    overflow: hidden;
}

.flite-slide__embed-frame {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
    background: #000;
}

/* Post-style embeds (LinkedIn) are portrait-ish — a 16:9 frame crops them.
   Match the deck frame's height instead; the post scrolls inside if longer. */
.flite-slide__embed-frame--tall {
    aspect-ratio: auto;
    height: 34rem;
    background: #fff;
}

@media (max-width: 640px) {
    .flite-slide__grid {
        grid-template-columns: 1fr;
    }
}

/* --- Slide trim editor: seamless-only stacked overrides for the Slide view
   (metadata['slide_trims']). Each field shows the full original muted and
   read-only above the trimmed-text textarea, for reference while shortening. */
.flite-slide-trim__bar {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

/* .flite-btn's display:inline-flex would override the UA [hidden] rule —
   restate it so the bar's Save button actually hides until the editor opens. */
.flite-btn[hidden] {
    display: none;
}

.flite-slide-trim {
    border: 1px solid var(--accent-lighter);
    border-radius: 6px;
    padding: 0.85rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.flite-slide-trim__hint {
    color: #6b7280;
    margin: 0 0 0.75rem;
}

.flite-slide-trim__field {
    margin-bottom: 0.85rem;
}

.flite-slide-trim__label {
    display: block;
    font-weight: 700;
    color: var(--accent-darker);
    margin-bottom: 0.15rem;
}

.flite-slide-trim__original {
    color: #6b7280;
    white-space: pre-wrap;
    margin-bottom: 0.3rem;
    padding-left: 0.5rem;
    border-left: 2px solid var(--accent-lighter);
}

.flite-slide-trim__input {
    width: 100%;
    font: inherit;
    color: var(--flite-text);
    border: 1px solid var(--accent-mid);
    border-radius: 4px;
    padding: 0.4rem;
}

.flite-slide-trim__actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.proposal-overlay__section-heading {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-darker, #02619b);
    margin: 1.5rem 0 0.75rem;
    padding-bottom: 0.375rem;
    border-bottom: 1px solid var(--gray-lightest, #e5e7eb);
}

.proposal-overlay__section:first-of-type .proposal-overlay__section-heading {
    margin-top: 0;
}

/* Collapsible section heading in the popover */
.proposal-overlay__section-heading--toggle {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.proposal-overlay__section-chevron {
    font-size: 0.7rem;
    color: var(--gray-base, #9ca3af);
}

.proposal-overlay__field {
    margin-bottom: 1.25rem;
}

/* Question labels are full sentences — sentence case, in the mid brand blue
   (the light blue deepened for text legibility) so they pair with the dark-blue
   section headings while the answer text stays ink. */
.proposal-overlay__field dt {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    color: var(--accent-mid, #2f85b5);
    margin-bottom: 0.25rem;
}

.proposal-overlay__field dd {
    font-size: 0.875rem;
    color: var(--gray-dark, #1f2937);
    margin: 0;
    line-height: 1.6;
}

.proposal-overlay__field dd p {
    margin: 0 0 0.5rem;
}

.proposal-overlay__field dd p:last-child {
    margin-bottom: 0;
}

.proposal-overlay__field--short-title {
    background: #f0f9ff;
    border-left: 3px solid var(--accent-darker, #02619b);
    padding: 0.625rem 0.75rem;
    border-radius: 4px;
    margin-bottom: 1.25rem;
}

.proposal-overlay__field--short-title dd {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-darker, #02619b);
}

.proposal-overlay__field-empty {
    color: #9ca3af;
    font-style: italic;
    font-weight: 400;
}

/* Action buttons row */
.proposal-overlay__actions {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 0;
    border-top: 1px solid var(--gray-lighter, #e5e7eb);
    border-bottom: 1px solid var(--gray-lighter, #e5e7eb);
    margin-bottom: 1.5rem;
}

/* Votes section */
.proposal-overlay__votes {
    margin-top: 0.5rem;
}

.proposal-overlay__votes--top {
    margin-top: 0;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
}

.proposal-overlay__votes h4 {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--gray-dark, #1f2937);
    margin: 0 0 0.75rem;
}

.proposal-overlay__vote {
    padding: 0.625rem 0.75rem;
    margin-bottom: 0.5rem;
    border-left: 3px solid var(--accent-base);
    background: var(--gray-lightest, #f9fafb);
    border-radius: 0 4px 4px 0;
    font-size: 0.8125rem;
}

.proposal-overlay__vote p {
    margin: 0.25rem 0 0;
    color: var(--gray-base, #4b5563);
}

.proposal-overlay__vote-remove {
    float: right;
    margin-left: 0.5rem;
    padding: 0 0.25rem;
    border: none;
    background: none;
    color: var(--gray-base, #9ca3af);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 4px;
}

.proposal-overlay__vote-remove:hover {
    color: #dc2626;
    background: #fee2e2;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .proposal-overlay__dialog {
        grid-template-columns: 1fr;
        width: calc(100vw - 32px);
        height: calc(100vh - 32px);
        margin: 16px auto;
        overflow: hidden;
    }

    .proposal-overlay__tabs {
        position: static;
        transform: none;
        flex-direction: row;
    }

    .proposal-overlay__tabs button {
        border-left: 1px solid var(--accent-base);
        border-radius: 6px;
    }

    .proposal-overlay__startup {
        max-height: 200px;
        border-right: none;
        border-bottom: 1px solid var(--gray-lighter, #e5e7eb);
        border-radius: 12px 12px 0 0;
    }

    .proposal-overlay__content {
        border-radius: 0 0 12px 12px;
    }

    .proposal-overlay__startup-header {
        flex-direction: row;
        gap: 0.75rem;
        text-align: left;
    }

    .proposal-overlay__logo {
        width: 48px;
        height: 48px;
        margin-bottom: 0;
    }
}


/* ============================================
   Question Editor — Settings page
   ============================================ */
.flite-questions-editor {
    margin-bottom: 2rem;
    padding: 1rem;
    border: 1px solid var(--gray-lighter, #e5e7eb);
    border-radius: 8px;
    background: #fff;
}

.flite-question-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 1.1rem 0;
    /* Clear divider between questions so a Yes/No + follow-up + Highlights-label
       stack doesn't blur into the next question. */
    border-bottom: 1px solid #e5e7eb;
    transition: background 0.1s ease;
}

.flite-question-row__options-line {
    flex-basis: 100%;
    width: 100%;
    margin-top: 0.25rem;
    padding-left: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* Highlights-label line — a short display label for Core questions. Matches the
   options-line layout; toggled with the Core checkbox. */
.flite-question-row__abbrev-line {
    flex-basis: 100%;
    width: 100%;
    margin-top: 0.25rem;
    padding-left: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.flite-question-row__abbrev-hint {
    font-weight: 400;
    color: var(--gray-light, #9ca3af);
}

.flite-question-row__abbrev-input {
    max-width: 24rem;
    font-size: 0.8125rem;
    padding: 0.375rem 0.5rem;
    border: 1px solid var(--gray-lighter, #d1d5db);
    border-radius: 4px;
    font-family: inherit;
}

.flite-question-row__abbrev-input:focus {
    outline: none;
    border-color: var(--accent-base, #72bbdc);
    box-shadow: 0 0 0 2px rgba(2, 97, 155, 0.15);
}

.flite-question-row__options-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-base, #6b7280);
}

.flite-question-row__options-input {
    width: 100%;
    font-size: 0.8125rem;
    padding: 0.375rem 0.5rem;
    border: 1px solid var(--gray-lighter, #d1d5db);
    border-radius: 4px;
    font-family: inherit;
    resize: vertical;
}

.flite-question-row__follow-up-line {
    flex-basis: 100%;
    width: 100%;
    margin-top: 0.25rem;
    padding-left: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.flite-question-row__follow-up-toggle {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-base, #6b7280);
    display: flex;
    align-items: center;
    gap: 0.375rem;
    cursor: pointer;
}

.flite-question-row__follow-up-fields {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.flite-question-row__follow-up-label {
    flex: 1;
    min-width: 200px;
    font-size: 0.8125rem;
    padding: 0.375rem 0.5rem;
    border: 1px solid var(--gray-lighter, #d1d5db);
    border-radius: 4px;
}

.flite-question-row__follow-up-type {
    width: 130px;
    font-size: 0.8125rem;
    padding: 0.375rem 0.5rem;
    border: 1px solid var(--gray-lighter, #d1d5db);
    border-radius: 4px;
}

.flite-question-row__follow-up-trigger {
    font-size: 0.75rem;
    color: var(--gray-base, #6b7280);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.flite-question-row__follow-up-trigger select {
    font-size: 0.8125rem;
    padding: 0.25rem 1.5rem 0.25rem 0.5rem;
    min-width: 70px;
    border: 1px solid var(--gray-lighter, #d1d5db);
    border-radius: 4px;
}

.flite-question-row__follow-up-line[data-disabled="true"] .flite-question-row__follow-up-fields {
    opacity: 0.5;
    pointer-events: none;
}

.flite-question-row:last-child {
    border-bottom: none;
}

.flite-question-row--dragging {
    opacity: 0.6;
    background: var(--accent-lightest, #f0fdfa);
    border-radius: 4px;
}

.flite-question-row__handle {
    cursor: grab;
    color: var(--gray-light, #9ca3af);
    font-size: 0.875rem;
    /* Nudge down so the grip lines up with the label input (the row now
       top-aligns its handle/remove against the full-width label). */
    padding: 0.6rem 0.25rem 0.25rem;
    user-select: none;
    letter-spacing: -2px;
    line-height: 1;
}

.flite-question-row__handle:active {
    cursor: grabbing;
}

.flite-question-row__fields {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.625rem;
    flex: 1;
    min-width: 0;
}

/* The question text is the row's headline: it gets its own full-width line,
   comfortably sized, with the config controls (mapping/type/Required/Core)
   wrapping onto a subordinate second line beneath it. */
.flite-question-row__label {
    flex-basis: 100%;
    width: 100%;
    min-width: 0;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--gray-dark, #111827);
    padding: 0.5rem 0.6875rem;
    border: 1px solid var(--gray-lighter, #d1d5db);
    border-radius: 6px;
}

.flite-question-row__label::placeholder {
    color: var(--gray-light, #9ca3af);
    font-weight: 400;
}

.flite-question-row__label:focus {
    outline: none;
    border-color: var(--accent-base, #72bbdc);
    box-shadow: 0 0 0 2px rgba(2, 97, 155, 0.15);
}

/* Mapping select has no dedicated rule otherwise and sprawls to its longest
   option; cap it so it can't crowd the config line. */
.flite-question-row__mapping {
    max-width: 15rem;
    font-size: 0.8125rem;
}

.flite-question-row__type {
    width: 120px;
    font-size: 0.8125rem;
    padding: 0.375rem 0.5rem;
    border: 1px solid var(--gray-lighter, #d1d5db);
    border-radius: 4px;
}

.flite-question-row__required {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-base, #6b7280);
    white-space: nowrap;
    cursor: pointer;
}

/* The Slide slot picker — same compact toggle language as Required/Core
   (unstyled it inherited the base 1.125rem label size and dominated the row). */
.flite-question-row__slide-slot {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-base, #6b7280);
    white-space: nowrap;
    cursor: pointer;
}

.flite-question-row__remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 1.125rem;
    color: var(--gray-light, #9ca3af);
    cursor: pointer;
    padding: 0;
    width: 1.75rem;
    height: 1.75rem;
    /* Sits alongside the full-width label line (row is top-aligned). */
    margin-top: 0.1rem;
    border-radius: 4px;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.15s ease, background 0.15s ease;
}

.flite-question-row__remove:hover {
    color: #dc2626;
    background: #fef2f2;
}

.flite-question-row__remove--locked {
    cursor: default;
    font-size: 0.875rem;
}

.flite-question-row__remove--locked:hover {
    color: var(--gray-light, #9ca3af);
    background: none;
}

.flite-section-title-input {
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 0.375rem 0.5rem;
    flex: 1;
    max-width: 300px;
}

.flite-section-title-input:focus {
    outline: none;
    border-color: var(--accent-base, #72bbdc);
    box-shadow: 0 0 0 2px rgba(2, 97, 155, 0.15);
}

.flite-section-delete-btn {
    background: none;
    border: none;
    font-size: 0.75rem;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: color 0.15s ease, background 0.15s ease;
    white-space: nowrap;
}

.flite-section-delete-btn:hover {
    color: #dc2626;
    background: #fef2f2;
}

/* ============================================
   Revision History
   ============================================ */
.proposal-overlay__revisions {
    margin-bottom: 1.25rem;
    border: 1px solid var(--gray-lighter, #e5e7eb);
    border-radius: 6px;
    background: var(--gray-lightest, #f9fafb);
}

.proposal-overlay__revisions-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.625rem 0.75rem;
    background: none;
    border: none;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-dark, #1f2937);
    cursor: pointer;
    text-align: left;
}

.proposal-overlay__revisions-toggle:hover {
    background: var(--accent-lightest, #f0fdfa);
    border-radius: 6px;
}

.proposal-overlay__revision {
    padding: 0.75rem;
    border-top: 1px solid var(--gray-lighter, #e5e7eb);
}

.proposal-overlay__revision-header {
    font-size: 0.8125rem;
    color: var(--gray-base, #4b5563);
    margin-bottom: 0.5rem;
}

.proposal-overlay__revision-field {
    margin-bottom: 0.375rem;
    padding-left: 0.5rem;
}

.proposal-overlay__revision-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gray-light, #6b7280);
}

.proposal-overlay__revision-old {
    font-size: 0.8rem;
    color: #991b1b;
    background: #fef2f2;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    text-decoration: line-through;
    margin: 0.125rem 0;
}

.proposal-overlay__revision-new {
    font-size: 0.8rem;
    color: #166534;
    background: #f0fdf4;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    margin: 0.125rem 0;
}

/* ============================================
   Inline Editing — Proposal Fields
   ============================================ */
.proposal-overlay__fields-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.5rem;
}

.proposal-overlay__field-input {
    width: 100%;
    min-height: 80px;
    font-size: 0.85rem;
    padding: 0.5rem;
    border: 1px solid var(--accent-base, #72bbdc);
    border-radius: 4px;
    resize: vertical;
    font-family: inherit;
    margin-top: 0.25rem;
    line-height: 1.6;
}

/* Single-line widgets (selects, text/number/date/url inputs) don't need the
   tall textarea default. Multi-selects keep a modest height so options show. */
input.proposal-overlay__field-input,
select.proposal-overlay__field-input {
    min-height: 0;
    resize: none;
}

select.proposal-overlay__field-input--multi {
    min-height: 96px;
}

/* ============================================
   Platform Tags — Pills
   ============================================ */
.platform-tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    min-height: 1.125rem;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0 0.5rem;
    border-radius: 999px;
    line-height: 1.6;
    white-space: nowrap;
    vertical-align: middle;
}

/* Historically a 9px variant; tags now share the chip token everywhere, so
   the modifier only trims the side padding to sit with the other badges. */
.platform-tag-pill--small {
    padding: 0 0.4375rem;
}

.platform-tag-pill__remove {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    line-height: 1;
    padding: 0;
    margin-left: 0.125rem;
    opacity: 0.7;
    transition: opacity 0.15s ease;
}

.platform-tag-pill__remove:hover {
    opacity: 1;
}

/* Tags section in popup */
.proposal-overlay__tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem;
    margin-bottom: 1rem;
}

/* "+ Add tag" — a native <select> (kept: JS/tests pin its id) styled as a small
   dashed brand-blue chip. Base keeps the NATIVE dropdown arrow/behavior, which
   is the reliable path when the select sits inside a native popover="auto" (the
   pipeline kebab menu) — an appearance:none select can fail to open there. */
.proposal-overlay__tag-select {
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.3;
    padding: 0.15rem 0.4rem;
    border: 1px dashed var(--accent-base);
    border-radius: 10px;
    background: transparent;
    color: var(--accent-darker);
    cursor: pointer;
    outline: none;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.proposal-overlay__tag-select:hover {
    background-color: var(--flite-status-info-bg);
    border-color: var(--accent-darker);
}

.proposal-overlay__tag-select:focus-visible {
    border-color: var(--accent-darker);
    box-shadow: 0 0 0 2px var(--flite-status-info-bg);
}

/* Inside the custom proposal overlay (NOT the native kebab popover) the select
   can safely take the polished chip treatment: hidden native arrow + custom
   caret, matching the tag pills. */
.proposal-overlay-wrapper .proposal-overlay__tag-select,
.flite-reviewer .proposal-overlay__tag-select {
    padding: 0.15rem 1.4rem 0.15rem 0.6rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='6'%3E%3Cpath fill='%2302619b' d='M0 0h8L4 6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
}

/* Pipeline kebab tag picker: clickable add-buttons (no native dropdown to be
   dismissed by the kebab's popover). Dashed brand-blue chips matching the pills. */
.proposal-overlay__tag-add-btn {
    display: inline-flex;
    align-items: center;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.3;
    padding: 0.15rem 0.5rem;
    margin: 0 0.25rem 0.25rem 0;
    border: 1px dashed var(--accent-base);
    border-radius: 10px;
    background: transparent;
    color: var(--accent-darker);
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.proposal-overlay__tag-add-btn:hover {
    background-color: var(--flite-status-info-bg);
    border-color: var(--accent-darker);
}

/* Tags on review cards */
.flite-review-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    justify-content: center;
    margin-top: 0.25rem;
}

/* Tags on project chips — a single clipped row so they never wrap and change
   the chip's height; overflow is hidden (all tags remain in the popover). The
   row is ALWAYS rendered with a reserved min-height, so a card with no tags
   still holds the same footprint as one with tags (uniform height + a stable
   spot for the tag pills across every card in a section). */
.flite-project-chip__tags {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.125rem;
    overflow: hidden;
    max-width: 100%;
    min-height: 1.125rem;
}
.flite-project-chip__tags .platform-tag-pill {
    flex-shrink: 0;
    white-space: nowrap;
}
/* This one row carries all of a card's secondary info — status badge, round
   badge and tags together — so every card is a uniform two lines (name + info
   row). Neutralize the badges' default inline margins (flex gap spaces them) and
   keep them from shrinking. */
.flite-project-chip__tags > .flite-project-chip__badge,
.flite-project-chip__tags > .flite-project-chip__round-badge,
.flite-project-chip__tags > .flite-project-chip__new-proposal-badge,
.flite-project-chip__tags > .flite-project-chip__archived-count {
    margin-left: 0;
    flex-shrink: 0;
}

/* Tags on repo cards */
.flite-repo-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
    margin-top: 0.25rem;
}

/* ============================================
   Proposal Comments / Notes
   ============================================ */
/* Save History */
.proposal-overlay__save-history {
    margin: 0.75rem 0;
    padding: 0.5rem;
    background: #fefce8;
    border: 1px solid #fde68a;
    border-radius: 4px;
    font-size: 0.7rem;
    line-height: 1.4;
}

.proposal-overlay__save-history h4 {
    margin: 0 0 0.25rem;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #92400e;
}

.proposal-overlay__save-event {
    padding: 0.2rem 0;
    font-size: 0.675rem;
    color: #78350f;
    border-bottom: 1px solid #fde68a;
}

.proposal-overlay__save-event:last-child {
    border-bottom: none;
}

.proposal-overlay__save-event-dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #d1d5db;
    vertical-align: middle;
    margin-right: 0.2rem;
}

.proposal-overlay__save-event-dot--active {
    background: #f59e0b;
}

.proposal-overlay__save-event-active {
    color: #f59e0b;
    font-weight: 600;
    font-size: 0.625rem;
}

/* === Unified proposal notes panel — used in proposal popover, presenter view === */
.proposal-notes-panel {
    margin-top: 1.25rem;
}

/* Default (popover) notes: a quiet washed panel so the thread reads as an
   intentional annotations area, not a raw form dropped into the page. The
   presenter's --compact variant keeps its bare, borderless layout. */
.proposal-notes-panel--default {
    padding: 0.875rem;
    background: var(--flite-wash);
    border: 1px solid var(--flite-line);
    border-radius: 8px;
}

.proposal-notes-panel--compact {
    margin-top: 0;
}

.proposal-notes-panel__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.proposal-notes-panel__label {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--gray-dark, #1f2937);
}

/* Match the Tags eyebrow so Tags and Notes read as sibling zones. */
.proposal-notes-panel--default .proposal-notes-panel__label {
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--flite-muted);
}

.proposal-notes-panel__count {
    font-size: 0.6875rem;
    color: var(--gray-light, #9ca3af);
}

.proposal-notes-panel__list {
    list-style: none;
    margin: 0 0 0.75rem;
    padding: 0;
}

.proposal-notes-panel__note {
    padding: 0.5rem 0.625rem;
    margin-bottom: 0.5rem;
    border-left: 3px solid var(--accent-base);
    background: var(--gray-lightest, #f9fafb);
    border-radius: 0 4px 4px 0;
    font-size: 0.8125rem;
}

/* On the washed default panel, notes are white "annotation" cards pinned by a
   brand-blue accent — they read as marks on the proposal, not list rows. */
.proposal-notes-panel--default .proposal-notes-panel__note {
    background: #fff;
    border-left-color: var(--accent-darker);
    border: 1px solid var(--flite-line);
    border-left: 3px solid var(--accent-darker);
}

.proposal-notes-panel--default .proposal-notes-panel__list:empty {
    display: none;
}

.proposal-notes-panel--default .proposal-notes-panel__form {
    border-top: 1px solid var(--flite-line);
    margin-top: 0.75rem;
    padding-top: 0.75rem;
}

.proposal-notes-panel--default .proposal-notes-panel__input {
    background: #fff;
}

.proposal-notes-panel__note-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.25rem;
}

.proposal-notes-panel__note-author {
    font-size: 0.8125rem;
    color: var(--gray-dark, #1f2937);
}

.proposal-notes-panel__note-time {
    font-size: 0.6875rem;
    color: var(--gray-light, #9ca3af);
}

.proposal-notes-panel__badge {
    font-size: 0.5625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.1rem 0.375rem;
    border-radius: 3px;
}

.proposal-notes-panel__badge--public {
    background: var(--flite-status-good-bg);
    color: var(--flite-status-good-fg);
}

.proposal-notes-panel__badge--private {
    background: var(--flite-status-warn-bg);
    color: var(--flite-status-warn-fg);
}

.proposal-notes-panel__badge--partner {
    background: var(--flite-status-info-bg);
    color: var(--flite-status-info-fg);
}

.proposal-notes-panel__delete {
    background: none;
    border: none;
    color: var(--gray-light, #9ca3af);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0 0.25rem;
    margin-left: auto;
    transition: color 0.15s ease;
}

.proposal-notes-panel__delete:hover {
    color: #dc2626;
}

.proposal-notes-panel__note-content {
    font-size: 0.8125rem;
    color: var(--gray-dark, #374151);
    line-height: 1.5;
}

.proposal-notes-panel__note-content p {
    margin: 0 0 0.25rem;
}

.proposal-notes-panel__form {
    border-top: 1px dashed var(--gray-lighter, #e5e7eb);
    padding-top: 0.625rem;
}

.proposal-notes-panel__input {
    width: 100%;
    font-size: 0.8125rem;
    padding: 0.4rem 0.55rem;
    border: 1px solid var(--gray-lighter, #d1d5db);
    border-radius: 4px;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}

.proposal-notes-panel__form-actions {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-top: 0.4rem;
    flex-wrap: wrap;
}

.proposal-notes-panel__visibility {
    font-size: 0.75rem;
    color: var(--gray-base, #4b5563);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
}

.proposal-notes-panel__visibility-note {
    font-size: 0.7rem;
    color: var(--gray-light, #6b7280);
    flex: 1;
}

.proposal-notes-panel__submit {
    background: var(--accent-darker);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.4rem 0.75rem;
    cursor: pointer;
    transition: background 0.15s ease;
}

.proposal-notes-panel__submit:hover {
    background: var(--accent-darker, #02619b);
}

.proposal-notes-panel__status {
    font-size: 0.7rem;
    color: var(--gray-light, #9ca3af);
}

/* === Presenter-scaled overrides — applied only inside the presenter view
       so the same notes panel partial reads well at conference-room scale. === */
.flite-presenter__side .proposal-notes-panel {
    margin-top: 0;
    padding: 1.25rem 1.5rem;
    border-top: none;
}

.flite-presenter__side .proposal-notes-panel__label {
    /* Same eyebrow language as the Reviewer-Votes label beside it. */
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--flite-presenter-muted);
}

.flite-presenter__side .proposal-notes-panel__count {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--flite-presenter-muted);
    font-weight: 600;
}

.flite-presenter__side .proposal-notes-panel__note {
    background: rgba(255, 255, 255, 0.7);
    border-left-color: var(--accent-base, #72bbdc);
    padding: 0.7rem 0.85rem;
    font-size: 0.95rem;
}

.flite-presenter__side .proposal-notes-panel__note-author { font-size: 0.95rem; }
.flite-presenter__side .proposal-notes-panel__note-time   { font-size: 0.78rem; }
.flite-presenter__side .proposal-notes-panel__note-content { font-size: 0.95rem; line-height: 1.55; }

.flite-presenter__side .proposal-notes-panel__input {
    font-size: 0.95rem;
    padding: 0.55rem 0.7rem;
    border-color: var(--flite-presenter-rule);
}

.flite-presenter__side .proposal-notes-panel__submit {
    font-size: 0.85rem;
    padding: 0.5rem 0.95rem;
}

.flite-presenter__side .proposal-notes-panel__visibility,
.flite-presenter__side .proposal-notes-panel__visibility-note {
    font-size: 0.85rem;
}

/* === In-app PDF viewer modal — opened from attachment links in proposal
       popovers, the reviewer popover, and the presenter view. === */
.flite-pdf-viewer {
    position: fixed;
    inset: 0;
    /* Must sit ABOVE the proposal popover (.proposal-overlay-wrapper, z-index
       9999999) — attachments are opened from inside that popover, so the viewer
       has to render in front of it. Closing the viewer reveals the popover again. */
    z-index: 10000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
    box-sizing: border-box;
}

.flite-pdf-viewer[hidden] { display: none; }

.flite-pdf-viewer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 18, 14, 0.72);
    backdrop-filter: blur(2px);
    cursor: zoom-out;
}

.flite-pdf-viewer__dialog {
    position: relative;
    width: min(1200px, 100%);
    height: min(90vh, 100%);
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 24px 60px -10px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.flite-pdf-viewer__header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.flite-pdf-viewer__title {
    margin: 0;
    flex: 1;
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flite-pdf-viewer__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.flite-pdf-viewer__download {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: none;
    padding: 0.4rem 0.85rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #ffffff;
    transition: background 0.12s ease, border-color 0.12s ease;
}

.flite-pdf-viewer__download:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.flite-pdf-viewer__close {
    background: transparent;
    border: none;
    width: 2rem;
    height: 2rem;
    border-radius: 6px;
    cursor: pointer;
    color: #6b7280;
    font-size: 1.5rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s ease, color 0.12s ease;
}

.flite-pdf-viewer__close:hover {
    background: #f3eee4;
    color: #1a1a1a;
}

.flite-pdf-viewer__frame {
    flex: 1;
    width: 100%;
    border: none;
    background: #f3eee4;
}

/* Image / video previews fill the content area below the header and scale to
   fit (letterboxed on a dark backdrop like a standard media viewer). */
.flite-pdf-viewer__image,
.flite-pdf-viewer__video {
    flex: 1;
    min-height: 0;
    width: 100%;
    object-fit: contain;
    background: #1a1a1a;
}

.flite-pdf-viewer__image[hidden],
.flite-pdf-viewer__video[hidden],
.flite-pdf-viewer__frame[hidden] {
    display: none;
}

/* The viewer-trigger anchor in the proposal body — readable but distinct
   from regular text links. */
.flite-attachment-link {
    color: var(--accent-darker, #02619b);
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    cursor: pointer;
}

.flite-attachment-link:hover {
    color: var(--accent-hover);
}

.flite-attachment-link::before {
    content: "📄 ";
    margin-right: 0.15rem;
}

/* ============================================
   No-Proposal Badge on Review Cards
   ============================================ */
.flite-review-card__no-proposal-badge {
    display: inline-block;
    margin-top: 0.375rem;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.1875rem 0.5rem;
    border-radius: 10px;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* ============================================
   Proposal Count Grid on Review Cards
   ============================================ */
.flite-review-card__proposal-grid {
    display: flex;
    gap: 0.25rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 0.125rem;
}

.flite-review-card__proposal-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    font-size: 0.625rem;
    font-weight: 700;
    border-radius: 4px;
    background: var(--accent-lightest);
    color: var(--accent-darker);
    border: 1px solid var(--accent-base);
}

/* ============================================
   No-Proposal Detail — Overlay Content
   ============================================ */
.proposal-overlay__no-proposal-detail {
    padding: 2rem 0;
}

.proposal-overlay__no-proposal-warning {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-lighter, #e5e7eb);
}

.proposal-overlay__no-proposal-warning p {
    font-size: 0.875rem;
    color: var(--gray-base, #6b7280);
    margin: 0.75rem 0 0;
    line-height: 1.5;
}

.proposal-overlay__no-proposal-section {
    margin-bottom: 1.5rem;
}

.proposal-overlay__no-proposal-section h4 {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--accent-darker);
    margin: 0 0 0.375rem;
}

.proposal-overlay__no-proposal-section p {
    font-size: 0.875rem;
    color: var(--gray-dark, #374151);
    margin: 0 0 0.375rem;
    line-height: 1.5;
}

.proposal-overlay__no-proposal-link {
    display: inline-block;
    font-size: 0.875rem;
    color: var(--accent-darker);
    text-decoration: none;
    padding: 0.375rem 0.75rem;
    background: var(--accent-lightest, #f0fdfa);
    border: 1px solid var(--accent-base);
    border-radius: 6px;
}

.proposal-overlay__no-proposal-link:hover {
    text-decoration: underline;
    background: var(--accent-lighter, #ccfbf1);
}

.proposal-overlay__no-proposal-hint {
    font-size: 0.75rem;
    font-style: italic;
    color: var(--gray-light, #9ca3af);
}

.proposal-overlay__no-proposal-send {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.flite-review-card__send-status {
    display: inline-block;
    font-size: 0.75rem;
}

/* ============================================
   Email Preview in No-Proposal Overlay
   ============================================ */
.proposal-overlay__email-preview {
    margin: 0.75rem 0;
    border: 1px solid var(--gray-lighter, #e5e7eb);
    border-radius: 6px;
    overflow: hidden;
}

.proposal-overlay__email-preview-header {
    background: var(--gray-lightest, #fafafa);
    padding: 0.375rem 0.75rem;
    border-bottom: 1px solid var(--gray-lighter, #e5e7eb);
}

.proposal-overlay__email-preview-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gray-light, #969696);
}

.proposal-overlay__email-preview-body {
    padding: 0.75rem;
    font-size: 0.8125rem;
    color: var(--gray-dark, #374151);
    line-height: 1.5;
}

.proposal-overlay__email-preview-body p {
    margin: 0 0 0.375rem;
}

.proposal-overlay__email-preview-body hr {
    border: none;
    border-top: 1px solid var(--gray-lighter, #e5e7eb);
    margin: 0.5rem 0;
}

/* ============================================
   Sealed Rounds (history chapter)
   Sealed rounds collapse to a one-line header by default.
   The "Past history" divider separates them from active rounds.
   ============================================ */
.round-card--sealed {
    background: #fafafa;
}

.round-card--sealed .round-card__name {
    color: #6b7280;
    font-weight: 500;
}

.round-card--sealed .round-card__badge {
    opacity: 0.75;
}

.round-card--focus {
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.12);
    border-color: #c7d2fe;
}

.round-card__new-badge {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    background: #dcfce7;
    color: #166534;
}

/* ============================================
   Chip archived-count subtext
   ============================================ */
.flite-project-chip__archived-count {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--flite-muted);
    margin-left: 0.25rem;
}

/* ============================================
   Restore picker modal
   ============================================ */
.flite-picker-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.flite-picker__dialog {
    background: #fff;
    border-radius: 8px;
    padding: 1.25rem;
    max-width: 520px;
    width: calc(100% - 2rem);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.flite-picker__title {
    margin: 0 0 0.25rem;
    font-size: 1.125rem;
    color: #111827;
}

.flite-picker__subtitle {
    margin: 0 0 1rem;
    font-size: 0.85rem;
    color: #6b7280;
}

.flite-picker__list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.flite-picker__item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
}

.flite-picker__item:hover {
    background: #f9fafb;
}

.flite-picker__item-body {
    display: flex;
    flex-direction: column;
}

.flite-picker__item-title {
    font-weight: 600;
    color: #111827;
    font-size: 0.875rem;
}

.flite-picker__item-round {
    font-weight: 500;
    color: #374151;
    font-size: 0.8125rem;
}

.flite-picker__item-meta {
    font-size: 0.75rem;
    color: #6b7280;
}

.flite-picker__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* ============================================
   Popover header status badges
   ============================================ */
.proposal-overlay__status-badge--saved {
    background: var(--flite-status-warn-bg);
    color: var(--flite-status-warn-fg);
}

.proposal-overlay__status-badge--review {
    background: var(--flite-status-info-bg);
    color: var(--flite-status-info-fg);
}

/* ============================================
   No-proposal onboarding panel
   ============================================ */
.proposal-overlay__no-proposal-panel {
    background: #fffbeb;
    border: 1px dashed #fcd34d;
    border-radius: 6px;
    padding: 0.875rem 1rem;
    margin-bottom: 1rem;
}

.proposal-overlay__no-proposal-panel p {
    margin: 0.5rem 0;
    font-size: 0.85rem;
    color: #78350f;
}

.proposal-overlay__no-proposal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.5rem;
}

/* ============================================
   FLITE Presenter Mode (fullscreen meeting)
   ============================================ */
/* (Reviewer / Presenter launch buttons now use .flite-btn; the disabled state
   is handled by .flite-btn.is-disabled.) */

.flite-presenter {
    position: fixed;
    inset: 0;
    background: var(--flite-wash, #f9fafb);
    display: flex;
    flex-direction: column;
    z-index: 100000;
    /* ONE family — the app's own (Interstate/Overpass) — so the fullscreen
       modes read as the same product as the dashboard and popovers. (The
       previous 'Geist'/'Newsreader' faces were never shipped, so this was
       silently rendering a chaotic Segoe/Georgia mix.) Hierarchy comes from
       size + weight + the shared eyebrow-label style, not family mixing. */
    font-family: var(--font-family, Interstate, Overpass, sans-serif);
    --flite-presenter-display: var(--font-family, Interstate, Overpass, sans-serif);
    --flite-presenter-paper: #ffffff;
    --flite-presenter-ink: var(--flite-ink, #1f2937);
    --flite-presenter-rule: var(--flite-line, #e5e7eb);
    --flite-presenter-muted: var(--flite-muted, #6b7280);
}

/* 1fr|auto|1fr grid so the title column sits at the TRUE viewport center —
   with flex it centered between the lone Prev button and the (wider) actions
   group, landing visibly left of the slide content's center line. */
.flite-presenter__nav {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1.25rem;
    padding: 0.85rem 1.5rem;
    background: var(--flite-presenter-paper);
    border-bottom: 1px solid var(--flite-presenter-rule);
}

.flite-presenter__nav > .flite-presenter__nav-btn {
    justify-self: start;
}

.flite-presenter__nav-actions {
    justify-self: end;
}

.flite-presenter__error-banner {
    background: #fee2e2;
    border-bottom: 2px solid #dc2626;
    color: #7f1d1d;
    padding: 0.6rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.flite-presenter__nav-title {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.flite-presenter__slide-counter {
    font-size: 0.7rem;
    color: var(--flite-presenter-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.flite-presenter__slide-name {
    font-family: var(--flite-presenter-display);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--flite-presenter-ink);
    letter-spacing: -0.01em;
}

.flite-presenter__nav-actions {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.flite-presenter__nav-btn {
    background: var(--flite-presenter-paper);
    border: 1px solid var(--flite-presenter-rule);
    border-radius: 6px;
    padding: 0.55rem 1.1rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--flite-presenter-ink);
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease, transform 0.08s ease;
}

.flite-presenter__nav-btn:active {
    transform: translateY(1px);
}

.flite-presenter__nav-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.flite-presenter__nav-btn--primary {
    background: var(--accent-darker);
    color: #fff;
    border-color: var(--accent-darker);
}

.flite-presenter__nav-btn--primary:hover {
    background: var(--accent-darker, #02619b);
    border-color: var(--accent-darker, #02619b);
}

.flite-presenter__nav-btn--exit {
    color: #b91c1c;
    border-color: #fecaca;
}

.flite-presenter__nav-btn--exit:hover {
    background: #fee2e2;
    border-color: #fca5a5;
}

.flite-presenter__deck {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.flite-presenter__slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 340px 1fr 400px;
    grid-template-rows: 1fr auto;
    grid-template-areas:
        "startup proposal side"
        "decision decision decision";
    gap: 0;
    background: var(--flite-presenter-paper);
    animation: flite-presenter-slide-in 0.32s ease-out;
}

/* Reviewer Mode: no votes/notes side column and no decision row — drop those
   grid tracks so the proposal panel expands to fill the freed space. Compound
   selector (two classes) so it outranks the base rule regardless of order. */
.flite-presenter__slide.flite-presenter__slide--review {
    grid-template-columns: 340px 1fr;
    grid-template-rows: 1fr;
    grid-template-areas: "startup proposal";
}

/* Overview slide — deck opener (presenter and reviewer modes): round title
   centered, topline numbers pinned to the top-right corner. Compound selector
   so it overrides the base slide grid. */
.flite-presenter__slide.flite-presenter__slide--overview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 9vh;
    padding-bottom: 3rem;
    overflow-y: auto;
}

/* Settings-configured FLITE logo, mirroring the stats block's corner offset. */
.flite-overview__logo {
    position: absolute;
    top: 2.5rem;
    left: 3rem;
    max-height: 6rem;
    max-width: 16rem;
    object-fit: contain;
}

.flite-overview__stats {
    position: absolute;
    top: 2.5rem;
    right: 3rem;
    display: flex;
    flex-direction: column;
    gap: 2.25rem;
    text-align: right;
}

.flite-overview__stat {
    display: flex;
    flex-direction: column;
}

.flite-overview__number {
    font-size: 7rem;
    font-weight: 700;
    line-height: 1;
    color: var(--flite-presenter-ink);
}

.flite-overview__number--score {
    font-size: 3.25rem;
}

.flite-overview__denom {
    font-size: 0.45em;
    font-weight: 600;
    color: var(--gray-base, #6b7280);
}

.flite-overview__label {
    margin-top: 0.4rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray-base, #6b7280);
}

.flite-overview__heading {
    text-align: center;
    padding: 0 4rem;
}

.flite-overview__title {
    margin: 0;
    font-size: 4rem;
    font-weight: 700;
    color: var(--flite-presenter-ink);
}

.flite-overview__dates {
    margin: 0.75rem 0 0;
    font-size: 1.5rem;
    color: var(--gray-base, #6b7280);
}

.flite-overview__tags,
.flite-overview__locations,
.flite-overview__breakdown {
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    width: 80%; /* fixed (not max-) so every group's separator spans one line */
}

.flite-overview__locations,
.flite-overview__breakdown {
    padding-top: 2.5rem;
    border-top: 1px solid var(--flite-presenter-rule, #e5e7eb);
}

/* Each row is a shared 2-track grid (name zone above the line, count below)
   that every card subgrids into — the underline sits on the shared track
   boundary, so it lands at the same height on every card in the row, sized
   by the row's tallest name (no fixed heights to overflow). */
.flite-overview__tags-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 13.5rem;
    grid-template-rows: auto auto;
    justify-content: center;
    column-gap: 3.5rem;
}

/* Per-tag mini stat: uniform slightly-tall cards so short and long tag names
   read as one set — long names wrap to a second line inside the fixed width.
   Underline accent is the FLITE brand blue for every tag. */
.flite-overview__tag-stat {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 2;
    justify-items: center;
    padding: 1.1rem 1rem;
    border: 1px solid var(--flite-presenter-rule, #e5e7eb);
    border-radius: 10px;
}

/* Fills the shared name track, centers 1-liners vertically against taller
   neighbors, and keeps the text clear of the underline via padding — the
   track grows with the longest name, so nothing can bleed through the line. */
.flite-overview__tag-name {
    display: flex;
    align-items: center;
    justify-content: center;
    justify-self: stretch;
    min-height: 3rem;
    padding-bottom: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: center;
    color: var(--gray-base, #6b7280);
    border-bottom: 3px solid var(--accent-darker, #02619b);
}

.flite-overview__tag-number {
    display: flex;
    align-items: center;
    min-height: 4.5rem; /* matching count zone below the line on every card */
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1;
    color: var(--flite-presenter-ink);
}

/* Presenter Settings modal — draggable startup order rows */
.presenter-order-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.4rem;
    border: 1px solid var(--flite-border, #e5e7eb);
    border-radius: 6px;
    background: #fff;
    cursor: grab;
    user-select: none;
}

.presenter-order-item:active {
    cursor: grabbing;
}

.presenter-order-item.sortable-ghost {
    opacity: 0.4;
}

.presenter-order-item__handle {
    color: var(--gray-base, #9ca3af);
}

.presenter-order-item__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.presenter-order-item__name {
    font-weight: 600;
}

.presenter-order-item__proposal {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--gray-base, #6b7280);
}

.presenter-order-item__title {
    font-weight: 500;
}

.presenter-order-item__score {
    margin-left: auto;
    font-weight: 600;
    color: var(--flite-ink, #1f2937);
}

/* Presenter Settings needs more room than the confirm-style modals. */
.flite-modal--wide {
    max-width: 640px;
}

/* The shared project-list caps at 300px (sized for the Advance Round modal);
   the reorder list should use most of the screen instead. */
.presenter-order-list {
    max-height: 62vh;
}

@keyframes flite-presenter-slide-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Startup sidebar (left) */
.flite-presenter__startup {
    grid-area: startup;
    background: var(--flite-presenter-paper);
    border-right: 1px solid var(--flite-presenter-rule);
    padding: 1.5rem 1.5rem 2rem;
    overflow-y: auto;
}

.flite-presenter__startup-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.6rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--flite-presenter-rule);
    margin-bottom: 1.25rem;
}

.flite-presenter__logo {
    width: 116px;
    height: 116px;
    border-radius: 14px;
    object-fit: contain;
    padding: 8px;
    background: #f9fafb;
    box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 4px 14px rgba(0, 0, 0, 0.05);
}

/* Wordmark-shaped (wide) logos — a square card squeezes them tiny, so the
   card grows wide instead. Added by the image's onload aspect check
   (naturalWidth > 1.4 × naturalHeight) in flite_presenter/_slide. */
.flite-presenter__logo--wide {
    width: auto;
    height: auto;
    max-width: min(260px, 100%);
    max-height: 92px;
}

.flite-presenter__startup-name {
    font-family: var(--flite-presenter-display);
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1.15;
    margin: 0.25rem 0 0;
    color: var(--flite-presenter-ink);
    letter-spacing: -0.01em;
    text-transform: none;
}

.flite-presenter__startup-website {
    font-size: 0.95rem;
    color: var(--accent-darker, #02619b);
    text-decoration: none;
    word-break: break-all;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s;
}

.flite-presenter__startup-website:hover { border-bottom-color: currentColor; }

.flite-presenter__startup-details {
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.flite-presenter__startup-details dt {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--flite-presenter-muted);
    margin-bottom: 0.3rem;
}

.flite-presenter__startup-details dd {
    margin: 0 0 0.65rem;
    font-size: 1.05rem;
    color: var(--flite-presenter-ink);
    line-height: 1.5;
    word-break: break-word;
}

.flite-presenter__startup-email {
    color: var(--flite-presenter-muted);
    font-size: 0.9rem;
}

/* Proposal column (center) */
.flite-presenter__proposal {
    grid-area: proposal;
    background: var(--flite-presenter-paper);
    overflow-y: auto;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.flite-presenter__proposal-meta {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.4rem 0.85rem;
    font-size: 0.95rem;
    color: var(--flite-presenter-muted);
    padding: 1.5rem 2rem 1.05rem;
    border-bottom: 1px solid var(--flite-presenter-rule);
}

.flite-presenter__proposal-title {
    font-family: var(--flite-presenter-display);
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--flite-presenter-ink);
    margin: 0 0 0.15rem;
    line-height: 1.15;
    letter-spacing: -0.015em;
    text-transform: none;
    flex-basis: 100%;
}

.flite-presenter__proposal-meta-submitter {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: var(--flite-presenter-muted);
}

.flite-presenter__proposal-meta-submitter strong {
    color: var(--flite-presenter-ink);
    font-size: 0.82rem;
    font-weight: 600;
}
.flite-presenter__proposal-meta-email { color: var(--flite-presenter-muted); font-size: 0.78rem; }
.flite-presenter__proposal-meta-date  { font-size: 0.78rem; }
.flite-presenter__proposal-meta-spacer { display: none; }

.flite-presenter__tabs {
    display: flex;
    gap: 0;
    background: var(--flite-presenter-paper);
    padding: 0 2rem;
    flex-shrink: 0;
    border-bottom: 1px solid var(--flite-presenter-rule);
}

.flite-presenter__tab {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.85rem 0;
    margin-right: 1.75rem;
    font-family: inherit;
    color: var(--flite-presenter-muted);
    cursor: pointer;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.flite-presenter__tab:hover {
    color: var(--flite-presenter-ink);
}

.flite-presenter__tab--active {
    color: var(--flite-presenter-ink);
    border-bottom-color: var(--accent-base, #72bbdc);
}

.flite-presenter__tab-label {
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 500;
    font-variation-settings: normal;
    line-height: 1.1;
    letter-spacing: 0.005em;
}

.flite-presenter__tab--active .flite-presenter__tab-label {
    font-weight: 600;
}

.flite-presenter__tab-meta {
    font-size: 0.78rem;
    color: var(--flite-presenter-muted);
    font-weight: 500;
    letter-spacing: 0.01em;
}

.flite-presenter__tab--active .flite-presenter__tab-meta {
    color: var(--accent-darker, #02619b);
}

.flite-presenter__proposal-panel {
    padding: 1.75rem 2rem 2.5rem;
}

/* Slide one-pager inside the presenter/reviewer modes: scale up slightly for
   conference-room legibility, keep a readable measure on very wide screens,
   and drop the tags footer (tags already sit in the meta strip above). */
.flite-presenter__proposal-panel--slide .flite-slide {
    font-size: 1rem;
    /* Left-aligned with a capped measure — centering left a weird dead gap
       between the startup sidebar and the slide on wide screens. */
    max-width: 72rem;
    margin: 0;
    padding: 0.5rem 0 1rem;
}
.flite-presenter__proposal-panel--slide .flite-slide__tags {
    display: none;
}

.flite-presenter__proposal-fields {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.flite-presenter__section-heading {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent-darker, #02619b);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 1.25rem 0 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--flite-presenter-rule);
}

.flite-presenter__section-heading:first-child {
    margin-top: 0;
}

.flite-presenter__field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.flite-presenter__field dt {
    /* Sentence-case question label in the mid brand blue (same language as
       the popover) — pairs with the dark-blue section headings above. */
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    color: var(--accent-mid, #2f85b5);
    margin: 0;
}

.flite-presenter__field dd {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.55;
    color: var(--flite-presenter-ink);
    font-weight: 400;
}

.flite-presenter__field dd p { margin: 0 0 0.6rem; }
.flite-presenter__field dd p:last-child { margin-bottom: 0; }

.flite-presenter__empty {
    padding: 3rem 2rem;
    color: var(--flite-presenter-muted);
    text-align: center;
    font-style: italic;
    font-size: 1.1rem;
}

/* Core tab — empty state when no questions are marked core */
.flite-presenter__core-empty {
    padding: 3rem 2rem;
    text-align: center;
    color: var(--flite-presenter-muted);
    border: 1px dashed var(--flite-presenter-rule);
    border-radius: 10px;
    margin: 1rem 0;
    background: rgba(255, 255, 255, 0.6);
}

.flite-presenter__core-empty-title {
    font-family: var(--flite-presenter-display);
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--flite-presenter-ink);
    margin: 0 0 0.5rem;
}

.flite-presenter__core-empty-hint {
    margin: 0;
    font-size: 1rem;
    line-height: 1.55;
    color: var(--flite-presenter-muted);
    max-width: 38rem;
    margin: 0 auto;
}

.flite-presenter__core-empty-hint strong {
    color: var(--flite-presenter-ink);
    font-weight: 600;
}

/* Right side panel: votes + notes */
.flite-presenter__side {
    grid-area: side;
    background: #f9fafb;
    border-left: 1px solid var(--flite-presenter-rule);
    overflow-y: auto;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.flite-presenter__side-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

/* Votes */
.flite-presenter__votes {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--flite-presenter-rule);
    background: var(--flite-presenter-paper);
}

.flite-presenter__votes-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.flite-presenter__votes-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--flite-presenter-muted);
}

.flite-presenter__votes-avg-num {
    font-family: var(--flite-presenter-display);
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--flite-presenter-ink);
    line-height: 1;
}

.flite-presenter__votes-avg-out {
    font-size: 0.95rem;
    color: var(--flite-presenter-muted);
}

.flite-presenter__votes-avg-count {
    font-size: 0.85rem;
    color: var(--flite-presenter-muted);
    margin-left: 0.4rem;
}

.flite-presenter__votes-avg-empty {
    font-size: 0.95rem;
    color: var(--flite-presenter-muted);
    font-style: italic;
}

.flite-presenter__votes-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    max-height: 260px;
    overflow-y: auto;
}

.flite-presenter__vote {
    padding: 0.55rem 0.75rem;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--flite-presenter-rule);
    border-radius: 6px;
    font-size: 0.95rem;
}

.flite-presenter__vote-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.flite-presenter__vote-stars { letter-spacing: 0.08em; }
.flite-presenter__vote-star { color: #d1d5db; font-size: 1rem; }
.flite-presenter__vote-star--filled { color: #d97706; }

.flite-presenter__vote-user {
    color: var(--flite-presenter-muted);
    font-weight: 600;
    margin-left: auto;
    font-size: 0.85rem;
}

.flite-presenter__vote-comment {
    margin: 0.4rem 0 0;
    color: var(--flite-presenter-ink);
    line-height: 1.5;
    font-size: 0.95rem;
}

/* Notes */
.flite-presenter__notes {
    padding: 0.85rem 1rem;
    background: #fafafa;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.flite-presenter__notes-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.flite-presenter__notes-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--flite-presenter-muted);
}

.flite-presenter__notes-count {
    font-size: 0.7rem;
    color: #9ca3af;
}

.flite-presenter__notes-list {
    list-style: none;
    margin: 0 0 0.5rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-y: auto;
    flex: 1;
}

.flite-presenter__note {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 0.4rem 0.55rem;
}

.flite-presenter__note-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.4rem;
    margin-bottom: 0.2rem;
    font-size: 0.7rem;
}

.flite-presenter__note-author {
    color: #1f2937;
    font-weight: 600;
}

.flite-presenter__note-time {
    color: #9ca3af;
}

.flite-presenter__note-content {
    margin: 0;
    font-size: 0.8rem;
    color: #1f2937;
    line-height: 1.4;
}

.flite-presenter__notes-form {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    border-top: 1px dashed #d1d5db;
    padding-top: 0.5rem;
    flex-shrink: 0;
}

.flite-presenter__notes-input {
    width: 100%;
    padding: 0.4rem 0.55rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.8rem;
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
}

.flite-presenter__notes-input:focus {
    outline: none;
    border-color: var(--accent-base, #72bbdc);
    box-shadow: 0 0 0 2px rgba(2, 97, 155, 0.18);
}

.flite-presenter__notes-submit {
    align-self: flex-end;
    background: var(--accent-darker);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0.35rem 0.85rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.flite-presenter__notes-submit:hover {
    background: var(--accent-darker, #02619b);
}

/* Decision bar (bottom) */
.flite-presenter__decision-bar {
    grid-area: decision;
    background: var(--flite-presenter-paper);
    border-top: 1px solid var(--flite-presenter-rule);
    padding: 1.1rem 1.75rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.flite-presenter__decision-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--flite-presenter-muted);
    margin-right: 0.4rem;
}

.flite-presenter__decision-btn {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--flite-presenter-rule);
    border-radius: 999px;
    padding: 0.55rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--flite-presenter-ink);
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease, transform 0.08s ease;
}

.flite-presenter__decision-btn:active { transform: translateY(1px); }

.flite-presenter__decision-btn:hover {
    background: #ffffff;
    border-color: #9ca3af;
}

.flite-presenter__decision-btn.active {
    background: var(--accent-darker);
    color: #ffffff;
    border-color: var(--accent-darker);
}

.flite-presenter__decision-btn--clear {
    color: #6b7280;
    background: transparent;
    border-color: #e5e7eb;
    margin-left: 0.25rem;
}

.flite-presenter__decision-btn--clear:hover {
    background: #f3f4f6;
    color: #111827;
}

.flite-presenter__decision-current {
    margin-left: auto;
    font-size: 0.95rem;
    color: var(--flite-presenter-muted);
}

.flite-presenter__decision-current strong {
    color: var(--flite-presenter-ink);
    font-weight: 600;
}

/* Wrap-up screen */
.flite-presenter-wrapup {
    min-height: 100vh;
    background: #f3f4f6;
    display: flex;
    flex-direction: column;
}

.flite-presenter-wrapup__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1.5rem;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.flite-presenter-wrapup__title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
}

.flite-presenter-wrapup__body {
    flex: 1;
    max-width: 900px;
    width: 100%;
    margin: 1.5rem auto;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.flite-presenter-wrapup__group {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.flite-presenter-wrapup__group--empty {
    background: #fafafa;
    opacity: 0.85;
}

.flite-presenter-wrapup__group-title {
    margin: 0;
    padding: 0.75rem 1rem;
    background: #f9fafb;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.95rem;
    font-weight: 700;
    color: #111827;
}

.flite-presenter-wrapup__group-count {
    color: #9ca3af;
    font-weight: 500;
    margin-left: 0.25rem;
}

.flite-presenter-wrapup__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.flite-presenter-wrapup__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 1rem;
    border-bottom: 1px solid #f3f4f6;
}

.flite-presenter-wrapup__row:last-child { border-bottom: none; }

.flite-presenter-wrapup__startup {
    font-weight: 600;
    color: #1f2937;
}

.flite-presenter-wrapup__row-meta {
    font-size: 0.75rem;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.flite-presenter-wrapup__notes-pill {
    background: #eef2ff;
    color: #4f46e5;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
}

.flite-presenter-wrapup__empty {
    padding: 2rem;
    text-align: center;
    color: #9ca3af;
    font-style: italic;
}

.flite-presenter-wrapup__footer {
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    padding: 0.85rem 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    position: sticky;
    bottom: 0;
}

/* ── "Download Full PDF" loading overlay ─────────────────────────────────── */
/* Wrapper is transparent to layout so the button stays a normal flex item. */
.flite-pdf-dl {
    display: contents;
}

.flite-pdf-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(17, 24, 39, 0.55);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.flite-pdf-overlay[hidden] {
    display: none;
}

.flite-pdf-overlay__card {
    position: relative;
    background: #ffffff;
    border-radius: 14px;
    padding: 28px 34px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    max-width: 320px;
    text-align: center;
}

/* Corner X — aborts the in-flight request and dismisses the overlay. */
.flite-pdf-overlay__cancel {
    position: absolute;
    top: 6px;
    right: 10px;
    border: none;
    background: none;
    padding: 4px;
    font-size: 20px;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
}

.flite-pdf-overlay__cancel:hover {
    color: #374151;
}

.flite-pdf-overlay__spinner {
    position: relative;
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
}

.flite-pdf-overlay__ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 4px solid rgba(2, 97, 155, 0.15);
    border-top-color: #02619b;
    animation: flite-pdf-spin 0.9s linear infinite;
}

.flite-pdf-overlay__logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.flite-pdf-overlay__msg {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.flite-pdf-overlay__hint {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: #6b7280;
    text-align: center;
}

.flite-pdf-overlay__dismiss {
    display: none;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    color: #374151;
    border-radius: 8px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.flite-pdf-overlay__dismiss:hover {
    background: #f3f4f6;
}

/* Error state: stop the spinner, tint it red, reveal the Close button. */
.flite-pdf-overlay.is-error .flite-pdf-overlay__ring {
    animation: none;
    border-color: rgba(220, 38, 38, 0.25);
    border-top-color: #dc2626;
}

.flite-pdf-overlay.is-error .flite-pdf-overlay__dismiss {
    display: inline-block;
}

@keyframes flite-pdf-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .flite-pdf-overlay__ring {
        animation-duration: 2.2s;
    }
}

/* Member rows in the project block carry their own funding value + inline
   editor (spec R3), so the row wraps rather than squeezing the name. */
.project-viewer__member {
    flex-wrap: wrap;
    gap: 0.4rem;
}

.project-viewer__member-funding {
    font-variant-numeric: tabular-nums;
    color: var(--text-muted, #5c6169);
}

.project-viewer__member-funding-input {
    width: 7rem;
    padding: 0.2rem 0.35rem;
    border: 1px solid var(--line, #dee2e6);
    border-radius: var(--radius-ctl, 5px);
    font-size: var(--fs-meta, 0.75rem);
}

.project-viewer__block-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.project-viewer__block-title {
    margin: 0;
    font-size: 1rem;
    color: var(--ink, #22343a);
}

.project-viewer__proposal-label {
    color: var(--text-faint, #868d96);
}

/* ============================================================================
   FLITE PROJECT reader ("Option D, rev 3") — the lazily-fetched project popover.

   EVERY selector in this file starts with .flite-project-reader, on purpose:
   shared FLITE/pipeline rules have leaked into CACHED dashboard fragment HTML
   before, and a cached fragment cannot be re-rendered to undo it. A test in
   test/integration/flite_project_reader_test.rb enforces the scope.

   Colors/type come from design_tokens.css (ink + teal). Casing is hybrid:
   UPPERCASE eyebrows and card heads, sentence-case buttons — which means the
   uppercase in .flite-btn / .project-viewer__edit-btn has to be undone locally,
   and only for the reader's own chrome. The timeline keeps FLITE's existing
   look so round chapters read identically in both readers.
   ========================================================================= */

/* --- shell ------------------------------------------------------------- */

.flite-project-reader .proposal-overlay__dialog--single {
    grid-template-columns: 1fr;
}

.flite-project-reader .proposal-overlay__dialog--single .proposal-overlay__content {
    border-radius: 12px;
}

/* --- header band ------------------------------------------------------- */

.flite-project-reader .flite-project-reader__band {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.flite-project-reader .flite-project-reader__identity {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.flite-project-reader .flite-project-reader__kicker {
    font-family: var(--font-ui, inherit);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--text-faint, #868d96);
    line-height: 1.2;
}

.flite-project-reader .flite-project-reader__title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--ink, #22343a);
    letter-spacing: -0.01em;
}

.flite-project-reader .flite-project-reader__band .project-viewer__header-actions {
    margin-left: auto;
}

/* title row: name + "Custom title" flag + the quiet Edit title toggle */
.flite-project-reader .flite-project-reader__title-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.25rem 0.75rem;
    min-width: 0;
}

.flite-project-reader .flite-project-reader__title-row[hidden],
.flite-project-reader .flite-project-reader__title-edit[hidden] {
    display: none;
}

.flite-project-reader .flite-project-reader__title-flag {
    display: inline-flex;
    align-items: center;
    min-height: 1.125rem;
    padding: 0 0.4375rem;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.6;
    border-radius: 999px;
    background: var(--pill-track, #eef0f2);
    color: var(--text-muted, #5c6169);
    align-self: center;
}

.flite-project-reader .flite-project-reader__title-flag[hidden] {
    display: none;
}

.flite-project-reader .flite-project-reader__quiet-btn {
    padding: 0;
    border: 0;
    background: none;
    font-family: inherit;
    cursor: pointer;
}

.flite-project-reader .flite-project-reader__quiet-btn:hover {
    color: var(--teal-ink-hover, #266b72);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

/* title editor: [ input ] – members  Save  Cancel, hint on its own line */
.flite-project-reader .flite-project-reader__title-edit {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.625rem;
    margin-top: 0.125rem;
}

.flite-project-reader .flite-project-reader__title-input {
    height: 1.9rem;
    min-width: 18rem;
    padding: 0 0.5rem;
    font-family: inherit;
    font-size: var(--fs-body-sm, 0.875rem);
    font-weight: 700;
    color: var(--ink, #22343a);
    background: #fff;
    border: 1px solid var(--line, #dee2e6);
    border-radius: var(--radius-ctl, 5px);
}

.flite-project-reader .flite-project-reader__title-members {
    font-size: var(--fs-body-sm, 0.875rem);
    font-weight: 700;
    color: var(--text-muted, #5c6169);
    white-space: nowrap;
}

.flite-project-reader .flite-project-reader__title-edit .flite-btn--solid {
    height: 1.9rem;
    padding: 0 0.75rem;
    font-size: var(--fs-meta, 0.75rem);
    background: var(--teal-ink, #2f7e86);
    border-color: var(--teal-ink, #2f7e86);
    color: #fff;
    text-transform: none;
    letter-spacing: 0;
}

.flite-project-reader .flite-project-reader__title-edit .flite-btn--solid:hover {
    background: var(--teal-ink-hover, #266b72);
    border-color: var(--teal-ink-hover, #266b72);
}

.flite-project-reader .flite-project-reader__title-hint {
    flex-basis: 100%;
    font-size: var(--fs-meta, 0.75rem);
    color: var(--text-faint, #868d96);
}

.flite-project-reader .flite-project-reader__band .flite-btn {
    text-transform: none;
    letter-spacing: 0;
    font-size: var(--fs-ui, 0.8125rem);
}

/* project tabs: only rendered when this startup holds >1 project this round */

.flite-project-reader .flite-project-reader__project-tabs {
    flex-basis: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem;
    margin-bottom: 0.25rem;
}

.flite-project-reader .flite-project-reader__project-tabs-label {
    font-family: var(--font-ui, inherit);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--text-faint, #868d96);
    margin-right: 0.25rem;
}

.flite-project-reader .flite-project-reader__project-tabs .project-pill {
    text-transform: none;
    letter-spacing: 0;
    font-size: var(--fs-meta, 0.75rem);
    max-width: 22rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flite-project-reader .project-pill__status {
    margin-left: 0.35rem;
    font-size: 0.65rem;
    font-weight: 700;
    opacity: 0.75;
}

/* --- round-history zone ------------------------------------------------ */

.flite-project-reader .flite-project-reader__history {
    margin-top: 1.5rem;
}

.flite-project-reader .flite-project-reader__history-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding-bottom: 0.4rem;
    margin-bottom: 0.9rem;
    border-bottom: 2px solid var(--teal-rule, #b2e0e4);
}

.flite-project-reader .flite-project-reader__eyebrow {
    margin: 0;
    font-family: var(--font-ui, inherit);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink, #22343a);
}

.flite-project-reader .flite-project-reader__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.flite-project-reader .flite-project-reader__tabs .member-pill {
    text-transform: none;
    letter-spacing: 0;
    font-size: var(--fs-meta, 0.75rem);
}

.flite-project-reader .flite-project-reader__hint {
    margin-left: auto;
    font-size: var(--fs-meta, 0.75rem);
    color: var(--text-faint, #868d96);
}

.flite-project-reader .flite-project-reader__member-region {
    display: grid;
    grid-template-columns: 264px minmax(0, 1fr);
    gap: 1.15rem;
    align-items: start;
}

/* The rail is the shared popover sidebar re-hosted inside the body, so its
   full-height column styling (right border, half-rounded corners) is undone
   here rather than in the shared partial — the startup reader still needs it. */
.flite-project-reader .flite-project-reader__rail .proposal-overlay__startup {
    padding: 1.15rem 1rem 1rem;
    background: var(--wash, #f6f7f8);
    border: 1px solid var(--line, #dee2e6);
    border-radius: var(--radius-card, 8px);
    overflow-y: visible;
    max-height: none;
}

.flite-project-reader .flite-project-reader__rail .proposal-overlay__logo {
    width: 64px;
    height: 64px;
}

@media (max-width: 1100px) {
    .flite-project-reader .flite-project-reader__member-region {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* --- dossier ----------------------------------------------------------- */

.flite-project-reader .flite-project-reader__grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1rem;
    align-items: start; /* a card that opens an editor grows alone */
}

.flite-project-reader .flite-project-reader__card {
    grid-column: span 6;
    border: 1px solid var(--line, #dee2e6);
    border-radius: var(--radius-card, 8px);
    background: #fff;
    min-width: 0;
}

.flite-project-reader .flite-project-reader__card--wide { grid-column: span 7; }
.flite-project-reader .flite-project-reader__card--narrow { grid-column: span 5; }

.flite-project-reader .flite-project-reader__card-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0.55rem 0.85rem 0.4rem;
    font-family: var(--font-ui, inherit);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink, #22343a);
    border-bottom: 2px solid var(--teal-rule, #b2e0e4);
}

.flite-project-reader .flite-project-reader__card-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.flite-project-reader .flite-project-reader__card-actions .project-viewer__edit-btn,
.flite-project-reader .flite-project-reader__quiet-link {
    text-transform: none;
    letter-spacing: 0;
    font-size: var(--fs-meta, 0.75rem);
    font-weight: 700;
    color: var(--teal-ink, #2f7e86);
}

.flite-project-reader .flite-project-reader__card-body {
    padding: 0.5rem 0.85rem 0.75rem;
}

.flite-project-reader .flite-project-reader__empty {
    margin: 0.25rem 0;
    font-size: var(--fs-meta, 0.75rem);
    color: var(--text-faint, #868d96);
}

.flite-project-reader .flite-project-reader__card .flite-btn, .flite-project-reader .flite-project-reader__card .project-viewer__file-link {
    text-transform: none;
    letter-spacing: 0;
}

/* members list */

.flite-project-reader .flite-project-reader__members {
    list-style: none;
    margin: 0;
    padding: 0;
}

.flite-project-reader .flite-project-reader__member-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.5rem 0.85rem;
    border-bottom: 1px solid var(--line-soft, #e8ebee);
}

.flite-project-reader .flite-project-reader__member-row:last-child { border-bottom: 0; }

.flite-project-reader .flite-project-reader__member-name {
    font-weight: 700;
    color: var(--ink, #22343a);
    font-size: var(--fs-body-sm, 0.875rem);
}

.flite-project-reader .flite-project-reader__star { color: #d99114; }

.flite-project-reader .flite-project-reader__member-amount {
    margin-left: auto;
    font-variant-numeric: tabular-nums;
    color: var(--text, #313131);
}

.flite-project-reader .flite-project-reader__member-row--total {
    background: var(--teal-wash, #f6fcfc);
    font-weight: 700;
}

.flite-project-reader .flite-project-reader__member-row--total .flite-project-reader__member-amount {
    color: var(--ink, #22343a);
}

/* key/value rows */

.flite-project-reader .flite-project-reader__kv {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    min-height: 2.25rem; /* the same footprint in display and edit mode */
    padding: 0.25rem 0;
    border-bottom: 1px solid var(--line-soft, #e8ebee);
    font-size: var(--fs-meta, 0.75rem);
}

.flite-project-reader .flite-project-reader__kv-group:last-child > .flite-project-reader__kv:last-child,
.flite-project-reader .flite-project-reader__card-body > .flite-project-reader__kv:last-child {
    border-bottom: 0;
}

.flite-project-reader .flite-project-reader__v {
    font-size: var(--fs-body-sm, 0.875rem);
    color: var(--text, #313131);
    font-variant-numeric: tabular-nums;
}

.flite-project-reader .flite-project-reader__v--empty {
    color: var(--text-faint, #868d96);
}

/* Native date inputs, dressed to the row: hairline, control radius, one height. */
.flite-project-reader .flite-project-reader__date-input {
    height: 1.75rem;
    padding: 0 0.5rem;
    font-family: inherit;
    font-size: var(--fs-body-sm, 0.875rem);
    color: var(--text, #313131);
    background: #fff;
    border: 1px solid var(--line, #dee2e6);
    border-radius: var(--radius-ctl, 5px);
}

/* Inline save/upload status ("Saving…", "Saved", errors) beside its control. */
.flite-project-reader .flite-project-reader__status {
    font-size: var(--fs-meta, 0.75rem);
    color: var(--text-muted, #5c6169);
}

.flite-project-reader .flite-project-reader__status:empty {
    display: none;
}

.flite-project-reader .flite-project-reader__k {
    flex: none;
    width: 5.25rem;
    margin: 0;
    line-height: 1.2;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-faint, #868d96);
}

.flite-project-reader .flite-project-reader__kv--files {
    display: block;
    min-height: 0;
    padding: 0.35rem 0 0.25rem;
}

.flite-project-reader .flite-project-reader__kv-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 1.75rem;
}

.flite-project-reader .flite-project-reader__count {
    font-size: var(--fs-meta, 0.75rem);
    color: var(--text-faint, #868d96);
    font-variant-numeric: tabular-nums;
}

.flite-project-reader .flite-project-reader__kv-head .flite-project-reader__quiet-btn {
    margin-left: auto;
    padding: 0;
    border: 0;
    background: none;
    font-family: inherit;
    cursor: pointer;
}

.flite-project-reader .flite-project-reader__kv-head .flite-project-reader__quiet-btn:hover,
.flite-project-reader .flite-project-reader__kv-head .flite-project-reader__quiet-btn[aria-expanded="true"] {
    color: var(--teal-ink-hover, #266b72);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.flite-project-reader .flite-project-reader__files-body {
    padding-left: 5.75rem; /* the label column + gap, so files align with the values above */
}

.flite-project-reader .flite-project-reader__files-body .project-viewer__files {
    margin: 0;
    padding: 0;
    list-style: none;
}

.flite-project-reader .flite-project-reader__files-body .project-viewer__file {
    gap: 0.5rem;
    padding: 0.3rem 0;
    border-bottom: 1px solid var(--line-soft, #e8ebee);
    font-size: var(--fs-body-sm, 0.875rem);
}

.flite-project-reader .flite-project-reader__files-body .project-viewer__file:last-child {
    border-bottom: 0;
}

.flite-project-reader .flite-project-reader__files-body .project-viewer__file-name {
    color: var(--text, #313131);
}

.flite-project-reader .flite-project-reader__files-body .project-viewer__file-type {
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.6;
    padding: 0 0.4375rem;
    color: var(--text-muted, #5c6169);
    background: var(--pill-track, #eef0f2);
    border-radius: var(--radius-pill, 999px);
}

.flite-project-reader .flite-project-reader__files-body .project-viewer__file-link,
.flite-project-reader .flite-project-reader__files-body .project-viewer__file-delete {
    text-transform: none;
    letter-spacing: 0;
    font-size: var(--fs-meta, 0.75rem);
    font-weight: 700;
    padding: 0.125rem 0.25rem;
}

.flite-project-reader .flite-project-reader__files-body .project-viewer__file-link {
    color: var(--teal-ink, #2f7e86);
}

.flite-project-reader .flite-project-reader__files-body .project-viewer__file-delete {
    color: var(--text-faint, #868d96);
}

.flite-project-reader .flite-project-reader__files-body .project-viewer__file-delete:hover {
    color: var(--red-ink, #b91c1c);
    background: var(--red-wash, #fee2e2);
}

.flite-project-reader .flite-project-reader__files-body .project-viewer__empty {
    margin: 0.25rem 0;
}

.flite-project-reader .flite-project-reader__upload {
    margin: 0.5rem 0 0.25rem;
    padding: 0.625rem 0.75rem;
    background: var(--wash, #f6f7f8);
    border: 1px solid var(--line-soft, #e8ebee);
    border-radius: var(--radius-item, 6px);
}

.flite-project-reader .flite-project-reader__upload[hidden] {
    display: none;
}

.flite-project-reader .flite-project-reader__upload .project-viewer__upload-row {
    max-width: none;
    gap: 0.5rem;
}

.flite-project-reader .flite-project-reader__upload .project-viewer__file-input {
    font-size: var(--fs-meta, 0.75rem);
    color: var(--text-muted, #5c6169);
}

.flite-project-reader .flite-project-reader__upload .project-viewer__type-select {
    height: 1.75rem;
    padding: 0 0.5rem;
    min-width: 8rem;
    font-family: inherit;
    font-size: var(--fs-meta, 0.75rem);
    color: var(--text, #313131);
    border: 1px solid var(--line, #dee2e6);
    border-radius: var(--radius-ctl, 5px);
    background: #fff;
}

.flite-project-reader .flite-project-reader__upload .flite-project-reader__status {
    display: block;
    margin-top: 0.375rem;
}

.flite-project-reader .flite-project-reader__upload .flite-project-reader__status:empty {
    display: none;
}

.flite-project-reader .flite-project-reader__kv .proposal-overlay__tags,
.flite-project-reader .flite-project-reader__kv .project-viewer__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    min-width: 0;
}

.flite-project-reader .flite-project-reader__kv .project-viewer__files {
    margin: 0;
    padding: 0;
    list-style: none;
    min-width: 0;
}

/* --- member row disclosures -------------------------------------------- */

.flite-project-reader .flite-project-reader__inline-edit > summary,
.flite-project-reader .flite-project-reader__menu > summary {
    cursor: pointer;
    list-style: none;
}

.flite-project-reader .flite-project-reader__inline-edit > summary::-webkit-details-marker,
.flite-project-reader .flite-project-reader__menu > summary::-webkit-details-marker {
    display: none;
}

.flite-project-reader .flite-project-reader__member-row {
    min-height: 2.75rem; /* tall enough for the open editor, so opening it moves nothing */
}

.flite-project-reader .flite-project-reader__inline-edit {
    position: relative;
}

/* Open: the editor takes the amount's slot (the amount hides), reading
   [ input ][ Save ] Cancel — row-reverse puts the body before the summary. */
.flite-project-reader .flite-project-reader__member-row:has(.flite-project-reader__inline-edit[open]) .flite-project-reader__member-amount {
    display: none;
}

.flite-project-reader .flite-project-reader__inline-edit[open] {
    display: inline-flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.flite-project-reader .flite-project-reader__inline-edit[open] > summary {
    color: var(--text-muted, #5c6169);
    font-size: 0; /* swap the label without touching the text node the JS/tests read */
}

.flite-project-reader .flite-project-reader__inline-edit[open] > summary::after {
    content: "Cancel";
    font-size: var(--fs-meta, 0.75rem);
}

.flite-project-reader .flite-project-reader__inline-edit[open] > summary:hover::after {
    color: var(--ink, #22343a);
}

.flite-project-reader .flite-project-reader__inline-edit-body {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.flite-project-reader .flite-project-reader__inline-edit-body .project-viewer__member-funding-input {
    height: 1.75rem;
    width: 7.5rem;
    padding: 0 0.5rem;
    font-family: inherit;
    font-size: var(--fs-body-sm, 0.875rem);
    font-variant-numeric: tabular-nums;
    text-align: right;
    color: var(--text, #313131);
    border: 1px solid var(--line, #dee2e6);
    border-radius: var(--radius-ctl, 5px);
}

/* Compact solid Save/Upload buttons sized to the row's controls, in the
   reader's own teal (the FLITE wrapper remaps --accent-* to blue; the reader's
   links are teal, so its buttons are too). */
.flite-project-reader .flite-project-reader__card .flite-btn--solid {
    height: 1.75rem;
    padding: 0 0.75rem;
    font-size: var(--fs-meta, 0.75rem);
    background: var(--teal-ink, #2f7e86);
    border-color: var(--teal-ink, #2f7e86);
    color: #fff;
}

.flite-project-reader .flite-project-reader__card .flite-btn--solid:hover {
    background: var(--teal-ink-hover, #266b72);
    border-color: var(--teal-ink-hover, #266b72);
    color: #fff;
}

/* Focus: the site's teal ring instead of the browser's black outline. */
.flite-project-reader input:focus-visible,
.flite-project-reader select:focus-visible,
.flite-project-reader textarea:focus-visible,
.flite-project-reader summary:focus-visible,
.flite-project-reader .flite-project-reader__quiet-btn:focus-visible {
    outline: 2px solid var(--teal-ink, #2f7e86);
    outline-offset: 1px;
    border-color: var(--teal-ink, #2f7e86);
}

/* Summary / notes editors: same hairline vocabulary as the inputs above. */
.flite-project-reader .flite-project-reader__card .project-viewer__notes-input {
    min-height: 5.5rem;
    padding: 0.5rem 0.625rem;
    font-size: var(--fs-body-sm, 0.875rem);
    line-height: 1.45;
    color: var(--text, #313131);
    border: 1px solid var(--line, #dee2e6);
    border-radius: var(--radius-ctl, 5px);
}

.flite-project-reader .flite-project-reader__menu {
    position: relative;
}

.flite-project-reader .flite-project-reader__kebab {
    display: inline-grid;
    place-items: center;
    width: 1.5rem;
    height: 1.35rem;
    border: 1px solid var(--line, #dee2e6);
    border-radius: var(--radius-ctl, 5px);
    color: var(--text-muted, #5c6169);
    font-weight: 800;
    line-height: 1;
}

.flite-project-reader .flite-project-reader__menu[open] > .flite-project-reader__kebab {
    border-color: var(--teal-ink, #2f7e86);
    color: var(--teal-ink, #2f7e86);
}

.flite-project-reader .flite-project-reader__menu-list {
    position: absolute;
    right: 0;
    top: calc(100% + 0.25rem);
    z-index: 5;
    min-width: 12rem;
    display: flex;
    flex-direction: column;
    padding: 0.25rem;
    background: #fff;
    border: 1px solid var(--line, #dee2e6);
    border-radius: var(--radius-item, 6px);
    box-shadow: var(--shadow-pop, 0 10px 24px rgba(17, 24, 39, 0.14));
}

.flite-project-reader .flite-project-reader__menu-item {
    display: block;
    width: 100%;
    padding: 0.35rem 0.5rem;
    border: 0;
    border-radius: 4px;
    background: none;
    text-align: left;
    text-decoration: none;
    text-transform: none;
    letter-spacing: 0;
    font-family: inherit;
    font-size: var(--fs-meta, 0.75rem);
    font-weight: 600;
    color: var(--text, #313131);
    cursor: pointer;
}

.flite-project-reader .flite-project-reader__menu-item:hover {
    background: var(--teal-wash, #f6fcfc);
    color: var(--teal-ink, #2f7e86);
}

.flite-project-reader .flite-project-reader__menu-item--danger {
    color: var(--red-ink, #b91c1c);
}

.flite-project-reader .flite-project-reader__menu-item--danger:hover {
    background: var(--red-wash, #fee2e2);
    color: var(--red-ink, #b91c1c);
}

@media (max-width: 1100px) {
    .flite-project-reader .flite-project-reader__card,
    .flite-project-reader .flite-project-reader__card--wide,
    .flite-project-reader .flite-project-reader__card--narrow {
        grid-column: span 12;
    }
}

/* --- embedded variant (inside a startup-reader round chapter) ----------- */

/* A round-card body is far narrower than the reader's scroll area, so the
   12-column grid collapses to a single stack and the chrome tightens. The
   chapter framing around this element is untouched (Ruling 1). */
.flite-project-reader.flite-project-reader__dossier--embedded .flite-project-reader__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
}

.flite-project-reader.flite-project-reader__dossier--embedded .flite-project-reader__card,
.flite-project-reader.flite-project-reader__dossier--embedded .flite-project-reader__card--wide,
.flite-project-reader.flite-project-reader__dossier--embedded .flite-project-reader__card--narrow {
    grid-column: auto;
}

.flite-project-reader.flite-project-reader__dossier--embedded .project-viewer__block-header {
    margin-bottom: 0.6rem;
}
/* ==========================================================================
   FLITE public proposal form — scoped redesign.

   Loaded globally via application.css (require_tree .), so EVERY rule is
   scoped under `.flite-public` (set on the <body> of the flite_application
   layout) to override the global base.css without leaking elsewhere.

   Brand: dark blue #02619B, light blue #72BBDC. Arial throughout.
   ========================================================================== */

.flite-public {
  --flite-dark: #02619B;
  --flite-dark-hover: #024d7c;
  --flite-light: #72BBDC;
  --flite-light-soft: #e3f1f9;
  --flite-ink: #1f2937;
  --flite-label: #374151;
  --flite-muted: #6b7280;
  --flite-border: #d8dee6;
  --flite-card-border: #e7ebf1;

  font-family: Arial, Helvetica, sans-serif;
  color: var(--flite-ink);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Make the whole scope inherit Arial, overriding base.css's font on
   inputs/selects/buttons/headings. */
.flite-public,
.flite-public input,
.flite-public textarea,
.flite-public select,
.flite-public button,
.flite-public .button,
.flite-public h1,
.flite-public h2,
.flite-public h3,
.flite-public legend,
.flite-public label {
  font-family: Arial, Helvetica, sans-serif;
}

/* --------------------------------------------------------------------------
   Branding header (logo + rich-text intro)
   -------------------------------------------------------------------------- */
.flite-public .flite-program-intro {
  /* This is a <header>, and the global components/header.css styles the bare
     `header` element as a black, 3-column grid (the app's top nav). Reset that
     so our branding block is a normal, full-width, light section. */
  display: block;
  background: transparent;
  color: inherit;
  font-size: 1rem;
  grid-template-columns: none;
  text-align: center;
  margin: 0 0 2.5rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--flite-card-border);
}

.flite-public .flite-program-intro__logo {
  display: block;
  margin: 0 auto 1rem;
  max-height: 96px;
  max-width: 320px;
  width: auto;
  height: auto;
}

.flite-public .flite-program-intro__title {
  color: var(--flite-dark);
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: none;
  margin: 0 0 0.5rem;
}

.flite-public .flite-program-intro__text {
  max-width: 640px;
  margin: 0.75rem auto 0;
  text-align: left;
  color: var(--flite-label);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* Trix renders each paragraph as a <div> (not <p>), so target both. */
.flite-public .flite-program-intro__text p,
.flite-public .flite-program-intro__text .trix-content > div {
  margin: 0 0 0.85rem;
}
.flite-public .flite-program-intro__text p:last-child,
.flite-public .flite-program-intro__text .trix-content > div:last-child {
  margin-bottom: 0;
}

/* Rich-text content (ActionText / Trix) inside the intro */
.flite-public .flite-program-intro__text .trix-content {
  font-size: 0.95rem;
  line-height: 1.65;
}
.flite-public .flite-program-intro__text a,
.flite-public .flite-program-intro__text .trix-content a {
  color: var(--flite-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 700;
  text-transform: none; /* override global `header a` uppercase */
  letter-spacing: 0;
}
.flite-public .flite-program-intro__text a:hover {
  color: var(--flite-dark-hover);
}

/* --------------------------------------------------------------------------
   Page heading (e.g. "Apply to FLITE")
   -------------------------------------------------------------------------- */
.flite-public main > h2 {
  color: var(--flite-dark);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: none;
  margin: 0 0 1.75rem;
}

/* --------------------------------------------------------------------------
   Section cards (fieldset + legend)
   -------------------------------------------------------------------------- */
.flite-public fieldset {
  border: 1px solid var(--flite-card-border);
  border-radius: 12px;
  background: #ffffff;
  padding: 1.5rem 1.75rem 1.75rem;
  margin: 0 0 1.75rem;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 4px 16px rgba(2, 97, 155, 0.04);
}

.flite-public fieldset > legend {
  display: block;
  width: 100%;
  float: left; /* keeps the underline full-width across browsers */
  color: var(--flite-dark);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: none;
  padding: 0 0 0.6rem;
  margin-bottom: 1.4rem;
  border-bottom: 2px solid var(--flite-light);
}
.flite-public fieldset > legend + * {
  clear: both; /* clear the floated legend */
}

/* --------------------------------------------------------------------------
   Question fields
   -------------------------------------------------------------------------- */
.flite-public .field {
  margin-bottom: 1.35rem;
}
.flite-public .field:last-child {
  margin-bottom: 0;
}

.flite-public .field > label,
.flite-public .field label:first-child {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--flite-label);
  letter-spacing: 0;
  line-height: 1.35;
  margin-bottom: 0.4rem;
}

/* Inline option labels (checkbox / radio / agreement) stay normal-weight */
.flite-public .checkbox-group label,
.flite-public .boolean-group label,
.flite-public .field > label[style*="flex"] {
  display: flex;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--flite-ink);
  margin-bottom: 0.3rem;
}

/* Text inputs, textareas, selects */
.flite-public input[type="text"],
.flite-public input[type="email"],
.flite-public input[type="url"],
.flite-public input[type="number"],
.flite-public input[type="date"],
.flite-public input[type="tel"],
.flite-public textarea,
.flite-public select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font-size: 0.9rem;
  line-height: 1.45;
  letter-spacing: 0;
  color: var(--flite-ink);
  background: #ffffff;
  border: 1px solid var(--flite-border);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  box-shadow: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.flite-public textarea {
  min-height: 7rem;
  resize: vertical;
}

/* Clean select: white bg + a simple chevron (override base.css gradient/arrow) */
.flite-public select {
  appearance: none;
  -webkit-appearance: none;
  font-weight: 400;
  padding-right: 2.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2302619B' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 12px 8px;
}

/* Focus: light-blue ring */
.flite-public input:focus,
.flite-public textarea:focus,
.flite-public select:focus {
  outline: none;
  border-color: var(--flite-light);
  box-shadow: 0 0 0 3px rgba(114, 187, 220, 0.35);
}

.flite-public ::placeholder {
  color: #9aa3af;
}

/* Checkboxes / radios: tidy, brand-colored, not the global 1.5x scale */
.flite-public input[type="checkbox"],
.flite-public input[type="radio"] {
  transform: none;
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  accent-color: var(--flite-dark);
  flex: 0 0 auto;
}

.flite-public .checkbox-group,
.flite-public .boolean-group {
  margin-top: 0.15rem;
}

/* File input */
.flite-public input[type="file"] {
  font-size: 0.85rem;
  color: var(--flite-muted);
}

/* Follow-up (conditional) field: light-blue accent rail */
.flite-public .follow-up-field {
  margin-top: 0.6rem;
  padding-left: 1rem;
  border-left: 3px solid var(--flite-light);
}

/* --------------------------------------------------------------------------
   Submit button
   -------------------------------------------------------------------------- */
.flite-public .actions {
  margin-top: 2rem;
}

.flite-public #flite-apply-submit,
.flite-public .actions .button,
.flite-public .actions input[type="submit"] {
  display: inline-block;
  background-color: var(--flite-dark);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
  padding: 0.8rem 2.1rem;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(2, 97, 155, 0.25);
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}

.flite-public #flite-apply-submit:hover,
.flite-public .actions .button:hover,
.flite-public .actions input[type="submit"]:hover {
  background-color: var(--flite-dark-hover);
  box-shadow: 0 4px 12px rgba(2, 97, 155, 0.3);
}
.flite-public #flite-apply-submit:active,
.flite-public .actions input[type="submit"]:active {
  transform: translateY(1px);
}
.flite-public #flite-apply-submit:disabled,
.flite-public .actions input[type="submit"]:disabled {
  background-color: #9bb6c8;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.85;
}

/* --------------------------------------------------------------------------
   Flash / error messaging
   -------------------------------------------------------------------------- */
.flite-public .flash--alert,
.flite-public .flash.flash--alert {
  border-radius: 8px;
}
.flite-public .flash--alert h3 {
  text-transform: none;
  font-size: 1rem;
  color: #b42318;
}

/* --------------------------------------------------------------------------
   Field hints + read-only fields

   Identity questions on the edit form (name / email) are read-only: that form
   can never change them, so they are shown greyed with a hint saying who to
   contact rather than inviting an edit that goes nowhere.
   -------------------------------------------------------------------------- */
.flite-public .flite-field-hint {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.8rem;
  color: #667085;
  line-height: 1.4;
}

.flite-public .flite-attachment-on-file {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.flite-public .flite-attachment-on-file__preview {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border: 1px solid #e4e7ec;
  border-radius: 6px;
  background: #fff;
  padding: 0.25rem;
  flex-shrink: 0;
}

.flite-public .flite-attachment-on-file .flite-field-hint {
  margin-top: 0;
}

.flite-public input.flite-readonly-field {
  background: #f2f4f7;
  color: #475467;
  cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .flite-public fieldset {
    padding: 1.25rem 1.1rem 1.4rem;
  }
  .flite-public fieldset > legend {
    font-size: 1.2rem;
  }
  .flite-public .flite-program-intro__title {
    font-size: 1.55rem;
  }
}
/* Under-review review board (non-FLITE focus areas).
 *
 * Lives inside the existing amber .under-review-collapsible box, so the chrome
 * (toggle bar, count pill, View Rejected link) comes from dashboards.css and
 * only the board itself is styled here. FLITE keeps the legacy .under-review-*
 * grid — do not fold these rules into those.
 */

/* The shared .under-review-content box clamps to 300px and scrolls, which is
   right for the legacy grid but would bury the board's column footers below an
   outer scrollbar. The board sizes itself instead: each column scrolls its own
   card list and keeps its footer pinned.

   Doubled class for specificity: dashboards.css defines .under-review-content
   at the same weight and sorts after this file in the require_tree bundle, so a
   single class here would lose. */
.under-review-content.under-review-content--board {
    max-height: none;
    overflow: visible;
    padding: 0;
}

.review-board {
    background: #fff;
    overflow-x: auto;
    overflow-y: hidden;

    /* Card metrics, kept here so the column-height math below reads as "N
       cards" instead of a magic pixel total. An untagged card is 50px: the
       32px logo row plus 0.5rem padding top and bottom plus its 1px borders.
       A tagged card runs ~19px taller, so this is the nominal card — the cap
       it feeds is a max-height, not a fixed one, and a heavily tagged column
       simply shows a card or two fewer before it scrolls. */
    --review-card-h: 50px;
    --review-card-gap: 0.375rem;
    /* Room for this many cards before a column starts scrolling. */
    --review-column-cards: 9;
    /* ...and this many before it stops shrinking, so a one-card column still
       reads as a drop target rather than a sliver. */
    --review-column-cards-min: 3;
}

.review-board__rail {
    display: flex;
    align-items: stretch;
    min-width: min-content;
}

/* Filter strip above the columns. */
.review-board__tools {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--line-soft);
    background: var(--wash);
}

.review-board__filter {
    flex: 0 1 260px;
    padding: 0.375rem 0.5rem;
    font-family: inherit;
    font-size: 0.8125rem;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-ctl);
}

.review-board__filter-clear {
    flex: 0 0 auto;
}

/* Who else is on this board right now. */
.review-board__presence {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-left: auto;
}

.review-board__presence-chip {
    padding: 0.125rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 600;
    white-space: nowrap;
    color: var(--blue-ink);
    background: var(--blue-wash);
    border: 1px solid var(--blue-line);
    border-radius: var(--radius-pill);
}

.review-card.is-filtered-out {
    display: none;
}

/* ---- column ---- */

/* Content-driven height: the column is as tall as head + cards + footer needs,
   so a two-card board is a short box instead of a mostly-empty 72vh one. The
   cap lives on .review-column__body (below) — once the cards exceed it the body
   scrolls rather than the page growing. align-items:stretch on the rail then
   levels every column to the tallest, so the footers stay in a row. */
.review-column {
    flex: 1 0 284px;
    min-width: 284px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--line-soft);
    background: #fff;
}

.review-column:last-child {
    border-right: none;
}

.review-column__head {
    padding: 0.75rem 0.75rem 0.625rem;
    border-bottom: 1px solid var(--line-soft);
    background: var(--wash);
}

.review-column__name {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
}

.review-column__name h5 {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink);
}

.review-column__total {
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--pill-track);
    border-radius: var(--radius-pill);
    padding: 0.0625rem 0.4375rem;
    font-variant-numeric: tabular-nums;
}

/* Sized to be readable across every column at once — the whole point of
   keeping all subtopics on screen is spotting a lopsided set of picks. */
.review-column__ticked {
    margin-top: 0.5rem;
    display: flex;
    align-items: baseline;
    gap: 0.375rem;
    font-variant-numeric: tabular-nums;
}

.review-column__ticked b {
    font-size: 1.25rem;
    line-height: 1;
    font-weight: 700;
    color: var(--green-ink);
}

.review-column__ticked.is-none b {
    color: var(--text-faint);
}

.review-column__ticked span {
    font-size: 0.6875rem;
    color: var(--text-faint);
}

.review-column__read {
    margin-top: 0.375rem;
    font-size: 0.6875rem;
    color: var(--text-faint);
    font-variant-numeric: tabular-nums;
}

.review-column__bar {
    margin-top: 0.3125rem;
    height: 3px;
    background: var(--pill-track);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.review-column__fill {
    height: 100%;
    background: var(--teal-ink);
    transition: width 0.25s ease;
}

/* The body is what sets the board's height: it grows with its cards up to
   --review-column-cards, then scrolls. Sizing the cap here rather than on the
   column means it doesn't have to hardcode the head and footer heights.
   min()'d against the viewport so a tall board still fits a laptop screen. */
.review-column__body {
    flex: 1 1 auto;
    min-height: calc(var(--review-column-cards-min) * var(--review-card-h) +
                     (var(--review-column-cards-min) - 1) * var(--review-card-gap) + 1rem);
    max-height: min(
        calc(var(--review-column-cards) * var(--review-card-h) +
             (var(--review-column-cards) - 1) * var(--review-card-gap) + 1rem),
        62vh);
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: var(--review-card-gap);
    overflow-y: auto;
    scrollbar-width: thin;
}

.review-column__empty {
    font-size: 0.75rem;
    color: var(--text-faint);
    text-align: center;
    padding: 1.25rem 0.5rem;
    border: 1px dashed var(--line);
    border-radius: var(--radius-item);
}

/* Never scrolls away from the column it acts on. margin-top:auto pins it to the
   bottom when a neighbouring column is taller (a wrapped subtopic title, say)
   and this one's capped body can't stretch to fill the difference. */
.review-column__foot {
    flex: 0 0 auto;
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    padding: 0.5rem;
    border-top: 1px solid var(--line-soft);
    background: var(--wash);
}

/* A lone subtopic column spans the whole board — don't let its footer
   buttons balloon with it. No effect at normal column width. */
.review-column__foot .review-btn {
    max-width: 16rem;
}

/* ---- card ---- */

.review-card {
    position: relative;
    display: grid;
    grid-template-columns: 20px 32px 1fr 24px;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.5rem 0.5rem 0.25rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-item);
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.06);
    cursor: grab;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s, background 0.15s;
}

.review-card:hover {
    border-color: var(--amber-accent);
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.14);
    transform: translateY(-1px);
}

.review-card:active {
    cursor: grabbing;
}

.review-card.is-picked {
    background: var(--green-wash);
    border-color: var(--green-line);
}

.review-card__rank {
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-faint);
    font-variant-numeric: tabular-nums;
    user-select: none;
}

.review-card.is-picked .review-card__rank {
    color: var(--green-ink);
}

.review-card__logo {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-ctl);
    object-fit: cover;
    background: var(--wash);
    border: 1px solid var(--line-soft);
    pointer-events: none;
}

.review-card__body {
    min-width: 0;
    pointer-events: none;
}

.review-card__name {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.review-card__meta {
    margin-top: 0.0625rem;
    font-size: 0.6875rem;
    color: var(--text-faint);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Age + note chips. pointer-events is re-enabled because .review-card__body is
   pointer-events:none (so drags/clicks hit the card) — without this their title
   tooltips never appear. Clicks still bubble to the card, so opening the reader
   is unaffected. */
.review-card__age,
.review-card__note {
    pointer-events: auto;
    display: inline-block;
    margin-right: 0.375rem;
    font-size: 0.6875rem;
    font-variant-numeric: tabular-nums;
    color: var(--text-faint);
}

/* Sitting in review for over three weeks. */
.review-card__age.is-old {
    color: var(--amber-ink);
    font-weight: 700;
}

.review-card__note {
    color: var(--teal-ink);
}

/* Tag chips. Kept to one line — a card carrying six tags shouldn't be three
   times the height of its neighbours in a column you're ranking by eye. */
.review-card__tags {
    display: flex;
    gap: 0.25rem;
    margin-top: 0.1875rem;
    overflow: hidden;
    white-space: nowrap;
}

.review-card__tag {
    flex: 0 0 auto;
    max-width: 8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0.0625rem 0.3125rem;
    font-size: 0.625rem;
    font-weight: 600;
    line-height: 1.4;
    border-radius: var(--radius-pill);
}

/* Cleared once the startup has been opened. */
.review-card__unread {
    position: absolute;
    left: 0.5rem;
    top: 0.375rem;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--teal-ink);
}

.review-card.is-read .review-card__unread {
    display: none;
}

.review-card__pick {
    width: 22px;
    height: 22px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-ctl);
    background: #fff;
    color: transparent;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.review-card__pick:hover {
    border-color: var(--green-accent);
}

.review-card.is-picked .review-card__pick {
    background: var(--green-accent);
    border-color: var(--green-accent);
    color: #fff;
}

/* ---- buttons ---- */

/* base.css's button display:inline-block overrides the UA [hidden] rule
   (same trap flite_platform.css:2968 documents) — restore it here. */
.review-btn[hidden] {
    display: none;
}

.review-btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 0.4375rem 0.375rem;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.1;
    white-space: nowrap;
    color: var(--text-muted);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-ctl);
    cursor: pointer;
}

.review-btn:hover:not(:disabled) {
    border-color: var(--text-faint);
    color: var(--ink);
}

.review-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.review-btn--commit {
    flex: 1 1 100%;
    background: var(--green-accent);
    border-color: var(--green-accent);
    color: #fff;
    font-weight: 700;
}

.review-btn--commit:hover:not(:disabled) {
    background: var(--green-accent-hover);
    border-color: var(--green-accent-hover);
    color: #fff;
}

.review-btn--commit:disabled {
    background: var(--pill-track);
    border-color: var(--line);
    color: var(--text-faint);
}

.review-btn--approve {
    flex: 0 0 auto;
    background: var(--green-wash);
    border-color: var(--green-line);
    color: var(--green-ink);
    font-weight: 700;
}

.review-btn--reject {
    flex: 0 0 auto;
    background: var(--red-wash);
    border-color: var(--red-line);
    color: var(--red-ink);
    font-weight: 700;
}

/* Remove, in the pipeline reader's footer. Quieter than Reject — it sits next
   to navigation, not to a decision, and shouldn't read as the obvious next
   click. Colour arrives on hover. */
.review-btn--danger {
    flex: 0 0 auto;
    color: var(--text-faint);
}

.review-btn--danger:hover:not(:disabled) {
    background: var(--red-wash);
    border-color: var(--red-line);
    color: var(--red-ink);
}

.review-btn--tick {
    flex: 0 0 auto;
    background: var(--green-accent);
    border-color: var(--green-accent);
    color: #fff;
    font-weight: 700;
}

.review-btn--tick.is-picked {
    background: var(--green-wash);
    border-color: var(--green-line);
    color: var(--green-ink);
}

/* ---- reader overlay ---- */

.review-reader {
    position: fixed;
    inset: 0;
    z-index: 1200;
}

.review-reader__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.5);
}

.review-reader__dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(720px, calc(100vw - 2rem));
    max-height: min(86vh, 800px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 24px 64px rgba(17, 24, 39, 0.28);
    overflow: hidden;
}

/* The shell the controller builds wraps the fetched partial, so IT is the
   dialog's only flex child — head/body/foot are its children, not the
   dialog's. Without this the wrapper sizes to its content and the footer
   overflows past the dialog's bottom edge, where overflow:hidden clips it. */
.review-reader__content {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.review-reader__head {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border-bottom: 1px solid var(--line-soft);
}

/* Height-locked, width-free. A square mark renders 46x46 as before; a wide
   wordmark keeps its aspect ratio out to 160px instead of being centre-cropped
   into an unreadable slice by object-fit:cover. The header is a flex row with
   room to spare, so the extra width costs nothing. */
.review-reader__logo {
    height: 46px;
    width: auto;
    min-width: 46px;
    max-width: 160px;
    border-radius: var(--radius-item);
    object-fit: contain;
    background: var(--wash);
    border: 1px solid var(--line-soft);
    flex: 0 0 auto;
}

.review-reader__id {
    flex: 1;
    min-width: 0;
}

.review-reader__name {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.2;
    /* base.css uppercases every heading; a company name is a proper noun and
       should read as it's written. */
    text-transform: none;
}

.review-reader__sub {
    margin-top: 0.1875rem;
    font-size: 0.75rem;
    color: var(--text-faint);
}

.review-reader__profile {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.review-reader__close {
    padding: 0 0.125rem;
    background: none;
    border: 0;
    font-size: 1.375rem;
    line-height: 1;
    color: var(--text-faint);
    cursor: pointer;
}

.review-reader__close:hover {
    color: var(--ink);
}

.review-reader__body {
    flex: 1;
    /* A flex item won't shrink below its content without this, so a tall body
       (images + files) would squeeze the footer and eat its padding — leaving
       the action buttons flush against the bottom edge of the dialog. */
    min-height: 0;
    padding: 1rem;
    overflow-y: auto;
}

.review-reader__summary {
    max-width: 68ch;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-muted);
}

.review-reader__summary p {
    margin: 0 0 0.5rem;
}

.review-reader__facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem 1rem;
    margin: 0;
    padding: 0.875rem;
    background: var(--wash);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-item);
}

.review-reader__facts dt {
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.review-reader__facts dd {
    margin: 0.1875rem 0 0;
    font-size: 0.8125rem;
    font-variant-numeric: tabular-nums;
    word-break: break-word;
}

.review-reader__email {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.review-reader__field {
    margin-top: 1rem;
}

/* Inline image gallery. Screenshots and slides are evidence — they get the
   reader's full width rather than a thumbnail you can't read. */
.review-reader__gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.5rem;
}

.review-reader__shot {
    display: block;
    aspect-ratio: 16 / 10;
    background: var(--wash);
    border: 1px solid var(--line);
    border-radius: var(--radius-item);
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.review-reader__shot img {
    display: block;
    width: 100%;
    height: 100%;
    /* Contain, not cover: never crop the thing being judged. Portraits
       letterbox onto the neutral ground instead. */
    object-fit: contain;
}

.review-reader__shot:hover,
.review-reader__shot:focus-visible {
    border-color: var(--teal-ink);
    box-shadow: 0 0 0 2px rgba(63, 143, 150, 0.25);
}

/* File rows. Deliberately NOT the global .construct-list > .file grid: that
   one reserves a 60px icon gutter and named areas for a category/hamburger
   this list doesn't have, which left a dead column and a stray rule. */
.review-reader__files {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.review-reader__file {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.625rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-item);
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s;
}

.review-reader__file:hover,
.review-reader__file:focus-visible {
    border-color: var(--teal-ink);
    background: var(--teal-wash);
}

.review-reader__file-icon {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
}

.review-reader__file-text {
    flex: 1;
    min-width: 0;
}

.review-reader__file-name {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.review-reader__file-meta {
    display: block;
    margin-top: 0.0625rem;
    font-size: 0.6875rem;
    color: var(--text-faint);
    font-variant-numeric: tabular-nums;
}

/* Says what the click does — previewing and downloading shouldn't look alike. */
.review-reader__file-action {
    flex: 0 0 auto;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--teal-ink);
}

.review-reader__label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.review-reader__hint {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    font-style: italic;
}

.review-reader__select,
.review-reader__note {
    width: 100%;
    padding: 0.5rem;
    font-family: inherit;
    font-size: 0.8125rem;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-ctl);
}

.review-reader__note {
    line-height: 1.5;
    resize: vertical;
}

.review-reader__status {
    display: inline-block;
    margin-top: 0.25rem;
    font-size: 0.6875rem;
    color: var(--text-faint);
    min-height: 1em;
}

/* ---- tags ---- */

/* Assigned pills reuse the .tag-pill styling the cards and the kebab already
   use, so a tag looks the same everywhere it appears. */
/* Unconditional margin: ERB leaves whitespace text nodes inside, so :empty
   never matches an actually-empty pill list. */
.review-reader__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 0.5rem;
}

/* Select and its Add button on one line; the status note wraps below. */
.review-reader__tag-add {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.review-reader__tag-add .review-reader__select {
    flex: 1 1 12rem;
    width: auto;
}

.review-reader__tag-add .review-btn {
    flex: 0 0 auto;
}

.review-reader__tag-add .review-reader__status {
    flex-basis: 100%;
    margin-top: 0;
}

.review-reader__foot {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--line-soft);
    background: var(--wash);
}

.review-reader__foot .review-btn {
    flex: 0 0 auto;
}

/* ---- map reader footer ----
   The innovation map opens the pipeline reader, whose footer holds only
   buttons. Its Approve is a Turbo form (button_to), and the form wrapper must
   not add a box of its own or the button sits off the row. Own class, so the
   board and FLITE footers are untouched. */
.review-reader__foot-form {
    display: flex;
    flex: 0 0 auto;
    margin: 0;
}

.review-reader__pos {
    font-size: 0.75rem;
    color: var(--text-faint);
    font-variant-numeric: tabular-nums;
}

/* Pipeline reader for a user who may read the note but not write it.
   simple_format supplies the <p> wrapping, so no pre-wrap here. */
.review-reader__note-readonly {
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--ink);
}

.review-reader__note-readonly p {
    margin: 0 0 0.5rem;
}

.review-reader__note-readonly p:last-child {
    margin-bottom: 0;
}

.review-reader__spacer {
    flex: 1;
}

@media (max-width: 720px) {
    .review-column {
        flex: 1 0 250px;
        min-width: 250px;
    }

    /* Less vertical room to spend on one column when the board is also
       scrolling sideways. */
    .review-board {
        --review-column-cards: 6;
    }
}

/* ---- realtime: attribution chips, notices, banners, reader lock ---- */

/* Transient "ticked by mark" / "moved by mark" chip on a card. */
.review-card__flash {
    position: absolute;
    right: 2rem;
    top: -0.5rem;
    z-index: 2;
    padding: 0.125rem 0.4375rem;
    font-size: 0.625rem;
    font-weight: 700;
    white-space: nowrap;
    color: #fff;
    background: var(--teal-ink);
    border-radius: var(--radius-pill);
    box-shadow: 0 1px 3px rgba(17, 24, 39, 0.25);
    pointer-events: none;
}

/* A card someone else just decided: fade before removal. */
.review-card.is-remote-removing {
    opacity: 0;
    transition: opacity 0.8s ease;
    pointer-events: none;
}

.review-dismiss {
    flex-shrink: 0;
    padding: 0 0.25rem;
    background: none;
    border: 0;
    font-size: 1rem;
    line-height: 1;
    color: inherit;
    opacity: 0.7;
    cursor: pointer;
}

.review-dismiss:hover {
    opacity: 1;
}

/* Board-level "mark added a subtopic — refresh to update" strip. */
.review-board__banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--amber-ink);
    background: var(--amber-wash);
    border-bottom: 1px solid var(--amber-line);
}

/* Column-head "mark committed this column" banner (a decision, green). */
.review-column__banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.375rem;
    margin-top: 0.4375rem;
    padding: 0.25rem 0.4375rem;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--green-ink);
    background: var(--green-wash);
    border: 1px solid var(--green-line);
    border-radius: var(--radius-ctl);
}

/* Reader banner when the open startup was decided by someone else. */
.review-reader__lockbar {
    padding: 0.625rem 1rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--amber-ink);
    background: var(--amber-wash);
    border-bottom: 1px solid var(--amber-line);
}

.review-reader__select:disabled,
.review-reader__note:disabled {
    background: var(--wash);
    color: var(--text-faint);
    cursor: not-allowed;
}

/* ---- platform page layout ---- */
/* (The old Files/Partner-Orgs meta-row is gone: files live in a header
   popover, orgs on the settings page. Page-frame rules live in
   workspace_redesign.css under .platform-workspace-page.) */

/* Pipeline-card stage · funding · location line (added with the card rework).
   Base look here so the focus area page's not-yet-redesigned cards render it
   small and quiet too; workspace_redesign.css refines it on the platform page. */
.pipeline-column-content .startup .startup__meta {
    color: var(--text-faint);
    font-size: 0.75rem;
    line-height: 1.35;
    margin-top: 0.0625rem;
}

/* Days in the current stagegate — the pipeline's counterpart to the review
   card's age chip, and styled to match it. */
.pipeline-column-content .startup .startup__age {
    margin-right: 0.375rem;
    font-variant-numeric: tabular-nums;
}

.pipeline-column-content .startup .startup__age.is-old {
    color: var(--amber-ink);
    font-weight: 700;
}

/* Quiet secondary action in the Topics header (was a whole orphaned
   "Startups Export" section whose only content was this button). */
.workspace-export-link {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.3125rem 0.625rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-ctl);
    white-space: nowrap;
}

.workspace-export-link:hover {
    color: var(--ink);
    border-color: var(--text-faint);
}

/* ---- platform page: focus area workspace tabs ---- */

.focus-area-workspace__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    /* Tabs sit ON the panel: no gap, active tab merges with the panel border. */
    margin-bottom: -1px;
    position: relative;
    z-index: 1;
    padding: 0 0.5rem;
}

.focus-area-workspace__tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4375rem 0.75rem;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--wash);
    border: 1px solid var(--line);
    border-radius: var(--radius-item) var(--radius-item) 0 0;
    border-bottom-width: 2px;
    border-bottom-color: transparent;
    cursor: pointer;
}

.focus-area-workspace__tab:hover {
    color: var(--ink);
    border-color: var(--text-faint);
}

.focus-area-workspace__tab.is-active {
    color: var(--ink);
    background: #fff;
    border-color: var(--line);
    /* Opens into the panel below. */
    border-bottom-color: #fff;
    border-bottom-width: 1px;
}

.focus-area-workspace__tab.is-active .focus-area-workspace__tab-name {
    box-shadow: inset 0 -2px 0 var(--teal-ink);
    padding-bottom: 0.125rem;
}

/* The panel the tabs open into. */
.focus-area-workspace__panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    padding: 1rem 1.25rem 1.25rem;
}

/* The frame content's own <section> brings page-level headings; calm them
   inside the panel. */
.focus-area-workspace__panel section {
    margin: 0;
}

/* Slim toolbar at the top of a work-area tab (replaces the duplicated
   focus-area-name heading). */
.work-area-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.375rem;
}

.work-area-toolbar__open {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--teal-ink);
    text-decoration: none;
    white-space: nowrap;
    margin-left: auto;
    padding: 0.3125rem 0.625rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-ctl);
    background: #fff;
}

.work-area-toolbar__open:hover {
    color: var(--teal-ink-hover);
    border-color: var(--teal-ink);
}

.focus-area-workspace__tab-count {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--amber-ink);
    background: var(--amber-wash);
    border: 1px solid var(--amber-line);
    border-radius: var(--radius-pill);
    padding: 0.0625rem 0.4375rem;
    font-variant-numeric: tabular-nums;
}

.focus-area-workspace__loading,
.focus-area-workspace__empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-faint);
    font-size: 0.875rem;
    border: 1px dashed var(--line);
    border-radius: var(--radius-card);
}

.work-area-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.work-area-header__name {
    margin: 0;
    font-size: 1rem;
}

.work-area-header__link {
    font-size: 0.8125rem;
    white-space: nowrap;
}

/* ---- live pipeline notice ---- */

.pipeline-live__notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 0.375rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--blue-ink);
    background: var(--blue-wash);
    border: 1px solid var(--blue-line);
    border-radius: var(--radius-item);
}

/* Tab switch feedback: Turbo marks a fetching frame [busy] — dim the stale
   content so the click visibly took. */
#focus-area-work-area[busy] {
    opacity: 0.45;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.review-reader__siblings .review-reader__sibling {
  display: flex; align-items: center; gap: .5rem; margin-top: .375rem;
}
.review-reader__sibling-name { flex: 0 0 40%; min-width: 0; font-size: .8rem; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.review-reader__sibling-subtopic { flex: 1 1 auto; min-width: 0; }
.review-reader__sibling-empty { flex: 1 1 auto; font-size: .75rem; opacity: .6; }

.review-reader__sibling { flex-wrap: wrap; }
.review-reader__sibling-tags { display: flex; flex-wrap: wrap; gap: .25rem; flex: 1 1 100%; }
.review-reader__sibling-tag-select { flex: 1 1 auto; min-width: 0; }
main[data-controller~="focus-areas"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 2.5rem;
}

/* Top row: Synopsis (40%), Subtopics (20%), Tags (20%), Files (20%) side-by-side */
.focus-area-top-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

.focus-area-top-row .synopsis-section,
.focus-area-top-row .subtopics-section,
.focus-area-top-row .tags-section,
.focus-area-top-row .files-section {
    min-width: 0; /* Prevent overflow in grid items */
}

/* Tag styling */
.tag-item {
    display: flex;
    align-items: center;
    padding: 0.25rem 0;
}

/* Color indicator circle in tag list */
.tag-color-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.tag-name {
    flex: 1;
}

/* Color picker in context menu */
.menu-item--color {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
}

.menu-item--color label {
    font-size: 0.875rem;
    color: #374151;
}

.menu-item--color input[type="color"] {
    width: 32px;
    height: 24px;
    padding: 0;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
}


/* Tag pills for display on startup cards */
.startup__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    font-size: 0.6875rem;
    background-color: #e0f2fe;
    color: #0369a1;
    border-radius: 9999px;
    white-space: nowrap;
}

.tag-pill--removable {
    padding-right: 0.25rem;
}

.tag-pill .tag-remove-btn {
    background: none;
    border: none;
    color: #0369a1;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0 0.25rem;
    margin-left: 0.25rem;
    line-height: 1;
}

.tag-pill .tag-remove-btn:hover {
    color: #dc2626;
}

/* Tag assignment section in popover */
.tag-assignment-section {
    margin-top: 0.75rem;
    margin-bottom: 1rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.tag-assignment-section label {
    font-weight: 600;
    font-size: 0.75rem;
    color: #374151;
    display: block;
    margin-bottom: 0.5rem;
}

.assigned-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.add-tag-section {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.add-tag-section select {
    flex: 1;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
}

.add-tag-section .add-tag-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    background: #0369a1;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.add-tag-section .add-tag-btn:hover {
    background: #075985;
}

/* Tag modal styling - reuse subtopic modal styles */
.tag-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tag-modal.hidden {
    display: none;
}

/* Responsive: stack on smaller screens */
@media (max-width: 900px) {
    .focus-area-top-row {
        grid-template-columns: 1fr;
    }
}

.focus_area_summary {
    height: 100%;
    overflow: hidden;
}

/* Make the tabs/pipeline full width within the startups section */
main[data-controller~="focus-areas"] .tabs,
main[data-controller~="focus-areas"] .tabs--wide {
    max-width: none;
    width: 100%;
}

/* Ensure pipeline container expands to full width */
main[data-controller~="focus-areas"] .pipeline-full-width {
    width: 100%;
}

main[data-controller~="focus-areas"] .pipeline-container {
    width: 100%;
}

main[data-controller~="focus-areas"] .pipeline-content {
    width: 100%;
}

/* Drag-and-drop visual states for under-review startups */
.sortable-ghost {
    opacity: 0.4;
    background: #fef3c7;
    border: 2px dashed #f59e0b;
    border-radius: 8px;
}

.sortable-chosen {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: scale(1.02);
}

.sortable-drag {
    opacity: 1;
}

.under-review-item {
    cursor: grab;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.under-review-item:active {
    cursor: grabbing;
}

.under-review-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ============================================================
   Pipeline CRM card + kebab controls
   Shared by the FLITE pipeline and non-FLITE focus area
   pipelines (_pipeline_crm / _focus_area_startup_crm). These
   replace inline styles verbatim — no visual change. The kebab
   <label> rules are scoped under `popover-toggle [popover]` to
   out-specify the generic 0.875rem label rule.
   ============================================================ */

/* --- Pipeline banners (post-approval submissions / skip-new) --- */
.pipeline-alert {
    background: #fef3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    color: #856404;
}
.pipeline-alert__skip-new {
    margin-top: 0.5rem;
    padding: 0.4rem 0.5rem;
    background: #fde2e2;
    border: 1px solid #f5a6a6;
    border-radius: 4px;
    color: #991b1b;
    font-size: 0.75rem;
}
.pipeline-alert__list { margin-top: 0.5rem; }
.pipeline-alert__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0;
    border-top: 1px solid #fde68a;
}
.pipeline-alert__status { color: #92400e; font-size: 0.75rem; }
.pipeline-alert__btn {
    border: none;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.7rem;
    cursor: pointer;
    color: #fff;
}
.pipeline-alert__btn--assign { background: #059669; }
.pipeline-alert__btn--reject { background: #dc2626; }
.pipeline-alert__btn--remove { background: #6b7280; }

/* --- Card body (badges / vote count / note preview) --- */
.startup__new-proposal-badge {
    display: inline-block;
    background: #f59e0b;
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    margin-left: 0.25rem;
    vertical-align: middle;
}
.startup__vote-count {
    margin-top: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: #6b7280;
}
.startup__approval-comment small {
    color: #059669;
    font-style: italic;
}

/* --- Kebab popover controls (note / subtopic / FLITE tags) --- */
.note-section,
.kebab-platform-tags {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}
.subtopic-section,
.kebab-notes { margin-bottom: 0.75rem; }
.note-section .field,
.subtopic-section .field { margin: 0; }
.note-section .actions { margin: 0.5rem 0 0; }
.note-section textarea {
    width: 100%;
    height: 200px;
    font-size: 0.8rem;
    padding: 0.375rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    resize: vertical;
}
.subtopic-section select {
    width: 100%;
    font-size: 0.8rem;
    padding: 0.25rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
}
.note-section strong { font-size: 0.75rem; color: #374151; }
.note-readonly {
    margin: 0.25rem 0 0;
    font-size: 0.8rem;
    color: #059669;
    font-style: italic;
}
.note-save-btn { font-size: 0.75rem; padding: 0.25rem 0.5rem; }
.note-status { margin-left: 0.5rem; font-size: 0.75rem; }
.kebab-platform-tags .proposal-overlay__tags { margin: 0; }
.kebab-empty-hint {
    margin: 0 0 0.5rem;
    font-size: 0.75rem;
    color: #6b7280;
}

/* Kebab labels — scoped to out-specify `popover-toggle [popover] label`. */
popover-toggle [popover] .note-section label,
popover-toggle [popover] .subtopic-section label,
popover-toggle [popover] .kebab-platform-tags label {
    font-size: 0.75rem;
    color: #374151;
    font-weight: 600;
}
popover-toggle [popover] .subtopic-section label,
popover-toggle [popover] .kebab-platform-tags label {
    display: block;
    margin-bottom: 0.25rem;
}


/* Retroactive decision dialog (finished FLITE rounds) — opened by
   pipeline_sortable_controller when a meaning-bearing history drag needs
   confirmation. */
.retro-decision-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
}

/* The project-membership dialogs are launched from INSIDE the proposal popover
   (.proposal-overlay-wrapper, z-index 9999999), so the base 1100 would bury
   them behind it and the buttons would look dead. Same reason — and the same
   layer — as the in-app PDF viewer (.flite-pdf-viewer, flite_platform.css). */
.retro-decision-overlay--above-popover {
    z-index: 10000000;
}

.retro-decision-panel {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.28);
    padding: 1.5rem 1.75rem;
    width: min(540px, calc(100vw - 2rem));
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    font-size: 0.9rem;
}

.retro-decision-panel h3 {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
}

.retro-decision-summary {
    margin: 0 0 1rem;
    color: #475569;
}

/* The removal dialog's list of proposals a round would stop listing. */
.retro-decision-list {
    margin: 0 0 1rem;
    padding-left: 1.25rem;
    color: #475569;
    font-size: 0.9rem;
}

.retro-decision-list li {
    margin-bottom: 0.25rem;
}

.retro-decision-warning {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 0.75rem 0.9rem;
    margin-bottom: 1rem;
    color: #78350f;
}

.retro-decision-field {
    display: block;
    margin-bottom: 0.85rem;
    font-weight: 600;
    color: #1f2937;
}

.retro-decision-field .retro-decision-hint {
  display: block; margin: 0.15rem 0 0.45rem 1.4rem;
  font-weight: 400; font-size: 0.8rem; color: #6b7280;
}

.retro-decision-field select,
.retro-decision-field input,
.retro-decision-field textarea {
    display: block;
    width: 100%;
    margin-top: 0.3rem;
    font-weight: 400;
    padding: 0.45rem 0.55rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
}

/* Checkboxes/radios sit INSIDE the label next to their text (proposal picker,
   create-vs-join, detach-vs-resolve), so they must escape the block/full-width
   rule above that the text inputs and selects want. */
.retro-decision-field input[type="checkbox"],
.retro-decision-field input[type="radio"] {
    display: inline-block;
    width: auto;
    margin: 0 0.4rem 0 0;
    vertical-align: middle;
}

fieldset.retro-decision-field {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.6rem 0.75rem;
}

fieldset.retro-decision-field legend {
    padding: 0 0.35rem;
    font-size: 0.85rem;
    color: #475569;
}

/* Bare radio/checkbox labels inside a fieldset (detach-vs-resolve, the
   removal/unlink history choices) stack one per line instead of running
   together as inline text. Labels that carry .retro-decision-field are
   already block with their own margin. */
fieldset.retro-decision-field > label:not(.retro-decision-field) {
    display: block;
    margin-bottom: 0.45rem;
}

fieldset.retro-decision-field > label:not(.retro-decision-field):last-child {
    margin-bottom: 0;
}

.retro-decision-panel [data-role="member-targets"] {
    margin-top: 0.5rem;
}

.retro-decision-dates {
    display: flex;
    gap: 0.75rem;
}

.retro-decision-dates .retro-decision-field {
    flex: 1;
}

.retro-decision-error {
    color: #b91c1c;
    margin: 0 0 0.75rem;
}

.retro-decision-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.retro-decision-actions button {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    cursor: pointer;
}

.retro-decision-actions .retro-decision-confirm {
    background: #b91c1c;
    border-color: #b91c1c;
    color: #ffffff;
}

.retro-decision-actions .retro-decision-confirm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Secondary destructive action in the Add-startup dialog: merging deletes a
   project, so it is warned in amber rather than sharing Cancel's neutral face —
   but it is not the primary action, so it is not the retro red either. */
.retro-decision-actions .retro-decision-merge {
    border-color: #f59e0b;
    color: #78350f;
}

.retro-decision-actions .retro-decision-merge:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Accept-time create-or-join dialog. Deliberately NOT the retro dialog's red:
   accepting a startup is the good outcome, so it wears the ink+teal tokens
   (design_tokens.css) while the destructive retro dialogs keep theirs. */
.flite-accept-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
}

.flite-accept-panel {
    background: #ffffff;
    border-radius: var(--radius-card, 8px);
    box-shadow: var(--shadow-pop, 0 18px 45px rgba(15, 23, 42, 0.28));
    padding: 1.5rem 1.75rem;
    width: min(560px, calc(100vw - 2rem));
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    font-size: var(--fs-body-sm, 0.875rem);
    color: var(--text, #313131);
}

.flite-accept-panel h3 {
    margin: 0 0 0.4rem;
    font-size: 1.05rem;
    color: var(--ink, #22343a);
}

.flite-accept-summary {
    margin: 0 0 1rem;
    color: var(--text-muted, #5c6169);
}

/* The two parallel choices plus the proposal list, each visually its own block
   so "create" and "join" read as siblings rather than one nested in the other. */
.flite-accept-section {
    border: 1px solid var(--line-soft, #e8ebee);
    border-radius: var(--radius-item, 6px);
    padding: 0.7rem 0.85rem;
    margin-bottom: 0.85rem;
}

.flite-accept-section h4 {
    margin: 0 0 0.5rem;
    font-size: var(--fs-ui, 0.8125rem);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted, #5c6169);
}

.flite-accept-option {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--text, #313131);
}

.flite-accept-option input[type="checkbox"],
.flite-accept-option input[type="radio"] {
    margin: 0 0.4rem 0 0;
    vertical-align: middle;
}

.flite-accept-note {
    margin: 0.6rem 0 0;
    color: var(--text-faint, #868d96);
    font-size: var(--fs-meta, 0.75rem);
}

.flite-accept-error {
    color: var(--red-ink, #b91c1c);
    margin: 0 0 0.75rem;
}

.flite-accept-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.flite-accept-actions button {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-ctl, 5px);
    border: 1px solid var(--line, #dee2e6);
    background: #ffffff;
    font-size: var(--fs-ui, 0.8125rem);
    cursor: pointer;
}

.flite-accept-actions .flite-accept-confirm {
    background: var(--teal-ink, #2f7e86);
    border-color: var(--teal-ink, #2f7e86);
    color: #ffffff;
}

.flite-accept-actions .flite-accept-confirm:hover {
    background: var(--teal-ink-hover, #266b72);
    border-color: var(--teal-ink-hover, #266b72);
}

.flite-accept-actions .flite-accept-confirm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
@font-face {
    font-display: swap;
    font-family: Overpass;
    font-style: normal;
    font-weight: 300;
    src: url(/assets/Overpass-latin-Light-b6de253e3957ce635633016a05d248bf37d8693f9fbf25162c0ead0c962ad1f4.woff2) format('woff2-variations');
    unicode-range: U+0020-007F, U+00A0-00FF;
}
@font-face {
    font-display: swap;
    font-family: Overpass;
    font-style: normal;
    font-weight: 400;
    src: url(/assets/Overpass-latin-Regular-9e7067990c8833cdadf32343f79dd1e2df4e117bb5388987a1169118bd013a5b.woff2) format('woff2-variations');
    unicode-range: U+0020-007F, U+00A0-00FF;
}
@font-face {
    font-display: swap;
    font-family: Overpass;
    font-style: normal;
    font-weight: 700;
    src: url(/assets/Overpass-latin-Bold-128ea00ceb02e0ea518c614721cd9cc84de114cc480b79b68bed9baeeca11d00.woff2) format('woff2-variations');
    unicode-range: U+0020-007F, U+00A0-00FF;
}

/* Overpass with corrected vertical metrics, for tight badges/counters only.
   Overpass's oversized ascender makes glyphs sit visibly HIGH when centered in
   a small fixed-height box (.flite-count section counters). Overriding the
   ascent/descent split re-centers cap-height glyphs (digits) in the em box, so
   any line-box centering lands them dead-center at every zoom level — unlike a
   pixel-padding nudge, which rounds differently per element. Do NOT use this
   family for body text (it changes line spacing). */
@font-face {
    font-display: swap;
    font-family: 'Overpass Badge';
    font-style: normal;
    font-weight: 700;
    src: url(/assets/Overpass-latin-Bold-128ea00ceb02e0ea518c614721cd9cc84de114cc480b79b68bed9baeeca11d00.woff2) format('woff2-variations');
    unicode-range: U+0020-007F, U+00A0-00FF;
    ascent-override: 86%;
    descent-override: 14%;
}
main[data-controller~="import-batches"] .ib-payload {
  width: 100%;
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
}
main[data-controller~="import-batches"] .ib-hint,
main[data-controller~="import-batches"] .ib-empty {
  color: var(--text-muted);
  max-width: 70ch;
}
main[data-controller~="import-batches"] .ib-candidate {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
main[data-controller~="import-batches"] .ib-candidate--approved,
main[data-controller~="import-batches"] .ib-candidate--merged,
main[data-controller~="import-batches"] .ib-candidate--rejected {
  opacity: 0.55;
}
main[data-controller~="import-batches"] .ib-candidate__summary {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}
main[data-controller~="import-batches"] .ib-candidate__dup {
  margin: 0.25rem 0 0;
  color: var(--amber-ink);
  font-size: 0.85rem;
}
main[data-controller~="import-batches"] .ib-candidate__hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}
main[data-controller~="import-batches"] .ib-candidate__actions {
  display: flex;
  gap: 0.5rem;
  white-space: nowrap;
}
main[data-controller~="import-batches"] .ib-candidate__status {
  font-size: 0.85rem;
  text-transform: capitalize;
  color: var(--text-muted);
}
main[data-controller~="import-batches"] .ib-row__meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}
/* Innovation Workspace (client self-serve scouting), spec §8.2.
 * Shell + sidebar rules live here; the map (Task 11) and focus panel
 * (Task 12) append their own blocks to this file. Everything is scoped
 * under .innovation-workspace and draws only from design_tokens.css. */

.innovation-workspace {
  font-family: var(--font-ui);
  color: var(--text);
}

.innovation-workspace .work-area-toolbar {
  /* The embedded work area's "Open focus area" link is staff-only wording. */
  display: none;
}

:is(.innovation-workspace, .innovation-admin) .iw-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--teal-rule);
}

:is(.innovation-workspace, .innovation-admin) .iw-kicker {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text-faint);
}

/* base.css uppercases every h1-h6 app-wide and sizes h1 at 2.25rem; an org
 * name is a name, not a banner. */
:is(.innovation-workspace, .innovation-admin) .iw-title h1 {
  margin: 2px 0 0;
  text-wrap: balance;
  text-transform: none;
  font-size: 1.375rem;
  font-weight: 650;
  line-height: 1.15;
  color: var(--ink);
}

:is(.innovation-workspace, .innovation-admin) .iw-spacer {
  flex: 1 1 auto;
}

:is(.innovation-workspace, .innovation-admin) .iw-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

:is(.innovation-workspace, .innovation-admin) .iw-card--quiet {
  box-shadow: none;
}

:is(.innovation-workspace, .innovation-admin) .iw-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 2px solid var(--teal-rule);
}

:is(.innovation-workspace, .innovation-admin) .iw-card__head h2 {
  margin: 0;
  font-size: 12px;
  letter-spacing: .1em;
  text-wrap: balance;
}

:is(.innovation-workspace, .innovation-admin) .iw-card__sub {
  font-size: 11px;
  color: var(--text-faint);
}

:is(.innovation-workspace, .innovation-admin) .iw-card__body {
  padding: 12px 16px;
}

:is(.innovation-workspace, .innovation-admin) .iw-muted {
  color: var(--text-faint);
  font-size: 12px;
}

:is(.innovation-workspace, .innovation-admin) .iw-seg {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}

:is(.innovation-workspace, .innovation-admin) .iw-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

:is(.innovation-workspace, .innovation-admin) .iw-form--inline {
  flex-direction: row;
  align-items: center;
}

/* Contextual links share one treatment, including the detached reader. */
:is(.innovation-workspace, .iw-shell, .iw-reader) a {
  color: var(--teal-ink);
  font-weight: 600;
  text-decoration: none;
}
:is(.innovation-workspace, .iw-shell, .iw-reader) a:hover { color: var(--teal-ink-hover); }
:is(.innovation-workspace, .iw-shell, .iw-reader) :is(a, summary):focus-visible {
  outline: 2px solid var(--teal-ink);
  outline-offset: 2px;
  border-radius: var(--radius-ctl);
}

:is(.innovation-workspace, .innovation-admin) .iw-link {
  color: var(--teal-ink);
  cursor: pointer;
}

:is(.innovation-workspace, .innovation-admin) .iw-btn,
.iw-shell .iw-stale a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-ctl);
  color: var(--teal-ink);
  background: transparent;
  padding: 6px 12px;
  cursor: pointer;
}

:is(.innovation-workspace, .innovation-admin) .iw-btn:focus-visible {
  outline: 2px solid var(--teal-ink);
  outline-offset: 2px;
}

:is(.innovation-workspace, .innovation-admin) .iw-btn--primary {
  background: var(--teal-ink);
  border-color: var(--teal-ink);
  color: white;
}

:is(.innovation-workspace, .innovation-admin) .iw-btn--danger {
  color: var(--red-ink);
  border-color: var(--red-ink);
}

:is(.innovation-workspace, .innovation-admin) .iw-org-list {
  list-style: none;
  margin: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Task 10: sidebar tools (run buttons, run status, proposals, suggestions,
 * add-a-startup). */

:is(.innovation-workspace, .innovation-admin) .iw-btn__est {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: auto;
}

:is(.innovation-workspace, .innovation-admin) .iw-btn--primary .iw-btn__est {
  color: white;
}

:is(.innovation-workspace, .innovation-admin) .iw-btn[disabled] {
  opacity: .5;
  cursor: default;
}

:is(.innovation-workspace, .innovation-admin) .iw-run {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--amber-line);
  background: var(--amber-wash);
  border-radius: var(--radius-item);
}

:is(.innovation-workspace, .innovation-admin) .iw-run__line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 650;
}

:is(.innovation-workspace, .innovation-admin) .iw-run--succeeded {
  border-color: var(--green-line);
  background: var(--green-wash);
}

:is(.innovation-workspace, .innovation-admin) .iw-run--failed,
:is(.innovation-workspace, .innovation-admin) .iw-run--refused {
  border-color: var(--red-line);
  background: var(--red-wash);
}

:is(.innovation-workspace, .innovation-admin) .iw-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber-accent);
  box-shadow: 0 0 0 0 var(--amber-accent);
  animation: iw-pulse 1.6s ease-out infinite;
}

@keyframes iw-pulse {
  0% { box-shadow: 0 0 0 0 var(--amber-accent); }
  100% { box-shadow: 0 0 0 8px transparent; }
}

@media (prefers-reduced-motion: reduce) {
  :is(.innovation-workspace, .innovation-admin) .iw-pulse {
    animation: none;
  }
}

:is(.innovation-workspace, .innovation-admin) .iw-proposal {
  display: grid;
  grid-template-columns: 18px 1fr;
  row-gap: 2px;
  align-items: center;
  padding: 6px 0;
}

:is(.innovation-workspace, .innovation-admin) .iw-brief {
  max-width: 65ch;
}

:is(.innovation-workspace, .innovation-admin) .iw-brief h2,
:is(.innovation-workspace, .innovation-admin) .iw-brief h3 {
  text-transform: none;
}

:is(.innovation-workspace, .innovation-admin) .iw-btn--sm,
.iw-shell .iw-stale a {
  padding: 3px 9px;
  font-size: 12px;
}

/* ---- Map (Task 11), spec §8.3 -------------------------------------------
 * One map, always: a force-settled node per startup, a hull per topic, drawn
 * around anchors the Stimulus controller lays out and relaxes client-side from
 * server-supplied PCA coordinates (x/y in [-1,1]). Focusing a topic does not
 * swap this block for anything -- it dims what is outside the topic and flies
 * the camera (a d3-zoom transform on the graph's root <g>) to that topic's
 * hull, which is why so much below has to hold its size on SCREEN rather than
 * on the map. See graph.js placeText and the non-scaling-stroke rules. */

/* ---- Living map palette -------------------------------------------------
 * Eight categorical topic hues plus an eight-step shade ramp each, for
 * segments within a topic. The eight HUES are unchanged and still carry the
 * dataviz skill's palette checker verdict against this map's own surface
 * (--teal-wash #f6fcfc):
 *
 *   [PASS] Lightness band      all 8 inside L 0.43-0.77
 *   [PASS] Chroma floor        all 8 >= 0.1
 *   [PASS] CVD separation      worst adjacent dE 9.2 (deutan)
 *   [PASS] Normal-vision floor worst adjacent dE 20.8
 *   [WARN] Contrast vs surface aqua/magenta/yellow below 3:1
 *
 * The contrast WARN is relieved, not ignored: every topic carries its name
 * as a visible label on the canvas, a hull outline in its own hue, and a
 * named legend group, so identity is never colour-alone. The slot ORDER is
 * load-bearing -- the checker's default is an adjacent-pair test and hue
 * index follows topic position, so consecutive topics get consecutive
 * slots. Do not reorder without re-running the checker.
 *
 * Each ramp is EIGHT steps at OKLCH lightness 0.32 to 0.74, dL 0.06 exactly,
 * chroma the most sRGB holds at that step up to 0.19 (the palette's existing
 * ceiling); gamut clipping lowers chroma, never lightness, so the ramp stays
 * ordinal. All eight pass the checker's ordinal test (monotone L, dL >= 0.06,
 * light end >= 2:1 on the surface -- worst is green at 2.07 -- single hue).
 * App is light-only: no dark block.
 *
 * It used to be four steps over L 0.48-0.75, and the report that ended that
 * was "the colour differences between the subtopics are too subtle, and
 * sometimes even look exactly the same if there are 6+ segments." Exactly the
 * same, literally: four shades, and a topic's fifth segment reused its first
 * shade. Eight tokens is what SEGMENT_COLORS in innovation_map_service.rb
 * cycles on, and this block is the source of truth for that number -- see
 * palette.js, which counts the -s<n> tokens rather than restating it.
 *
 * TWO dimensions were tried for the extra distinctness and both were measured
 * and dropped, because this palette's neighbours are closer than they look:
 *   - a hue tilt per shade (+/-15deg) assumes the eight topic hues are ~45deg
 *     apart. They are not. Measured OKLCH hue gaps round the circle: red 25,
 *     orange 41, yellow 75, green 142, aqua 162, blue 256, purple 320,
 *     magenta 357 -- gaps of 16, 34, 67, 20, 93, 65, 37, 28. A 30deg span
 *     swaps red with orange and green with aqua outright: the closest
 *     CROSS-TOPIC pair fell to dE 1.25 (vs 4.29 today), i.e. two topics in
 *     one colour.
 *   - a chroma tone (vivid/muted alternating) reaches dE 8.03 within a hue,
 *     but the muted steps land on --iw-hue-none #98a6a7: closest approach to
 *     the Uncategorized grey fell under dE 8, from 12.7 today, so a segment
 *     would read as "no segment". No feasible setting cleared both.
 * What is left is lightness, widened as far as both ends allow: the top is
 * pinned by the 2:1 floor above, so the eight steps run DOWNWARD to 0.32.
 *
 * The SHADE slot order is therefore load-bearing in its own right. Segment
 * colour_index counts 0,1,2,... up the legend, so the slots are permuted to
 * put consecutive indices far apart in lightness -- s0 L.32, s1 L.56, s2 L.38,
 * s3 L.68, s4 L.50, s5 L.74, s6 L.44, s7 L.62 -- chosen by maximising the
 * smallest consecutive step over all eight hues, cyclically (segment 8 wraps
 * to s0, so s7->s0 is a consecutive pair too). s0 is pinned to the darkest
 * step: the hover card's initials disc paints itself shadeFor(hue, 0) and owes
 * text contrast. Measured, in OKLab dE x100 (CIEDE2000 in brackets):
 *
 *   consecutive within a hue   min 17.9 (17.3)   was 8.35
 *   any pair within a hue      min  5.8 ( 5.3)   was 8.35, but 0 from seg 5
 *   any pair across two hues   min  4.3 ( 8.4)   was 4.29
 *   nearest approach to        min 13.0          was 12.7
 *     --iw-hue-none
 *
 * The any-pair floor is the one number that went DOWN, and knowingly: eight
 * shades in one hue family cannot all be 8 apart without one of the two
 * dimensions above. It buys 2.1x on the pair a reader actually compares --
 * consecutive rows of one topic's legend -- and removes the repeat entirely.
 *
 * Declared on :root, NOT on :is(.innovation-workspace, .innovation-admin)
 * like every rule below. Custom properties inherit downwards only, and the
 * client reads these through
 * `getComputedStyle(document.documentElement).getPropertyValue(name)`
 * (spec 2.11) -- `.innovation-workspace` is a <div> inside <body>, so a
 * token declared there is invisible from <html> and every hue would read
 * back as the empty string. The `--iw-` prefix keeps the global scope inert
 * for the rest of the app, the same way design_tokens.css declares at :root.
 * ------------------------------------------------------------------------ */
:root {
  --iw-hue-0: #2a78d6;  /* blue    */
  --iw-hue-1: #1baf7a;  /* aqua    */
  --iw-hue-2: #eb6834;  /* orange  */
  --iw-hue-3: #9240a4;  /* purple  */
  --iw-hue-4: #e87ba4;  /* magenta */
  --iw-hue-5: #008300;  /* green   */
  --iw-hue-6: #eda100;  /* yellow  */
  --iw-hue-7: #e34948;  /* red     */

  /* The same eight hues, DEEPER: what a one-topic map paints its segments in
     (palette.js singleTopic; iw_segment_color's single: true, so the drawer
     and the tab's lists match the map, R-15). Mark, 2026-09-30, on a
     ten-segment one-topic map: "something just feels a little wrong, maybe the
     brightness of them. Make them all a bit darker versions of their colors."
     The eight tokens above are left alone -- they are the TOPIC's identity
     everywhere (hull, outline, legend head, funnel). Each deep token is its
     hue at 85% of its OKLCH lightness (L x 0.85, i.e. 15% lower), same hue
     angle, same chroma wherever sRGB holds it (aqua 0.141 -> 0.124, green
     0.180 -> 0.153, yellow 0.161 -> 0.136 are clipped; clipping lowers chroma,
     never lightness). Relative rather than a flat step, so the light hues that
     read too bright lose most (yellow L .764 -> .650, magenta .716 -> .609)
     and the already-dark ones least (purple .521 -> .443, green .529 -> .450).
     Measured: every deep hue is >= 3.3:1 on white (was 2.17 worst, yellow);
     closest pair red/orange OKLab dE 6.6 (was 7.1); nearest approach to
     --iw-hue-none 16.0 (was 13.7). */
  --iw-hue-0-deep: #035db9;  /* blue    L .575 -> .488 */
  --iw-hue-1-deep: #038d60;  /* aqua    L .669 -> .569 */
  --iw-hue-2-deep: #c84704;  /* orange  L .671 -> .570 */
  --iw-hue-3-deep: #7a278b;  /* purple  L .521 -> .443 */
  --iw-hue-4-deep: #c35a83;  /* magenta L .716 -> .609 */
  --iw-hue-5-deep: #006800;  /* green   L .529 -> .448 */
  --iw-hue-6-deep: #bf8104;  /* yellow  L .764 -> .650 */
  --iw-hue-7-deep: #c2252c;  /* red     L .623 -> .530 */

  /* Eight more deep hues, 8-15, for the one-topic SEGMENT WALK only (palette.js
     deepHueFor, iw_segment_color's single: true; InnovationMapService
     SEGMENT_HUES = 16). Mark, 2026-09-30, on a twelve-segment topic: three
     segments read as the same green, because the walk had eight hues and
     wrapped, so segment 8 wore segment 0's colour. Deep form only -- no base
     hue and no shade ramp for 8-15, because topics keep the eight-hue ring
     (TOPIC_HUES) and nothing but the walk ever names these.
     Chosen by script on the OKLCH wheel, one per named gap between the eight
     above (sky, lime, brown, indigo, violet, rose, crimson, teal-blue), each
     hue confined to its gap and its L (.46-.70) and C (>= .09) searched to
     maximise the smallest OKLab dE to every other deep token. Measured (OKLab
     dE x100): every new token >= 3.31:1 on white (violet; the ring's worst
     stays yellow's 3.30); the closest pair of all sixteen is still red/orange
     6.6, untouched; the closest pair with a new token in it is 11.5 (teal-blue
     /blue, teal-blue/aqua, lime/yellow); nearest approach to --iw-hue-none
     15.8 (sky). ORDER is the walk: laid out so that neighbours on the ring
     (7->8 ... 15->0) are >= 21.0 apart (15->0 violet/blue; the old ring's own
     worst step is 6->7 at 19.1), and so is slot k against k+8, the two a
     topic of nine or more segments puts side by side (>= 21.5, 3|11
     purple/brown). */
  --iw-hue-8-deep:  #7c9605;  /* lime      L .630 C .150 h 121 */
  --iw-hue-9-deep:  #ea41d0;  /* rose      L .670 C .250 h 335 */
  --iw-hue-10-deep: #0994de;  /* sky       L .639 C .150 h 242 */
  --iw-hue-11-deep: #794d15;  /* brown     L .460 C .090 h  68 */
  --iw-hue-12-deep: #713df3;  /* indigo    L .539 C .250 h 288 */
  --iw-hue-13-deep: #ff135c;  /* crimson   L .640 C .250 h  14 */
  --iw-hue-14-deep: #007386;  /* teal-blue L .511 C .090 h 214 */
  --iw-hue-15-deep: #a278e4;  /* violet    L .660 C .159 h 300 */

  /* Eight shades per hue, in SLOT order (s0 L.32, s1 L.56, s2 L.38, s3 L.68,
     s4 L.50, s5 L.74, s6 L.44, s7 L.62) -- not lightness order. Adding a
     shade here means bumping SEGMENT_COLORS in innovation_map_service.rb;
     palette.js picks the new count up on its own. */
  --iw-hue-0-s0: #003168; --iw-hue-0-s1: #0071df; --iw-hue-0-s2: #004084; --iw-hue-0-s3: #4798ff;
  --iw-hue-0-s4: #0060c0; --iw-hue-0-s5: #6eadff; --iw-hue-0-s6: #0050a1; --iw-hue-0-s7: #2184f5;

  --iw-hue-1-s0: #003e28; --iw-hue-1-s1: #008a5e; --iw-hue-1-s2: #005034; --iw-hue-1-s3: #00b47c;
  --iw-hue-1-s4: #007650; --iw-hue-1-s5: #00c98b; --iw-hue-1-s6: #006242; --iw-hue-1-s7: #009f6d;

  --iw-hue-2-s0: #5a1b00; --iw-hue-2-s1: #c44500; --iw-hue-2-s2: #732500; --iw-hue-2-s3: #f56528;
  --iw-hue-2-s4: #a83a00; --iw-hue-2-s5: #ff8253; --iw-hue-2-s6: #8d2f00; --iw-hue-2-s7: #df5106;

  --iw-hue-3-s0: #520061; --iw-hue-3-s1: #a344b8; --iw-hue-3-s2: #69007c; --iw-hue-3-s3: #ca6ae0;
  --iw-hue-3-s4: #9030a4; --iw-hue-3-s5: #de7ef4; --iw-hue-3-s6: #7d1991; --iw-hue-3-s7: #b657cb;

  --iw-hue-4-s0: #610033; --iw-hue-4-s1: #c43275; --iw-hue-4-s2: #7b0043; --iw-hue-4-s3: #ef5b99;
  --iw-hue-4-s4: #af1864; --iw-hue-4-s5: #ff75ac; --iw-hue-4-s6: #970053; --iw-hue-4-s7: #d94787;

  --iw-hue-5-s0: #003f00; --iw-hue-5-s1: #028e01; --iw-hue-5-s2: #005200; --iw-hue-5-s3: #41b43b;
  --iw-hue-5-s4: #007900; --iw-hue-5-s5: #56c850; --iw-hue-5-s6: #006500; --iw-hue-5-s7: #29a125;

  --iw-hue-6-s0: #472d00; --iw-hue-6-s1: #9c6900; --iw-hue-6-s2: #5b3b00; --iw-hue-6-s3: #cb8900;
  --iw-hue-6-s4: #865900; --iw-hue-6-s5: #e39a00; --iw-hue-6-s6: #704a00; --iw-hue-6-s7: #b37900;

  --iw-hue-7-s0: #65000b; --iw-hue-7-s1: #cc3336; --iw-hue-7-s2: #810011; --iw-hue-7-s3: #f75d59;
  --iw-hue-7-s4: #b71824; --iw-hue-7-s5: #ff7e77; --iw-hue-7-s6: #9e0017; --iw-hue-7-s7: #e24948;

  --iw-hue-none: #98a6a7;                 /* Uncategorized */
  --iw-map-ring-accent: var(--teal-ink);  /* the neighbour ring on hover */
  --iw-map-link-ink: #5d7274;             /* similarity lines and topic ties */
}

:is(.innovation-workspace, .innovation-admin) .iw-map-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--teal-wash);
  overflow: hidden;
}

:is(.innovation-workspace, .innovation-admin) .iw-map-stage {
  position: relative;
  flex: none;
}

:is(.innovation-workspace, .innovation-admin) .iw-map-toolbar {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

:is(.innovation-workspace, .innovation-admin) .iw-map-toolbar > * {
  pointer-events: auto;
}

:is(.innovation-workspace, .innovation-admin) .iw-pill {
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--teal-rule);
  background: transparent;
  color: var(--teal-ink);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

:is(.innovation-workspace, .innovation-admin) .iw-pill:focus-visible {
  outline: 2px solid var(--teal-ink);
  outline-offset: 2px;
}

:is(.innovation-workspace, .innovation-admin) .iw-pill.is-active {
  background: var(--teal-ink);
  border-color: var(--teal-ink);
  color: white;
}

/* Defensive only: nothing here gives .iw-pill a display of its own, so the UA
   [hidden] rule still hides a hidden pill. Stated so a later `display:` on this
   class cannot quietly unhide one -- the trap .iw-map-legend and .iw-map-empty
   document below, where the class DOES carry its own display and the UA rule
   really is defeated. */
:is(.innovation-workspace, .innovation-admin) .iw-pill[hidden] {
  display: none;
}

:is(.innovation-workspace, .innovation-admin) svg.iw-map {
  display: block;
  width: 100%;
  aspect-ratio: 1000 / 580;
  /* The graph is pannable/zoomable: claim the horizontal gesture for the map
     and leave vertical scrolling to the page. */
  touch-action: pan-y;
  cursor: grab;
}

:is(.innovation-workspace, .innovation-admin) svg.iw-map.is-grabbing {
  cursor: grabbing;
}

/* The visible dot takes no pointer events at all: .iw-node__hit, the
   transparent circle painted underneath it, is the whole target, so a 4px
   node is as easy to hit as an 11px one.

   The RADIUS scales with the camera — a bigger dot is what zooming in is for —
   but the ring around it does not. Its widths (1.4 quiet, 2 lit, 2.2 pinned)
   were chosen as screen pixels for a hairline and an emphasis that reads
   against it; multiplied by the fit's 2.5x they stop being a ring and become a
   donut, and the quiet ring's job is only to hold the dot off whatever is
   behind it. */
:is(.innovation-workspace, .innovation-admin) .iw-node__dot {
  pointer-events: none;
  vector-effect: non-scaling-stroke;
  transition: opacity .2s;
}

/* The board-status ring round a member dot on Board review and the whole
   workspace (graph.js paint, STATUS_RING_WIDTH): amber under review, green
   approved, written inline by the graph from the accent tokens. A hairline
   stroke for the same reason as the dot's own, and no pointer: the hit
   circle stays the whole target. */
:is(.innovation-workspace, .innovation-admin) .iw-node__status {
  fill: none;
  pointer-events: none;
  vector-effect: non-scaling-stroke;
  transition: opacity .2s;
}

:is(.innovation-workspace, .innovation-admin) .iw-node__hit {
  fill: transparent;
  pointer-events: all;
  cursor: pointer;
}

/* Every node carries its name; only a node the client has singled out shows it.
   `visibility` as well as opacity, so a hidden name is out of the accessibility
   tree and out of a test's default visibility filter rather than merely
   transparent — and both are transitioned, so the flip to hidden happens at the
   END of the fade out rather than at its start. paint-order: stroke puts the wash halo UNDER the glyph, the same
   trick the topic label uses, which is what keeps a name legible where it
   crosses the links and dots behind it. It never takes a pointer event: the
   hit circle under it must stay the whole target. */
/* No vector-effect on either text halo, deliberately: a label is drawn inside
   a scale(1/k) transform (graph.js placeText), so its 3.5px/4px wash stroke
   already nets out to exactly that many screen pixels. */
:is(.innovation-workspace, .innovation-admin) .iw-node__name {
  fill: var(--ink);
  font-size: 10.5px;
  font-weight: 600;
  pointer-events: none;
  paint-order: stroke;
  stroke: var(--teal-wash);
  stroke-width: 3.5px;
  stroke-linejoin: round;
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s, visibility .18s;
}

/* Four ways a node earns its name: the pointer is on it, it neighbours whatever
   owns the highlight, it is pinned, or it belongs to the topic the client has
   focused — a focused topic names ALL of itself, because that is the topic they
   asked to read.

   `:not(.is-unfocused)` rather than a later override, so source order cannot
   decide it. A focused topic dims every node outside itself to an opacity this
   label does not share, and a name is either legible or it is not — there is no
   faint version of it. The pin is the one mark that can still be set on a node
   outside the focus (the panel is showing that startup wherever it sits), so
   this is what keeps it from shouting over a map that is deliberately quiet.
   Since click-lock, a pin's hot and lit ignore the focus in paint(); this
   selector is what keeps an out-of-focus lit neighbour's name hidden. */
:is(.innovation-workspace, .innovation-admin) .iw-node:is(.is-hot, .is-lit, .is-active, .is-focused):not(.is-unfocused) .iw-node__name {
  opacity: 1;
  visibility: visible;
}

/* A suggestion names itself the way a member does, on hover and while its
   profile is held -- same type, same wash halo, a touch muted because it is
   not in the topic yet. */
:is(.innovation-workspace, .innovation-admin) .iw-ghost__name {
  fill: var(--text-muted);
  font-size: 10.5px;
  font-weight: 600;
  pointer-events: none;
  paint-order: stroke;
  stroke: var(--teal-wash);
  stroke-width: 3.5px;
  stroke-linejoin: round;
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s, visibility .18s;
}

:is(.innovation-workspace, .innovation-admin) .iw-ghost:is(:hover, .is-held) .iw-ghost__name {
  opacity: 1;
  visibility: visible;
}

/* ---- Ghosts: suggestions nobody has decided on yet ------------------------
   A faded mark just outside the topic it would join — a circle for something
   already in our database, a square on its corner for one of Claude's web
   finds — so the client can see where a startup WOULD land before deciding
   whether it belongs.

   The colour is not a second palette and it is not minted here: graph.js
   fills the mark with the segment's own --iw-hue-* token, 80% of it, mixed
   toward --text-muted (color-mix, see ghostFill) and this file supplies the opacity
   and the dashed ring. There was a `filter: saturate(.22)` here, matching the
   mockup — it is gone on purpose: a CSS filter on sixty SVG children inside
   the zoom transform makes sixty offscreen buffers, rasterised before the
   camera's scale, so the ghosts blurred at the 2.5x focus fit while the
   member dots stayed sharp, and every pan repainted all of them.

   Hover lifts the fill rather than changing its colour: the card beside it is
   what names the startup, and a ghost that recoloured on hover would read as
   having been decided.

   GRADED BY SIMILARITY (round 2). The three custom properties below are
   written per ghost, on its own <g>, by graph.js#drawGhosts: the strongest
   suggestions get exactly the numbers that used to be hard-coded here and the
   weak ones fade and thin, so a cloud that reaches a long way out reads as
   thinning rather than as a wall of identical marks. The fallbacks ARE those
   old numbers, so a mark drawn before a layout has run -- or by a browser
   that has dropped the property for any reason -- looks precisely as it did.

   Why a property and not an inline opacity: an inline style beats every
   stylesheet rule, which would kill the hover and .is-held lifts below. These
   two rules stay the winners by specificity, exactly as before. */
:is(.innovation-workspace, .innovation-admin) .iw-ghost__dot {
  pointer-events: none;
  opacity: var(--iw-ghost-op, .75);
  transition: opacity .12s;
}

:is(.innovation-workspace, .innovation-admin) .iw-ghost:hover .iw-ghost__dot {
  opacity: .95;
}

/* Hover lights the RING as well, and on a weak match that is the whole point:
   round 4 grades a suggestion's dot down to a 2px speck and writes
   --iw-ghost-ring-op as 0 below GHOST_RING_MIN_STRENGTH, so without this rule
   pointing at one of them showed almost nothing for the whole two-second
   dwell the card takes to open. .9 is the ring's own strong end
   (GHOST_RING_OPACITY_MAX / the fallback on .iw-ghost__ring above), so a
   hovered speck borrows exactly the ring a close match wears rather than a
   number invented here. It beats the custom property because a property is
   only the value of the declaration it feeds, and this declaration is the
   more specific one. */
:is(.innovation-workspace, .innovation-admin) .iw-ghost:hover .iw-ghost__ring {
  opacity: .9;
}

/* non-scaling-stroke for the same reason the node ring carries it: 1.5px and a
   2.4/2.6 dash were chosen as SCREEN pixels, and at the focus camera's 2.5x
   they would stop being a dashed hairline and become a dotted donut. The
   width is graded with the opacity and for the same reason -- a strong
   suggestion is nearly a member, a weak one is barely a mark -- but the DASH
   is not: it is what says "undecided", and a dash that changed length as well
   would read as a different kind of thing rather than a fainter one. */
:is(.innovation-workspace, .innovation-admin) .iw-ghost__ring {
  fill: none;
  pointer-events: none;
  stroke: var(--text-muted);
  stroke-width: var(--iw-ghost-ring-w, 1.5);
  stroke-dasharray: 2.4 2.6;
  opacity: var(--iw-ghost-ring-op, .9);
  vector-effect: non-scaling-stroke;
  /* The same .12s the dot has: the hover and .is-held rules lift both marks
     together, and one of them easing while the other snapped read as the ring
     arriving late. */
  transition: opacity .12s;
}

/* The same bargain as .iw-node__hit: the visible marks take no pointer events
   at all, and this transparent circle is the whole target. */
:is(.innovation-workspace, .innovation-admin) .iw-ghost__hit {
  fill: transparent;
  pointer-events: all;
  cursor: pointer;
}

.innovation-workspace .iw-btn--fav.is-on { color: var(--amber-accent); }

/* ---- Held: the mark a locked profile bar belongs to (step 3) --------------
   The bar is docked below the map, so the mark itself says which startup is
   pinned while the client compares nearby suggestions.

   The ring is drawn on the HIT circle, which is otherwise invisible and, at
   r + 5 / GHOST_HIT_R, already the right size for a halo around the mark. It
   also has to be: paint() sets the member dot's stroke through `style`, which
   no stylesheet rule can beat, so a ring on .iw-node__dot would simply never
   appear. non-scaling-stroke for the same reason every other stroke on this
   map carries it — 1.5 is a screen pixel count, and the focus camera goes to
   2.5x.

   A held ghost also lifts to its hover opacity, because the pointer has
   usually left it by the time the client is reading the card. It does not
   RECOLOUR: a ghost that changed colour would read as having been decided,
   which is precisely the thing the client has not done yet. */
:is(.innovation-workspace, .innovation-admin) .iw-node.is-held .iw-node__hit,
:is(.innovation-workspace, .innovation-admin) .iw-ghost.is-held .iw-ghost__hit {
  stroke: var(--teal-ink);
  stroke-width: 1.5;
  stroke-opacity: 1;
  vector-effect: non-scaling-stroke;
}

:is(.innovation-workspace, .innovation-admin) .iw-ghost.is-held .iw-ghost__dot { opacity: .95; }

:is(.innovation-workspace, .innovation-admin) .iw-ghost.is-held .iw-ghost__ring { opacity: 1; }

/* The graph's similarity edges. `iw-simlink`, not `iw-link`: `.iw-link` above
   is the workspace's text-link class, and these declarations on it took every
   one of those links out of the pointer's reach.

   non-scaling-stroke: a link's width is its BAND — 2px closest, 1.2 close, 1
   loosely related — and three bands a pixel apart only read as three if they
   are drawn at the widths they were picked at. Under the camera they would all
   be scaled together and the map would look like it had thickened rather than
   like it had come closer. The dash pattern holds its size with them. */
:is(.innovation-workspace, .innovation-admin) .iw-simlink,
:is(.innovation-workspace, .innovation-admin) .iw-tie {
  pointer-events: none;
  vector-effect: non-scaling-stroke;
  transition: opacity .2s;
}

/* A suggestion's connection lines to the members it is closest to
   (graph.js drawGhostLinks). Drawn always, so they are the quietest line on
   the map: a hairline in the ghost ring's own ink and a short dash, the
   ghost's visual language for "undecided", thinner than the weakest member
   link. Only the opacity is written by the graph (graded by similarity, lifted
   when either end is hovered or held). Non-scaling for the reason above. */
:is(.innovation-workspace, .innovation-admin) .iw-ghostlink {
  stroke: var(--text-muted);
  stroke-width: 0.8;
  stroke-dasharray: 1.5 2.5;
  stroke-linecap: round;
  pointer-events: none;
  vector-effect: non-scaling-stroke;
  transition: opacity .2s;
}

/* The hull's outline is a 1px hairline around a wash; the camera must not turn
   it into a border. (The FILL scales with everything else, which is the point.) */
:is(.innovation-workspace, .innovation-admin) .iw-hull {
  cursor: pointer;
  vector-effect: non-scaling-stroke;
  transition: fill-opacity .25s, stroke-opacity .25s;
}

:is(.innovation-workspace, .innovation-admin) .iw-map-legend {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 11px;
  color: var(--text-muted);
}

/* This file's own display:flex overrides the UA [hidden] rule (same trap
   focus_area_review_board.css:415 / flite_platform.css:2968 document) —
   restore it here so the JS's `.hidden = true/false` toggle actually hides. */
:is(.innovation-workspace, .innovation-admin) .iw-map-legend[hidden] {
  display: none;
}

/* The map has one legend and one view, so `--graph` is now the only mode the
   `legend` target is ever in. The modifier is kept rather than folded into
   .iw-map-legend: the base rule is the flex row the panel's own `display:block`
   overrides, and collapsing the two would mean re-deriving every declaration
   here against it for no behaviour change. */
:is(.innovation-workspace, .innovation-admin) .iw-map-legend--graph {
  left: auto;
  right: 12px;
  top: 12px;
  bottom: auto;
  display: block;
  max-height: calc(100% - 24px);
  min-width: 168px;
  max-width: 232px;
  overflow-y: auto;
  /* The panel is a fixed-width key, not a viewer: a name it cannot fit wraps
     (see the head rule below), and anything still over the edge after that is
     clipped rather than turned into a sideways scrollbar the client has to
     find and drag. Belt and braces on purpose — a legend that scrolls
     horizontally reads as broken whatever produced it. */
  overflow-x: hidden;
  padding: 9px 11px 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, .88);
  box-shadow: var(--shadow-card);
}

:is(.innovation-workspace, .innovation-admin) .iw-map-legend__title {
  margin: 0 0 6px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--text-faint);
}

:is(.innovation-workspace, .innovation-admin) .iw-map-legend__grp { margin-top: 7px; }
:is(.innovation-workspace, .innovation-admin) .iw-map-legend__grp:first-of-type { margin-top: 0; }

:is(.innovation-workspace, .innovation-admin) .iw-map-legend__head {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 2px 4px;
  margin: 0 -4px;
  border-radius: var(--radius-ctl);
  text-align: left;
}

:is(.innovation-workspace, .innovation-admin) .iw-map-legend__head:hover {
  background: var(--teal-wash);
  color: var(--teal-ink);
}

/* A topic head is a <button>, and base.css:163 gives EVERY button in the app
   `white-space: nowrap` (the same rule block whose `display: inline-block`
   defeats [hidden] app-wide — suspect it whenever a button misbehaves). It is
   an inherited property, so the head's `.iw-map-legend__nm` span inherited the
   nowrap too, which is what made the `overflow-wrap: anywhere` already on that
   span inert: overflow-wrap only gets a say where wrapping is allowed at all.
   A long topic name therefore ran the head out to one flat line and put a
   horizontal scrollbar under the whole legend. `white-space: normal` is the fix;
   `overflow-wrap` is restated here so a name that is one long token with no
   space to break at wraps too, and `min-width: 0` so neither box can refuse to
   shrink below its content if either ever becomes a flex item. */
:is(.innovation-workspace, .innovation-admin) .iw-map-legend--graph .iw-map-legend__head,
:is(.innovation-workspace, .innovation-admin) .iw-map-legend--graph .iw-map-legend__nm {
  white-space: normal;
  overflow-wrap: anywhere;
  min-width: 0;
}

:is(.innovation-workspace, .innovation-admin) .iw-map-legend__rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

:is(.innovation-workspace, .innovation-admin) .iw-map-legend__row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-muted);
  padding: 1px 0;
}

:is(.innovation-workspace, .innovation-admin) .iw-map-legend__nm {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

:is(.innovation-workspace, .innovation-admin) .iw-map-legend__ct {
  font-size: 10px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

:is(.innovation-workspace, .innovation-admin) .iw-map-legend__swatch {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: 0 0 auto;
  align-self: center;
  box-shadow: 0 0 0 1px var(--line-soft);
}

:is(.innovation-workspace, .innovation-admin) .iw-map-legend__swatch.is-square {
  border-radius: 2px;
}

:is(.innovation-workspace, .innovation-admin) .iw-map-legend__foot {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--text-faint);
  font-size: 10.5px;
}

:is(.innovation-workspace, .innovation-admin) .iw-map-legend__footrow {
  display: flex;
  align-items: center;
  gap: 7px;
}

:is(.innovation-workspace, .innovation-admin) .iw-map-legend__footrow svg {
  flex: 0 0 auto;
  overflow: visible;
}

/* The suggestions key, last in the foot: one switch over the whole ghost
   layer, then the two shapes it governs. Drawn at both levels -- the layer is
   every topic's now, and a focus changes what the count beside the switch is
   about, not whether there is one. Ruled off from the line-style rows above
   because it is the one part of the legend that DOES something rather than
   explaining something. */
:is(.innovation-workspace, .innovation-admin) .iw-map-legend__ghosts {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--line-soft);
}

/* The one control in the legend, so it carries the legend's only ink colour
   rather than the foot's faint one. */
:is(.innovation-workspace, .innovation-admin) .iw-map-legend__toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  cursor: pointer;
}

:is(.innovation-workspace, .innovation-admin) .iw-map-legend__toggle input {
  width: 13px;
  height: 13px;
  margin: 0;
  flex: 0 0 auto;
  accent-color: var(--teal-ink);
}

/* A suggestion's key, drawn the way the map draws the mark itself: a dashed
   ring (this rule) round a tinted centre (the next). The ring alone was the
   old key, and at legend size a dashed disc, a dashed diamond and the dashed
   no-vector circle were one smudge (2026-09-30); the centre is what carries
   the disc-or-diamond shape, and the no-vector key has none. The centre is
   the foot's own ink at partial strength, not a segment colour -- the key is
   about shape, and a coloured swatch would claim a segment. */
:is(.innovation-workspace, .innovation-admin) .iw-map-legend__ghostmark {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.1;
  stroke-dasharray: 2.4 2.6;
}

:is(.innovation-workspace, .innovation-admin) .iw-map-legend__ghostdot {
  fill: currentColor;
  fill-opacity: .55;
  stroke: none;
}

:is(.innovation-workspace, .innovation-admin) .iw-map-hint {
  position: absolute;
  right: 12px;
  bottom: 12px;
  font-size: 11px;
  color: var(--text-faint);
}

:is(.innovation-workspace, .innovation-admin) .iw-map-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 40px;
  color: var(--text-faint);
  font-size: 13px;
}

/* Same UA [hidden] trap as .iw-map-legend above — without this the empty
   state's `inset: 0` overlay sits on top of the map and swallows every
   blob click, topics or not. */
:is(.innovation-workspace, .innovation-admin) .iw-map-empty[hidden] {
  display: none;
}

/* "Loading map…" (and the fetch-failed line that replaces it): the empty
   state's look, over the stage from the HTML itself until the first draw.
   pointer-events: none so that, should it ever linger, the map beneath still
   takes the client's clicks. */
:is(.innovation-workspace, .innovation-admin) .iw-map-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 40px;
  color: var(--text-faint);
  font-size: 13px;
  pointer-events: none;
}

:is(.innovation-workspace, .innovation-admin) .iw-map-loading[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  :is(.innovation-workspace, .innovation-admin) .iw-node__dot,
:is(.innovation-workspace, .innovation-admin) .iw-node__status,
:is(.innovation-workspace, .innovation-admin) .iw-ghost__dot,
:is(.innovation-workspace, .innovation-admin) .iw-ghost__ring,
:is(.innovation-workspace, .innovation-admin) .iw-simlink,
:is(.innovation-workspace, .innovation-admin) .iw-ghostlink,
:is(.innovation-workspace, .innovation-admin) .iw-tie,
:is(.innovation-workspace, .innovation-admin) .iw-hull,
:is(.innovation-workspace, .innovation-admin) .iw-node__name,
:is(.innovation-workspace, .innovation-admin) .iw-ghost__name {
    transition: none;
  }
}

/* ---- Focus panel (Task 12), spec §8.4 ------------------------------------
 * The turbo-frame under the map: a topic embeds the existing focus-area work
 * area (board + pipeline) inside `.pipeline-skin`, a startup gets a
 * reader-style detail, and "all" gets a topic summary list + the org's whole
 * pipeline (also wrapped in `.pipeline-skin`, also its own turbo-frame with
 * the id the embedded endpoint actually renders — see innovation_map_controller.js
 * + Innovation::PanelController). Note deliberately NOT restyled here: the
 * `.section__header h2` headings that ride in on the embedded board/pipeline
 * belong to `.pipeline-skin`, not to this file. */

:is(.innovation-workspace, .innovation-admin) .iw-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

:is(.innovation-workspace, .innovation-admin) .iw-chip--seg {
  color: var(--teal-ink);
  background: var(--teal-wash);
  border-color: var(--teal-rule);
}

:is(.innovation-workspace, .innovation-admin) .iw-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

:is(.innovation-workspace, .innovation-admin) .iw-workarea {
  margin-top: 4px;
}

/* Innovation admin (Task 13): org table + recent-runs table, layered on the
 * shared .iw-card/.iw-chip/.iw-btn/.iw-form vocabulary above. */

.innovation-admin .iw-table {
  width: 100%;
  font-size: 13px;
  border-collapse: collapse;
}

.innovation-admin .iw-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 650;
  color: var(--text-muted);
  text-align: left;
  padding: 8px;
}

.innovation-admin .iw-table td {
  padding: 8px;
  border-bottom: 1px solid var(--line-soft);
}

.innovation-admin .iw-table-wrap {
  overflow-x: auto;
}

/* base.css sizes inputs and selects for roomy forms, which left a 7ch field
 * 42px for its digits: 10000 read as 100. Every admin control shares one
 * height and scale here. */
.innovation-admin :is(.iw-num, .iw-admin-org select, .iw-admin-unattached select) {
  box-sizing: border-box;
  height: 30px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-ctl);
  font-size: var(--fs-ui);
  font-weight: 400;
  letter-spacing: 0;
  color: var(--text);
}

.innovation-admin .iw-num {
  width: 96px;
  padding: 0 8px;
  background: white;
  font-variant-numeric: tabular-nums;
}

.innovation-admin .iw-num::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

.innovation-admin :is(.iw-admin-org select, .iw-admin-unattached select) {
  width: 68px;
  padding: 0 22px 0 8px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="13" height="8"><path fill="%235c6169" fill-rule="evenodd" d="m7.01 7.222 5.19-5.538A1 1 0 0 0 11.472 0H1.088a1 1 0 0 0-.73 1.684L5.55 7.222a1 1 0 0 0 1.46 0Z"/></svg>') no-repeat right 8px center / 9px 6px, white;
}

/* Fixed columns, so the platform tables line up from one organisation to the
 * next; the platform name takes what is left. */
.innovation-admin :is(.iw-admin-org, .iw-admin-unattached) .iw-table {
  table-layout: fixed;
  min-width: 880px;
}

.innovation-admin :is(.iw-admin-org, .iw-admin-unattached) .iw-table th {
  white-space: nowrap;
}

.innovation-admin :is(.iw-admin-org, .iw-admin-unattached) .iw-table td {
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}

.innovation-admin :is(.iw-admin-org, .iw-admin-unattached) .iw-table :is(th, td):nth-child(2) { width: 84px; }
.innovation-admin :is(.iw-admin-org, .iw-admin-unattached) .iw-table :is(th, td):nth-child(3) { width: 136px; }
.innovation-admin :is(.iw-admin-org, .iw-admin-unattached) .iw-table :is(th, td):nth-child(4) { width: 116px; }
.innovation-admin :is(.iw-admin-org, .iw-admin-unattached) .iw-table :is(th, td):nth-child(5) { width: 132px; }
.innovation-admin :is(.iw-admin-org, .iw-admin-unattached) .iw-table :is(th, td):nth-child(6) { width: 88px; }
.innovation-admin :is(.iw-admin-org, .iw-admin-unattached) .iw-table :is(th, td):nth-child(7) { width: 88px; }
.innovation-admin :is(.iw-admin-org, .iw-admin-unattached) .iw-table :is(th, td):nth-child(8) { width: 72px; }

/* Links here inherited the page's body size and towered over the chips and
 * meta text beside them. */
.innovation-admin .iw-admin-ready {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-size: var(--fs-ui);
}

.innovation-admin .iw-admin-ready .iw-form--inline {
  margin: 0 0 0 auto;
}

.innovation-admin :is(.iw-admin-ready, .iw-admin-org__who) a {
  font-size: var(--fs-ui);
  color: var(--teal-ink);
}

/* Organizations and platforms (A3c Task 15): one block per organisation, its
 * own settings on a head line and its platforms in a table beneath. */
.innovation-admin .iw-admin-org {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.innovation-admin .iw-admin-org:first-child {
  padding-top: 0;
}

.innovation-admin .iw-admin-org__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 4px;
}

.innovation-admin .iw-admin-org__who {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}

.innovation-admin :is(.iw-admin-scouting, .iw-admin-labs, .iw-admin-shared, .iw-admin-org__none) {
  font-size: var(--fs-meta);
}

.innovation-admin .iw-admin-shared {
  display: block;
}

.innovation-admin .iw-admin-org__none {
  margin: 4px 0 0;
}

.innovation-admin .iw-admin-unattached {
  padding-top: 12px;
}

.innovation-admin .iw-admin-unattached h3 {
  margin: 0 0 4px;
  font-size: var(--fs-ui);
  font-weight: 650;
}

/* Focus-area import (Task 3): one <details> per enabled org, collapsed by
 * default so an org with many focus areas (legacy + abandoned rounds) never
 * forces a long page — the org's name/count stays visible either way. */
:is(.innovation-workspace, .innovation-admin) .iw-chip--ok {
  color: var(--green-ink);
  background: var(--green-wash);
  border-color: var(--green-line);
}

:is(.innovation-workspace, .innovation-admin) .iw-chip--bad {
  color: var(--red-ink);
  background: var(--red-wash);
  border-color: var(--red-line);
}

:is(.innovation-workspace, .innovation-admin) .iw-chip--succeeded {
  color: var(--green-ink);
  background: var(--green-wash);
  border-color: var(--green-line);
}

:is(.innovation-workspace, .innovation-admin) .iw-chip--partial {
  color: var(--amber-ink);
  background: var(--amber-wash);
  border-color: var(--amber-line);
}

:is(.innovation-workspace, .innovation-admin) .iw-chip--failed,
:is(.innovation-workspace, .innovation-admin) .iw-chip--refused {
  color: var(--red-ink);
  background: var(--red-wash);
  border-color: var(--red-line);
}

:is(.innovation-workspace, .innovation-admin) .iw-chip--running,
:is(.innovation-workspace, .innovation-admin) .iw-chip--queued {
  color: var(--blue-ink);
  background: var(--blue-wash);
  border-color: var(--blue-line);
}

/* A3c: "Set aside by Seamless" -- history on an entry, not a state, so it is
   the quietest chip: washed, muted ink, sentence case. In the map's head
   column (a flex column) it keeps its own width. */
.iw-shell .iw-chip--muted {
  color: var(--text-muted);
  background: var(--wash);
  border-color: var(--line);
  text-transform: none;
  letter-spacing: 0;
}

.iw-shell .iw-hovercard__ident > .iw-chip--muted { align-self: flex-start; }

/* ---- Polish wave 2026-08-21, item 1: layout, density, controls ----------
 * .iw-grid stretched the map card to the sidebar's height; sidebar rows had
 * no min-width:0 so names pushed their cards wide; base.css uppercases every
 * button app-wide and .iw-btn never reset it. */

/* align-self was `start` here so a very tall sidebar couldn't stretch the map.
 * The 2026-08-21b sidebar takes its card out of flow — hide it and this row
 * collapses to zero — so it contributes no height and can no longer stretch
 * anything, and `start` now causes the opposite problem.
 *
 * This card alone sizes the row, but its contribution comes out ~20px taller
 * than the height it then renders at (it is an overflow:hidden box whose
 * toolbar, hint and legend are absolutely positioned over the map). So a
 * content-sized map card sat 20px short of the row the sidebar fills, and no
 * alignment value closes that gap — align-self:stretch is honoured on paper
 * and ignored in layout here. height:100% resolves against the grid area and
 * does close it: the card fills the row it sized, and the sidebar beside it is
 * exactly as tall. The profile bar is in normal flow below that map stage. */
:is(.innovation-workspace, .innovation-admin) .iw-map-card {
  align-self: stretch;
  height: 100%;
}
/* A definite, viewport-relative height rather than the aspect-ratio box above.
 * The sidebar is pinned to this card's height, so the pair has to stay usable
 * on a short laptop screen as well as a tall monitor: the clamp gives the map
 * a floor, a proportionate middle, and a ceiling, and the sidebar follows it.
 *
 * The drawing is unaffected — the SVG's own preserveAspectRatio="xMidYMid meet"
 * letterboxes the viewBox inside whatever box it is handed. */
:is(.innovation-workspace, .innovation-admin) svg.iw-map {
  flex: none;
  height: clamp(360px, 52vh, 640px);
}

/* §3.3 Row density and truncation: ~26px rows at 13px text. */
:is(.innovation-workspace, .innovation-admin) .iw-seg { padding: 3px 0; gap: 6px; }

/* .iw-seg__name is always a read-only <span>: item 6 moved the editable name
 * input into the disclosure body, so the row cell no longer has an input
 * variant. min-width:0 lets it shrink like the other name cells; the ellipsis
 * itself is declared in the item 1 fix-round banner further down. */
:is(.innovation-workspace, .innovation-admin) .iw-chip {
  flex-shrink: 0;
}

/* §3.5 Buttons: sentence case everywhere (base.css uppercases buttons
 * app-wide and .iw-btn never reset it), run buttons full width with the ~N¢
 * estimate flush right and free to wrap onto its own line.
 *
 * text-decoration too: several .iw-btn are anchors ("Open in reader", "Full
 * profile"), and browsers underline anchors, so they read as links wearing
 * a button's box rather than as buttons. */
:is(.innovation-workspace, .innovation-admin) :is(.iw-btn, .iw-pill) {
  text-transform: none;
  white-space: normal;
  text-decoration: none;
}

:is(.innovation-workspace, .innovation-admin) .iw-btn__est { flex: none; margin-left: auto; }

/* ---- Polish wave 2026-08-21, item 2: startup avatars ---- */

:is(.innovation-workspace, .innovation-admin) .iw-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: contain;
  background: var(--teal-wash);
  flex: none;
}

:is(.innovation-workspace, .innovation-admin) .iw-avatar--initials {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 650;
  color: var(--text-muted);
}

/* ---- Polish wave 2026-08-21, item 5: run breakdown ---- */

:is(.innovation-workspace, .innovation-admin) .iw-run__segs {
  list-style: none;
  margin: 6px 0 0;
  padding: 6px 0 0;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

:is(.innovation-workspace, .innovation-admin) .iw-run__seg {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  min-width: 0;
}

:is(.innovation-workspace, .innovation-admin) .iw-run__seg-name {
  flex: 0 0 38%;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

:is(.innovation-workspace, .innovation-admin) .iw-run__seg-stat {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

:is(.innovation-workspace, .innovation-admin) .iw-run__seg.is-error .iw-run__seg-stat {
  color: var(--red-ink);
}

/* ---- Polish wave 2026-08-21b ---------------------------------------------
 * Five items: the black header slab, the usage percentage, the sidebar's
 * scroll behaviour, forms behind dialogs, and the recommended-startup badges. */

/* §1 Usage. Clients agreed to a workspace, not to a bill — they see the share
 * of the month's budget spent, and staff get the amounts in the tooltip. */
:is(.innovation-workspace, .innovation-admin) .iw-usage {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  flex: none;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--wash);
  font-size: var(--fs-meta);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  cursor: default;
}

:is(.innovation-workspace, .innovation-admin) .iw-usage__pct {
  font-size: var(--fs-ui);
  font-weight: 650;
  color: var(--teal-ink);
}

:is(.innovation-workspace, .innovation-admin) .iw-usage.is-warn {
  border-color: var(--amber-line);
  background: var(--amber-wash);
}

:is(.innovation-workspace, .innovation-admin) .iw-usage.is-warn .iw-usage__pct { color: var(--amber-ink); }

:is(.innovation-workspace, .innovation-admin) .iw-usage.is-over {
  border-color: var(--red-line);
  background: var(--red-wash);
}

:is(.innovation-workspace, .innovation-admin) .iw-usage.is-over .iw-usage__pct { color: var(--red-ink); }

/* §2 Sidebar: a bounded card, not a sticky column.
 *
 * The previous model — position:sticky, max-height:100vh, overflow-y:auto,
 * overscroll-behavior:contain — is what made scrolling feel broken. A column
 * taller than the viewport pins at the top with its own end unreachable, and
 * `contain` stops the wheel from chaining to the page once the inner scroller
 * bottoms out, so the wheel does nothing until the pointer is moved off the
 * sidebar.
 *
 * Instead the card takes the grid row's height, which the map card sets, and
 * splits into fixed tab strip / one scrolling panel / fixed foot. The card is
 * never taller than the map beside it, so page scrolling below it is never
 * interrupted, and the one nested scroller is a visibly bounded box. */
/* display:contents so the frame's two panels and the foot join .iw-sidecard's
 * flex column directly instead of stacking inside an extra box the flex
 * algorithm would have to size. */
:is(.innovation-workspace, .innovation-admin) #innovation-topic-sidebar { display: contents; }

:is(.innovation-workspace, .innovation-admin) .iw-tab {
  flex: 1 1 0;
  padding: 7px 8px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: var(--radius-ctl) var(--radius-ctl) 0 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
}

:is(.innovation-workspace, .innovation-admin) .iw-tab:hover { color: var(--teal-ink); }

:is(.innovation-workspace, .innovation-admin) .iw-tab.is-active {
  color: var(--teal-ink);
  border-bottom-color: var(--teal-ink);
  background: white;
}

:is(.innovation-workspace, .innovation-admin) .iw-tab:focus-visible {
  outline: 2px solid var(--teal-ink);
  outline-offset: -2px;
}

/* :has(), not :not(:empty) — a dismissed notice is still in the DOM, and
 * :not(:empty) would leave an empty bordered strip behind it. */
:is(.innovation-workspace, .innovation-admin) .iw-run[hidden] { display: none; }

:is(.innovation-workspace, .innovation-admin) .iw-run__label {
  flex: 1 1 auto;
  min-width: 0;
}

/* base.css gives every <button> a grey chip; this is a glyph. */
:is(.innovation-workspace, .innovation-admin) .iw-run__dismiss {
  flex: none;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--text-faint);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

:is(.innovation-workspace, .innovation-admin) .iw-run__dismiss:hover { color: var(--text); }

/* Two lines maximum before the disclosure takes over. A raw API error runs to
 * several hundred characters and used to print in full, right here. */
:is(.innovation-workspace, .innovation-admin) .iw-run__meta {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

:is(.innovation-workspace, .innovation-admin) .iw-run__detail { margin-top: 4px; }

:is(.innovation-workspace, .innovation-admin) .iw-run__detail summary { font-size: 12px; }

:is(.innovation-workspace, .innovation-admin) .iw-run__error {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

/* §3 Dialogs. base.css sizes every dialog for the full-screen image previewer
 * (`dialog[open] { height: 100vh; width: 90vw }`); these are forms, so they
 * size to their content and cap out.
 *
 * height must be `fit-content`, not `auto`. A modal dialog gets
 * `position: fixed; inset: 0` from the UA stylesheet, so `auto` is
 * over-constrained and stretches to the viewport before max-height clamps it —
 * a 425px form rendered in a 720px box with 300px of white below the button.
 * `fit-content` is what the UA's own dialog rule uses, and what base.css
 * replaced. */
:is(.innovation-workspace, .innovation-admin) .iw-dialog-wrap { margin-top: 8px; }

:is(.innovation-workspace, .innovation-admin) dialog.iw-dialog,
:is(.innovation-workspace, .innovation-admin) dialog.iw-dialog[open] {
  width: min(460px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  height: fit-content;
  max-height: min(80vh, 720px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-pop);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: var(--fs-body-sm);
  overflow: hidden;
}

:is(.innovation-workspace, .innovation-admin) dialog.iw-dialog--wide,
:is(.innovation-workspace, .innovation-admin) dialog.iw-dialog--wide[open] {
  width: min(620px, calc(100vw - 32px));
}

:is(.innovation-workspace, .innovation-admin) dialog.iw-dialog::backdrop {
  background: rgba(17, 24, 39, .38);
}

:is(.innovation-workspace, .innovation-admin) .iw-dialog__panel {
  display: flex;
  flex-direction: column;
  max-height: inherit;
}

:is(.innovation-workspace, .innovation-admin) .iw-dialog__head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
  padding: 14px 18px;
  border-bottom: 1px solid var(--teal-rule);
}

:is(.innovation-workspace, .innovation-admin) .iw-dialog__head h2 {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--ink);
}

/* base.css gives every <button> a grey chip; the × is a glyph. */
:is(.innovation-workspace, .innovation-admin) .iw-dialog__close {
  flex: none;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--text-faint);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

:is(.innovation-workspace, .innovation-admin) .iw-dialog__close:hover { color: var(--text); }

:is(.innovation-workspace, .innovation-admin) .iw-dialog__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 18px 18px;
}

:is(.innovation-workspace, .innovation-admin) .iw-dialog__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

/* button_to wraps its button in a form, which would otherwise sit on its own
 * line and push the primary action down. */
:is(.innovation-workspace, .innovation-admin) .iw-dialog__destroy { margin: 0; }

:is(.innovation-workspace, .innovation-admin) .iw-dialog__actions > :last-child { margin-left: auto; }

:is(.innovation-workspace, .innovation-admin) .iw-dialog__split {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 4px;
  font-size: var(--fs-meta);
  color: var(--text-faint);
}

:is(.innovation-workspace, .innovation-admin) .iw-dialog__split::before,
:is(.innovation-workspace, .innovation-admin) .iw-dialog__split::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--line-soft);
}

/* Labelled fields, so a dialog reads as a form rather than a stack of boxes. */
:is(.innovation-workspace, .innovation-admin) .iw-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

:is(.innovation-workspace, .innovation-admin) .iw-field__label {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

:is(.innovation-workspace, .innovation-admin) .iw-field__hint {
  font-size: var(--fs-meta);
  color: var(--text-faint);
}

/* Fields fill the dialog; buttons do not. input[type=submit] has to be excluded
 * explicitly or the actions row stretches every button to full width and
 * `margin-left: auto` on the primary has nothing left to push against — which
 * also stacks Delete and Save badly in the edit-topic dialog. */
:is(.innovation-workspace, .innovation-admin) .iw-dialog
  :is(input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]), select, textarea) {
  width: 100%;
  box-sizing: border-box;
  font-size: var(--fs-body-sm);
  padding: 8px 10px;
}

:is(.innovation-workspace, .innovation-admin) .iw-dialog textarea {
  line-height: 1.45;
  resize: vertical;
}

/* The proposal review list, now that it has room to be legible. */
:is(.innovation-workspace, .innovation-admin) .iw-proposal {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}

:is(.innovation-workspace, .innovation-admin) .iw-proposal__fields {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
}

/* §4 Full-width sidebar buttons and the "there is something to review" cue. */
:is(.innovation-workspace, .innovation-admin) .iw-btn--block {
  display: flex;
  width: 100%;
}

:is(.innovation-workspace, .innovation-admin) .iw-btn--attn {
  border-color: var(--amber-line);
  background: var(--amber-wash);
  color: var(--amber-ink);
  font-weight: 650;
}

:is(.innovation-workspace, .innovation-admin) .iw-control {
  border: 1px solid var(--line);
  border-radius: var(--radius-ctl);
  background: white;
  color: var(--text);
  max-width: 220px;
}

/* The sidebar's suggestion hovercards are positioned outside their clipped
 * panels. The map overrides these rules with its docked profile bar below. */
.iw-hovercard {
  position: fixed;
  z-index: 60;
  width: 280px;
  max-width: calc(100vw - 16px);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: white;
  box-shadow: var(--shadow-pop);
  font-family: var(--font-ui);
  font-size: var(--fs-meta);
  color: var(--text);
  pointer-events: none;
}

.iw-hovercard[hidden] { display: none; }

/* The map bar is in normal card flow, directly below the SVG. Its height is
   FIXED -- 196px on a desktop card whatever it holds (empty, a hover, a pin, a preview) -- so the
   map card, and the sidebar pinned to it, never move as the pointer crosses
   the map. The height is sized to the worst real content: a pinned under-review
   member with a website, the Move picker, Approve, Open reader and Full
   profile in its actions column, and a misfit's two-line placement rows over
   Keep here / Move to. Nothing in it relies on the overflow clip: the columns
   clamp their own text, and the system tests assert every control is inside.

   flex-grow 1 takes up the card's slack: this card sizes the grid row ~20px
   taller than its content (see the long comment above
   `.iw-map-card { height: 100% }`), and that slack used to show as a strip of
   the map's teal wash under the bar. The basis, not the grown size, is what
   the card contributes to the row, so growing cannot feed back into it.

   The bar is a size container: its columns follow the CARD's width, which
   the viewport alone does not give (the sidebar takes 340px of it above
   980px and none below). Because a container cannot size itself by its own
   width, the fixed height is set on the three panes (empty, primary,
   preview) -- one value per width band, the same in every state -- and the
   bar is their height plus its padding. */
:is(.innovation-workspace, .innovation-admin) .iw-map-bar {
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  flex: 1 0 auto;
  width: 100%;
  max-width: none;
  min-width: 0;
  height: auto;
  padding: 12px 14px 10px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: var(--wash);
  box-shadow: none;
  pointer-events: auto;
  overflow: hidden;
  container: iw-map-bar / inline-size;
}

:is(.innovation-workspace, .innovation-admin) .iw-map-bar.is-locked {
  border-top-color: var(--teal-ink);
}

:is(.innovation-workspace, .innovation-admin) .iw-map-bar__empty {
  display: flex;
  align-items: center;
  height: 173px;
  color: var(--text-muted);
  font-size: var(--fs-ui);
}

:is(.innovation-workspace, .innovation-admin) .iw-map-bar__empty[hidden],
:is(.innovation-workspace, .innovation-admin) .iw-map-bar__primary[hidden],
:is(.innovation-workspace, .innovation-admin) .iw-map-bar__preview[hidden] { display: none; }

/* Four columns -- who, most similar, placement, actions -- each a full-height
   ledger column. The identity column is three stacked items (head, a ghost's
   origin line, blurb) in the three auto rows; every other column spans all
   four rows, and because that span crosses the flexible last row the grid
   sizes the auto rows from the identity column alone. That is what keeps the
   blocks beside the head starting at the top rather than below it.

   Placement gets as much room as the identity: its rows are sentences with
   segment names in them, and Most similar's names ellipsize happily. The
   actions column keeps a floor wide enough for two small buttons abreast. */
:is(.innovation-workspace, .innovation-admin) :is(.iw-map-bar__primary, .iw-map-bar__preview) {
  display: grid;
  grid-template-columns:
    [ident] minmax(0, 1.3fr)
    [similar] minmax(0, .8fr)
    [place] minmax(0, 1.25fr)
    [act] minmax(15rem, 1.15fr);
  grid-template-rows: auto auto auto minmax(0, 1fr);
  column-gap: 14px;
  height: 173px;
  overflow: hidden;
}

/* Previewing another mark while one is pinned: said in the actions column,
   which a preview never fills, so the profile itself stays exactly where the
   pinned one was. */
:is(.innovation-workspace, .innovation-admin) .iw-map-bar__preview-label {
  grid-column: act;
  grid-row: 1 / -1;
  align-self: stretch;
  padding-left: 14px;
  border-left: 1px solid var(--line-soft);
  line-height: 1.35;
  color: var(--text-muted);
  font-size: var(--fs-meta);
}

/* ---- The dwell ring and the locked card's action area ---------------------
   The ring fills over the 2 seconds the client has to hold still, in the card's
   top-right corner: the one place a progress indicator can sit without moving
   anything else in a card whose height changes with every startup. Rotated so
   the fill starts at twelve o'clock rather than at three. */
.iw-hovercard__dwell {
  flex: none;
  margin-left: auto;
  width: 22px;
  height: 22px;
  transform: rotate(-90deg);
}

.iw-hovercard__dwell-track,
.iw-hovercard__dwell-bar {
  fill: none;
  stroke-width: 3;
}

.iw-hovercard__dwell-track { stroke: var(--pill-track); }

/* The ring's GEOMETRY is not here: innovation_map_controller writes both the
   dash (the r=8 circumference, 2πr = 50.27) and the offset, frame by frame,
   off the same clock as the lock timer — see its tickDwell. This file supplies
   the ink and nothing else.

   It used to be `animation: iw-dwell 2s linear forwards`, with a
   prefers-reduced-motion override that replaced it with a static
   `stroke-dashoffset: 25`. That override is the bug it looked like a courtesy:
   this ring is a PROGRESS indicator, not decorative motion, and a client with
   animations off got a ring that opened half drawn, never moved, and snapped
   full at the lock — which says "stuck" about the one thing that is running.
   Progress fills in every case; the preference is honoured by filling it in
   quarter steps instead of continuously (DWELL_REDUCED_STEPS), which is a
   reduction in motion rather than a refusal to say anything.

   The values below are the EMPTY ring, and they are the fallback for the one
   frame between the card being built and the first rAF landing — never a
   resting state. Full-at-lock is likewise the controller's (setDwellProgress),
   not an `.is-locked` rule: an inline style is what it writes, and no
   stylesheet rule could beat it anyway. */
.iw-hovercard__dwell-bar {
  stroke: var(--teal-ink);
  stroke-dasharray: 50.27;
  stroke-dashoffset: 50.27;
}

/* The hint line under the card's content: what holding still will do, and then
   what has happened. It stays in muted ink once locked: the bar's teal top rule
   already carries the state, and teal on text that cannot be pressed would say
   the line is a link. */
.iw-hovercard__hint {
  margin-top: 8px;
  font-size: var(--fs-meta);
  color: var(--text-faint);
}

/* Empty until the fragment lands, so it draws no rule and takes no room:
   :empty is what keeps an unlocked card exactly the size it was before step 3
   added this element to every one of them. */
.iw-hovercard__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line-soft);
  font-size: var(--fs-meta);
}

.iw-hovercard__actions:empty {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

/* A row wraps rather than starving the select: the card is 280px and a segment
   name can be long, so the buttons drop under the picker instead of the picker
   shrinking to an arrow. Forms are rows too — the card's controls are split
   across two forms that post to two different endpoints (see panel/_card), and
   `margin: 0` is what stops base.css's form margin opening a gap between
   them. */
.iw-hovercard__row,
.iw-hovercard__form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
}

/* Holds hidden fields and a CSRF token and nothing else — the buttons that
   submit it live in a row below and name it through `form=`. */
.iw-hovercard__form--carrier { display: none; }

/* One one-click "Move to <segment>" per segment, all hidden until the map
   controller reveals the one its fit arithmetic names. [hidden] has to be
   restated: .iw-hovercard__form's display:flex would otherwise beat it. */
.iw-card__fit-move[hidden] { display: none; }

.iw-hovercard__lbl {
  flex: none;
  font-size: var(--fs-meta);
  color: var(--text-muted);
  letter-spacing: 0;
}

/* The picker takes the room the buttons do not, down to a floor that still
   shows a name rather than an ellipsis. */
:is(.innovation-workspace, .innovation-admin) .iw-map-bar .iw-control {
  flex: 1 1 110px;
  min-width: 0;
  height: 26px;
  padding: 0 24px 0 8px;
  font-size: var(--fs-meta);
  font-weight: 400;
  letter-spacing: 0;
}

.iw-hovercard__site { overflow-wrap: anywhere; }

:is(.innovation-workspace, .innovation-admin) .iw-map-bar a { color: var(--teal-ink); }

/* "Already turned down for this topic." — a decision made somewhere else while
   this card was open. A line, never a form: the point is that there is nothing
   left to press. */
.iw-hovercard__done {
  margin: 0;
  color: var(--text-muted);
}

.iw-hovercard__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

/* The map bar's avatar, at the head's left: the same logo-or-initials pair
   .iw-avatar draws beside a startup in the sidebar, sized for a card head
   rather than a list row. */
.iw-hovercard__logo,
.iw-hovercard__initials {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

/* `contain`, so a wide wordmark is letterboxed rather than cropped, on the
   map's own wash so the letterbox is not a white void; the hairline is what
   keeps a white-on-white logo from dissolving into the card. */
.iw-hovercard__logo {
  object-fit: contain;
  border: 1px solid var(--line);
  background: var(--teal-wash);
}

/* No logo: the startup's initials on the darkest step of its TOPIC's hue ramp
   (--iw-hue-<h>-s0), which the controller sets inline from the palette. Two
   letters are text, so this disc owes 4.5:1 and cannot take the decorative
   licence the palette block above takes for the dots: every hue's s0 clears
   11.7:1 against wash-coloured letters (worst is aqua, 11.77), while the
   segment shades the dots wear run out to OKLCH L 0.74 and would have put a
   startup in a topic's THIRD segment -- s2, the ramp's light end -- at about
   2:1. The declared background is
   --ink, so a token that failed to resolve leaves the letters readable rather
   than white on white. */
.iw-hovercard__initials {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  font-size: 11px;
  font-weight: 650;
  color: var(--teal-wash);
}

.iw-hovercard__name {
  font-size: var(--fs-ui);
  font-weight: 650;
  color: var(--ink);
}

.iw-hovercard__meta {
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text-muted);
}

.iw-hovercard__summary {
  margin: 0;
  line-height: 1.5;
  color: var(--text-muted);
  /* A long summary should not become a wall in a hover card. */
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- The map's docked profile bar ------------------------------------------ */
:is(.innovation-workspace, .innovation-admin) .iw-map-bar .iw-hovercard__head {
  grid-column: ident;
  grid-row: 1;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
}

:is(.innovation-workspace, .innovation-admin) .iw-map-bar .iw-hovercard__ident {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding-top: 1px;
}

/* Name and meta clamp at two lines each (the title attribute carries the
   rest), so a long topic · segment pair cannot eat the blurb's room. */
:is(.innovation-workspace, .innovation-admin) .iw-map-bar :is(.iw-hovercard__name, .iw-hovercard__meta) {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

:is(.innovation-workspace, .innovation-admin) .iw-map-bar .iw-hovercard__name {
  font-size: var(--fs-body-sm);
  line-height: 1.25;
}

/* Secondary to the name: no rule under it any more (the sections below carry
   their own), and --text-muted rather than faint so it clears 4.5:1. */
:is(.innovation-workspace, .innovation-admin) .iw-map-bar .iw-hovercard__meta {
  padding: 0;
  margin: 0;
  border: 0;
  line-height: 1.35;
  color: var(--text-muted);
}

/* A ghost's "Found by Claude" / "Suggested from our database" line. */
:is(.innovation-workspace, .innovation-admin) .iw-map-bar .iw-hovercard__origin {
  grid-column: ident;
  grid-row: 2;
  margin: 4px 0 0;
  color: var(--text-muted);
}

:is(.innovation-workspace, .innovation-admin) .iw-map-bar .iw-hovercard__summary {
  grid-column: ident;
  grid-row: 3;
  margin-top: 6px;
  font-size: var(--fs-ui);
  line-height: 1.35;
  color: var(--text);
  -webkit-line-clamp: 4;
}

.iw-hovercard__similar,
.iw-hovercard__place {
  margin: 0;
  padding: 0 0 0 12px;
  border: 0;
  border-left: 1px solid var(--line-soft);
}

/* The three right-hand columns: full height, top-aligned, each opened by the
   same hairline and a head on one shared baseline. */
:is(.innovation-workspace, .innovation-admin) .iw-map-bar :is(.iw-hovercard__similar, .iw-hovercard__place, .iw-map-bar__act) {
  grid-row: 1 / -1;
  align-self: stretch;
  min-width: 0;
  padding-left: 14px;
  border-left: 1px solid var(--line-soft);
}

:is(.innovation-workspace, .innovation-admin) .iw-map-bar .iw-hovercard__similar { grid-column: similar; }
:is(.innovation-workspace, .innovation-admin) .iw-map-bar .iw-hovercard__place { grid-column: place; }
:is(.innovation-workspace, .innovation-admin) .iw-map-bar .iw-map-bar__act {
  grid-column: act;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* The DESIGN.md group-label recipe (700, 0.6875rem, .06em, uppercase), in
   --text-muted: at this size --text-faint is 3.4:1 on white. */
.iw-hovercard__section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* One line box for every column's head -- the two eyebrows and the actions
   column's hint -- so the three read along a single baseline. */
:is(.innovation-workspace, .innovation-admin) .iw-map-bar :is(.iw-hovercard__section-head, .iw-hovercard__hint) {
  min-height: 16px;
  margin: 0 0 4px;
  line-height: 16px;
}

.iw-hovercard__similar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content max-content;
  align-items: center;
  gap: 6px;
  line-height: 1.6;
  color: var(--text);
}

.iw-hovercard__similar-name {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--teal-ink);
  font: inherit;
  line-height: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-align: left;
  text-transform: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.iw-hovercard__similar-pct {
  flex: none;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.iw-hovercard__similar-status {
  color: var(--text-muted);
  font-size: var(--fs-meta);
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: none;
  white-space: nowrap;
}

/* Most similar is a bounded, independently scrollable list: its controls
   must remain reachable without making the fixed-height profile bar taller. */
:is(.innovation-workspace, .innovation-admin) .iw-map-bar .iw-hovercard__similar {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

:is(.innovation-workspace, .innovation-admin) .iw-map-bar .iw-hovercard__similar-list {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
  overflow-y: auto;
}

/* The server-rendered carrier moves here while it is open. It is a child of
   the Most similar column, never of the scrolling list (which would clip it),
   spans the column inside its 14px hairline gutter, and the JS sets `top` to
   sit under its row, or over it when the bar has no room below. */
.iw-hovercard__similar-popover {
  position: absolute;
  z-index: 3;
  left: 14px;
  right: 0;
  box-sizing: border-box;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-item);
  background: var(--wash);
  box-shadow: var(--shadow-pop);
}

.iw-hovercard__similar-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.iw-hovercard__similar-form .iw-control { flex: 1 1 100%; }

/* A suggestion in the list (a ghost's line, not a member's link): the name
   goes muted and a small "Suggested" tag in the ghost ring's dashed outline
   says so in words. The tag takes a second line under the name rather than a
   slot beside it -- the Most similar column is the bar's narrowest, and a tag
   on the name's line truncated the name to a couple of letters. */
.iw-hovercard__similar-row.is-ghost {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content max-content;
  column-gap: 12px;
  row-gap: 0;
}

.iw-hovercard__similar-row.is-ghost .iw-hovercard__similar-name { color: var(--text-muted); }
.iw-hovercard__similar-row.is-ghost .iw-hovercard__similar-pct { grid-row: 1; grid-column: 2; }
.iw-hovercard__similar-row.is-ghost .iw-hovercard__similar-status { grid-row: 1; grid-column: 3; }

.iw-hovercard__similar-tag {
  grid-row: 2;
  grid-column: 1;
  justify-self: start;
  margin-bottom: 2px;
  padding: 0 5px;
  border: 1px dashed var(--text-muted);
  border-radius: 999px;
  font-size: 0.6875rem;
  line-height: 1.35;
  color: var(--text-muted);
}

/* The placement block: label | value rows that line up down the block. The
   rows are subgrids of the block so "Placed in", "Better fit" and "Weak for
   this topic" share one label column; the fixed 7.5rem is the fallback for a
   browser without subgrid. The head, the no-vector note and the buttons span
   both columns. */
.iw-hovercard__place {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 2px;
}

.iw-hovercard__place > .iw-hovercard__section-head,
.iw-hovercard__place-note,
.iw-hovercard__place > .iw-card__fit-actions { grid-column: 1 / -1; }

.iw-hovercard__place-row {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  grid-template-columns: subgrid;
  line-height: 1.5;
}

.iw-hovercard__place-label { color: var(--text-muted); }

.iw-hovercard__place-value {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

/* In the bar each row is a sentence -- "Placed in Radar · 77%" -- that wraps
   under its own label. The label column above sized itself to the widest
   label ("Weak for this topic"), which in a column this narrow left a
   segment name 70px to wrap into; as running text it gets the full width.
   Two lines at most (the row's title carries a longer name whole). */
:is(.innovation-workspace, .innovation-admin) .iw-map-bar .iw-hovercard__place {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

:is(.innovation-workspace, .innovation-admin) .iw-map-bar .iw-hovercard__place-row {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

:is(.innovation-workspace, .innovation-admin) .iw-map-bar .iw-hovercard__place-label { margin-right: .35em; }

/* A misfit's signal, on the two elements that carry it and nowhere else:
   amber is the "a decision is owed here" colour (5.2:1 on white). */
.iw-hovercard__place-flag,
.iw-hovercard__place-row.is-better .iw-hovercard__place-label { color: var(--amber-ink); }

.iw-hovercard__place-row.is-better .iw-hovercard__place-value { font-weight: 600; }

/* Keep here was pressed: committed-green, the confirmed/committed colour. */
.iw-hovercard__place-row.is-confirmed .iw-hovercard__place-value { color: var(--green-ink); }

.iw-hovercard__place-note { color: var(--text-muted); }

/* The locked card's Move to / Keep here / Undo, moved here from the action
   area by the map controller (placeFitActions). */
.iw-hovercard__place > .iw-card__fit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

/* In the bar: one row, always. Keep here and Undo keep their size; the one
   Move to gives way, its segment name ellipsized (its title has it whole). */
:is(.innovation-workspace, .innovation-admin) .iw-map-bar .iw-hovercard__place > .iw-card__fit-actions {
  flex-wrap: nowrap;
  margin-top: 6px;
}

:is(.innovation-workspace, .innovation-admin) .iw-map-bar .iw-card__fit-actions > .iw-hovercard__form { flex: none; }
:is(.innovation-workspace, .innovation-admin) .iw-map-bar .iw-card__fit-actions > .iw-card__fit-move { flex: 0 1 auto; min-width: 0; }

:is(.innovation-workspace, .innovation-admin) .iw-map-bar .iw-card__fit-move .iw-btn {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The actions column's hint: "Click to pin", then "Pinned · Esc to let go". */
:is(.innovation-workspace, .innovation-admin) .iw-map-bar .iw-hovercard__hint {
  flex: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-muted);
}

/* Rows of small controls that wrap as the column narrows: the website, the
   Move picker, then Approve / Open reader / Full profile side by side. No
   rule above it: the column's hairline and the hint already open it. */
:is(.innovation-workspace, .innovation-admin) .iw-map-bar .iw-hovercard__actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

:is(.innovation-workspace, .innovation-admin) .iw-map-bar .iw-hovercard__actions:empty { display: none; }

:is(.innovation-workspace, .innovation-admin) .iw-map-bar .iw-hovercard__actions :is(.iw-hovercard__row, .iw-hovercard__form) {
  min-width: 0;
  gap: 6px;
}

/* A Claude find's verdict form: "Into" and the picker share the first line,
   Approve and Reject the second, rather than Reject wrapping on its own. */
:is(.innovation-workspace, .innovation-admin) .iw-map-bar .iw-hovercard__form:has(> .iw-hovercard__lbl) > .iw-control {
  flex-basis: calc(100% - 3rem);
}

/* A row's own button_to forms sit inline with its buttons. */
:is(.innovation-workspace, .innovation-admin) .iw-map-bar .iw-hovercard__actions .iw-hovercard__row > .iw-hovercard__form { flex: none; }

:is(.innovation-workspace, .innovation-admin) .iw-map-bar .iw-hovercard__actions .iw-btn { white-space: nowrap; }

:is(.innovation-workspace, .innovation-admin) .iw-map-bar .iw-hovercard__actions .iw-hovercard__site {
  line-height: 1.4;
}

/* The link is the ellipsis box, not its row: a clipped link whose own box ran
   on past the column would be a target the pointer can reach but not see. */
:is(.innovation-workspace, .innovation-admin) .iw-map-bar .iw-hovercard__site > a {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Where a mark has no Most similar block (no links) or no placement block (a
   ghost, a startup with no fit), the identity widens into the empty track
   rather than leaving a hole; the actions column never moves. Wide and middle
   bands only -- the narrow band below has no such tracks. */
@container iw-map-bar (min-width: 701px) {
  :is(.innovation-workspace, .innovation-admin) :is(.iw-map-bar__primary, .iw-map-bar__preview):not(:has(> .iw-hovercard__similar))
    > :is(.iw-hovercard__head, .iw-hovercard__origin, .iw-hovercard__summary) { grid-column: ident / place; }

  :is(.innovation-workspace, .innovation-admin) :is(.iw-map-bar__primary, .iw-map-bar__preview):not(:has(> .iw-hovercard__similar)):not(:has(> .iw-hovercard__place))
    > :is(.iw-hovercard__head, .iw-hovercard__origin, .iw-hovercard__summary) { grid-column: ident / act; }

  /* A ghost has a Most similar block and no placement: the list takes the
     placement track too rather than leaving it empty. */
  :is(.innovation-workspace, .innovation-admin) :is(.iw-map-bar__primary, .iw-map-bar__preview):not(:has(> .iw-hovercard__place))
    > .iw-hovercard__similar { grid-column: similar / act; }
}

/* Middle band, ~730-890px of card (a 1100-1270px window): Most similar gives
   up its column -- the map already draws those neighbours as the lit lines
   around the pinned dot -- and placement and the actions keep theirs. */
@container iw-map-bar (max-width: 860px) {
  :is(.innovation-workspace, .innovation-admin) :is(.iw-map-bar__primary, .iw-map-bar__preview) {
    grid-template-columns:
      [ident] minmax(0, 1.2fr)
      [place] minmax(0, 1.1fr)
      [act] minmax(14rem, 1.1fr);
  }

  :is(.innovation-workspace, .innovation-admin) .iw-map-bar .iw-hovercard__similar { display: none; }
}

/* Middle band only: with Most similar gone, a card with no placement either
   (a ghost) widens its identity into the empty placement track, as the wide
   band does for a card with neither. Not below 701px, where the bar is two
   columns and `act` is the actions' own. */
@container iw-map-bar (min-width: 701px) and (max-width: 860px) {
  :is(.innovation-workspace, .innovation-admin) :is(.iw-map-bar__primary, .iw-map-bar__preview):not(:has(> .iw-hovercard__place))
    > :is(.iw-hovercard__head, .iw-hovercard__origin, .iw-hovercard__summary) { grid-column: ident / act; }
}

/* Narrow band, under ~730px of card (a window near 1024px, or a one-column
   page on a small screen): three columns would leave placement ~130px, so
   the bar goes to two -- the profile with its placement verdict under it, and
   the actions beside -- and takes a taller fixed height for it. The blurb
   drops to two lines and the meta to one (the segment it would name is in
   the placement line right below). */
@container iw-map-bar (max-width: 700px) {
  :is(.innovation-workspace, .innovation-admin) :is(.iw-map-bar__primary, .iw-map-bar__preview) {
    grid-template-columns: [ident] minmax(0, 1fr) [act] minmax(13rem, 1fr);
    height: 250px;
  }

  :is(.innovation-workspace, .innovation-admin) .iw-map-bar__empty { height: 250px; }

  :is(.innovation-workspace, .innovation-admin) .iw-map-bar .iw-hovercard__meta { -webkit-line-clamp: 1; }
  :is(.innovation-workspace, .innovation-admin) .iw-map-bar .iw-hovercard__summary { -webkit-line-clamp: 2; }

  :is(.innovation-workspace, .innovation-admin) .iw-map-bar .iw-hovercard__place {
    grid-column: ident;
    grid-row: 4;
    align-self: start;
    margin-top: 8px;
    padding: 8px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line-soft);
  }
}

.iw-hovercard .iw-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: contain;
  background: var(--teal-wash);
  flex: none;
}

.iw-run__seg.is-skipped { opacity: .6; }
.iw-run__seg.is-skipped .iw-run__seg-stat { font-style: italic; }

/* Task 2 (2026-08-24): settings page (guidance + default filters). It is
 * neither a .iw-dialog nor inside .iw-side, so its inputs get their own copy
 * of the shared "full-width form control" rule those two already carry
 * (§ dialog rule, § sidebar rule above) rather than a new visual vocabulary -
 * same padding/font-size as the dialog version. */
:is(.innovation-workspace, .innovation-admin) .iw-settings__body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
  max-width: 640px;
}

:is(.innovation-workspace, .innovation-admin) .iw-settings
  :is(input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]), select, textarea) {
  width: 100%;
  box-sizing: border-box;
  font-size: var(--fs-body-sm);
  padding: 8px 10px;
}

:is(.innovation-workspace, .innovation-admin) .iw-settings textarea {
  line-height: 1.45;
  resize: vertical;
}

:is(.innovation-workspace, .innovation-admin) .iw-settings__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

/* Task 7: read-only lead/viewer roster on the settings page. Two columns on
 * wide viewports, stacked on narrow ones — same breakpoint-free approach as
 * the rest of this stylesheet (flex-wrap, not a media query). */
:is(.innovation-workspace, .innovation-admin) .iw-roster {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

:is(.innovation-workspace, .innovation-admin) .iw-roster__group {
  flex: 1 1 220px;
  min-width: 0;
}

:is(.innovation-workspace, .innovation-admin) .iw-roster__heading {
  font-size: var(--fs-body-sm);
  font-weight: 600;
  margin: 0 0 8px;
}

:is(.innovation-workspace, .innovation-admin) .iw-roster__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

:is(.innovation-workspace, .innovation-admin) .iw-roster__member {
  font-size: var(--fs-body-sm);
  overflow-wrap: anywhere;
}

/* Why these two `order`s exist. The Topics panel is rendered OUTSIDE and BEFORE
 * turbo-frame#innovation-topic-sidebar (innovation_workspace/show.html.erb),
 * while the stepper is the frame's first child — and the frame is
 * display:contents, so all of them are siblings in .iw-sidecard's flex column
 * in DOM order. Without an explicit order the Topics panel therefore PRECEDES
 * the stepper, and on the tab the page opens on the strip drops to the bottom
 * of the card (measured: stepper top 828 vs panel top 276). Pinning the tab
 * strip and the stepper ahead of everything else puts the strip below the tabs
 * and above the panels on every tab, whatever the DOM order. Everything else
 * stays at the default order 0 and so keeps DOM order, which is what leaves
 * .iw-sidecard__foot last. */
:is(.innovation-workspace, .innovation-admin) .iw-stage {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

:is(.innovation-workspace, .innovation-admin) .iw-stage__head {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

:is(.innovation-workspace, .innovation-admin) .iw-stage__title {
  margin: 0;
  font-size: var(--fs-ui);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--teal-rule);
  padding-bottom: 3px;
}

:is(.innovation-workspace, .innovation-admin) .iw-stage__note {
  font-size: var(--fs-meta);
  color: var(--text-muted);
}

/* The "Where should we start?" group is a fieldset (a <header> or a bare <h*>
 * would inherit the app nav's black slab), and nothing in this app resets the
 * element — focus_areas.css styles its own fieldset rather than the bare tag.
 * Strip the UA groove border, padding and inline margin so the group stacks
 * like every other .iw-field, and clear min-inline-size: min-content or the
 * longest radio label sets the dialog's width. */
:is(.innovation-workspace, .innovation-admin) .iw-dialog fieldset.iw-field {
  border: 0;
  margin: 0;
  padding: 0;
  min-inline-size: 0;
}

:is(.innovation-workspace, .innovation-admin) .iw-dialog fieldset.iw-field > legend {
  padding: 0;
  margin-bottom: 4px;
}

/* Radio rows in the new-topic dialog. The .iw-side input rule already excludes
 * [type=radio], so these stay their natural size instead of stretching. */
:is(.innovation-workspace, .innovation-admin) .iw-radio {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px;
  align-items: start;
  padding: 3px 0;
  font-size: var(--fs-body-sm);
}

/* ws-polish: the Web search form (runs/_form) as one form. Option rows share
   a recipe (control, label, one quiet line); groups are separated by space,
   not rules; the limit reads as a summary block; the footer holding the
   estimate, Cancel and Start stays in view while the body scrolls. Plain
   <label>s inherited base.css's 1.125rem legacy label type. */
:is(.innovation-workspace, .innovation-admin) dialog.iw-dialog--run,
:is(.innovation-workspace, .innovation-admin) dialog.iw-dialog--run[open] { width: min(520px, calc(100vw - 32px)); }
.innovation-workspace .iw-dialog--run .iw-dialog__body { padding-bottom: 0; }
.innovation-workspace .iw-runform { display: flex; flex-direction: column; gap: 18px; font-family: var(--font-ui); }
.innovation-workspace .iw-runform :is(p, fieldset) { margin: 0; }
.innovation-workspace .iw-runform fieldset.iw-field { gap: 2px; border: 0; padding: 0; min-inline-size: 0; }
.innovation-workspace .iw-runform fieldset.iw-field > legend { padding: 0; margin-bottom: 6px; }
.innovation-workspace .iw-option { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; align-items: start; margin: 0; padding: 6px 8px; border-radius: var(--radius-ctl); font-size: var(--fs-body-sm); font-weight: 400; line-height: 1.3; letter-spacing: normal; text-transform: none; color: var(--text); cursor: pointer; }
.innovation-workspace .iw-option:hover { background: var(--wash); }
.innovation-workspace .iw-option:has(> input:checked) { background: var(--teal-wash); }
.innovation-workspace .iw-option:has(> input:disabled) { cursor: default; opacity: .6; }
.innovation-workspace .iw-option:has(> input:disabled):hover { background: none; }
.innovation-workspace .iw-option > input[type] { width: 14px; height: 14px; min-width: 0; margin: 2px 0 0; padding: 0; transform: none; accent-color: var(--teal-ink); }
.innovation-workspace .iw-option__text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.innovation-workspace .iw-option__title { font-weight: 600; color: var(--ink); }
.innovation-workspace .iw-option__line { font-size: var(--fs-meta); color: var(--text-muted); }
.innovation-workspace .iw-option--check { padding-block: 4px; }
.innovation-workspace .iw-option--check:has(> input:checked) { background: none; }
.innovation-workspace .iw-option--check:has(> input:checked):hover { background: var(--wash); }
.innovation-workspace .iw-runform__segments { display: flex; flex-direction: column; margin: 4px 0 0 26px; padding-left: 8px; border-left: 2px solid var(--line-soft); }
.innovation-workspace .iw-runform__segments[hidden] { display: none; }
.innovation-workspace .iw-runform p.iw-runform__lineage { margin: 2px 0 0; padding-left: 34px; }
.innovation-workspace .iw-runform .iw-field__hint { line-height: 1.4; }
.innovation-workspace .iw-runform__group > .iw-field__hint:last-child { margin-top: 4px; padding-left: 8px; }
.innovation-workspace .iw-runform__cost { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: var(--radius-item); background: var(--wash); }
.innovation-workspace .iw-runform__summary { font-size: var(--fs-body-sm); line-height: 1.4; color: var(--ink); }
.innovation-workspace .iw-runform__notice { font-size: var(--fs-meta); color: var(--amber-ink); }
.innovation-workspace .iw-runform :is(.iw-runform__notice, .iw-runform__error, .iw-runform__lineage):empty { display: none; }
.innovation-workspace .iw-runform__more > summary { width: fit-content; font-size: var(--fs-ui); font-weight: 600; color: var(--teal-ink); cursor: pointer; }
.innovation-workspace .iw-runform__more > summary:hover { color: var(--teal-ink-hover); }
.innovation-workspace .iw-runform__more > summary:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 2px; border-radius: var(--radius-ctl); }
.innovation-workspace .iw-runform__optional { margin-left: 6px; font-weight: 400; color: var(--text-faint); }
.innovation-workspace .iw-runform__more-body { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; padding-left: 12px; border-left: 2px solid var(--line-soft); }
.innovation-workspace .iw-runform__more-body label.iw-field { font-size: var(--fs-body-sm); font-weight: 400; }
.innovation-workspace .iw-runform__enable { padding-inline: 0; }
.innovation-workspace .iw-runform__enable:has(> input:checked) { background: none; }
.innovation-workspace dialog .iw-runform__foot { position: sticky; bottom: 0; z-index: 1; margin: 0 -18px; padding: 12px 18px 14px; border-top: 1px solid var(--line-soft); background: white; }
.innovation-workspace .iw-runform__status { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.innovation-workspace .iw-runform__estimate { font-size: var(--fs-ui); font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.innovation-workspace .iw-runform__error { font-size: var(--fs-meta); color: var(--red-ink); }
.innovation-workspace .iw-runform__foot > .iw-btn { flex: none; white-space: nowrap; }
.innovation-workspace .iw-runform__foot > .iw-btn:last-child { margin-left: 0; }
/* Cancel closes the dialog; the plain page (runs/new) has none to close. */
.innovation-workspace .iw-runform__cancel { display: none; }
.innovation-workspace dialog .iw-runform__cancel { display: inline-flex; }

/* §5.3 Research findings. A question groups its claims; the claim column is
 * minmax(0,1fr) inside a plain block, never a grid track next to an `auto`
 * one — an `auto` (max-content) sibling would take the whole 320px column and
 * starve the text, which is exactly what made the suggestion rows unreadable. */
:is(.innovation-workspace, .innovation-admin) .iw-question {
  margin-top: 10px;
}

/* §6.6 The live count while a pass runs. Its own line under the run meta, so
 * a growing number never reflows the status line beside it. */
:is(.innovation-workspace, .innovation-admin) .iw-run__found {
  display: block;
  font-size: var(--fs-meta);
  color: var(--teal-ink);
  font-variant-numeric: tabular-nums;
}

/* The seamless-only candidate ledger (W3). Admin-scoped, and deliberately NOT
   .iw-cand* — that prefix belongs to the client-facing Review panel in the
   same stylesheet. Every colour is a design_tokens.css custom property; no
   literal is minted here. */
.innovation-admin .iw-led-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 12px;
}

/* No background of its own: .iw-card sets none either, so the ledger rows sit
   on the same surface as every other card body rather than minting a #fff. */
.innovation-admin .iw-led {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-item);
  margin-bottom: 8px;
}

/* Flex, not grid: a grid whose track list ends in `auto` gives the name column
   nothing, because `auto` is max-content and the meta line takes it all. That
   is what made the suggestion rows invisible in the second polish pass. */
.innovation-admin .iw-led__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  padding: 8px 10px;
  cursor: pointer;
}

.innovation-admin .iw-led__name {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 700;
}

.innovation-admin .iw-led__badge,
.innovation-admin .iw-led__meta {
  flex: 0 0 auto;
}

/* The one outcome that is a flag rather than a fact. */
.innovation-admin .iw-led__badge[data-outcome="created_possible_duplicate"] {
  background: var(--amber-wash);
  border-color: var(--amber-line);
  color: var(--amber-ink);
}

.innovation-admin .iw-led__meta {
  font-size: var(--fs-meta);
  color: var(--text-muted);
}

.innovation-admin .iw-led__body {
  padding: 0 10px 10px;
  border-top: 1px solid var(--line-soft);
}

.innovation-admin .iw-led__facts td {
  vertical-align: top;
}

.innovation-admin .iw-led__facts .is-conflict :is(.iw-led__claude, .iw-led__current) {
  background: var(--amber-wash);
}

.innovation-admin .iw-led__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 8px 0 12px;
}

.innovation-admin .iw-led__relink {
  border-top: 1px dashed var(--line);
  padding-top: 10px;
}

.innovation-admin .iw-field--check {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* §5.5 + §6.6 The triage popups. Both suggestion lists — Database matches and
 * Review candidates — render their rows in a wide <dialog> instead of the
 * 320px sidebar column, which could hold a name, a percentage and forty
 * characters of summary and nothing a decision could be made on.
 *
 * The .iw-match* and .iw-cand* blocks above are the sidebar row versions these
 * replaced. Nothing renders them any more; they are kept per the never-delete
 * rule, alongside the .iw-suggest* block that went the same way. */

/* Wider than --wide (620px), which is sized for a form: a row here is a
 * checkbox, an avatar, a name, a summary and a segment select on one line. */
:is(.innovation-workspace, .innovation-admin) .iw-dialog__sub {
  flex: none;
  font-size: var(--fs-meta);
  color: var(--text-faint);
}

/* The form owns the panel's whole column below the head, so the scrolling body
 * and the sticky foot are inside ONE form and a single submit carries every
 * ticked row. min-height: 0 is what makes the body scroll instead of the
 * dialog growing past its max-height. */
:is(.innovation-workspace, .innovation-admin) .iw-triage {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
}

/* flex-wrap, never a grid whose track list ends in `auto`: at a narrow width
 * the segment select drops onto its own line instead of starving the summary
 * to zero — the trap that made the old sidebar rows unreadable. */
:is(.innovation-workspace, .innovation-admin) .iw-triage-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}

:is(.innovation-workspace, .innovation-admin) .iw-triage-row.is-decided { opacity: 0.6; }

/* === Map filter controls === */
.iw-filter-wrap { position: relative; pointer-events: auto; }
.iw-filters { position: absolute; left: 0; top: calc(100% + 8px); z-index: 4; display: grid; grid-template-columns: 1fr 1fr; grid-auto-flow: row dense; gap: 8px; width: 22rem; padding: 12px; background: white; border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-pop); pointer-events: auto; }
/* The UA [hidden] trap: author display rules override it. */
.iw-filters[hidden] { display: none; }
.iw-filters label { display: grid; gap: 4px; margin: 0; color: var(--ink); font-size: var(--fs-ui); }
.iw-filters label:nth-child(1), .iw-filters label:nth-child(3), .iw-filters__foot { grid-column: 1 / -1; }
.iw-filters input, .iw-filters select { width: 100%; }
.iw-filters label > span { display: flex; gap: 8px; }
.iw-filters__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--text-muted); font-size: var(--fs-ui); }
.iw-node.is-filtered-out .iw-node__hit { pointer-events: none; cursor: default; }
.iw-node.is-filtered-out .iw-node__name { display: none; }

/* ---- Funnel strip (workspace-funnel spec §6.3) ---------------------------
 * Tokens only: bands and strokes are the teal ramp, the source bar the
 * existing segment hues. Text sizes are the mockup's, in SVG units. */
.innovation-workspace .iw-funnel { margin: 0 0 12px; }
/* ws-polish: the stat row shares the SVG's width, so its columns start
   where the bands do (x = 0, 46%, 76% of the viewBox); the left pad is the
   headings' own 8-unit inset. */
.innovation-workspace .iw-funnel__history-link { color: var(--teal-ink); font-size: var(--fs-meta); font-weight: 600; text-transform: none; text-decoration: none; white-space: nowrap; }
.innovation-workspace .iw-funnel__history-link:hover { color: var(--teal-ink-hover); text-decoration: none; text-decoration-color: var(--teal-rule); text-underline-offset: 2px; }
.innovation-workspace .iw-history-dialog .iw-dialog__head { border-bottom: 2px solid var(--teal-rule); }
.innovation-workspace .iw-history-dialog h2 { text-transform: uppercase; }
.innovation-workspace .iw-history__summary { margin: 0; font-size: var(--fs-meta); color: var(--text-muted); }
.innovation-workspace .iw-history__table td { vertical-align: top; }
.innovation-workspace .iw-history__table { font-variant-numeric: tabular-nums; }
.innovation-workspace .iw-history__empty { color: var(--text-muted); }
.innovation-workspace .iw-history a[aria-current="page"] { border-color: var(--teal-ink); }
/* The shared actions row pushes its last child right (a primary button);
 * the history filter row and pager stay compact groups on the left. */
.innovation-workspace .iw-history .iw-dialog__actions > :last-child { margin-left: 0; }
/* Six columns do not fit the shared 620px wide dialog: the table scrolled
 * sideways and the dates broke across lines. History alone gets more room. */
.innovation-workspace dialog.iw-history-dialog,
.innovation-workspace dialog.iw-history-dialog[open] { width: min(880px, calc(100vw - 32px)); }
/* base.css paints bare links in the retired pale teal; history rows use ink teal. */
.innovation-workspace .iw-history__table a { color: var(--teal-ink); }
.innovation-workspace .iw-history__table a:hover { color: var(--teal-ink-hover); }
.innovation-workspace .iw-history__table td:first-child a { overflow-wrap: anywhere; }
.innovation-workspace .iw-history__table td:nth-last-child(3),
.innovation-workspace .iw-history__table td:last-child { white-space: nowrap; }
/* The workspace focus ring (see .iw-btn:focus-visible) on history's links. */
.innovation-workspace .iw-funnel__history-link:focus-visible,
.iw-shell .iw-layers__history:focus-visible,
.innovation-workspace .iw-history__table a:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 2px; }

/* ws-polish: the way into Passed (list headers, Board review): a quiet,
   clearly pressable control rather than a large underlined link. The funnel
   writes its own as a plain count (.iw-funnel__history-link). */
.innovation-workspace .iw-passed-link { display: inline-flex; align-items: center; height: 22px; box-sizing: border-box; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--radius-ctl); background: white; font-family: var(--font-ui); font-size: var(--fs-meta); font-weight: 600; line-height: 1; letter-spacing: normal; text-transform: none; color: var(--teal-ink); text-decoration: none; white-space: nowrap; font-variant-numeric: tabular-nums; cursor: pointer; transition: border-color .15s ease-out; }
.innovation-workspace .iw-passed-link:hover { border-color: var(--teal-ink); color: var(--teal-ink-hover); }
.innovation-workspace .iw-passed-link:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 2px; }

/* === T2 (spec 2026-09-24 §7): the shell — tabs, head, navigation, canvas grid, map foot === */
.innovation-workspace.iw-shell {
  --iw-map-w: 44%;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 0 var(--iw-map-w);
  grid-template-areas:
    "tabs tabs tabs"
    "head head head"
    "steps steps steps"
    "work split map"
    "foot foot foot"
    "below below below";
  grid-template-rows: auto auto auto clamp(28rem, calc(100vh - 17rem), 60rem) auto auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  font-variant-numeric: tabular-nums;
}
.iw-shell .iw-region { display: contents; }
.iw-shell .iw-work { grid-area: work; container: iw-work / inline-size; min-width: 0; overflow: auto; padding: 14px 20px 20px; }
.iw-shell .iw-split { grid-area: split; }
.iw-shell .iw-map-pane { grid-area: map; container: iw-mapbar / inline-size; position: relative; min-width: 0; min-height: 0; overflow: hidden; display: flex; flex-direction: column; background: var(--wash); border-left: 1px solid var(--line-soft); }
/* The map card's own rules (.iw-map-card) no longer apply: the pane is the
   grid row's height and the SVG letterboxes inside the stage
   (preserveAspectRatio). The drawer section below (§7.6) positions the
   stage and the drawer absolutely. */
.iw-shell .iw-map-pane .iw-map-stage { flex: 1 1 auto; min-height: 0; }
.iw-shell .iw-map-pane svg.iw-map { height: 100%; }
/* The profile bar keeps its content height; the stage, not the bar, takes
   the pane's slack (the bar's own flex-grow served the old map card). */
.iw-shell .iw-map-pane .iw-map-bar { flex: none; }
/* The divider's presets are inert until the innovation-split controller
   ships (Task 8, whose section re-shows them). */
.iw-shell .iw-maptools { display: none; }
.iw-shell .iw-below { grid-area: below; padding: 16px 20px 20px; border-top: 1px solid var(--line-soft); }
.iw-shell .iw-below .iw-sec__head { padding-bottom: 8px; margin-bottom: 12px; border-bottom: 2px solid var(--teal-rule); }
.iw-shell .iw-below .iw-sec__head h2 { margin: 0; font-size: 0.9375rem; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink); }
.iw-shell .iw-map-toggle[hidden] { display: none; }

/* Research and Pipeline: full width, no divider, no map (mockup MAP_STEPS). */
.iw-shell[data-iw-map="off"] { grid-template-columns: minmax(0, 1fr) 0 0; grid-template-rows: auto auto auto auto auto auto; }
.iw-shell[data-iw-map="off"] :is(.iw-split, .iw-map-pane) { display: none; }
.iw-shell[data-iw-map="off"] .iw-work { overflow: visible; }

/* Whole workspace (the platform overview, spec §7.5): a ~250px topic column
   (the work area, scrolling inside itself) beside the all-topic map, no
   divider; the pipeline section (below) and the facts strip (strip) full
   width beneath. The map row is fixed: about what the retired view=map page
   gave the map, capped at 40rem so the section beneath is in reach. Under
   760px the column stacks above the map (the Platform overview block). */
.iw-shell[data-iw-scope="workspace"] {
  grid-template-columns: 250px 0 minmax(0, 1fr);
  grid-template-areas:
    "tabs tabs tabs"
    "head head head"
    "steps steps steps"
    "work split map"
    "foot foot foot"
    "below below below"
    "strip strip strip";
  grid-template-rows: auto auto auto clamp(32rem, calc(100vh - 17rem), 40rem) auto auto auto;
}
.iw-shell[data-iw-scope="workspace"] .iw-split { display: none; }

/* The Map page (A3b spec §10.5, iw_map_mode "full"): the map fills the
   shell, as on the whole workspace; the work pane and the divider leave. */
.iw-shell[data-iw-map="full"] { grid-template-columns: 0 0 minmax(0, 1fr); }
.iw-shell[data-iw-map="full"] :is(.iw-work, .iw-split) { display: none; }
.iw-shell[data-iw-map="full"] .iw-map-pane { border-left: 0; }
/* What the Map page renders instead of a work pane (workspace/_step): its
   sr-only heading and, after a refused decision, the links to where the
   companies are, in the foot row beneath the map. The stale-results link
   stays hidden here, as it was with the work pane hidden. */
.iw-shell .iw-mapfoot { grid-area: foot; min-width: 0; }
.iw-shell .iw-mapfoot > .iw-decision-destinations { padding: 8px 20px; border-top: 1px solid var(--line-soft); background: var(--wash); }
.iw-shell .iw-mapfoot > .iw-stale { display: none; }

/* The stacked (< 560px canvas) layout is Task 8's, with the divider controller that sets it. */

/* Tabs (mockup .tabs/.ttab). */
.iw-shell .iw-tabbar { grid-area: tabs; display: flex; align-items: stretch; padding-inline: 10px; background: var(--wash); border-bottom: 1px solid var(--line); border-radius: var(--radius-card) var(--radius-card) 0 0; }
/* overflow-y hidden, and the box reaches 1px over the strip's bottom rule so
   the selected tab (top: 1px) covers that rule instead of forcing a
   vertical scrollbar. */
.iw-shell .iw-tabbar__scroll { display: flex; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; overflow-y: hidden; margin-bottom: -1px; padding-top: 8px; scrollbar-width: thin; }
.iw-shell .iw-ttab { flex: none; display: grid; gap: 3px; min-width: 150px; max-width: 230px; padding: 7px 14px 8px; position: relative; top: 1px; text-decoration: none; text-align: left; border: 1px solid transparent; border-bottom: 0; border-radius: var(--radius-item) var(--radius-item) 0 0; transition: background-color 0.15s ease-out; }
.iw-shell .iw-ttab:hover { background: white; }
.iw-shell .iw-ttab[aria-selected="true"] { background: white; border-color: var(--line); box-shadow: inset 0 2px 0 var(--teal-ink); }
.iw-shell .iw-ttab:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: -2px; }
.iw-shell .iw-ttab__name { font-size: var(--fs-ui); font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iw-shell .iw-ttab[aria-selected="false"] .iw-ttab__name { color: var(--text-muted); }
.iw-shell .iw-ttab__line { font-size: var(--fs-meta); color: var(--text-muted); line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iw-shell .iw-tabbar__end { flex: none; display: flex; align-items: center; gap: 12px; padding: 8px 6px 0 14px; }
.iw-shell .iw-tabbar__end .iw-usage { margin: 0; }

/* Header (mockup .head). */
.iw-shell .iw-head { grid-area: head; display: flex; flex-direction: column; gap: 8px; padding: 12px 20px 8px; min-width: 0; }
.iw-shell .iw-head__row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.iw-shell .iw-head__title { margin: 0; font-size: 0.9375rem; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iw-shell .iw-head__sub { font-size: var(--fs-meta); color: var(--text-faint); }
/* Staff only: which org this is, a meta line leading the title row. */
.iw-shell .iw-head__org { flex: 0 1 auto; max-width: 16rem; padding-right: 12px; border-right: 1px solid var(--line-soft); font-size: var(--fs-meta); line-height: 1.35; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Staff on a shared platform: the org cue opens a menu of the platform's members. */
.iw-shell .iw-head__orgs { position: relative; flex: 0 1 auto; min-width: 0; }
.iw-shell summary.iw-head__org { display: list-item; cursor: pointer; list-style-position: inside; color: var(--teal-ink); border-radius: var(--radius-ctl); }
.iw-shell .iw-head__org-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.iw-shell summary.iw-head__org:hover { color: var(--teal-ink-hover); }
.iw-shell summary.iw-head__org:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 2px; }
.iw-shell .iw-head__org-menu { position: absolute; left: 0; top: calc(100% + 6px); z-index: 60; width: 15rem; max-width: calc(100vw - 40px); max-height: 20rem; overflow-y: auto; padding: 6px; background: white; border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-pop); }
.iw-shell .iw-head__org-menu-title { margin: 0; padding: 4px 8px; font-size: var(--fs-meta); color: var(--text-muted); }
.iw-shell .iw-head__org-menu ul { margin: 0; padding: 0; list-style: none; }
.iw-shell .iw-head__org-menu a { display: block; padding: 6px 8px; font-size: var(--fs-ui); color: var(--ink); text-decoration: none; border-radius: var(--radius-ctl); }
.iw-shell .iw-head__org-menu a:hover { background: var(--teal-wash); color: var(--teal-ink-hover); }
.iw-shell .iw-head__org-menu a[aria-current="true"] { font-weight: 700; color: var(--teal-ink); }
.iw-shell .iw-head__add .iw-add { margin: 0; }
.iw-shell .iw-head__run { display: block; min-width: 0; max-width: 28rem; }
.iw-shell .iw-head__run .iw-run { margin: 0; }
/* ws-polish: one line, one height, for the tab bar's end and the title row.
   The causes, not nudges: .iw-dialog-wrap's 8px top margin (the retired
   sidebar's stacking gap) pushed every dialog trigger (New topic, Edit topic,
   Add startup) below the plain links beside it; a <button> takes base.css's
   bold, tracked button type while the Settings <a> did not; and the title h2
   fell back to the legacy h2 face. Every control here is a 26px box in the
   label type. The run-status card, when there is one, takes its own full-
   width line under the title (the width of the funnel box below it), so it
   neither leaves a dead band beside a one-line title nor squeezes the title
   into an ellipsis; the title truncates only when it alone outruns the row. */
.iw-shell .iw-head__row { flex-wrap: wrap; row-gap: 8px; }
.iw-shell .iw-head__id { display: flex; align-items: center; gap: 12px; flex: 0 1 auto; min-width: 0; max-width: 100%; min-height: 26px; }
.iw-shell .iw-head__row > .iw-head__run { flex: 1 1 100%; max-width: none; }
.iw-shell .iw-head__row > .iw-head__run:empty { display: none; }
.iw-shell .iw-head__id > :is(.iw-dialog-wrap, .iw-head__add) { flex: none; }
.iw-shell .iw-head__title { font-family: var(--font-ui); line-height: 1.2; }
.iw-shell :is(.iw-tabbar__end, .iw-head__id, .iw-head__add .iw-add) > .iw-dialog-wrap { margin-top: 0; }
.iw-shell :is(.iw-tabbar__end, .iw-head__id, .iw-head__add .iw-add) > .iw-dialog-wrap > .iw-btn,
.iw-shell .iw-tabbar__end > .iw-btn {
  height: 26px; box-sizing: border-box; padding-block: 0;
  font-family: var(--font-ui); font-size: var(--fs-meta); font-weight: 600; letter-spacing: normal; line-height: 1; white-space: nowrap;
}
.iw-shell .iw-tabbar__end .iw-usage { height: 26px; box-sizing: border-box; padding-block: 0; align-items: center; font-family: var(--font-ui); }
.iw-shell .iw-tabbar__end .iw-usage__pct { font-size: var(--fs-meta); }
/* B6: a lab's way back to its Rounds (quiet, like its neighbours), ruled off
   from the staff controls after it. */
.iw-shell .iw-tabbar__end > .iw-tabbar__rounds:not(:last-child) { border-right: 1px solid var(--line-soft); border-radius: 0; padding-right: 12px; }
/* A button's inline-flex drops the space between its label and ~N¢ chip. */
.iw-shell .iw-btn:has(> .iw-btn__est) { gap: 6px; }

/* A3b (spec §10.5): the Define / Review / Overview navigation, in the
   steps grid area (tracked group labels, a teal underline on
   the current page, plain grey counts). Seven entries fit a canvas, so the
   groups wrap rather than scroll on a narrow one. While a Suggestions list
   shows, Suggestions keeps a lighter underline (is-group-current) and its
   sources row is a quieter full-width line under the groups. */
.iw-shell .iw-nav { grid-area: steps; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0 16px; padding: 0 20px; border-bottom: 1px solid var(--line); min-width: 0; }
.iw-shell .iw-nav__group { display: flex; flex-direction: column; gap: 1px; flex: none; }
.iw-shell .iw-nav__label { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); padding-left: 4px; white-space: nowrap; }
.iw-shell .iw-nav__row { display: flex; }
.iw-shell .iw-nav__item { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px 8px; font-size: var(--fs-ui); font-weight: 600; color: var(--text-muted); white-space: nowrap; text-decoration: none; border-bottom: 2px solid transparent; transition: color 0.15s ease-out; }
.iw-shell .iw-nav__item:hover { color: var(--ink); }
.iw-shell .iw-nav__item[aria-current="step"] { color: var(--ink); border-bottom-color: var(--teal-ink); }
.iw-shell .iw-nav__item.is-group-current { color: var(--ink); border-bottom-color: var(--teal-rule); }
.iw-shell .iw-nav__item:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: -2px; }
.iw-shell .iw-nav__count { font-size: var(--fs-meta); font-weight: 400; color: var(--text-muted); }
.iw-shell .iw-nav__div { width: 1px; flex: none; align-self: stretch; margin: 14px 0 8px; background: var(--line-soft); }
.iw-shell .iw-nav__sources { flex: 1 0 100%; display: flex; gap: 2px; min-width: 0; padding-left: 12px; overflow-x: auto; border-top: 1px solid var(--line-soft); scrollbar-width: thin; }
.iw-shell .iw-nav__sources .iw-nav__item { padding: 5px 10px 6px; font-size: var(--fs-meta); }
@media (prefers-reduced-motion: reduce) {
  .iw-shell .iw-nav__item { transition: none; }
}
/* The Brief page: the topic's scope and search focus, read-only, at a
   reading measure. */
.iw-shell .iw-brief-page__part { max-width: 70ch; }
.iw-shell .iw-brief-page__title { margin: 0 0 4px; font-family: var(--font-ui); font-size: var(--fs-ui); font-weight: 700; letter-spacing: normal; text-transform: none; color: var(--ink); }
.iw-shell .iw-brief-page__text p { margin: 0 0 6px; color: var(--text); }
.iw-shell .iw-brief-page__edit { margin: 0; font-size: var(--fs-meta); color: var(--text-faint); }

/* Buttons the prototype needs that the file lacks. */
.iw-shell .iw-btn--quiet,
.iw-shell .iw-stale a { color: var(--text-muted); }
.iw-shell .iw-btn--quiet:hover,
.iw-shell .iw-stale a:hover { color: var(--ink); }

/* ws-polish: drawn separators. Overpass sets the middle-dot glyph with almost
   no advance, so " · " prints as " ·x" wherever it is typed. .iw-sep wraps a
   typed " · " (kept for the text and for assertions) and draws the dot
   instead; .iw-sepline draws one between its children. */
.innovation-workspace .iw-sep { display: inline-block; width: 15px; font-size: 0; line-height: 0; text-align: center; vertical-align: middle; }
.innovation-workspace .iw-sep::before,
.innovation-workspace .iw-sepline > * + *::before { content: ""; display: inline-block; width: 3px; height: 3px; border-radius: var(--radius-pill); background: currentColor; opacity: .55; vertical-align: middle; }
.innovation-workspace .iw-sepline > * + *::before { margin: 0 6px; }

@media (prefers-reduced-motion: reduce) {
  .iw-shell .iw-ttab { transition: none; }
}

/* === T2 (spec 2026-09-24 §7.3–§7.4): Board review === */
/* The canvases' shared section head and state dot. Task 5's canvas section
   was to introduce these; Board review lands first (sub-batch A1), so they
   are defined here once and Task 5 reuses them. */
.iw-shell .iw-sec { display: flex; flex-direction: column; gap: 10px; }
.iw-shell .iw-sec__head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; padding-bottom: 8px; border-bottom: 2px solid var(--teal-rule); }
.iw-shell .iw-sec__head :is(h2, h3) { margin: 0; font-size: 0.875rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink); }
.iw-shell .iw-sec__acts { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.iw-shell .iw-dot { width: 8px; height: 8px; border-radius: var(--radius-pill); display: inline-block; flex: none; background: var(--iw-dot, var(--iw-hue-none)); }
/* === T2 (spec 2026-09-24 §7.4): Segments and Web search canvases === */
/* .iw-sec, .iw-sec__head, .iw-sec__acts and .iw-dot* are the Board review
   banner's (defined once there). This section adds the chip variant, the
   proposal strip, segment cards, the passes table and the all-decided block
   the Database and Review lists reuse. */
.iw-shell .iw-chip--also { background: var(--teal-wash); color: var(--teal-ink); border-color: var(--teal-rule); text-transform: none; letter-spacing: 0; }
.iw-shell .iw-sec__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 4px; }
.iw-shell .iw-propose { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 12px; background: white; border: 1px solid var(--line); border-radius: var(--radius-item); font-size: var(--fs-ui); color: var(--text); }
.iw-shell .iw-propose__text { margin: 0; flex: 1 1 18rem; }
.iw-shell .iw-propose .iw-proposals { margin: 0; }
/* Segments: background re-sort / assessment progress lines (2026-11-12). */
.iw-shell .iw-segprogress { display: grid; gap: 4px; }
.iw-shell .iw-segprogress p { margin: 0; }
.iw-shell .iw-segcards { display: grid; grid-template-columns: 1fr; gap: 10px; }
@container iw-work (min-width: 560px) { .iw-shell .iw-segcards { grid-template-columns: 1fr 1fr; } }
.iw-shell .iw-segcard { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 12px 14px; background: white; border: 1px solid var(--line-soft); border-radius: var(--radius-item); }
.iw-shell .iw-segcard.is-proposed { border-style: dashed; border-color: var(--line); }
.iw-shell .iw-segcard__top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.iw-shell .iw-segcard__name { min-width: 0; font-weight: 700; color: var(--ink); font-size: var(--fs-ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iw-shell .iw-segcard__edit { margin-left: auto; flex: none; }
.iw-shell .iw-segcard__sum { margin: 0; font-weight: 300; font-size: var(--fs-body-sm); line-height: 1.5; color: var(--text); max-width: 70ch; }
.iw-shell .iw-segcard__meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: var(--fs-meta); color: var(--text-faint); }
.iw-shell .iw-segcard__meta b { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.iw-shell .iw-segcard__list summary { width: fit-content; font-size: var(--fs-meta); font-weight: 600; color: var(--teal-ink); cursor: pointer; }
.iw-shell .iw-segcard__list summary:hover { color: var(--teal-ink-hover); }
.iw-shell .iw-segcard__list summary:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 2px; border-radius: var(--radius-ctl); }
.iw-shell .iw-segcard__list ul { margin: 6px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; font-size: var(--fs-meta); color: var(--text); }
.iw-shell .iw-segcard__list li { display: flex; justify-content: space-between; gap: 8px; min-width: 0; }
.iw-shell .iw-segcard__member { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iw-shell .iw-segcard__fit { flex: none; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.iw-shell .iw-passes { width: 100%; border-collapse: collapse; font-size: var(--fs-ui); font-variant-numeric: tabular-nums; }
.iw-shell .iw-passes th { text-align: left; padding: 6px; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); border-bottom: 1px solid var(--line); }
.iw-shell .iw-passes td { padding: 8px 6px; border-bottom: 1px solid var(--line-soft); color: var(--text); }
.iw-shell .iw-passes .iw-num { text-align: right; }
/* ws-polish: Web search history, one entry per search (it replaced an
   eleven-column table that overflowed the split canvas). Head line, a row of
   figures that wraps by width, then scope, depth and lineage beside the
   Finish action. */
.iw-shell .iw-searches { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-family: var(--font-ui); font-variant-numeric: tabular-nums; }
.iw-shell .iw-search { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: var(--radius-item); background: white; scroll-margin-top: 12px; }
.iw-shell .iw-search:target { border-color: var(--teal-ink); }
.iw-shell .iw-search__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.iw-shell .iw-search__n { font-size: var(--fs-ui); font-weight: 700; color: var(--ink); }
.iw-shell .iw-search__when { font-size: var(--fs-meta); color: var(--text-muted); }
.iw-shell .iw-search__stop { margin-left: auto; padding: 0 7px; border-radius: var(--radius-pill); background: var(--pill-track); font-size: 0.6875rem; font-weight: 600; line-height: 1.6; color: var(--text-muted); white-space: nowrap; }
.iw-shell .iw-search__figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr)); gap: 6px 12px; margin: 0; }
.iw-shell .iw-search__figures > div { min-width: 0; }
.iw-shell .iw-search__figures > .iw-search__fig--prose { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 8px; }
.iw-shell .iw-search__figures > .iw-search__fig--prose dd { margin: 0; font-size: var(--fs-meta); font-weight: 400; color: var(--text-muted); }
.iw-shell .iw-search__figures dt { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); }
.iw-shell .iw-search__figures dd { margin: 1px 0 0; font-size: 0.9375rem; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.iw-shell .iw-search__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding-top: 8px; border-top: 1px solid var(--line-soft); }
.iw-shell .iw-search__meta { flex: 1 1 16rem; margin: 0; font-size: var(--fs-meta); color: var(--text-muted); }
.iw-shell .iw-search__meta > span { white-space: nowrap; }
.iw-shell .iw-search__focus { flex: 1 1 100%; margin: 0; font-size: var(--fs-meta); color: var(--text-muted); overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.iw-shell .iw-search__meta a { color: var(--teal-ink); font-weight: 600; text-decoration: none; }
.iw-shell .iw-search__meta a:hover { color: var(--teal-ink-hover); text-decoration: none; }
.iw-shell .iw-search__finish { margin: 0 0 0 auto; }
.iw-shell .iw-search__finish .iw-btn { white-space: nowrap; }
/* === T2 (spec 2026-09-24 §7.3–§7.4): decision lists (Database, Review web finds) === */
/* One grid per row, reflowed by container query on iw-work: a table above
   640px, compact (segment under the name) at 461–640px, stacked at 460px and
   below. The head's selection count and the over-cap notice come from the
   popup this replaces (innovation_triage_controller). */
.iw-shell .iw-dl { display: flex; flex-direction: column; margin: 0; }
.iw-shell .iw-dl__row {
  display: grid; align-items: start; gap: 4px 12px; padding: 9px 6px; border-bottom: 1px solid var(--line-soft);
  grid-template-columns: 18px minmax(0, 1fr) 150px 48px auto;
  grid-template-areas: "chk who seg fit act";
  cursor: pointer; transition: background-color 0.15s ease-out;
}
.iw-shell .iw-dl__row:hover, .iw-shell .iw-dl__row.is-sel { background: var(--teal-wash); }
.iw-shell .iw-dl__row:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: -2px; }
/* 461–640px: segment under the name, header segment column hidden. */
@container iw-work (max-width: 640px) {
  .iw-shell .iw-dl__row { grid-template-columns: 18px minmax(0, 1fr) 44px auto; grid-template-areas: "chk who fit act" ". seg . ."; }
  }
/* ≤ 460px: stacked, header hidden, actions full width under the row. */
@container iw-work (max-width: 460px) {
  .iw-shell .iw-dl__row { grid-template-columns: 18px minmax(0, 1fr) auto; grid-template-areas: "chk who fit" ". seg seg" ". act act"; padding-block: 11px; }
  }
@media (prefers-reduced-motion: reduce) {
  .iw-shell .iw-dl__row { transition: none; }
}

/* === T2 (spec 2026-09-24 §7.11): the navigation owner — stale-canvas link === */
/* A finished run spared a dirty canvas: one quiet link in the step's own
   header, pushed to its right end. */
.iw-shell .iw-stale { margin-left: auto; font-size: var(--fs-meta); }
.iw-shell .iw-stale a { color: var(--teal-ink); text-decoration: none; text-underline-offset: 2px; }
.iw-shell .iw-stale a:hover { color: var(--teal-ink-hover); }
.iw-shell .iw-work > .iw-stale { display: block; margin: 0 0 10px; }

/* === T2 (spec 2026-09-24 §7.5): map step tag and key === */
/* The tag rides in the map toolbar beside Filter (where the crumb was); the
   key sits bottom left in the stage, opposite the hint. Both are keys to
   what is drawn, so neither takes the pointer from the map beneath. */
.iw-shell .iw-maptag { padding: 3px 10px; font-size: var(--fs-meta); line-height: 1.35; color: var(--text-muted); background: white; border: 1px solid var(--line-soft); border-radius: var(--radius-pill); box-shadow: var(--shadow-card); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.iw-shell .iw-maptag[hidden], .iw-shell .iw-mapkey[hidden] { display: none; }
.iw-shell .iw-mapkey { position: absolute; left: 12px; bottom: 12px; z-index: 1; display: flex; flex-wrap: wrap; gap: 4px 6px; max-width: calc(100% - 24px); font-size: var(--fs-meta); color: var(--text-muted); pointer-events: none; }
.iw-shell .iw-mapkey__item { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; background: white; border: 1px solid var(--line-soft); border-radius: var(--radius-ctl); }
/* The source steps' third tier (graph.js STEP_OTHER_SOURCE): the ghost marks
   drawn faint. Not the map's own 0.15 -- a 16px swatch at that ink is a blank
   on white -- but visibly a step below the step's own suggestion marks. */
.iw-shell .iw-mapkey__item.is-faint svg { opacity: .4; }
.iw-shell .iw-mapkey__dot { width: 9px; height: 9px; border-radius: var(--radius-pill); background: var(--iw-dot); display: inline-block; }
/* A board-status key: the map's look in miniature -- a neutral dot (the
   segment's fill, which the key does not claim), a hairline of white, then
   the status ring (graph.js STATUS_RING_WIDTH). */
.iw-shell .iw-mapkey__dot.is-ring { width: 7px; height: 7px; margin: 0 2px; background: var(--iw-hue-none); box-shadow: 0 0 0 1px white, 0 0 0 3px var(--iw-dot); }
/* The hint moves above the key's row when both are shown. */
.iw-shell .iw-map-stage:has(.iw-mapkey:not([hidden])) .iw-map-hint { bottom: 40px; }
/* The toolbar stops short of the graph legend (top right, at most 232px),
   so the tag ellipsizes instead of running under it. */
.iw-shell .iw-map-stage:has(.iw-map-legend:not([hidden])) .iw-map-toolbar { right: 256px; }
/* The hint (bottom right) stops short of the legend the same way, and wraps
   rather than running under it (Mark, 2026-11-04). */
.iw-shell .iw-map-stage:has(.iw-map-legend:not([hidden])) .iw-map-hint { right: 256px; left: 12px; text-align: right; }
/* The retained legend's one control reads at the legend's own size. */
.iw-shell .iw-map-legend__toggle { font-size: var(--fs-meta); font-weight: 500; }
/* A segment's name over its group (graph.js drawSegmentLabels): in its own
   colour, regular weight, a size under the topic title's 13px bold -- the
   topic is the heading, a segment a caption inside it (2026-09-30, shown on
   every one-topic view now, so it had to stop shouting). The wash halo keeps
   it legible across dots and lines. */
.iw-shell .iw-seg-label { font-size: 10.5px; font-weight: 400; letter-spacing: .01em; paint-order: stroke; stroke: var(--wash); stroke-width: 3px; stroke-linejoin: round; }
.iw-shell .iw-hull { cursor: pointer; }
/* paint() writes the hull stroke inline, so keyboard focus is an outline. */
.iw-shell .iw-hull:focus { outline: none; }
.iw-shell .iw-hull:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 2px; }

/* === T2 (spec 2026-09-24 §7.6): the profile drawer === */
/* The old profile bar becomes a drawer over the lower 48% of the map pane,
   opened by a pin (a dot or a row click) and closed by × or Esc. The stage
   shrinks above it; the legend, key, tag and map tools step aside. */
/* A <section>: the base stylesheet's bottom margin would leave the pane (and
   the drawer on its bottom edge) 20px short of the work pane beside it. */
.iw-shell .iw-map-pane { margin: 0; }
.iw-shell .iw-map-pane .iw-map-stage { position: absolute; inset: 0; transition: bottom 0.2s cubic-bezier(0.2, 0.8, 0.2, 1); }
.iw-shell .iw-map-pane.has-prof .iw-map-stage { bottom: 48%; }
.iw-shell .iw-map-pane.has-prof :is(.iw-map-legend, .iw-mapkey, .iw-maptag, .iw-maptools) { display: none; }
.iw-shell .iw-map-pane .iw-drawer {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  height: 48%; min-width: 0; max-width: 100%; box-sizing: border-box;
  padding: 14px 44px 14px 16px; overflow: auto; overscroll-behavior: contain;
  background: white; border: 0; border-top: 1px solid var(--line); border-radius: 0;
  box-shadow: 0 -10px 24px rgba(17, 24, 39, 0.14);
  /* The old bar's own container queries do not apply to the drawer; the
     facts query the pane (iw-mapbar) instead. */
  container: none;
}
.iw-shell .iw-map-pane .iw-drawer.is-locked { border-top-color: var(--teal-ink); }
.iw-shell .iw-map-pane:not(.has-prof) .iw-drawer { display: none; }
.iw-shell .iw-map-pane.has-prof .iw-drawer { animation: iw-drawer-up 0.22s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes iw-drawer-up { from { transform: translateY(24px); opacity: 0.4; } to { transform: none; opacity: 1; } }
.iw-shell .iw-drawer__close {
  position: absolute; top: 8px; right: 10px; width: 26px; height: 26px;
  display: grid; place-items: center; padding: 0;
  font-size: 1rem; line-height: 1; color: var(--text-muted);
  background: none; border: 1px solid transparent; border-radius: var(--radius-ctl); cursor: pointer;
}
.iw-shell .iw-drawer__close:hover { color: var(--ink); border-color: var(--line); }
.iw-shell .iw-drawer__close:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 1px; }
/* The base button display beats [hidden] without this (spec §7.12 trap). */
.iw-shell .iw-drawer__close[hidden] { display: none; }
/* One column, natural height: the old bar's four-column ledger clipped at
   narrow widths. Everything stacks, wraps and scrolls inside the drawer. */
.iw-shell .iw-map-pane .iw-drawer :is(.iw-map-bar__primary, .iw-map-bar__preview) {
  display: flex; flex-direction: column; gap: 10px;
  width: 100%; height: auto; min-width: 0; min-height: 0; overflow: visible;
}
.iw-shell .iw-map-pane .iw-drawer :is(.iw-map-bar__primary, .iw-map-bar__preview) > * {
  grid-column: auto; grid-row: auto; width: auto; min-width: 0; max-width: 100%;
  height: auto; max-height: none; overflow: visible; overflow-wrap: anywhere;
}
.iw-shell .iw-map-pane .iw-drawer [hidden] { display: none; }
/* Reading order (spec §7.6, mockup profile()): who it is, the facts and the
   actions for its state, then Most similar and the placement verdict (whose
   Keep here / Move to stay beside it). The old ledger's column rules become
   section rules. The × says how to let go, so the lock hint is not repeated. */
.iw-shell .iw-map-pane .iw-drawer :is(.iw-hovercard__similar, .iw-hovercard__place) { order: 1; padding: 10px 0 0; border-left: 0; border-top: 1px solid var(--line-soft); }
.iw-shell .iw-map-pane .iw-drawer .iw-hovercard__hint { display: none; }
.iw-shell .iw-map-pane .iw-drawer .iw-hovercard__similar { display: block; }
.iw-shell .iw-map-pane .iw-drawer .iw-map-bar__act { border: 0; padding-left: 0; }
.iw-shell .iw-map-pane .iw-drawer :is(.iw-hovercard__summary, .iw-hovercard__meta, .iw-hovercard__name) {
  display: block; -webkit-line-clamp: unset; overflow: visible;
}
.iw-shell .iw-map-pane .iw-drawer .iw-hovercard__name { font-size: var(--fs-ui); font-weight: 700; color: var(--ink); }
.iw-shell .iw-map-pane .iw-drawer .iw-hovercard__actions { min-width: 0; overflow-wrap: anywhere; }
.iw-shell .iw-map-pane .iw-drawer :is(.iw-hovercard__row, .iw-hovercard__form) { flex-wrap: wrap; }
/* Placement warnings read in neutral ink: amber is the map's decision
   signal only (spec §7.12). */
.iw-shell .iw-map-pane .iw-drawer :is(.iw-hovercard__place-flag, .iw-hovercard__place-row.is-better .iw-hovercard__place-label) { color: var(--text-muted); }
/* The facts (mockup .prof__facts): two columns, one below 340px of pane. */
.iw-shell .iw-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; margin: 4px 0 8px; }
@container iw-mapbar (max-width: 340px) { .iw-shell .iw-facts { grid-template-columns: 1fr; } }
.iw-shell .iw-facts > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.iw-shell .iw-facts > div[hidden] { display: none; }
/* --text-muted, not the mockup's faint: at this size --text-faint is 3.4:1 on white. */
.iw-shell .iw-facts dt { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.iw-shell .iw-facts dd { display: flex; align-items: center; gap: 6px; min-width: 0; margin: 0; font-size: var(--fs-ui); color: var(--ink); font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) {
  .iw-shell .iw-map-pane .iw-map-stage { transition: none; }
  .iw-shell .iw-map-pane.has-prof .iw-drawer { animation: none; }
}

/* === T2 (spec 2026-09-24 §7): the divider and stacked map === */
.iw-shell .iw-split { position: relative; z-index: 2; display: grid; place-items: center; justify-self: center; width: 9px; min-width: 0; cursor: col-resize; touch-action: none; }
.iw-shell .iw-split::before { content: ""; position: absolute; inset: 0 4px; background: var(--line); }
.iw-shell .iw-split:hover::before, .iw-shell .iw-split.is-drag::before, .iw-shell .iw-split:focus-visible::before { inset: 0 3px; background: var(--teal-ink); }
.iw-shell .iw-split:focus-visible { outline: none; }
.iw-shell .iw-split__grip { position: relative; width: 13px; height: 34px; border: 1px solid var(--line); border-radius: var(--radius-ctl); background: white; box-shadow: var(--shadow-card); }
.iw-shell .iw-split:hover .iw-split__grip, .iw-shell .iw-split.is-drag .iw-split__grip, .iw-shell .iw-split:focus-visible .iw-split__grip { border-color: var(--teal-ink); }
.iw-shell .iw-split__read { position: absolute; top: 50%; left: 14px; transform: translateY(40px); white-space: nowrap; padding: 2px 8px; font-size: var(--fs-meta); color: var(--ink); background: white; border: 1px solid var(--line); border-radius: var(--radius-ctl); box-shadow: var(--shadow-pop); pointer-events: none; }
.iw-shell .iw-split__read[hidden] { display: none; }
/* The presets sit top right, where the prototype put them, on the graph
   legend's right edge; the legend (as built, also top right) drops below
   them instead of being painted over. Sentence case: base.css uppercases
   every button. */
.iw-shell .iw-maptools { position: absolute; top: 12px; right: 12px; z-index: 2; display: flex; gap: 4px; }
.iw-shell .iw-maptools__btn { padding: 2px 8px; font-size: var(--fs-meta); font-weight: 500; line-height: 1.5; text-transform: none; letter-spacing: normal; color: var(--text-muted); background: white; border: 1px solid var(--line); border-radius: var(--radius-ctl); box-shadow: var(--shadow-card); cursor: pointer; }
.iw-shell[data-iw-scope="topic"]:not([data-iw-stacked]) .iw-map-pane .iw-map-legend--graph { top: 44px; max-height: calc(100% - 56px); }
.iw-shell .iw-maptools__btn:hover { color: var(--teal-ink); border-color: var(--teal-rule); }
.iw-shell .iw-maptools[hidden], .iw-shell .iw-maptools__btn[hidden] { display: none; }
.iw-shell[data-iw-scope="workspace"] .iw-maptools { display: none; }

/* Stacked: under 560px no split satisfies both floors (spec §7.3). Topic scope on a map step only. */
.iw-shell[data-iw-stacked][data-iw-scope="topic"][data-iw-map="on"] {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "tabs" "head" "steps" "work" "maptoggle" "map" "foot" "below";
  grid-template-rows: auto auto auto minmax(20rem, auto) auto auto auto auto;
}
.iw-shell[data-iw-stacked] .iw-split { display: none; }
.iw-shell[data-iw-stacked][data-iw-scope="topic"][data-iw-map="on"]:not([data-iw-map-open]) .iw-map-pane { display: none; }
.iw-shell[data-iw-stacked][data-iw-scope="topic"][data-iw-map="on"] .iw-map-pane { height: 24rem; border-left: 0; border-top: 1px solid var(--line-soft); }
.iw-shell[data-iw-stacked][data-iw-scope="topic"][data-iw-map="on"] .iw-maptools { display: none; }
.iw-shell .iw-map-toggle { grid-area: maptoggle; justify-self: start; margin: 8px 20px; }
.iw-shell:not([data-iw-stacked]) .iw-map-toggle, .iw-shell:is([data-iw-scope="workspace"], [data-iw-map="off"]) .iw-map-toggle { display: none; }

/* === T3 (spec 2026-09-24 §7.8): the finding row, verdicts and objection box === */
/* Prototype .fd/.verd/.fd__edit on the tokens. The form is display:contents,
   so the verdict group takes the row's second column beside the claim while
   the objection box stays under it in the first. */
.iw-shell .iw-fd { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; padding: 10px 0 12px; border-bottom: 1px solid var(--line-soft); }
.iw-shell .iw-fd > :not(.iw-fd__form) { grid-column: 1; }
.iw-shell .iw-fd__form { display: contents; }
.iw-shell .iw-fd__claim { margin: 0; font-size: 0.95rem; font-weight: 300; line-height: 1.65; color: var(--text); text-wrap: pretty; }
.iw-shell .iw-fd.is-dismissed .iw-fd__claim { color: var(--text-faint); text-decoration: line-through; text-decoration-color: var(--line); }
.iw-shell .iw-fd__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.iw-shell .iw-fd__src { font-size: var(--fs-meta); color: var(--teal-ink); text-decoration: none; overflow-wrap: anywhere; }
.iw-shell .iw-fd__src:hover { text-decoration: underline; text-underline-offset: 2px; }
.iw-shell .iw-fd__src:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 2px; border-radius: 2px; }
.iw-shell .iw-fd__state { font-size: var(--fs-meta); font-weight: 600; color: var(--text-muted); }
.iw-shell .iw-fd__state--agree { color: var(--green-ink); }
.iw-shell .iw-fd__state--push_back { color: var(--ink); }
.iw-shell .iw-fd__note { display: flex; gap: 10px; align-items: baseline; padding: 6px 10px; font-size: var(--fs-ui); color: var(--text); background: var(--wash); border: 1px solid var(--line-soft); border-radius: var(--radius-ctl); }
.iw-shell .iw-fd__note span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.iw-shell .iw-fd__note b { color: var(--ink); font-weight: 600; }
/* A <button> that reads as a link; base.css's bare button slab reset. */
.iw-shell .iw-linkbtn:where(:not(.iw-btn)) { margin: 0; padding: 0; background: none; border: 0; font: inherit; font-size: var(--fs-meta); font-weight: 600; letter-spacing: normal; text-transform: none; color: var(--teal-ink); text-decoration: none; text-decoration-color: var(--teal-rule); text-underline-offset: 2px; cursor: pointer; }
.iw-shell .iw-linkbtn:hover { color: var(--teal-ink-hover); text-decoration-color: currentColor; }
.iw-shell .iw-linkbtn:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 2px; border-radius: 2px; }
/* The segmented verdict control (prototype .verd). */
.iw-shell .iw-verd { grid-column: 2; grid-row: 1 / span 3; align-self: start; display: flex; }
.iw-shell .iw-verd__btn { margin: 0; padding: 2px 8px; font: inherit; font-size: 0.7rem; font-weight: 600; line-height: 1.6; letter-spacing: normal; text-transform: none; color: var(--text-muted); background: white; border: 1px solid var(--line); border-radius: 0; cursor: pointer; transition: background-color 150ms ease-out, color 150ms ease-out, border-color 150ms ease-out; }
.iw-shell .iw-verd__btn + .iw-verd__btn { margin-left: -1px; }
.iw-shell .iw-verd__btn:first-child { border-radius: var(--radius-ctl) 0 0 var(--radius-ctl); }
.iw-shell .iw-verd__btn:last-child { border-radius: 0 var(--radius-ctl) var(--radius-ctl) 0; }
.iw-shell .iw-verd__btn:hover { color: var(--ink); }
.iw-shell .iw-verd__btn[aria-pressed="true"] { position: relative; color: white; background: var(--ink); border-color: var(--ink); }
.iw-shell .iw-verd__btn:focus-visible { position: relative; z-index: 1; outline: 2px solid var(--teal-ink); outline-offset: 1px; }
/* The objection box. */
.iw-shell .iw-fd__edit { grid-column: 1; display: flex; flex-direction: column; gap: 8px; }
.iw-shell .iw-fd__edit[hidden] { display: none; }
.iw-shell .iw-fd__edit label { font-size: var(--fs-ui); color: var(--text-muted); }
.iw-shell .iw-fd__edit textarea { box-sizing: border-box; width: 100%; min-height: 76px; resize: vertical; padding: 8px 10px; font: inherit; font-size: 0.86rem; font-weight: 400; line-height: 1.5; color: var(--text); caret-color: var(--teal-ink); background: white; border: 1px solid var(--line); border-radius: var(--radius-ctl); }
.iw-shell .iw-fd__edit textarea::placeholder { color: var(--text-muted); }
.iw-shell .iw-fd__edit textarea:focus { outline: 2px solid var(--teal-ink); outline-offset: 0; border-color: var(--teal-ink); }
.iw-shell .iw-fd__row { display: flex; gap: 6px; align-items: center; }
.iw-shell .iw-fd__error { margin: 0; font-size: var(--fs-meta); color: var(--red-ink); }
/* The feedback box and its tally (shared with the Task 6 aside). */
.iw-shell .iw-report__box { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: var(--radius-card); }
.iw-shell .iw-report__box .iw-btn { white-space: normal; text-align: left; line-height: 1.3; }
.iw-shell .iw-report__label { margin: 0; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.iw-shell .iw-tally { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; margin: 0; font-size: var(--fs-ui); }
.iw-shell .iw-tally dt { font-weight: 400; color: var(--text); }
.iw-shell .iw-tally dd { margin: 0; text-align: right; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.iw-shell .iw-report__note { margin: 0; font-size: var(--fs-meta); color: var(--text-muted); }
@container iw-work (max-width: 520px) {
  .iw-shell .iw-fd { grid-template-columns: minmax(0, 1fr); }
  .iw-shell .iw-verd { grid-column: 1; grid-row: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .iw-shell .iw-verd__btn { transition: none; }
}

/* === T3 (spec 2026-09-24 §7.8): the research report canvas === */
/* Prototype .doc/.toc/.article/.q/.aside on the tokens. The article column is
   capped at 66ch (a 65–75ch measure); the two side columns stick while the
   article scrolls. Research is full width (T2 data-iw-map="off"), so the work
   pane does not scroll on its own and the stickiness is against the page. */
.iw-shell .iw-report { display: grid; grid-template-columns: 200px minmax(0, 66ch) 230px; gap: 36px; justify-content: center; align-items: start; padding-top: 6px; color: var(--text); }
.iw-shell .iw-report ::selection { color: var(--ink); background: var(--teal-ring); }
.iw-shell .iw-report [tabindex="-1"]:focus { outline: none; }
.iw-shell .iw-report__toc { position: sticky; top: 12px; display: flex; flex-direction: column; font-size: var(--fs-ui); }
.iw-shell .iw-report__toc .iw-report__label { margin-bottom: 8px; }
.iw-shell .iw-report__toc a { padding: 5px 10px; line-height: 1.35; color: var(--teal-ink); text-decoration: none; border-left: 1px solid var(--line); transition: color 150ms ease-out, border-color 150ms ease-out; }
.iw-shell .iw-report__toc a:hover { color: var(--teal-ink); border-left-color: var(--teal-ink); }
.iw-shell .iw-report__toc a:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: -2px; }
.iw-shell .iw-report__article { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.iw-shell .iw-report__title { margin: 0; font-size: 1.5rem; font-weight: 400; line-height: 1.21; letter-spacing: -0.011em; text-transform: uppercase; color: var(--ink); text-wrap: balance; }
.iw-shell .iw-report__meta { margin: 6px 0 0; font-size: var(--fs-meta); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.iw-shell .iw-report__brief { font-size: 1rem; font-weight: 300; line-height: 1.7; color: var(--text); text-wrap: pretty; scroll-margin-top: 12px; }
.iw-shell .iw-report__brief :is(h1, h2, h3, h4) { margin: 18px 0 6px; font-size: var(--fs-body-sm); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink); }
.iw-shell .iw-report__brief > :first-child { margin-top: 0; }
.iw-shell .iw-report__brief p { margin: 0 0 10px; }
.iw-shell .iw-report__brief a { color: var(--teal-ink); text-underline-offset: 2px; }
.iw-shell .iw-q { display: flex; flex-direction: column; gap: 4px; scroll-margin-top: 12px; }
.iw-shell .iw-q__title { display: flex; gap: 10px; margin: 0; padding-bottom: 6px; font-size: 0.95rem; font-weight: 700; line-height: 1.35; color: var(--ink); border-bottom: 2px solid var(--teal-rule); text-wrap: balance; }
.iw-shell .iw-q__count { font-weight: 400; color: var(--text-muted); font-variant-numeric: tabular-nums; }
/* Research-loop spec §4.5–4.7: a finding's subject/date, the client's
   questions and the Sources ledger. Tokens only. */
.iw-shell .iw-fd__subject { font-size: var(--fs-meta); font-weight: 700; color: var(--ink); }
.iw-shell .iw-fd__date { font-size: var(--fs-meta); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.iw-shell .iw-report__qlist { margin: 4px 0 0; padding-left: 1.4em; color: var(--text); line-height: 1.6; }
.iw-shell .iw-src { gap: 8px; font-size: var(--fs-ui); }
.iw-shell .iw-src__counts { margin: 0; font-size: var(--fs-meta); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.iw-shell .iw-src__from { margin: 0; font-size: var(--fs-meta); color: var(--text-muted); }
.iw-shell .iw-report__meta a { color: var(--teal-ink); text-decoration: none; }
.iw-shell .iw-report__meta a:hover { text-decoration: none; text-underline-offset: 2px; }
.iw-shell .iw-report__meta a:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 2px; border-radius: 2px; }
.iw-shell .iw-src__domains { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.iw-shell .iw-src__domains li { padding: 2px 8px; font-size: var(--fs-meta); color: var(--text); border: 1px solid var(--line-soft); border-radius: var(--radius-ctl); }
.iw-shell .iw-src__n { margin-left: 4px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.iw-shell .iw-src__label { margin: 6px 0 0; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.iw-shell .iw-src__list { display: flex; flex-direction: column; gap: 3px; margin: 0; padding-left: 1.4em; color: var(--text); line-height: 1.45; }
.iw-shell .iw-src__list a { color: var(--teal-ink); text-decoration: none; overflow-wrap: anywhere; }
.iw-shell .iw-src__list a:hover { text-decoration: underline; text-underline-offset: 2px; }
.iw-shell .iw-src__list a:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 2px; border-radius: 2px; }
.iw-shell .iw-src__list span { overflow-wrap: anywhere; }
.iw-shell .iw-src__yield { margin-left: 6px; font-size: var(--fs-meta); color: var(--teal-ink); white-space: nowrap; }
.iw-shell .iw-src__hint { margin: 4px 0 0; font-size: var(--fs-meta); color: var(--text-muted); }
.iw-shell .iw-report__aside { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 14px; font-size: var(--fs-ui); }
.iw-shell .iw-report__line { margin: 0; color: var(--text); }
.iw-shell .iw-report__box > .iw-btn { align-self: flex-start; }
.iw-shell .iw-report__again .iw-btn { white-space: normal; text-align: left; }
@container iw-work (max-width: 899.98px) {
  .iw-shell .iw-report { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .iw-shell .iw-report__toc { display: none; }
  .iw-shell .iw-report__aside { position: static; }
}
@media (prefers-reduced-motion: reduce) {
  .iw-shell .iw-report__toc a { transition: none; }
}

/* === T3 (spec 2026-09-24 §7.7): the first-run Research screen === */
/* Prototype .firstrun on the tokens: one column at a reading measure. */
.iw-shell .iw-firstrun { display: flex; flex-direction: column; gap: 14px; max-width: 60ch; margin: 36px auto 0; }
.iw-shell .iw-firstrun__title { margin: 0; font-size: 1.5rem; font-weight: 400; line-height: 1.21; letter-spacing: -0.011em; text-transform: uppercase; color: var(--ink); text-wrap: balance; }
/* Direct children only: the run dialog renders inside .iw-firstrun too, and
   its own p.iw-muted must keep the dialog's type. */
.iw-shell .iw-firstrun > p { margin: 0; font-size: 1rem; font-weight: 300; line-height: 1.6; color: var(--text); text-wrap: pretty; }
.iw-shell .iw-firstrun > p.iw-firstrun__cost { font-size: var(--fs-ui); font-weight: 400; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.iw-shell .iw-firstrun__acts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
/* A refused run (Claude off, budget spent) puts its reason under the actions,
   at meta size, rather than inline at body size between the two buttons. */
.iw-shell .iw-firstrun__acts > p { order: 1; margin: 0; line-height: 1.5; flex-basis: 100%; font-size: var(--fs-meta); font-weight: 400; color: var(--text-muted); }
/* The report's run buttons keep their label and estimate apart (seen in the
   eye check: "Research again~85¢" touched on the quiet trigger). */
.iw-shell :is(.iw-report__box, .iw-report__again, .iw-firstrun__acts) .iw-btn { gap: 8px; }

/* === Landscape page (A3b, 2026-10-27) =======================================
   The Overview's Landscape (innovation/stages/_landscape): every admitted
   company, grouped by segment. A group is a small head over the teal
   hairline. The Landscape's rows are badges
   (.iw-co--badge, block "Landscape badges" after this one). Set aside (the
   removed entries) is a closed details at the foot. */
.iw-shell .iw-landscape__summary { font-size: var(--fs-ui); }
.iw-shell .iw-landscape__legend { margin: 4px 0 0; font-size: var(--fs-meta); }
.iw-shell .iw-landscape__none { margin: 12px 0 0; }
.iw-shell .iw-landscape__aside-link {
  display: inline-flex; align-items: center; height: 22px; box-sizing: border-box; padding: 0 8px;
  border: 1px solid var(--line); border-radius: var(--radius-ctl);
  font-size: var(--fs-meta); font-weight: 600; line-height: 1; color: var(--teal-ink); text-decoration: none; white-space: nowrap;
  font-variant-numeric: tabular-nums; transition: border-color .15s ease-out;
}
.iw-shell .iw-landscape__aside-link:hover { border-color: var(--teal-ink); color: var(--teal-ink-hover); }
.iw-shell .iw-landscape__aside-link:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 2px; }

.iw-shell .iw-landscape__groups {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
  gap: 18px 22px; align-items: start; margin-top: 16px;
}
.iw-shell .iw-landscape__title {
  display: flex; align-items: baseline; gap: 8px; margin: 0 0 8px; padding-bottom: 4px;
  border-bottom: 2px solid var(--teal-rule);
  font-size: var(--fs-ui); font-weight: 700; color: var(--ink);
}
.iw-shell .iw-landscape__name { min-width: 0; overflow-wrap: anywhere; }
.iw-shell .iw-landscape__count { margin-left: auto; font-weight: 400; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.iw-shell .iw-landscape__linked { display: inline-block; margin: 0 0 8px; font-size: var(--fs-meta); font-weight: 600; color: var(--teal-ink); text-decoration: none; }
.iw-shell .iw-landscape__linked:hover { color: var(--teal-ink-hover); text-decoration: none; }
/* A hole in the landscape is information, so it stays, quietly. */
.iw-shell .iw-landscape__empty { margin: 0; font-size: var(--fs-meta); color: var(--text-faint); }
.iw-shell .iw-landscape__group.is-empty .iw-landscape__title { color: var(--text-faint); border-bottom-color: var(--line-soft); }
.iw-shell .iw-landscape__rows { display: flex; flex-direction: column; gap: 5px; }

.iw-shell .iw-co {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border: 1px solid var(--line-soft); border-radius: var(--radius-item);
  cursor: pointer; transition: border-color .15s ease-out, background-color .15s ease-out;
}
.iw-shell .iw-co:hover { border-color: var(--teal-rule); background: var(--teal-wash); }
/* The live layer's row notice takes its own full-width line. */
.iw-shell .iw-co:has(> [data-live-row-notice]) { flex-wrap: wrap; }
.iw-shell .iw-co > [data-live-row-notice] { flex-basis: 100%; margin: 0; }
.iw-shell .iw-co:focus-within { border-color: var(--teal-rule); }
/* The row's name is its real button (the keyboard way into the reader).
   base.css uppercases, tracks and nowraps every button: the name reads as
   written and wraps (A6 sweep). */
.iw-shell .iw-co__open { padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; text-transform: none; letter-spacing: inherit; white-space: inherit; }
.iw-shell .iw-co__open:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 2px; border-radius: var(--radius-ctl); }
.iw-shell .iw-co__logo { width: 26px; height: 26px; border-radius: var(--radius-pill); object-fit: contain; flex: none; }
.iw-shell .iw-co__logo--initials {
  display: flex; align-items: center; justify-content: center;
  background: var(--teal-ring); color: var(--teal-ink); font-size: var(--fs-meta); font-weight: 700;
}
.iw-shell .iw-co__body { flex: 1 1 auto; min-width: 0; }
.iw-shell .iw-co__line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin: 0; }
.iw-shell .iw-co__name { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.iw-shell .iw-co__rec { color: var(--text-muted); font-size: var(--fs-meta); }
.iw-shell .iw-co__also { font-size: var(--fs-meta); color: var(--teal-ink); }
.iw-shell .iw-co__blurb {
  margin: 1px 0 0; font-size: var(--fs-meta); color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.iw-shell .iw-co__status { margin-left: auto; flex: none; font-size: var(--fs-meta); color: var(--text-faint); white-space: nowrap; }
.iw-shell .iw-co[data-status="interested"] .iw-co__status { color: var(--green-ink); font-weight: 600; }
.iw-shell .iw-co__acts { display: flex; gap: 6px; flex: none; }
/* The viewing organisation marked it Not interested: still listed, quiet. */
.iw-shell .iw-co.is-muted { opacity: 0.62; }
.iw-shell .iw-co.is-muted .iw-co__name { text-decoration: line-through; text-decoration-color: var(--line); text-decoration-thickness: 1px; }

.iw-shell .iw-landscape__aside { margin-top: 22px; border-top: 1px solid var(--line-soft); padding-top: 10px; }
.iw-shell .iw-landscape__aside > summary { cursor: pointer; font-size: var(--fs-ui); font-weight: 700; color: var(--ink); }
.iw-shell .iw-landscape__aside-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.iw-shell .iw-landscape__aside-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: var(--fs-ui); }
.iw-shell .iw-landscape__aside-row .iw-muted { font-size: var(--fs-meta); }
.iw-shell .iw-landscape__aside-group { margin: 14px 0 0; font-size: var(--fs-meta); font-weight: 700; color: var(--text-muted); }
/* === end Landscape page === */

/* === Landscape badges (mb/landscape-badges, 2026-11-03) ====================
   Mark: "the landscape should be logos/names only. Little badges, so if there
   are a lot - it can still realistically fit on one page". A row is a small
   chip -- logo, name (two lines at most, the full name in the title) -- in a
   wrapping grid inside its segment. The viewing organisation's state costs
   no space: Interested carries the green stripe on its left edge, Under
   review is plain, Not interested is faded (.is-muted, still listed); a lab's Sent-to-a-round
   badge carries a teal stripe instead. The legend's keys (.iw-landscape__key)
   are sample badges with the same cues. The recommendation star sits on the
   logo's corner. Scoped to the Landscape stage.
   */
.iw-shell .iw-landscape[data-stage="landscape"] .iw-landscape__groups { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px 20px; }
.iw-shell .iw-landscape[data-stage="landscape"] .iw-landscape__rows {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 136px), 1fr)); gap: 4px;
}
.iw-shell .iw-landscape[data-stage="landscape"] .iw-co--badge {
  position: relative; display: flex; align-items: center; gap: 6px; min-width: 0; min-height: 30px; box-sizing: border-box;
  padding: 3px 6px 3px 4px; border-radius: var(--radius-item);
  font-size: var(--fs-meta); line-height: 1.15;
}
.iw-shell .iw-landscape[data-stage="landscape"] :is(.iw-co--badge, .iw-landscape__key):is([data-status="interested"], [data-status="in_round"]) {
  border-left-width: 3px; padding-left: 2px;
}
.iw-shell .iw-landscape[data-stage="landscape"] :is(.iw-co--badge, .iw-landscape__key)[data-status="interested"] { border-left-color: var(--green-accent); }
.iw-shell .iw-landscape[data-stage="landscape"] :is(.iw-co--badge, .iw-landscape__key)[data-status="in_round"] { border-left-color: var(--teal-ink); }
.iw-shell .iw-landscape[data-stage="landscape"] .iw-co__mark { position: relative; display: flex; flex: none; }
.iw-shell .iw-landscape[data-stage="landscape"] .iw-co--badge .iw-co__logo { width: 22px; height: 22px; }
.iw-shell .iw-landscape[data-stage="landscape"] .iw-co--badge .iw-co__logo--initials { font-size: var(--fs-meta); letter-spacing: -0.02em; }
.iw-shell .iw-landscape[data-stage="landscape"] .iw-co--badge .iw-co__rec {
  position: absolute; top: -5px; right: -6px; line-height: 1;
  text-shadow: 0 0 2px #fff, 0 0 2px #fff; /* a white halo so the star reads over any logo */
}
.iw-shell .iw-landscape[data-stage="landscape"] .iw-co--badge .iw-co__open { flex: 1 1 auto; min-width: 0; }
.iw-shell .iw-landscape[data-stage="landscape"] .iw-co--badge .iw-co__name {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
  overflow-wrap: anywhere;
}
/* Faded is the Not-interested cue; the shared row's strike-through is too
   busy on a two-line chip name. */
.iw-shell .iw-landscape[data-stage="landscape"] .iw-co--badge.is-muted .iw-co__name { text-decoration: none; }
.iw-shell .iw-landscape[data-stage="landscape"] .iw-landscape__legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.iw-shell .iw-landscape[data-stage="landscape"] .iw-landscape__key {
  display: inline-flex; align-items: center; height: 18px; box-sizing: border-box; padding: 0 6px;
  border: 1px solid var(--line-soft); border-radius: var(--radius-item); font-weight: 600; color: var(--ink);
}
.iw-shell .iw-landscape[data-stage="landscape"] .iw-landscape__key.is-muted { opacity: 0.62; }

/* Printing the page itself (the Download PDF link is the server-side
   LandscapePdf, drawn the same way): the badges only, in colour, a badge
   never split, a segment moved whole to the next page only when it fits one. */
@media print {
  .iw-shell .iw-landscape[data-stage="landscape"] { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .iw-shell .iw-landscape[data-stage="landscape"] :is(.iw-sec__acts, .iw-explore, .iw-explore__more, .iw-landscape__aside) { display: none; }
  .iw-shell .iw-landscape[data-stage="landscape"] .iw-landscape__group { break-inside: avoid-page; }
  .iw-shell .iw-landscape[data-stage="landscape"] .iw-landscape__title { break-after: avoid; }
  .iw-shell .iw-landscape[data-stage="landscape"] .iw-co--badge { break-inside: avoid; }
}
/* === end Landscape badges === */

/* === Search guidance (mb/search-guidance, 2026-09-29) ===================
   The topic's search focus and a run's one-off focus on the Research
   report, and the company feedback control, chip and dialog. Scoped to the
   workspace shell; nothing here reaches FLITE or any other page. */
.iw-shell .iw-guide__text { margin: 0; font-size: var(--fs-ui); line-height: 1.45; color: var(--text); white-space: pre-line; overflow-wrap: anywhere; }
.iw-shell .iw-guide__k { font-weight: 700; color: var(--ink); }
.iw-shell .iw-guide__runfocus { white-space: pre-line; overflow-wrap: anywhere; }
/* === end Search guidance === */

/* ---- Website check (web-validate, 2026-09-29) --------------------------
   The quiet "N not shown" / "Checking N company websites" line under a
   review list's header, and the read-only list its dialog loads. Reuses the
   history dialog's table; only the line's spacing and the two long-text
   columns are its own. */
.innovation-workspace .iw-checks-note { display: flex; flex-direction: column; gap: 2px; margin: -4px 0 10px; }
.innovation-workspace .iw-checks-note p { margin: 0; }
.innovation-workspace .iw-checks-note .iw-dialog-wrap { display: block; }
.innovation-workspace .iw-checks > .iw-muted { margin: 0 0 12px; max-width: 70ch; }
.innovation-workspace .iw-checks__url { overflow-wrap: anywhere; color: var(--text-muted); }
.innovation-workspace .iw-checks__evidence { max-width: 34ch; color: var(--text-muted); }

/* ---- The company reader (A3b, PanelController#render_reader) ------------
   Opened in pipeline-reader's overlay, which lives on <body> OUTSIDE
   .iw-shell, so this block is scoped by the partial's own root
   (.innovation-workspace.iw-reader); the overlay's dialog, head, body and
   close button are focus_area_review_board.css's .review-reader__*. */
.innovation-workspace.iw-reader { flex: 1; min-height: 0; display: flex; flex-direction: column; font-family: var(--font-ui); color: var(--text); }
.iw-reader .iw-reader__logo { flex: none; width: 46px; height: 46px; box-sizing: border-box; border: 1px solid var(--line-soft); border-radius: var(--radius-item); background: var(--wash); object-fit: contain; }
.iw-reader .iw-reader__logo--initials { display: inline-flex; align-items: center; justify-content: center; font-size: var(--fs-ui); font-weight: 700; color: var(--text-muted); }
.iw-reader .iw-reader__id { flex: 1; min-width: 0; }
/* base.css uppercases every heading; a company name reads as written. */
.iw-reader .iw-reader__name { margin: 0; font-size: 1.125rem; font-weight: 700; line-height: 1.2; letter-spacing: normal; text-transform: none; color: var(--ink); overflow-wrap: anywhere; }
.iw-reader .iw-reader__seg { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 3px 0 0; font-size: var(--fs-meta); color: var(--text-muted); }
.iw-reader .iw-reader__topic { color: var(--text-faint); }
.iw-reader .iw-reader__body { display: flex; flex-direction: column; gap: 10px; }
.iw-reader .iw-reader__body > p { margin: 0; }
.iw-reader .iw-reader__state { align-self: flex-start; padding: 3px 10px; border-radius: var(--radius-pill); background: var(--teal-wash); color: var(--teal-ink); font-size: var(--fs-ui); font-weight: 600; }
.iw-reader .iw-reader__state.is-removed { background: var(--amber-wash); color: var(--amber-ink); }
.iw-reader :is(.iw-reader__rec, .iw-reader__also) { font-size: var(--fs-meta); color: var(--text-muted); }
.iw-reader .iw-reader__rec { color: var(--text-muted); }
.iw-reader .iw-reader__blurb { max-width: 68ch; font-size: var(--fs-body-sm); line-height: 1.55; }
.iw-reader .iw-reader__site { font-size: var(--fs-meta); overflow-wrap: anywhere; }
.iw-reader .iw-reader__site a { color: var(--teal-ink); }
.iw-reader .iw-reader__acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.iw-reader .iw-reader__form { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.iw-reader .iw-reader__lbl { font-size: var(--fs-meta); color: var(--text-muted); }
.iw-reader .iw-reader__segform { margin: 3px 0 0; }
.iw-reader .iw-reader__segselect { width: auto; max-width: 100%; min-height: 0; padding: 2px 6px; font-size: var(--fs-meta); }
.iw-reader .iw-reader__status { font-size: var(--fs-meta); color: var(--text-muted); }
.iw-reader .iw-reader__facts { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.iw-reader .iw-reader__note { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.iw-reader .iw-reader__notebox { width: 100%; box-sizing: border-box; resize: vertical; font-family: inherit; font-size: var(--fs-body-sm); line-height: 1.45; }
.iw-reader .iw-reader__noteacts { display: flex; align-items: center; gap: 8px; }
.iw-reader .iw-reader__notetext { margin: 0; font-size: var(--fs-body-sm); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.iw-reader .iw-reader__history { padding-top: 10px; border-top: 1px solid var(--line-soft); font-size: var(--fs-meta); }
.iw-reader .iw-reader__history > summary { cursor: pointer; font-weight: 600; color: var(--text-muted); }
.iw-reader .iw-reader__history > summary:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 2px; border-radius: var(--radius-ctl); }
.iw-reader .iw-reader__events { display: grid; gap: 4px; margin: 8px 0 0; padding: 0; list-style: none; }
.iw-reader .iw-reader__when { display: inline-block; min-width: 7.5em; color: var(--text-faint); font-variant-numeric: tabular-nums; }
/* === end company reader === */

/* === Pipeline page (A3b, 2026-10-27) ========================================
   The Review group's Pipeline (innovation/stages/_pipeline): Under review on
   top as a board (.iw-rb) of segment columns (.iw-rcol; a lead's is the
   Commit-column form) holding ranked cards (.iw-rcard: rank, logo, name, the
   age chip -- amber past 21 days -- the star, the feedback mark and stage ·
   funding · city, the other organisations interested, a lead's tick). Then
   the organisation's pipeline frame.
   The mockup's .rb/.rcol/.rcard shapes; everything under .iw-shell. */
.iw-shell .iw-pipeline-page__summary { font-size: var(--fs-ui); }
.iw-shell .iw-pipeline-page__conflicts { font-size: var(--fs-ui); }
.iw-shell .iw-pipeline-under { margin-top: 14px; }
.iw-shell .iw-pipeline-under > .iw-sec__head h4,
.iw-shell .iw-pipeline-org__title { margin: 0; font-size: var(--fs-ui); font-weight: 700; color: var(--ink); }
.iw-shell .iw-pipeline-page__hint { margin: 2px 0 10px; font-size: var(--fs-meta); }

.iw-shell .iw-rb { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; align-items: flex-start; }
.iw-shell .iw-rcol {
  flex: 0 0 300px; display: flex; flex-direction: column; min-height: 120px; margin: 0;
  background: var(--wash); border: 1px solid var(--line-soft); border-radius: var(--radius-card);
}
.iw-shell .iw-rcol__head { padding: 10px 12px 8px; border-bottom: 1px solid var(--line-soft); }
.iw-shell .iw-rcol__name { display: flex; align-items: center; gap: 8px; }
.iw-shell .iw-rcol__name h5 { margin: 0; min-width: 0; overflow-wrap: anywhere; font-size: var(--fs-ui); font-weight: 700; color: var(--ink); }
.iw-shell .iw-rcol__total { margin-left: auto; font-size: var(--fs-meta); color: var(--text-faint); font-variant-numeric: tabular-nums; }
.iw-shell .iw-rcol__body { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 8px; }
.iw-shell .iw-rcol__empty {
  margin: 0; padding: 14px; text-align: center; font-size: var(--fs-meta); color: var(--text-faint);
  border: 1px dashed var(--line); border-radius: var(--radius-item);
}
.iw-shell .iw-rcol__foot { display: flex; gap: 6px; justify-content: flex-end; padding: 8px; border-top: 1px solid var(--line-soft); }

.iw-shell .iw-rcard {
  display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; align-items: center;
  padding: 7px 8px; background: white; border: 1px solid var(--line-soft); border-radius: var(--radius-item);
  cursor: pointer; transition: border-color .15s ease-out, background-color .15s ease-out;
}
.iw-shell .iw-rcard:hover { border-color: var(--teal-rule); }
.iw-shell .iw-rcard.is-sortable { cursor: grab; }
.iw-shell .iw-rcard.is-drag-chosen { cursor: grabbing; }
.iw-shell .iw-rcard.is-drag-ghost { opacity: 0.45; border-style: dashed; }
.iw-shell .iw-rcol__body:has(.iw-rcard) > .iw-rcol__empty { display: none; }
.iw-shell .iw-rcard:focus-within { border-color: var(--teal-rule); }
/* The card's name is its real button (the keyboard way into the reader), as
   on the landscape's rows; base.css's button capitals, tracking and nowrap
   are undone, so the name reads as written (A6 sweep). */
.iw-shell .iw-rcard__open {
  padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer;
  text-transform: none; letter-spacing: inherit; white-space: inherit;
}
.iw-shell .iw-rcard__open:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 2px; border-radius: var(--radius-ctl); }
/* Ticked to advance: no script, the tick's own state. */
.iw-shell .iw-rcard:has(.iw-rcard__tick:checked) { border-color: var(--teal-ink); background: var(--teal-wash); }
.iw-shell .iw-rcard__logo { width: 26px; height: 26px; border-radius: var(--radius-pill); object-fit: contain; }
.iw-shell .iw-rcard__logo--initials {
  display: flex; align-items: center; justify-content: center;
  background: var(--teal-ring); color: var(--teal-ink); font-size: var(--fs-meta); font-weight: 700;
}
.iw-shell .iw-rcard__body { min-width: 0; }
.iw-shell .iw-rcard__name { margin: 0; font-size: var(--fs-ui); font-weight: 600; line-height: 1.2; color: var(--ink); overflow-wrap: anywhere; }
.iw-shell .iw-rcard__meta { margin: 2px 0 0; font-size: var(--fs-meta); color: var(--text-faint); overflow-wrap: anywhere; }
.iw-shell .iw-rcard__age {
  display: inline-block; margin-right: 2px; padding: 0 5px; border-radius: var(--radius-ctl);
  background: var(--pill-track); font-variant-numeric: tabular-nums;
}
.iw-shell .iw-rcard__age.is-old { background: var(--wash); color: var(--text-muted); }
.iw-shell .iw-rcard__rec { color: var(--text-muted); font-weight: 600; }
.iw-shell .iw-rcard__also { margin: 2px 0 0; font-size: var(--fs-meta); color: var(--teal-ink); }
.iw-shell .iw-rcard__tick { width: 18px; height: 18px; margin: 0; accent-color: var(--teal-ink); cursor: pointer; }

.iw-shell .iw-pipeline-org { margin-top: 22px; }
.iw-shell .iw-pipeline-org__title { margin-bottom: 8px; }

/* A lab's pipeline (B6): a card this topic sent to an earlier round says so;
   then In rounds (innovation/pipeline/_rounds), one group per round, each row
   the company (the reader), when and by whom it was sent, and FLITE's state. */
.iw-shell .iw-rcard__was { margin: 2px 0 0; font-size: var(--fs-meta); color: var(--text-muted); }
.iw-shell .iw-rounds { margin-top: 22px; }
.iw-shell .iw-rounds > .iw-sec__head h4 { margin: 0; font-size: var(--fs-ui); font-weight: 700; color: var(--ink); }
.iw-shell .iw-rounds__board { font-size: var(--fs-ui); }
.iw-shell .iw-rounds__empty { margin: 8px 0 0; font-size: var(--fs-meta); }
.iw-shell .iw-rounds__groups { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; align-items: flex-start; }
.iw-shell .iw-rounds__group {
  flex: 1 1 320px; max-width: 480px; min-width: 0;
  background: var(--wash); border: 1px solid var(--line-soft); border-radius: var(--radius-card);
}
.iw-shell .iw-rounds__head { display: flex; align-items: center; gap: 8px; padding: 10px 12px 8px; border-bottom: 1px solid var(--line-soft); }
.iw-shell .iw-rounds__head h5 { margin: 0; min-width: 0; overflow-wrap: anywhere; font-size: var(--fs-ui); font-weight: 700; color: var(--ink); }
.iw-shell .iw-rounds__total { margin-left: auto; font-size: var(--fs-meta); color: var(--text-faint); font-variant-numeric: tabular-nums; }
.iw-shell .iw-rounds__list { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 8px; list-style: none; }
.iw-shell .iw-rounds__row {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; grid-template-areas: "logo name state" "logo sent state";
  column-gap: 8px; align-items: center; padding: 6px 8px;
  background: white; border: 1px solid var(--line-soft); border-radius: var(--radius-item);
  cursor: pointer; transition: border-color .15s ease-out;
}
.iw-shell .iw-rounds__row:hover,
.iw-shell .iw-rounds__row:focus-within { border-color: var(--teal-rule); }
.iw-shell .iw-rounds__logo { grid-area: logo; width: 22px; height: 22px; border-radius: var(--radius-pill); object-fit: contain; }
.iw-shell .iw-rounds__logo--initials {
  display: flex; align-items: center; justify-content: center;
  background: var(--teal-ring); color: var(--teal-ink); font-size: var(--fs-meta); font-weight: 700;
}
.iw-shell button.iw-rounds__name {
  grid-area: name; min-width: 0; padding: 0; border: 0; background: none; font: inherit; font-size: var(--fs-ui);
  font-weight: 600; color: var(--ink); text-align: left; overflow-wrap: anywhere; cursor: pointer;
}
.iw-shell button.iw-rounds__name:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 2px; border-radius: var(--radius-ctl); }
.iw-shell .iw-rounds__sent { grid-area: sent; font-size: var(--fs-meta); color: var(--text-faint); }
.iw-shell .iw-rounds__state {
  grid-area: state; padding: 1px 8px; border-radius: var(--radius-pill); white-space: nowrap;
  background: var(--teal-wash); color: var(--teal-ink); font-size: var(--fs-meta); font-weight: 600;
}
.iw-shell .iw-rounds__state.is-removed { background: var(--amber-wash); color: var(--amber-ink); }
/* === end Pipeline page === */

/* === Platform overview (A3b spec §10 table; T12) === The workspace scope's
   home: the topic column (.iw-overview, the work area) beside the all-topic
   map (the shell's grid, T2 above), one slim card per topic (name and Open,
   the funnel line, "since you were here"); the pipeline section beneath
   (.iw-below); then the platform's facts and its settings in a closed
   details, a thin strip at the foot (.iw-overview__strip). */
/* The overview carries its own New topic beside "Topics"; the tab bar's
   copy would be a second identical button on the same screen. */
.iw-shell[data-iw-scope="workspace"] .iw-tabbar__end > .iw-dialog-wrap { display: none; }
.iw-shell .iw-work.iw-overview { padding: 12px 14px 16px; }
.iw-shell .iw-overview__head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  padding-bottom: 6px; margin-bottom: 12px; border-bottom: 2px solid var(--teal-rule);
}
.iw-shell .iw-overview__title { margin: 0; font-size: var(--fs-ui); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink); }
.iw-shell .iw-overview__quota { font-size: var(--fs-meta); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.iw-shell .iw-overview__empty { margin: 0; font-size: var(--fs-ui); color: var(--text-muted); }
.iw-shell .iw-overview__list { display: flex; flex-direction: column; gap: 8px; }
.iw-shell .iw-overview__topic {
  display: flex; flex-direction: column; gap: 3px; min-width: 0;
  padding: 8px 10px; background: white; border: 1px solid var(--line-soft); border-radius: var(--radius-item);
  transition: border-color .15s ease-out;
}
.iw-shell .iw-overview__topic:hover { border-color: var(--teal-rule); }
.iw-shell .iw-overview__topic-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.iw-shell .iw-overview__name {
  margin: 0; min-width: 0; overflow: hidden; white-space: normal; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
  font-size: var(--fs-ui); font-weight: 650; color: var(--ink);
}
.iw-shell .iw-overview__open { flex: none; margin-left: auto; }
.iw-shell .iw-overview__funnel { margin: 0; font-size: var(--fs-meta); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.iw-shell .iw-overview__since { margin: 0; font-size: var(--fs-meta); color: var(--teal-ink); }
.iw-shell .iw-overview__strip {
  grid-area: strip; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 24px;
  padding: 10px 20px 12px; border-top: 1px solid var(--line-soft); background: var(--wash);
  border-radius: 0 0 var(--radius-card) var(--radius-card);
}
.iw-shell .iw-overview__facts { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; }
.iw-shell .iw-overview__fact { margin: 0; font-size: var(--fs-meta); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.iw-shell .iw-overview__settings > summary { cursor: pointer; font-size: var(--fs-meta); font-weight: 600; color: var(--text-muted); }
.iw-shell .iw-overview__settings > summary:hover { color: var(--ink); }
.iw-shell .iw-overview__settings-body {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-top: 8px; font-size: var(--fs-meta);
}
.iw-shell .iw-overview__settings-body a { font-weight: 600; color: var(--teal-ink); }
.iw-shell .iw-overview__settings-body a:hover { color: var(--teal-ink-hover); }
/* A lab's "Sent to rounds · all topics" (pipeline/_rounds across topics) is
   the section's own content: no gap above it. */
.iw-shell .iw-below > .iw-rounds { margin-top: 0; }
/* A narrow canvas: the topic column stacks above the map rather than
   squeezing it, and keeps scrolling inside itself. */
@media (max-width: 760px) {
  .iw-shell[data-iw-scope="workspace"] {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "tabs" "head" "steps" "work" "map" "foot" "below" "strip";
    grid-template-rows: auto auto auto auto 24rem auto auto auto;
  }
  .iw-shell[data-iw-scope="workspace"] .iw-work.iw-overview { max-height: 20rem; }
  .iw-shell[data-iw-scope="workspace"] .iw-map-pane { border-left: 0; border-top: 1px solid var(--line-soft); }
}
/* === end Platform overview === */

/* === Round (workspace rethink phase 2, Task 14): Suggestions as a round of
 * about twelve. Tokens only; .iw-rounds is B6's "Sent to rounds" and
 * .iw-suggest* is taken, hence .iw-sround. Weights are 400/700 (the statics
 * have no 600). The row mirrors the v5 mockup's renderRows. === */
.iw-shell .iw-sround { gap: 12px; }
.iw-shell .iw-sround__progress {
  display: flex; align-items: center; gap: 10px;
  font-size: var(--fs-meta); color: var(--text-muted); font-variant-numeric: tabular-nums;
}
.iw-shell .iw-sround__bar { flex: 0 0 120px; height: 4px; overflow: hidden; background: var(--pill-track); border-radius: var(--radius-pill); }
.iw-shell .iw-sround__bar-fill {
  display: block; height: 100%; background: var(--teal-ink);
  transform-origin: left center; transform: scaleX(var(--iw-sround-done, 0)); transition: transform .2s ease-out;
}
.iw-shell .iw-sround__rows { display: flex; flex-direction: column; }
.iw-shell .iw-sround__row {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 4px 12px; align-items: start;
  padding: 12px 6px; border-top: 1px solid var(--line-soft); border-radius: var(--radius-item);
}
.iw-shell .iw-sround__row:first-child { border-top: 0; }
.iw-shell .iw-sround__row.is-decided { opacity: .6; }
.iw-shell .iw-sround__row.is-decided.is-admit { opacity: 1; background: var(--teal-wash); }
.iw-shell .iw-sround__logo {
  width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--teal-ring);
  display: flex; align-items: center; justify-content: center;
  color: var(--teal-ink); font-weight: 700; font-size: var(--fs-meta);
}
.iw-shell .iw-sround__body { min-width: 0; }
.iw-shell .iw-sround__name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-weight: 700; color: var(--ink); font-size: var(--fs-ui); }
.iw-shell .iw-sround__open { font-size: inherit; font-weight: 700; color: var(--ink); text-decoration: none; text-align: left; }
.iw-shell .iw-sround__open:hover { color: var(--teal-ink); text-decoration: none; text-decoration-color: var(--teal-rule); }
.iw-shell .iw-sround__pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 1px 9px; background: var(--wash);
  border: 1px solid var(--line); border-radius: var(--radius-pill);
  font-size: var(--fs-meta); font-weight: 400; color: var(--text-muted);
}
.iw-shell .iw-sround__segform { margin: 0; padding-right: 2px; }
.iw-shell .iw-sround__segselect {
  max-width: 22rem; padding: 0 2px; border: 0; background: transparent; cursor: pointer;
  font: inherit; color: inherit; text-overflow: ellipsis;
}
.iw-shell .iw-sround__segselect:hover { color: var(--teal-ink); }
.iw-shell .iw-sround__segselect:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 2px; border-radius: var(--radius-ctl); }
/* === Segment editor (2026-11-18; innovation/segment_drafts) ================
   A standalone page (the settings shell): the draft as rows of name +
   description, then a confirm page that lists what will change. */
.innovation-workspace.iw-segdraft .iw-segdraft__form { display: flex; flex-direction: column; gap: 16px; max-width: 860px; }
.innovation-workspace.iw-segdraft .iw-segdraft__row + .iw-segdraft__row { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.innovation-workspace.iw-segdraft .iw-segdraft__remove,
.innovation-workspace.iw-segdraft .iw-segdraft__search { display: flex; align-items: baseline; gap: 6px; font-size: var(--fs-ui); color: var(--text-muted); }
.innovation-workspace.iw-segdraft .iw-segdraft__search { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); color: var(--text); }
.innovation-workspace.iw-segdraft .iw-segdraft__actions { display: flex; justify-content: flex-end; gap: 8px; }
.innovation-workspace.iw-segdraft .iw-segdraft__errors { padding: 8px 12px; border-radius: var(--radius-item); background: var(--amber-wash); color: var(--amber-ink); font-size: var(--fs-ui); }
.innovation-workspace.iw-segdraft .iw-segdraft__errors p { margin: 0; }
.innovation-workspace.iw-segdraft .iw-segdraft__summary h3 { margin: 10px 0 4px; font-size: var(--fs-ui); font-weight: 700; color: var(--ink); }
.innovation-workspace.iw-segdraft .iw-segdraft__summary h3:first-child { margin-top: 0; }
.innovation-workspace.iw-segdraft .iw-segdraft__summary ul { margin: 0; padding-left: 18px; font-size: var(--fs-body-sm); line-height: 1.55; }
.iw-shell .iw-sround__what { margin: 2px 0; font-size: var(--fs-body-sm); color: var(--text); }
.iw-shell .iw-sround__why { margin: 2px 0; font-size: var(--fs-meta); color: var(--text-muted); }
.iw-shell .iw-sround__flags { margin: 2px 0 0; font-size: var(--fs-meta); color: var(--text-faint); }
.iw-shell .iw-sround__acts { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.iw-shell .iw-sround__form { display: inline; margin: 0; }
.iw-shell .iw-sround__decided { font-size: var(--fs-meta); color: var(--text-muted); }
.iw-shell .iw-sround__decided b { color: var(--green-ink); font-weight: 700; }
.iw-shell .iw-sround__remove { font-size: var(--fs-meta); color: var(--text-muted); }
.iw-shell .iw-sround__comment,
.iw-shell .iw-sround__more,
.iw-shell .iw-sround__row > [data-live-row-notice] { grid-column: 2 / -1; }
.iw-shell .iw-sround__note { margin: 0 0 4px; font-size: var(--fs-meta); color: var(--text-muted); }
.iw-shell .iw-sround__noteform { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.iw-shell .iw-sround__noteinput {
  flex: 1 1 220px; min-width: 0; padding: 4px 8px; font: inherit; font-size: var(--fs-meta);
  border: 1px solid var(--line); border-radius: var(--radius-ctl); background: var(--wash); color: var(--text);
}
.iw-shell .iw-sround__noteinput:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 1px; }
.iw-shell .iw-sround__more-summary {
  display: list-item; cursor: pointer; font-size: var(--fs-meta); color: var(--teal-ink);
  text-decoration: none; text-decoration-color: var(--line); text-underline-offset: 2px;
}
.iw-shell .iw-sround__more-summary:hover { color: var(--teal-ink); }
.iw-shell .iw-sround__more-summary:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 2px; border-radius: 2px; }
.iw-shell .iw-sround__facts {
  display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; margin: 8px 0 0;
  font-size: var(--fs-meta); color: var(--text);
}
.iw-shell .iw-sround__facts dt { color: var(--text-faint); }
.iw-shell .iw-sround__facts dd { margin: 0; }
.iw-shell .iw-sround__src,
.iw-shell .iw-sround__other { display: block; }
.iw-shell .iw-sround__quiet { color: var(--text-faint); }
.iw-shell .iw-sround__more-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.iw-shell .iw-sround__foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
  margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line-soft);
}
.iw-shell .iw-sround__saves { margin-left: auto; font-size: var(--fs-meta); color: var(--text-faint); }
.iw-shell .iw-sround__quiet-link {
  font-size: var(--fs-meta); color: var(--text-muted);
  text-decoration: none; text-decoration-color: var(--line); text-underline-offset: 2px;
}
.iw-shell .iw-sround__quiet-link:hover { color: var(--teal-ink); text-decoration-color: currentColor; }
.iw-shell .iw-sround__quiet-link:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 2px; border-radius: 2px; }
.iw-shell .iw-sround__empty,
.iw-shell .iw-sround__end,
.iw-shell .iw-sround__viewer { color: var(--text); font-size: var(--fs-body-sm); }
.iw-shell .iw-sround__empty p,
.iw-shell .iw-sround__end p { margin: 0 0 6px; }
.iw-shell .iw-nav__count[hidden] { display: none; }
@media (max-width: 640px) {
  .iw-shell .iw-sround__row { grid-template-columns: 36px minmax(0, 1fr); }
  .iw-shell .iw-sround__acts { grid-column: 2; justify-content: flex-start; }
}
/* === end Round === */
/* === Round end (Task 15): counts in words, the segment table, coverage === */
.iw-shell .iw-sround__label { margin: 0; font-size: var(--fs-meta); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); }
.iw-shell .iw-sround__end .iw-sround__big { margin: 0 0 4px; font-size: 1.25rem; font-weight: 700; color: var(--ink); }
.iw-shell .iw-sround__table { width: 100%; border-collapse: collapse; font-size: var(--fs-body-sm); margin: 8px 0; }
.iw-shell .iw-sround__table th,
.iw-shell .iw-sround__table td { padding: 6px 8px; border-bottom: 1px solid var(--line-soft); text-align: left; font-weight: 400; color: var(--text); }
.iw-shell .iw-sround__table thead th { font-size: var(--fs-meta); font-weight: 700; color: var(--text-muted); border-bottom-color: var(--teal-rule); }
.iw-shell .iw-sround__table tbody th { font-weight: 700; color: var(--ink); }
.iw-shell .iw-sround__table .is-num { text-align: right; font-variant-numeric: tabular-nums; }
.iw-shell .iw-sround__end .iw-sround__coverage { margin: 0 0 6px; font-size: var(--fs-meta); color: var(--text-muted); }
@media (max-width: 640px) {
  .iw-shell .iw-sround__table { display: block; overflow-x: auto; }
}
/* === end Round end === */
/* === Workspace head, rethink phase 2 (Task 17): four-layer strip + action === */
.iw-shell .iw-head__action { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 6px 0 0; font-size: var(--fs-ui); color: var(--text-muted); }
.iw-shell .iw-head__direction { font-weight: 700; color: var(--teal-ink); }
.iw-shell .iw-head__mode { color: var(--text-faint); }
.iw-shell .iw-head__note { color: var(--text); }
.iw-shell .iw-head__paused { flex-basis: 100%; color: var(--text-muted); font-size: var(--fs-meta); }
.iw-shell .iw-layers { margin: 8px 0 0; }
.iw-shell .iw-layers__list {
  display: grid; grid-template-columns: 5fr 4.5fr 3fr 2.5fr; margin: 0; padding: 0; list-style: none;
}
.iw-shell .iw-layers__cell { display: block; min-width: 0; padding: 0 8px; }
.iw-shell .iw-layers__link { display: block; color: inherit; text-decoration: none; }
.iw-shell .iw-layers__link:hover .iw-layers__label { color: var(--teal-ink); }
.iw-shell .iw-layers__link:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 2px; border-radius: 2px; }
.iw-shell .iw-layers__top { display: block; white-space: nowrap; }
.iw-shell .iw-layers__n { font-size: 1.25rem; font-weight: 700; color: var(--ink); }
.iw-shell .iw-layers__label { font-size: var(--fs-meta); font-weight: 700; letter-spacing: .06em; color: var(--text-muted); }
.iw-shell .iw-layers__sub { display: block; font-size: var(--fs-meta); color: var(--text-faint); }
.iw-shell .iw-layers__svg { display: block; width: 100%; height: 28px; margin-top: 4px; }
.iw-shell .iw-layers__band { stroke: var(--teal-ink); stroke-opacity: .35; }
.iw-shell .iw-layers__band--1 { fill: var(--teal-wash); }
.iw-shell .iw-layers__band--2 { fill: var(--teal-wash); fill-opacity: .8; }
.iw-shell .iw-layers__band--3 { fill: var(--teal-ink); fill-opacity: .55; }
.iw-shell .iw-layers__band--4 { fill: var(--ink); fill-opacity: .8; }
.iw-shell .iw-layers__search { margin: 4px 8px 0; font-size: var(--fs-meta); color: var(--text-faint); }
@media (max-width: 640px) {
  .iw-shell .iw-layers__list { grid-template-columns: 1fr 1fr; gap: 6px 0; }
  .iw-shell .iw-layers__svg { display: none; }
}
/* === end Workspace head === */

/* === Direction (P2 T18) === */
.iw-shell .iw-direction { display: grid; gap: 14px; max-width: 70ch; }
.iw-shell .iw-direction__part { margin: 0; padding: 0; border: 0; min-width: 0; }
.iw-shell .iw-direction__title {
  margin: 0 0 4px; padding: 0; font-family: var(--font-ui); font-size: var(--fs-ui); font-weight: 700;
  letter-spacing: normal; text-transform: uppercase; color: var(--ink);
}
.iw-shell .iw-direction__draft {
  margin: 0; padding: 8px 12px; border-left: 3px solid var(--teal-rule);
  background: var(--wash); color: var(--text); font-size: var(--fs-body-sm);
}
.iw-shell .iw-direction__form { display: grid; gap: 14px; }
.iw-shell .iw-direction__text p,
.iw-shell .iw-direction__lines { margin: 0 0 6px; color: var(--text); }
.iw-shell .iw-direction__hint { margin: 0 0 6px; font-size: var(--fs-meta); color: var(--text-faint); }
.iw-shell .iw-direction__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.iw-shell .iw-direction__asis { justify-self: start; }
.iw-shell .iw-direction__facets,
.iw-shell .iw-direction__examples,
.iw-shell .iw-direction__history-list { margin: 0; padding-left: 18px; color: var(--text); }
.iw-shell .iw-direction__example { display: grid; grid-template-columns: 1fr 1fr 2fr auto; gap: 6px; margin-bottom: 6px; align-items: center; }
.iw-shell .iw-direction__state {
  font-size: var(--fs-meta); color: var(--teal-ink); white-space: nowrap;
}
.iw-shell .iw-direction__links { margin: 0; font-size: var(--fs-body-sm); }
.iw-shell .iw-direction__history { font-size: var(--fs-body-sm); color: var(--text); }
.iw-shell .iw-direction__history > summary { cursor: pointer; color: var(--text-muted); }
.iw-shell .iw-direction__history > summary:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 2px; }
@media (max-width: 640px) {
  .iw-shell .iw-direction__example { grid-template-columns: 1fr; }
}
/* === end Direction === */

/* Task 20: the open round's companies, outlined until admission. */
.innovation-workspace .iw-round-mark .iw-ghost__dot {
  opacity: 1;
  stroke-width: var(--iw-ghost-ring-w);
  vector-effect: non-scaling-stroke;
}
.innovation-workspace .iw-round-mark .iw-ghost__ring { display: none; }
/* End Task 20. */

/* === Coverage drawer (P4 T14): existing tokens only; layout comes from the
   existing .iw-stack (vertical rhythm), .iw-direction__draft (flash) and the
   history dialog's table, dialog and empty-state rules === */
.innovation-workspace .iw-coverage__part { min-width: 0; }
.innovation-workspace .iw-coverage__part p,
.innovation-workspace .iw-coverage__staff p { margin: 0; }
.innovation-workspace .iw-coverage__stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; /* spacing exception pending Mark's approval: a multi-column grid gap; .iw-stack is single-column */ margin: 0; }
.innovation-workspace .iw-coverage__stats dt { font-size: var(--fs-meta); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.innovation-workspace .iw-coverage__stats dd { margin: 0; font-size: 1.25rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.innovation-workspace .iw-coverage__list { margin: 0; color: var(--text); }
.innovation-workspace .iw-coverage__staff { border-top: 2px solid var(--teal-rule); }
.innovation-workspace .iw-coverage__withheld,
.innovation-workspace .iw-coverage__shortlist { align-items: flex-start; }
.innovation-workspace .iw-coverage__withheld textarea { width: 100%; }
.innovation-workspace .iw-coverage .iw-link:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 2px; }
@media (max-width: 640px) {
  .innovation-workspace .iw-coverage__stats { grid-template-columns: 1fr 1fr; }
}
/* === end Coverage drawer === */

/* === Exploration (P4 T22): segment lifecycle, "How does this fit?" and the
   branch actions. Colour, type and radius are tokens. Spacing between
   controls comes from the shared .iw-form and .iw-stack (gap 8px) -- the views
   carry those classes; design_tokens.css defines no spacing variables, so the
   few remaining paddings follow this file's literal-px idiom. === */
.innovation-workspace .iw-explore { margin: 0 0 12px; }
.innovation-workspace .iw-explore__summary,
.innovation-workspace .iw-explore__more > summary { cursor: pointer; font-size: var(--fs-body-sm); color: var(--teal-ink); }
.innovation-workspace .iw-explore__summary:hover,
.innovation-workspace .iw-explore__more > summary:hover { color: var(--teal-ink-hover); }
.innovation-workspace .iw-explore__summary:focus-visible,
.innovation-workspace .iw-explore__more > summary:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 2px; border-radius: var(--radius-ctl); }
.innovation-workspace .iw-explore__form { padding: 10px 12px; border-left: 3px solid var(--teal-rule); background: var(--wash); }
.innovation-workspace .iw-explore__tools { margin-top: 8px; }
.innovation-workspace .iw-explore__merge { flex-direction: row; flex-wrap: wrap; align-items: flex-end; }
.innovation-workspace .iw-fit { margin-top: 8px; }
.innovation-workspace .iw-fit__note { padding: 6px 10px; border-left: 3px solid var(--teal-rule); background: var(--teal-wash); }
.innovation-workspace .iw-fit__head { margin: 0 0 2px; font-size: var(--fs-meta); font-weight: 700; color: var(--ink); }
.innovation-workspace .iw-fit__finding,
.innovation-workspace .iw-fit__unknown { margin: 0 0 2px; font-size: var(--fs-body-sm); color: var(--text); overflow-wrap: anywhere; }
.innovation-workspace .iw-fit__unknown { color: var(--text-muted); }
/* === end Exploration === */
/* === Phase 4 T25: returning head, summary, Scouted overlay === */
.iw-shell .iw-head__line { color: var(--text-muted); font-size: var(--fs-meta); }
.iw-shell .iw-head__change { color: var(--text); }
.iw-shell .iw-head__summary:empty { display: none; }
.iw-shell .iw-summary { margin: 6px 0 0; padding: 8px 12px; background: var(--teal-wash); border-radius: var(--radius-item); font-size: var(--fs-ui); color: var(--text); }
.iw-shell .iw-summary__lead, .iw-shell .iw-summary__learning { margin: 0; }
.iw-shell .iw-summary__learning { margin-top: 4px; color: var(--text-muted); font-size: var(--fs-meta); }
.iw-shell .iw-summary__buckets { display: grid; gap: 4px; margin: 0; }
.iw-shell .iw-summary__bucket { display: flex; flex-wrap: wrap; gap: 2px 8px; }
.iw-shell .iw-summary__bucket dt { font-weight: 700; color: var(--ink); }
.iw-shell .iw-summary__bucket dd { margin: 0; min-width: 0; }
.iw-shell .iw-summary__n { font-weight: 400; color: var(--text-muted); }
.iw-shell .iw-summary__more { color: var(--text-muted); white-space: nowrap; }
/* Background work waiting behind "Show" (live controller). Fixed, so its
   arrival moves nothing on the page. */
.iw-shell .iw-live-waiting {
  position: fixed; z-index: 40;
  right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px;
  background: white; color: var(--ink); font-size: var(--fs-ui);
  border: 1px solid var(--line-soft); border-radius: var(--radius-pill); box-shadow: var(--shadow-pop);
}
.iw-shell .iw-live-waiting[hidden] { display: none; }
.iw-shell .iw-scouted { position: absolute; left: 12px; bottom: 64px; z-index: 2; max-width: calc(100% - 24px); background: var(--wash); border-radius: var(--radius-ctl); padding: 6px 12px; border-top: 1px solid var(--line-soft); font-size: var(--fs-meta); color: var(--text-muted); }
.iw-shell .iw-map-pane.has-prof .iw-scouted { display: none; }
.iw-shell .iw-scouted__count { margin: 0; }
.iw-shell .iw-scouted__list { max-height: 9rem; overflow-y: auto; margin: 4px 0 0; padding-left: 1.1rem; color: var(--text); }
.iw-shell .iw-scouted-dot { fill: var(--teal-ring); stroke: var(--teal-ink); stroke-width: 0.5; opacity: 0.55; pointer-events: none; }
/* === end Phase 4 T25 === */

/* Native disclosures keep their marker and keyboard focus. */
:is(.innovation-workspace, .iw-shell, .iw-reader) summary,
:is(.innovation-workspace, .iw-shell, .iw-reader) details[class] > summary,
:is(.innovation-workspace, .iw-shell, .iw-reader) details > summary[class] {
  display: list-item;
  font-size: var(--fs-meta);
  color: var(--teal-ink);
  font-weight: 600;
  text-decoration: none;
  text-transform: none;
  cursor: pointer;
}
/* Set aside is opened by its header link; its summary stays a keyboard control. */
.iw-shell #iw-set-aside > summary { display: block; list-style: none; }
.iw-shell #iw-set-aside > summary::marker { content: ""; }
.iw-shell #iw-set-aside > summary::-webkit-details-marker { display: none; }

:is(.innovation-workspace, .iw-shell, .iw-reader) summary:hover,
:is(.innovation-workspace, .iw-shell, .iw-reader) details[class] > summary:hover,
:is(.innovation-workspace, .iw-shell, .iw-reader) details > summary[class]:hover { color: var(--teal-ink-hover); }
:is(.innovation-workspace, .iw-shell, .iw-reader) .iw-link,
.iw-shell .iw-sround__quiet-link,
.iw-shell .iw-report__brief a,
.iw-shell .iw-stale a {
  color: var(--teal-ink);
  font-weight: 600;
  text-decoration: none;
  text-transform: none;
}
:is(.innovation-workspace, .iw-shell, .iw-reader) .iw-link:hover,
.iw-shell .iw-sround__quiet-link:hover,
.iw-shell .iw-report__brief a:hover,
.iw-shell .iw-report__meta a:hover,
.iw-shell .iw-stale a:hover { color: var(--teal-ink-hover); }
:is(.innovation-workspace, .iw-shell, .iw-reader) a[target="_blank"]:not(.iw-btn):hover {
  text-decoration: underline;
}

/* The receipt-bearing summary is authoritative while present; keep the compact
   fallback and its live-refresh hook when the summary is unavailable. */
.iw-shell .iw-head:has(#iw-head-summary > section.iw-summary) :is([data-head-change], .iw-head__empty) {
  display: none;
}

.iw-shell .iw-overview__since[hidden] { display: none; }

.innovation-workspace .iw-usage[hidden] { display: none; }

.iw-shell .iw-rcard .iw-chip--muted {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--text-muted);
}

.iw-shell .iw-scouted__toggle[hidden] { display: none; }

/* Field prompts and legends use sentence case; section headings stay uppercase. */
:is(.innovation-workspace, .iw-shell, .iw-reader) :is(label, legend, .iw-field__label) {
  text-transform: none;
  letter-spacing: normal;
}
/* === Worth a look (2026-11-09): the seen-the-best card and the funnel popup === */
.iw-shell .iw-sround__seen-best { color: var(--text); font-size: var(--fs-body-sm); max-width: 680px; }
.iw-shell .iw-sround__seen-best .iw-sround__big { margin: 0 0 4px; font-size: 1.25rem; font-weight: 700; color: var(--ink); text-transform: none; letter-spacing: normal; }
.iw-shell .iw-sround__seen-best-lead { margin: 0 0 12px; color: var(--text-muted); }
.iw-shell .iw-sround__choices { display: grid; gap: 8px; margin: 0 0 12px; }
.iw-shell .iw-sround__choices .iw-sround__form { margin: 0; }
.iw-shell .iw-sround__choice {
  display: block; width: 100%; padding: 10px 12px; text-align: left; font: inherit; color: var(--text);
  background: var(--wash); border: 1px solid var(--line); border-radius: var(--radius-item); cursor: pointer; text-decoration: none;
}
.iw-shell .iw-sround__choice:hover { border-color: var(--teal-rule); background: var(--teal-wash); }
.iw-shell .iw-sround__choice:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 2px; }
.iw-shell .iw-sround__choice-title { display: block; font-weight: 700; color: var(--ink); }
.iw-shell .iw-sround__choice-sub { display: block; font-size: var(--fs-meta); color: var(--text-muted); }
.iw-shell .iw-sround__seen-best .iw-dialog-wrap { display: inline; margin-top: 0; }
.iw-shell .iw-sround__seen-best button.iw-sround__quiet-link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.iw-shell .iw-layers__open {
  display: block; width: 100%; padding: 0; text-align: left; font: inherit; color: inherit; background: none; border: 0; cursor: pointer;
}
.iw-shell .iw-layers__open:hover .iw-layers__label { color: var(--teal-ink); }
.iw-shell .iw-layers__open:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 2px; border-radius: 2px; }
.iw-shell .iw-layers .iw-dialog-wrap { margin-top: 0; }
.iw-shell .iw-layers__list--five { grid-template-columns: 4.5fr 4fr 3.5fr 2.5fr 2fr; }
.iw-shell .iw-layers__band--worth { fill: var(--teal-wash); fill-opacity: .9; stroke: var(--teal-ink); }
@media (max-width: 640px) { .iw-shell .iw-layers__list--five { grid-template-columns: 1fr 1fr; } }
.iw-shell .iw-flist { font-size: var(--fs-body-sm); color: var(--text); }
.iw-shell .iw-flist__tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.iw-shell .iw-flist__tab {
  display: inline-flex; gap: 6px; align-items: baseline; padding: 4px 10px; border: 1px solid var(--line);
  border-radius: var(--radius-pill); color: var(--text); text-decoration: none;
}
.iw-shell .iw-flist__tab[aria-current="page"] { border-color: var(--teal-ink); background: var(--teal-wash); color: var(--teal-ink); }
.iw-shell .iw-flist__tab-n { font-weight: 700; }
.iw-shell .iw-flist__tab-label { font-size: var(--fs-meta); }
.iw-shell .iw-flist__filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 10px; }
.iw-shell .iw-flist__filters :is(input, select) { min-width: 0; }
.iw-shell .iw-flist__go, .iw-shell .iw-flist__jump { margin: 0 0 8px; font-size: var(--fs-meta); color: var(--text-muted); }
.iw-shell .iw-flist__group { margin: 0 0 4px; }
.iw-shell .iw-flist__group-head {
  position: sticky; top: 0; margin: 0; padding: 6px 8px; background: var(--wash); border-bottom: 1px solid var(--line-soft);
  font-size: var(--fs-meta); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted);
}
.iw-shell .iw-flist__group-n { font-weight: 400; }
.iw-shell .iw-flist__rows { margin: 0; padding: 0; list-style: none; }
.iw-shell .iw-flist__row {
  display: grid; grid-template-columns: minmax(120px, 11rem) minmax(0, 1fr) minmax(0, 10rem) 8rem; gap: 10px;
  padding: 6px 8px; border-bottom: 1px solid var(--line-soft); align-items: baseline;
}
.iw-shell .iw-flist__name { text-align: left; font-weight: 700; }
.iw-shell .iw-flist__liner { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iw-shell .iw-flist__segment-name, .iw-shell .iw-flist__band { font-size: var(--fs-meta); color: var(--text-faint); }
.iw-shell .iw-flist__mark--passed { color: var(--amber-ink); }
.iw-shell .iw-flist__mark--shown, .iw-shell .iw-flist__mark--admitted, .iw-shell .iw-flist__mark--interested { color: var(--teal-ink); }
.iw-shell .iw-flist__empty, .iw-shell .iw-flist__loading { margin: 8px; color: var(--text-muted); }
@media (max-width: 640px) {
  .iw-shell .iw-flist__row { grid-template-columns: minmax(0, 1fr) auto; }
  .iw-shell .iw-flist__liner, .iw-shell .iw-flist__segment-name { grid-column: 1 / -1; white-space: normal; }
}
/* === end Worth a look === */

/* Mark 2026-11-09: no folds in the head. The funnel is always shown (an
   empty one hides itself until a counts stream fills it), and what Topic
   details held is one quiet line under the next action. */
.iw-shell #iw-layers[data-totals-empty="true"] { display: none; }
.iw-shell .iw-head__meta {
  flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: baseline;
  margin: 0; font-size: var(--fs-meta); color: var(--text-muted);
}
.iw-shell .iw-head__meta > * + *::before { content: "·"; margin: 0 8px; color: var(--text-faint); font-weight: 400; }
main[data-controller~="topics"][data-action~="landscape"] .landscape-row {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-card);
  margin-bottom: 1rem;
  background: #fff;
}
main[data-controller~="topics"][data-action~="landscape"] .landscape-row__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--line-soft);
}
main[data-controller~="topics"][data-action~="landscape"] .landscape-row__rename input {
  border: none;
  font-weight: 600;
  font-size: 1rem;
  background: transparent;
}
main[data-controller~="topics"][data-action~="landscape"] .landscape-row__rename input:focus {
  outline: 1px solid var(--teal-ink);
  background: var(--wash);
}
main[data-controller~="topics"][data-action~="landscape"] .landscape-row__title {
  margin: 0;
  font-size: 1rem;
  color: var(--text-muted);
}
main[data-controller~="topics"][data-action~="landscape"] .landscape-row__count {
  font-size: 0.8rem;
  color: var(--text-muted);
}
main[data-controller~="topics"][data-action~="landscape"] .landscape-row__delete {
  margin-left: auto;
}
main[data-controller~="topics"][data-action~="landscape"] .landscape-row__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  list-style: none;
  padding: 0.75rem;
  margin: 0;
  min-height: 3.5rem;
}
main[data-controller~="topics"][data-action~="landscape"] .landscape-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 76px;
  cursor: grab;
  text-align: center;
}
main[data-controller~="topics"][data-action~="landscape"] .landscape-chip__logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: var(--radius-card);
  border: 1px solid var(--line-soft);
  background: #fff;
}
main[data-controller~="topics"][data-action~="landscape"] .landscape-chip__initial {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-card);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--pill-track);
  font-weight: 600;
  font-size: 1.25rem;
}
main[data-controller~="topics"][data-action~="landscape"] .landscape-chip__name {
  font-size: 0.65rem;
  margin-top: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
main[data-controller~="topics"][data-action~="landscape"] .landscape-stats {
  color: var(--text-muted);
}
main[data-controller~="topics"][data-action~="landscape"] .landscape-new-segment__form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

@media print {
  /* Scoped via :has so app chrome vanishes ONLY when printing the landscape
     page — an unscoped header/nav selector here leaks into every layout
     (including FLITE) through application.css require_tree. */
  body:has(#topic-landscape) header,
  body:has(#topic-landscape) nav,
  body:has(#topic-landscape) .admin-nav,
  body:has(#topic-landscape) .flash__wrapper,
  main[data-controller~="topics"][data-action~="landscape"] .landscape-actions,
  main[data-controller~="topics"][data-action~="landscape"] .landscape-new-segment,
  main[data-controller~="topics"][data-action~="landscape"] .landscape-row__delete {
    display: none !important;
  }
  main[data-controller~="topics"][data-action~="landscape"] .landscape-row {
    break-inside: avoid;
    border-color: var(--line);
  }
  main[data-controller~="topics"][data-action~="landscape"] .landscape-chip {
    cursor: default;
  }
}
main[data-controller~="meetings"] {
    display: grid;
    grid-auto-flow: row dense;
    grid-gap: 2.5rem;
    grid-template-columns: 2fr 1fr;
}
main[data-controller~="meetings"] section {
    grid-column: 1;
}
.monthly_startup_card {
    height: 100px;
    background-color: white;
    margin-left: 20px;
    margin-right: 20px;
    margin-top: 20px;
    margin-bottom: 20px;
    display: flex;
    border-bottom-left-radius: 15px;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    border-bottom-right-radius: 15px;
    box-shadow: 0 1px 2px #bab8b6, 0 -1px 1px #cfcbc8;
    cursor: pointer;
}

.monthly_startup_card.resized {
    height: 300px;
}

.monthly_startup_card:hover {
    background-color: #f5f5f5;
}

.monthly_startup_card_logo {
    width: 100px;
    border-right: 1px solid #ebebeb;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 5px;
    padding-right: 5px;
}

.monthly_startup_card img {
    max-width: 100px;
    height: min-content;
}

.monthly_startup_card .card_body {
    flex: 1;
    display: flex;
}

.monthly_startup_card .card_top {
    margin: 10px;
}

.monthly_startup_card_top .monthly_startup_card_name {
    font-size: 24px;
}

.monthly_startup_card_middle {
    flex: 5
}

.monthly_startup_card_right {
    flex: 1;
    border-left: 1px solid #ebebeb;
    padding: 5px;
}

.monthly_startup_card_header {
    font-size: 18px;
    font-weight: 700;
    margin-top: 10px;
}

main[data-controller~="partner-responses"] {
    display: grid;
    grid-auto-flow: row dense;
    grid-gap: 2.5rem;
    grid-template-columns: 2fr 1fr;
}
main[data-controller~="partner-responses"] section {
    grid-column: 1;
}
main[data-controller~="partner-organizations"] {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* 4-column grid for info sections (Stagegates, Categories, Users, Files).
   Boxes stretch to equal height; each box's list scrolls at a fixed max-height
   so no single box can grow unbounded and drag the row taller. */
.partner-org-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

/* Full-width Platforms bar below the 4 info boxes: horizontal, wrapping cards
   that span the page width (like the startups pipeline). */
.partner-org-platforms-bar {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #e5e7eb;
}

.partner-org-platforms-bar .platform-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.partner-org-platforms-bar .embedded-platform {
    flex: 1 1 220px;
    max-width: 320px;
}

.partner-org-info-section {
    min-width: 0; /* Allow grid item to shrink */
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    /* Flex column with a comfortable card height so the inner list can grow to
       fill the box (and only scroll past it) instead of capping early. */
    display: flex;
    flex-direction: column;
    min-height: 375px;
}

.partner-org-info-section .section__header {
    margin-bottom: 0.75rem;
}

.partner-org-info-section .section__header h2 {
    font-size: 1rem;
    margin: 0;
}

.partner-org-info-section .construct-list {
    margin: 0;
    padding: 0;
    /* Fill the remaining box height (flex-basis 0 so a long list doesn't grow
       the box past its set height) and scroll only when content overflows. */
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Categories box: the manager fills the box, its list flexing between the fixed
   toggle (top) and add row (bottom). */
.partner-org-info-section .sg-categories {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.partner-org-info-section .sg-cat-list {
    flex: 1 1 0;
    min-height: 0;
    max-height: none;
}

/* Compact user cards for the narrow info section */
.partner-org-info-section .embedded-user {
    display: grid;
    grid-template-columns: 24px 1fr auto;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 0.3rem 0.4rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.partner-org-info-section .embedded-user:last-child {
    border-bottom: none;
}

.partner-org-info-section .embedded-user .u-photo {
    width: 24px;
    height: 24px;
    grid-row: 1;
    grid-column: 1;
}

.partner-org-info-section .embedded-user .p-email {
    font-size: 0.8rem;
    word-break: break-all;
    min-width: 0;
    grid-row: 1;
    grid-column: 2;
}

.partner-org-info-section .embedded-user .p-email:nth-of-type(2) {
    font-size: 0.7rem;
    color: #888;
    grid-row: 2;
    grid-column: 2 / 4;
}

.partner-org-info-section .embedded-user popover-toggle,
.partner-org-info-section .embedded-user a[data-turbo-method="delete"] {
    grid-row: 1;
    grid-column: 3;
    justify-self: end;
}

/* User settings popups use fixed positioning to escape scrollable container */
.partner-org-info-section .embedded-user popover-toggle details[open] .details__liner {
    position: fixed;
    z-index: 9999;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 0.5rem;
    min-width: 120px;
}

/* Pipeline container on partner organization page - full width */
/* Ensure stable container width before JS calculates column sizes */
.partner-org-startups-section {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    contain: layout; /* CSS containment for better performance - browser knows this section's layout is independent */
}

.partner-org-pipeline {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    min-height: 450px; /* Reserve space to prevent collapse during load */
}

.partner-org-pipeline .pipeline-full-width {
    width: 100%;
    max-width: 100%;
}

.partner-org-pipeline .pipeline-container {
    width: 100%;
    max-width: 100%;
    min-height: 400px; /* Match .pipeline-column-content min-height */
}

.partner-org-pipeline .pipeline-content {
    width: 100%;
    max-width: 100%;
}

/* Ensure pipeline headers and columns use inline-flex to size to content and stay aligned */
.partner-org-pipeline .pipeline-headers {
    display: inline-flex;
    min-width: 100%;
}

.partner-org-pipeline .pipeline-columns {
    display: inline-flex;
    min-width: 100%;
}

/* Admin settings popup on partner organization page */
.partner_organizations.page-header {
    overflow: visible;
    position: relative;
}

.partner_organizations.page-header .admin-controls {
    grid-area: actions;
    justify-self: end;
    align-self: start;
}

.partner_organizations.page-header .admin-controls popover-toggle {
    position: relative;
}

/* ── Organization edit page layout ── */

.org-edit-layout {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

.org-edit-layout__main {
    min-width: 0;
}

.org-edit-layout__sidebar {
    position: sticky;
    top: 5rem;
}

@media (max-width: 800px) {
    .org-edit-layout {
        grid-template-columns: 1fr;
    }
    .org-edit-layout__sidebar {
        position: static;
    }
}

/* ── Edit page cards ── */

.org-edit-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.org-edit-card--personal {
    border-style: dashed;
    background: var(--gray-lightest);
}

.org-edit-card__header {
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.75rem 1.25rem;
}

.org-edit-card--personal .org-edit-card__header {
    background: transparent;
    border-bottom: 1px dashed #e5e7eb;
}

.org-edit-card__header h2 {
    font-size: 0.875rem;
    margin: 0;
    letter-spacing: 0.04em;
}

.org-edit-card__subtitle {
    display: block;
    font-size: 0.8rem;
    font-weight: 300;
    color: var(--gray-light);
    text-transform: none;
    letter-spacing: normal;
    margin-top: 0.15rem;
}

/* ── Card body and field overrides ── */

.org-edit-card__body {
    padding: 1.25rem;
}

/* Reset the base .field and .field + .field margins inside cards
   so grid gap is the only spacing source in multi-col rows */
.org-edit-card__body .field {
    margin: 0 0 1rem;
}

.org-edit-card__body .field + .field {
    margin-top: 0;
}

.org-edit-card__body .field:last-child {
    margin-bottom: 0;
}

.org-edit-card__body .field > label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-dark);
    margin-bottom: 0.35rem;
}

.org-edit-card__body input[type="text"],
.org-edit-card__body textarea,
.org-edit-card__body select {
    width: 100%;
}

.org-edit-card__body .field--checkbox {
    margin-bottom: 0.25rem;
}

.org-edit-card__body .field--checkbox label {
    font-size: 0.875rem;
    font-weight: 400;
}

.org-edit-hint {
    font-size: 0.75rem;
    font-weight: 300;
    color: var(--gray-light);
    margin: 0 0 1rem;
    line-height: 1.4;
}

.org-edit-hint:last-child {
    margin-bottom: 0;
}

/* ── Grid rows ── */

.org-edit-row--two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.org-edit-row--two-col:last-child {
    margin-bottom: 0;
}

/* Fields inside grid rows should not add their own bottom margin */
.org-edit-row--two-col > .field {
    margin-bottom: 0;
}

.org-edit-row--label-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Fields inside label grid should not add their own bottom margin */
.org-edit-row--label-grid > .field {
    margin-bottom: 0;
}

@media (max-width: 640px) {
    .org-edit-row--two-col,
    .org-edit-row--label-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Actions & save ── */

.org-edit-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 2rem;
}

.org-edit-actions .button--primary {
    background: var(--accent-darker);
    border-color: var(--accent-darker);
    color: #fff;
}

.org-edit-actions .button--primary:hover {
    filter: brightness(0.9);
}

.org-edit-save-status {
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 0.25rem;
}

.org-edit-save-status--success {
    color: #059669;
}

.org-edit-save-status--error {
    color: #dc2626;
}

/* ── Delete link ── */

.org-edit-delete {
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.org-edit-delete a {
    font-size: 0.8rem;
    color: var(--gray-light);
    text-decoration: none;
}

.org-edit-delete a:hover {
    color: var(--danger-darker);
}

/* Button outline style for secondary actions */
.button--outline {
    background: transparent;
    border: 1px solid currentColor;
    color: var(--accent-darker, #2563eb);
    transition: all 0.15s ease;
}

.button--outline:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.button--outline:active {
    transform: translateY(0);
}

main[data-controller~="platforms"] {
    display: grid;
    grid-auto-flow: row dense;
    grid-gap: 2.5rem;
    grid-template-columns: 2fr 1fr;
}
main[data-controller~="platforms"] section {
    grid-column: 1;
}

/* Settings page — single-column so the proposal-questions editor and
   platform-tags blocks span the full width. Wider than the base 90rem main
   cap, but centered with generous side gutters (padding, so they hold even
   below the cap where the auto margins collapse to 0). */
main[data-controller~="platforms"][data-action~="settings"] {
    grid-template-columns: 1fr;
    max-width: 104rem;
    margin: 3.75rem auto 1.875rem;
    padding-left: 4rem;
    padding-right: 4rem;
}
main[data-controller~="platforms"][data-action~="settings"] section {
    grid-column: 1;
}

/* Settings page — partner org list */
.settings-partner-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.settings-partner-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-lightest, #f3f4f6);
}

.settings-partner-item:last-child {
    border-bottom: none;
}

.settings-partner-item__logo {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    object-fit: contain;
    flex-shrink: 0;
    background: var(--gray-lightest, #f9fafb);
}

.settings-partner-item__name {
    flex: 1;
    min-width: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-dark, #1f2937);
    line-height: 1.3;
}

.settings-partner-item__remove {
    background: none;
    border: none;
    font-size: 0.6875rem;
    color: var(--gray-light, #9ca3af);
    cursor: pointer;
    padding: 0.25rem 0.375rem;
    border-radius: 4px;
    transition: color 0.15s ease, background 0.15s ease;
    flex-shrink: 0;
}

.settings-partner-item__remove:hover {
    color: #dc2626;
    background: #fef2f2;
}
popover-toggle-hover {
    position: relative;
    align-self: center;
}
popover-toggle-hover summary {
    align-items: center;
    align-self: center;
    color: var(--accent-darker);
    display: flex;
    font-size: 0.875rem;
    font-weight: 700;
    justify-self: end;
    text-decoration: none;
    text-transform: uppercase;
    width: auto;
}
popover-toggle-hover summary svg {
    margin-left: auto;
}
popover-toggle-hover summary::before {
    content: none;
}
popover-toggle-hover summary::-webkit-details-marker {
    display: none;
}
popover-toggle-hover .details__liner {
    background: var(--popover-background, #fff);
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.5);
    padding: var(--popover-padding, 0.625rem);
    position: absolute;
    right: 0;
    z-index: 1;
    width: auto;
}

popover-toggle-hover .details__liner > a {
    align-self: center;
    font-size: 0.875rem;
    font-weight: 700;
    justify-self: end;
    text-decoration: none;
    text-transform: uppercase;
}


popover-toggle-hover .details__liner label {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}
popover-toggle-hover .details__liner .button--text {
    text-align: right;
}


popover-toggle-hover .form__liner {
    background: var(--popover-background, #fff);
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.5);
    padding: var(--popover-padding, 0.625rem);
    position: absolute;
    z-index: 1;
    max-width: 100%;
}

popover-toggle-hover .form__liner > a {
    align-self: center;
    font-size: 0.875rem;
    font-weight: 700;
    justify-self: end;
    text-decoration: none;
    text-transform: uppercase;
}


popover-toggle-hover .form__liner label {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}
popover-toggle-hover .form__liner .button--text {
    text-align: right;
}

popover-toggle-hover details {
    position: relative;
    display: inline-block;
}

popover-toggle-hover details[open] .form__liner {
    position: absolute;
    background-color: white;
    border: 1px solid #ddd;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    min-width: 300px; /* Set a minimum width for the popover */
    max-width: 600px; /* Limit the maximum width so it doesn't get too wide */
    width: auto; /* Let the width grow based on content */
    z-index: 10;
}

popover-toggle-hover details summary {
    cursor: pointer;
    list-style: none; /* Remove default triangle */
    display: flex;
    align-items: center;
}

.form__liner div {
    word-wrap: break-word; /* Ensure long words wrap properly */
    max-width: 100%; /* Prevent overflow */
}
popover-toggle {
    position: relative;
    align-self: center;
}
popover-toggle summary {
    align-items: center;
    align-self: center;
    color: var(--accent-darker);
    display: flex;
    font-size: 0.875rem;
    font-weight: 700;
    justify-self: end;
    text-decoration: none;
    text-transform: uppercase;
}
popover-toggle summary svg {
    margin-left: auto;
}
popover-toggle summary::before {
    content: none;
}
popover-toggle summary::-webkit-details-marker {
    display: none;
}
popover-toggle .details__liner {
    background: var(--popover-background, #fff);
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.5);
    padding: var(--popover-padding, 0.625rem);
    position: absolute;
    right: 0;
    z-index: 1;
    width: auto;
}

popover-toggle .details__liner > a {
    align-self: center;
    font-size: 0.875rem;
    font-weight: 700;
    justify-self: end;
    text-decoration: none;
    text-transform: uppercase;
}


popover-toggle .details__liner label {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}
popover-toggle .details__liner .button--text {
    text-align: right;
}

/* Wider popover variant for forms with multiple controls */
popover-toggle .details__liner--wide {
    min-width: 300px;
    padding: 1rem 1.25rem;
}

popover-toggle .details__liner--wide fieldset {
    border: none;
    padding: 0;
    margin: 0 0 0.75rem 0;
}

popover-toggle .details__liner--wide legend {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--gray-light, #6b7280);
    margin-bottom: 0.5rem;
}

popover-toggle .details__liner--wide .radio-group {
    display: flex;
    gap: 0;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    overflow: hidden;
}

popover-toggle .details__liner--wide .radio-group label {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: background-color 0.15s ease, color 0.15s ease;
    border-right: 1px solid #d1d5db;
    margin: 0;
}

popover-toggle .details__liner--wide .radio-group label:last-child {
    border-right: none;
}

popover-toggle .details__liner--wide .radio-group label:has(input:checked) {
    background-color: var(--accent-base, #3b82f6);
    color: #fff;
}

popover-toggle .details__liner--wide .radio-group label input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    position: absolute;
    opacity: 0;
}

popover-toggle .details__liner--wide .form-group label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--gray-light, #6b7280);
    display: block;
    margin-bottom: 0.35rem;
}

popover-toggle .popover-divider {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 0.75rem 0;
}

popover-toggle .popover-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

popover-toggle .popover-actions .btn {
    flex: 1;
    text-align: center;
}

popover-toggle .popover-actions .button--text {
    color: #dc2626;
    font-size: 0.8rem;
}

/* Read-only visibility badge for partner users */
popover-toggle .visibility-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
}

popover-toggle .visibility-badge--public {
    background-color: #dcfce7;
    color: #166534;
}

popover-toggle .visibility-badge--private {
    background-color: #fef3c7;
    color: #92400e;
}

popover-toggle .form__liner {
    background: var(--popover-background, #fff);
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.5);
    padding: var(--popover-padding, 0.625rem);
    position: absolute;
    right: 0;
    z-index: 1;
    width: 200px;
}

popover-toggle .form__liner > a {
    align-self: center;
    font-size: 0.875rem;
    font-weight: 700;
    justify-self: end;
    text-decoration: none;
    text-transform: uppercase;
}


popover-toggle .form__liner label {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}
popover-toggle .form__liner .button--text {
    text-align: right;
}

/* ==========================================================================
   Popover API Styles (for pipeline contexts)
   The native Popover API renders in the top layer, automatically escaping
   overflow clipping from parent containers.
   ========================================================================== */

/* Popover trigger button */
popover-toggle .popover-trigger {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-darker);
    border-radius: 4px;
    transition: background-color 0.15s ease;
}

popover-toggle .popover-trigger:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

popover-toggle .popover-trigger:focus-visible {
    outline: 2px solid var(--accent-base, #3b82f6);
    outline-offset: 2px;
}

/* Native popover element styling */
popover-toggle [popover] {
    /* Reset browser defaults */
    border: none;
    margin: 0;
    overflow: visible;

    /* Styling */
    background: var(--popover-background, #fff);
    border-radius: 0.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: var(--popover-padding, 0.625rem);
    min-width: 200px;
    max-height: 80vh;
    overflow-y: auto;
}

/* Remove popover backdrop dimming */
popover-toggle [popover]::backdrop {
    background: transparent;
    opacity: 0;
}

/* Also target the popover directly in case browser applies default backdrop */
[popover]::backdrop {
    background: transparent !important;
    opacity: 0 !important;
}

/* Links inside popover */
popover-toggle [popover] a {
    align-self: center;
    font-size: 0.875rem;
    font-weight: 700;
    justify-self: end;
    text-decoration: none;
    text-transform: uppercase;
}

/* Labels inside popover */
popover-toggle [popover] label {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

/* Button text styling */
popover-toggle [popover] .button--text {
    text-align: right;
}
main[data-controller~="projects"] {
    display: grid;
    grid-auto-flow: row dense;
    grid-gap: 2.5rem;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: masonry;
}

.project_form {
    grid-column: 1;
}
.project_form textarea {
    max-width: 100%;
    min-height: 10rem;
    resize: vertical;
    width: 100%;
}
.project_form > .field:first-of-type {
    margin-top: 0;
}
main[data-controller~="scouting-priorities"][data-action~="new"],
main[data-controller~="scouting-priorities"][data-action~="edit"] {
    display: grid;
    grid-auto-flow: row dense;
    grid-gap: 2.5rem;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: masonry;
}
main[data-controller~="scouting-priorities"][data-action~="show"] {
    align-items: start;
    display: grid;
    grid-auto-flow: row dense;
    grid-gap: 2.5rem;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: masonry;
}

.select2-container--seamless .select2-selection--single {
    background: linear-gradient(to bottom, #fdfdfd, #e5e5e5);
    border: solid 1px var(--gray-light);
    border-radius: 0.25rem;
    color: var(--gray-light);
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: calc(0.875rem * 1.375 + 1rem + 2px);
    letter-spacing: calc(-0.15 / 14 * 1em);
    line-height: 1.375;
    padding: 0.5rem 2rem 0.5rem 0.875rem;
    position: relative;
}
.select2-container--seamless .select2-selection--single .select2-selection__rendered {
    color: #444;
    padding: 0;
}
.select2-container--seamless .select2-selection--single .select2-selection__clear {
    cursor: pointer;
    float: right;
    font-weight: 700;
    height: 26px;
    margin-right: 20px;
    padding-right: 0px;
}
.select2-container--seamless .select2-selection--single .select2-selection__placeholder {
    color: #999;
}
.select2-container--seamless .select2-selection--single .select2-selection__arrow {
    height: 100%;
    position: absolute;
    right: 0;
    top: 0;
    width: 2rem;
}
.select2-container--seamless .select2-selection--single .select2-selection__arrow b {
    background: var(--select-arrow) no-repeat center center / 1rem 0.5rem;
    height: 100%;
    position: absolute;
    width: 100%;
}

.select2-container--seamless[dir="rtl"] .select2-selection--single .select2-selection__clear {
    float: left;
}

.select2-container--seamless[dir="rtl"] .select2-selection--single .select2-selection__arrow {
    left: 1px;
    right: auto;
}

.select2-container--seamless.select2-container--disabled .select2-selection--single {
    background-color: #eee;
    cursor: default;
}
.select2-container--seamless.select2-container--disabled .select2-selection--single .select2-selection__clear {
    display: none;
}

.select2-container--seamless.select2-container--open .select2-selection--single .select2-selection__arrow b {
    transform: scaleY(-1);
}


.select2-container--seamless .select2-selection--multiple {
    background-color: #fff;
    border: 1px solid #aaa;
    border-radius: 4px;
    cursor: text;
    padding-bottom: 5px;
    padding-right: 5px;
    position: relative;
}
.select2-container--seamless .select2-selection--multiple.select2-selection--clearable {
    padding-right: 25px;
}
.select2-container--seamless .select2-selection--multiple .select2-selection__clear {
    cursor: pointer;
    font-weight: 700;
    height: 20px;
    margin-right: 10px;
    margin-top: 5px;
    padding: 1px;
    position: absolute;
    right: 0;
}
.select2-container--seamless .select2-selection--multiple .select2-selection__choice {
    background-color: #e4e4e4;
    border: 1px solid #aaa;
    border-radius: 4px;
    box-sizing: border-box;
    display: inline-block;
    margin-left: 5px;
    margin-top: 5px;
    max-width: 100%;
    overflow: hidden;
    padding: 0;
    padding-left: 20px;
    position: relative;
    text-overflow: ellipsis;
    vertical-align: bottom;
    white-space: nowrap;
}
.select2-container--seamless .select2-selection--multiple .select2-selection__choice__display {
    cursor: default;
    padding-left: 2px;
    padding-right: 5px;
}
.select2-container--seamless .select2-selection--multiple .select2-selection__choice__remove {
    background-color: transparent;
    border: none;
    border-bottom-left-radius: 4px;
    border-right: 1px solid #aaa;
    border-top-left-radius: 4px;
    color: #999;
    cursor: pointer;
    font-size: 1em;
    font-weight: 700;
    left: 0;
    padding: 0 4px;
    position: absolute;
    top: 0;
}
.select2-container--seamless .select2-selection--multiple .select2-selection__choice__remove:hover,
.select2-container--seamless .select2-selection--multiple .select2-selection__choice__remove:focus {
    background-color: #f1f1f1;
    color: #333;
    outline: none;
}

.select2-container--seamless[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
    margin-left: 5px;
    margin-right: auto;
}

.select2-container--seamless[dir="rtl"] .select2-selection--multiple .select2-selection__choice__display {
    padding-left: 5px;
    padding-right: 2px;
}

.select2-container--seamless[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 4px;
    border-left: 1px solid #aaa;
    border-right: none;
    border-top-left-radius: 0;
    border-top-right-radius: 4px;
}

.select2-container--seamless[dir="rtl"] .select2-selection--multiple .select2-selection__clear {
    float: left;
    margin-left: 10px;
    margin-right: auto;
}

.select2-container--seamless.select2-container--focus .select2-selection--multiple {
    border: solid #000 1px;
    outline: 0;
}

.select2-container--seamless.select2-container--disabled .select2-selection--multiple {
    background-color: #eee;
    cursor: default;
}

.select2-container--seamless.select2-container--disabled .select2-selection__choice__remove {
    display: none;
}

.select2-container--seamless.select2-container--open.select2-container--above .select2-selection--single,
.select2-container--seamless.select2-container--open.select2-container--above .select2-selection--multiple {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.select2-container--seamless.select2-container--open.select2-container--below .select2-selection--single,
.select2-container--seamless.select2-container--open.select2-container--below .select2-selection--multiple {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.select2-container--seamless .select2-search--dropdown .select2-search__field {
    border: 1px solid #aaa;
}

.select2-container--seamless .select2-search--inline .select2-search__field {
    -webkit-appearance: textfield;
    background: transparent;
    border: none;
    box-shadow: none;
    outline: 0;
}

.select2-container--seamless .select2-results > .select2-results__options {
    max-height: 200px;
    overflow-y: auto;
}

.select2-container--seamless .select2-results__option .select2-results__option {
    padding-left: 1em;
}
.select2-container--seamless .select2-results__option .select2-results__option .select2-results__group {
    padding-left: 0;
}
.select2-container--seamless .select2-results__option .select2-results__option .select2-results__option {
    margin-left: -1em;
    padding-left: 2em;
}
.select2-container--seamless .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
    margin-left: -2em;
    padding-left: 3em;
}
.select2-container--seamless .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
    margin-left: -3em;
    padding-left: 4em;
}
.select2-container--seamless .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
    margin-left: -4em;
    padding-left: 5em;
}
.select2-container--seamless .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
    margin-left: -5em;
    padding-left: 6em;
}

.select2-container--seamless .select2-results__option--group {
    padding: 0;
}

.select2-container--seamless .select2-results__option--disabled {
    color: #999;
}

.select2-container--seamless .select2-results__option--selected {
    background-color: #ddd;
}

.select2-container--seamless .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: #5897fb;
    color: #fff;
}

.select2-container--seamless .select2-results__group {
    cursor: default;
    display: block;
    padding: 6px;
}
/* The middle dot, drawn with normal spacing, inside the Innovation Workspace.
 *
 * Overpass (both the static faces and the 'Overpass Var' alias) sets U+00B7
 * "·" with almost no advance width, so " · " prints as " ·x" and "a·b" puts
 * the dot on top of the b. The workspace uses that dot as its separator in
 * about seventy places (views, helpers, services, Stimulus textContent, the
 * map's SVG labels).
 *
 * "Seamless Dot" is a one-glyph family: unicode-range limits it to U+00B7,
 * so it is only ever consulted for the dot, and every other character still
 * comes from Overpass. It is put first in the font stacks, and only inside
 * the workspace's own scopes and on pages that opted into the UI kit.
 * Nothing outside them changes: FLITE, the dashboards and the pipelines keep
 * the plain stacks from base.css and design_tokens.css. local() uses
 * whichever system sans is installed: Arial on Windows, Helvetica on macOS,
 * Liberation Sans or DejaVu Sans on Linux.
 * If none is present the dot falls through to Overpass, as before.
 *
 * Scopes: the workspace shell and its dialogs (.innovation-workspace; the
 * <dialog>s stay DOM descendants in the top layer), Innovation Admin, and
 * the two things the workspace moves to <body>: the map's reader overlay
 * (.review-reader, shared with the focus-area board, so only on a page that
 * has a workspace) and the suggestion hovercard. Also the UI kit: a page's
 * `main.ui-kit` (ui_kit.css sets `font-family: var(--font-ui)` on it; its
 * components read --font-ui too) and that page's flash, which sits outside
 * <main> (`body:has(> main.ui-kit) .flash`, also --font-ui). select2's
 * dropdown is appended to <body>, outside both, and keeps the plain stack.
 *
 * The workspace resolves its type through two variables: --font-ui (the
 * shell, `font-family: var(--font-ui)` in innovation_workspace.css, and every
 * redesigned rule) and --font-family (base.css's body/heading stack, used by
 * the legacy h1/h2 rules). Both are redefined in scope, so every descendant
 * that reads either variable, and everything that inherits (SVG <text>,
 * controls set to `font-family: inherit`), picks the dot up. Revert this file
 * alone to undo the change. */

@font-face {
  font-family: "Seamless Dot";
  font-style: normal;
  src: local("Arial"), local("ArialMT"), local("Helvetica Neue"), local("HelveticaNeue"), local("Helvetica"),
       local("Liberation Sans"), local("LiberationSans"), local("DejaVu Sans"), local("DejaVuSans");
  unicode-range: U+00B7;
}

.innovation-workspace,
.innovation-admin,
body:has(.innovation-workspace, .innovation-admin) :is(.review-reader, .iw-hovercard),
main.ui-kit,
body:has(> main.ui-kit) .flash {
  --font-ui: "Seamless Dot", 'Overpass Var', Overpass, sans-serif;
  --font-family: "Seamless Dot", Interstate, Overpass, sans-serif;
}

/* Scopes that inherit the body's stack rather than setting --font-ui. */
.innovation-admin,
body:has(.innovation-workspace, .innovation-admin) .review-reader {
  font-family: var(--font-family);
}
/* ============================================================
   Platform Settings + FLITE Admin
   Moved out of the inline <style> blocks in platforms/settings.html.erb
   and platforms/flite_admin.html.erb. Exact-match grays/status colors use
   the shared FLITE tokens (identical hex — no visual change).
   ============================================================ */

/* ---- Page header sub (platform name under "Settings") ---- */
.settings-header-sub {
    display: block;
    font-size: 0.8125rem;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    color: var(--flite-muted);
    margin-top: 0.25rem;
}

/* ---- Settings accordion ---- */
.settings-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    margin-top: 1.25rem;
}
.settings-card {
    border: 1px solid var(--flite-line);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}
/* Card header: title stacked over its description on the left, chevron
   centered on the right — a uniform two-line block for every section. */
.settings-card > summary {
    list-style: none;
    cursor: pointer;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 1rem;
    padding: 1rem 1.5rem;
    user-select: none;
}
.settings-card > summary::-webkit-details-marker { display: none; }
.settings-card > summary:hover { background: var(--flite-wash); }
.settings-card__title {
    grid-column: 1;
    font-weight: 600;
    font-size: 0.9375rem;
    color: #111827;
    letter-spacing: 0.01em;
}
.settings-card__sub {
    grid-column: 1;
    font-weight: 400;
    font-size: 0.8125rem;
    color: var(--flite-muted);
    margin-top: 0.125rem;
}
.settings-card__chevron {
    grid-column: 2;
    grid-row: 1 / span 2;
    color: var(--flite-faint);
    font-size: 0.7rem;
    transition: transform 0.15s ease;
}
.settings-card[open] > summary { border-bottom: 1px solid #f0f0f1; }
.settings-card[open] > summary .settings-card__chevron { transform: rotate(90deg); }
.settings-card__body { padding: 0.25rem 1.5rem 1rem; }
.settings-card--danger { border-color: #fecaca; background: #fff8f8; }

/* ---- The settings row: [title + description | control] ----
   Every setting is the same shape, on a shared vertical axis, with hairline
   dividers between rows. Controls are width-capped so they align in a column
   even when the page spans the full viewport. */
.settings-row {
    display: grid;
    grid-template-columns: minmax(200px, 300px) minmax(0, 1fr);
    gap: 0.5rem 3rem;
    padding: 1.25rem 0;
}
.settings-row + .settings-row { border-top: 1px solid #f0f0f1; }
.settings-row__head h3 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    color: #111827;
    margin: 0 0 0.375rem;
}
.settings-row__desc {
    color: var(--flite-muted);
    font-size: 0.8125rem;
    line-height: 1.55;
    margin: 0;
}
.settings-row__desc + .settings-row__desc { margin-top: 0.5rem; }
.settings-row__control { min-width: 0; }
/* Wide-control variant (the question editor): head on top, control spans
   the full card width below. */
.settings-row--stacked { grid-template-columns: 1fr; gap: 0.75rem 0; }
@media (max-width: 800px) {
    .settings-row { grid-template-columns: 1fr; gap: 0.75rem 0; }
}

/* ---- Form-control calm (scoped to the settings page) ----
   Quiet the heavy base form styles: smaller ink labels, flat white selects
   (no gradient pill), consistent sizes, capped control widths. */
.settings-accordion .field { margin: 0 0 0.875rem; }
.settings-accordion .field:last-child { margin-bottom: 0; }
.settings-accordion .field > label,
.settings-accordion .field label:first-child {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--flite-ink);
    margin-bottom: 0.375rem;
}
.settings-accordion select {
    appearance: none;
    background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="13" height="8"><path fill="%236b7280" fill-rule="evenodd" d="m7.01 7.222 5.19-5.538A1 1 0 0 0 11.472 0H1.088a1 1 0 0 0-.73 1.684L5.55 7.222a1 1 0 0 0 1.46 0Z"/></svg>') no-repeat right 0.65rem center / 0.7rem 0.45rem;
    border: 1px solid var(--flite-line);
    border-radius: 6px;
    color: var(--flite-text);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0;
    padding: 0.45rem 2rem 0.45rem 0.65rem;
}
.settings-accordion select[multiple] {
    background-image: none;
    padding: 0.45rem 0.65rem;
}
.settings-accordion select:disabled {
    background-color: var(--flite-wash);
    background-image: none;
    color: var(--flite-muted);
    border-color: var(--flite-line);
}
.settings-accordion .field > input[type="text"],
.settings-accordion .field > select,
.settings-accordion .field input[type="text"],
.settings-accordion .field select {
    width: 100%;
    max-width: 26rem;
}
.settings-accordion .field input[type="text"] {
    font-size: 0.875rem;
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--flite-line);
    border-radius: 6px;
}
.settings-accordion textarea {
    box-shadow: none;
    border: 1px solid var(--flite-line);
    border-radius: 6px;
    font-size: 0.875rem;
    max-width: 34rem;
}
/* Checkbox rows: inline normal-weight label beside the box. */
.settings-accordion .field--check { margin-bottom: 0.625rem; }
.settings-accordion .field--check label {
    display: inline;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--flite-text);
    margin: 0;
}
.settings-accordion .actions { margin-top: 0.875rem; }

/* ---- FLITE Admin tables + badges + action buttons ---- */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}
.admin-table th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    background: var(--flite-wash);
    border-bottom: 2px solid var(--flite-line);
    font-weight: 600;
    color: var(--flite-text);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}
.admin-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #f3f4f6;
    color: var(--flite-ink);
}
.admin-table tbody tr:hover { background: var(--flite-wash); }

.admin-badge {
    display: inline-block;
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.admin-badge--warning { background: var(--flite-status-warn-bg); color: var(--flite-status-warn-fg); }
.admin-badge--info { background: #dbeafe; color: #1e40af; }

.admin-delete-btn {
    background: none;
    border: 1px solid var(--flite-err);
    color: var(--flite-err);
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.admin-delete-btn:hover { background: var(--flite-err); color: #fff; }

/* Assign (green) / Reject (red) / Remove (gray) action buttons */
.admin-action-btn--success {
    background: none;
    border: 1px solid var(--flite-ok);
    color: var(--flite-ok);
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.admin-action-btn--success:hover { background: var(--flite-ok); color: #fff; }
.admin-action-btn--danger {
    background: none;
    border: 1px solid var(--flite-err);
    color: var(--flite-err);
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.admin-action-btn--danger:hover { background: var(--flite-err); color: #fff; }
.admin-action-btn--neutral {
    background: none;
    border: 1px solid var(--flite-muted);
    color: var(--flite-muted);
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.admin-action-btn--neutral:hover { background: var(--flite-muted); color: #fff; }

/* ============================================================
   Sweep: classes replacing inline styles in settings.html.erb +
   _flite_question_section_editor.html.erb (no visual change).
   ============================================================ */

/* Inline checkbox field row. */
.field--check { display: flex; align-items: center; gap: 0.5rem; }
/* Field with a bit of bottom breathing room (branding toggles). */
.field--spaced { margin-bottom: 1rem; }

/* Help / hint text. */
.settings-hint { color: var(--flite-muted); font-size: 0.8125rem; margin-top: 0.375rem; }
.settings-hint--tiny { color: var(--flite-faint); font-size: 0.75rem; margin-top: 0.25rem; }

/* Logo preview row (Name & Type). */
.settings-logo-preview {
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.settings-logo-preview__img { max-height: 60px; max-width: 240px; }
.settings-logo-preview__remove {
    font-size: 0.8125rem;
    color: var(--flite-text);
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-weight: normal;
}

/* Partner-org list: cap so the Remove action stays beside the org name
   instead of drifting to the far page edge in the full-width control cell. */
.settings-accordion .settings-partner-list { max-width: 26rem; }

/* "+ Add organization" popover summary. */
.settings-add-org-summary {
    font-size: 0.8125rem;
    cursor: pointer;
    color: var(--accent-darker);
    justify-self: start;
}
.settings-add-org {
    margin-top: 0.75rem;
    max-width: 26rem;
}

/* Multi-select for hidden reviewer categories. */
.settings-multiselect { width: 100%; max-width: 26rem; }

/* Admin-notification recipients textarea. */
.settings-recipients {
    width: 100%;
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 0.85rem;
}

/* Add-section row (Application Questions). */
.settings-add-section {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--flite-line);
}
.settings-add-section__form { display: flex; gap: 0.75rem; align-items: center; }
.settings-add-section__input { flex: 1; max-width: 300px; }

/* Danger-zone delete link. */
.settings-danger-link { color: var(--flite-err); font-weight: 600; }

/* Tag manager (Tags card). */
.platform-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.platform-tag-manager {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.625rem;
    border: 1px solid var(--flite-line);
    border-radius: 6px;
    background: #fff;
}
.platform-tag-manager__color {
    width: 20px;
    height: 20px;
    border: none;
    cursor: pointer;
    padding: 0;
}
.platform-tag-manager__delete {
    background: none;
    border: none;
    color: var(--flite-faint);
    cursor: pointer;
    font-size: 1rem;
    padding: 0 0.25rem;
    line-height: 1;
}
.platform-tag-add { display: flex; gap: 0.5rem; align-items: center; }
.platform-tag-add__name {
    font-size: 0.8125rem;
    padding: 0.375rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    width: 180px;
}
.platform-tag-add__color {
    width: 32px;
    height: 32px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
}
.platform-tag-status { font-size: 0.75rem; }

/* Question editor: section-title row, system tag, add-question row, Core toggle. */
.flite-section-editor-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.flite-section-system-tag {
    font-size: 0.7rem;
    color: var(--flite-muted);
    padding: 0.2rem 0.5rem;
    background: #f3f4f6;
    border-radius: 4px;
}
.flite-question-editor-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-top: 0.75rem;
}
/* Core toggle — its own class (was reusing __required); lets it be zoned apart. */
.flite-question-row__core { color: var(--accent-darker); }

/* ---- FLITE Admin page section chrome (replaces inline styles) ---- */
.admin-page { padding: 0 1rem; }
.admin-section { margin-bottom: 2rem; }
.admin-section__head {
    font-size: 1rem;
    border-bottom: 2px solid var(--flite-line);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}
.admin-section__head--info { border-bottom-color: #2563eb; }
.admin-section__head--warn { border-bottom-color: #f59e0b; }
.admin-section__head--danger { border-bottom-color: var(--flite-err); }
.admin-section__head--accent { border-bottom-color: var(--accent-base, #6fc4cb); }
.admin-section__count { font-weight: normal; font-size: 0.8rem; color: var(--flite-muted); }
.admin-section__desc { color: var(--flite-muted); font-size: 0.8125rem; margin-bottom: 0.75rem; }
.admin-empty { color: var(--flite-ok); font-size: 0.875rem; }
.admin-actions { display: flex; gap: 0.5rem; }
.admin-badges { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.admin-cell--muted { color: var(--flite-muted); }
.admin-cell--ink { color: #111827; }
.admin-none { color: var(--flite-faint); }
.admin-note { font-size: 0.7rem; color: var(--flite-muted); display: block; }
.admin-thumb { max-height: 40px; max-width: 120px; border-radius: 4px; }

/* Pending-review card. */
.admin-pending-review {
    border: 1px solid var(--flite-line);
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #fafbfc;
}
.admin-pending-review__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.admin-pending-review__name { font-size: 0.95rem; }
.admin-pending-review__meta { color: var(--flite-muted); font-size: 0.8rem; }
.admin-table--spaced { margin-bottom: 0.75rem; }
.admin-th-check { width: 1.5rem; }
.admin-field-label { font-weight: 600; }
.admin-row--dim { opacity: 0.5; }
.admin-empty--muted { color: var(--flite-muted); font-size: 0.875rem; }

/* ============================================================
   Question-editor calm — the editor's own compact selects keep
   their fixed widths (mapping/type/slide config line); the flat
   white select treatment comes from the .settings-accordion
   rules above. CSS-only: all class hooks are JS-pinned.
   ============================================================ */
.settings-accordion .flite-questions-editor select {
    font-size: 0.8125rem;
    padding: 0.35rem 1.75rem 0.35rem 0.5rem;
    width: auto;
    max-width: none;
}
.settings-accordion .flite-questions-editor .flite-question-row__mapping { max-width: 15rem; }
.settings-accordion .flite-questions-editor .flite-question-row__type { width: 120px; }
.settings-accordion .flite-questions-editor .flite-question-row__slide-select { max-width: 11rem; }
.settings-accordion .flite-questions-editor .flite-question-row__follow-up-type { width: 130px; }
main[data-controller~="stagegates"][data-action~="new"],
main[data-controller~="stagegates"][data-action~="edit"] {
    display: grid;
    grid-auto-flow: row dense;
    grid-gap: 2.5rem;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: masonry;
}
main[data-controller~="stagegates"][data-action~="show"] {
    align-items: start;
    display: grid;
    grid-auto-flow: row dense;
    grid-gap: 2.5rem;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: masonry;
}

.stagegate__controls {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stagegate__control {
    text-decoration: none; /* Removes the underline */
}

.stagegate__control--up {
    /* Additional styles for the up button if needed */
}

.stagegate__control--down {
    /* Additional styles for the down button if needed */
}


.partner__stagegates {
    display: grid;
    grid-gap: 2rem 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    justify-content: start;
    scroll-margin-top: 8rem;
}

.partner__stagegates .details__liner {
    width: 12rem;
}

.partner__stagegates .details__liner select {
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.partner__stagegates .details__liner .button--danger {
    margin-top: 1.25rem;
}

@media (min-width: 65rem) {
    .partner__stagegates {
        grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    }
}

@media (min-width: 93.75rem) {
    .partner__stagegates {
        grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    }
}
/* Descriptors on the startup page (spec 2026-10-07 §7): chip rows per kind,
   the six traits, and the staff add/remove controls. Tokens only
   (design_tokens.css); scoped under [data-descriptors] so nothing leaks. */

[data-descriptors] .desc-row,
[data-descriptors] .desc-traits {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0 0 8px;
}

[data-descriptors] .desc-label {
    flex: 0 0 7.5rem;
    color: var(--text-muted);
    font-size: var(--fs-meta);
    font-weight: 700;
}

[data-descriptors] .desc-item {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    max-width: 100%;
}

[data-descriptors] .desc-chip {
    display: inline-block;
    max-width: 100%;
    padding: 2px 8px;
    border: 1px solid var(--teal-rule);
    border-radius: var(--radius-pill);
    background: var(--teal-wash);
    color: var(--ink);
    font-size: var(--fs-meta);
    font-weight: 400;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: help;
}

[data-descriptors] .desc-none {
    color: var(--text-faint);
    font-size: var(--fs-meta);
    font-style: italic;
}

[data-descriptors] .desc-trait {
    display: inline-block;
    padding: 2px 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: var(--pill-track);
    color: var(--text-muted);
    font-size: var(--fs-meta);
    line-height: 1.4;
}
[data-descriptors] .desc-trait[data-value="yes"] {
    border-color: var(--green-line);
    background: var(--green-wash);
    color: var(--green-ink);
}
[data-descriptors] .desc-trait[data-value="no"] {
    border-color: var(--line);
    background: var(--wash);
    color: var(--text);
}
/* Unknown stays quiet: a missing answer is never a "no" (§0). */
[data-descriptors] .desc-trait[data-value="unknown"] {
    border-style: dashed;
    background: transparent;
    color: var(--text-faint);
}

/* Staff controls */
[data-descriptors] .desc-remove-form {
    display: inline;
    margin: 0;
}
[data-descriptors] .desc-remove {
    padding: 0 4px;
    border: 0;
    background: transparent;
    color: var(--text-faint);
    font-size: var(--fs-ui);
    line-height: 1;
    cursor: pointer;
}
[data-descriptors] .desc-remove:hover,
[data-descriptors] .desc-remove:focus-visible {
    color: var(--red-ink);
}

[data-descriptors] .desc-add {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0 0 0 4px;
}
[data-descriptors] .desc-add select {
    max-width: 16rem;
    padding: 2px 4px;
    border: 1px solid var(--line);
    border-radius: var(--radius-ctl);
    background: var(--wash);
    color: var(--text);
    font-size: var(--fs-meta);
}
[data-descriptors] .desc-add-button {
    padding: 2px 10px;
    border: 1px solid var(--teal-ink);
    border-radius: var(--radius-ctl);
    background: transparent;
    color: var(--teal-ink);
    font-size: var(--fs-meta);
    cursor: pointer;
}
[data-descriptors] .desc-add-button:hover {
    border-color: var(--teal-ink-hover);
    color: var(--teal-ink-hover);
}

[data-descriptors] .desc-alert,
[data-descriptors] .desc-notice {
    margin: 0 0 8px;
    padding: 4px 8px;
    border-radius: var(--radius-ctl);
    font-size: var(--fs-meta);
}
[data-descriptors] .desc-alert {
    border: 1px solid var(--red-line);
    background: var(--red-wash);
    color: var(--red-ink);
}
[data-descriptors] .desc-notice {
    border: 1px solid var(--teal-rule);
    background: var(--teal-wash);
    color: var(--teal-ink);
}
/* --- shared intelligence-page chrome (P9): the workspace eyebrow idiom -------
   Class-namespaced with a unique `intel-` prefix and deliberately UNSCOPED, so
   every intelligence surface (topics, landscape, startup-profile sections, Data
   Health, Imports, Enrichment) shares one section-header idiom. Leak-safe
   because these class names exist nowhere else — the P6 leak was an unscoped
   ELEMENT selector, a different failure.

   The `background` / `color` / `font-size` declarations are NOT decoration.
   These headers are `<header>` elements, and components/header.css carries a
   global `header { background-color: #000; color: #fff; display: grid }` for
   the site nav bar that hits EVERY `<header>` in the app (the same trap is
   documented in app/views/platforms/_flite_proposal_slide.html.erb). Without
   the opt-out every intel section header renders as a black bar — including
   the four already shipped on the Enrichment screen in P9 Task 8.
   -------------------------------------------------------------------------- */
.intel-section__header { display: flex; align-items: center; gap: 0.5rem; background: none; color: var(--text); font-size: 1rem; border-bottom: 2px solid var(--teal-rule); padding-bottom: 0.5rem; margin: 1.75rem 0 0.75rem; }
.intel-section__header h2 { font-size: 0.9375rem; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink); margin: 0; }
/* LAYOUT — direct children ONLY. A header-hosted popover (Members > "Add
   startup") carries its own nested form and may later carry links; they must
   not inherit the right-align meant for the section's own action. */
.intel-section__header > a, .intel-section__header > form, .intel-section__header > popover-toggle { margin-left: auto; }
/* NAV-BAR OPT-OUT — deliberately a DESCENDANT rule, unlike the layout one
   above: `header a` would otherwise repaint EVERY link in here, popover-panel
   links included, pale-teal (--accent-base) at weight 300 and uppercase. */
.intel-section__header a { color: var(--teal-ink); font-weight: 600; letter-spacing: normal; text-transform: none; }
/* ported from components/section.css, which did this for `.section__header` */
.intel-section__header > .actions { margin: 0; }
/* the nav-bar rule also skins popovers black via `--popover-background: #000` */
.intel-section__header popover-toggle { --popover-background: #fff; margin-right: 0; }
.intel-section__header popover-toggle summary { color: var(--teal-ink); }
.intel-section__meta { color: var(--text-muted); font-size: 0.85rem; font-weight: 400; }
.intel-count-pill { background: var(--pill-track); color: var(--text-muted); border-radius: 999px; font-size: 0.75rem; font-weight: 600; padding: 0.1rem 0.55rem; }

main[data-controller~="startups"][data-action~="show"] .si-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
}
main[data-controller~="startups"][data-action~="show"] .si-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--pill-track);
  font-size: 0.85rem;
}
main[data-controller~="startups"][data-action~="show"] .si-chip--suggestion {
  background: transparent;
  border: 1px dashed var(--line);
}
main[data-controller~="startups"][data-action~="show"] .si-chip--ai {
  background: var(--teal-wash);
  color: var(--teal-ink);
}
main[data-controller~="startups"][data-action~="show"] .si-chip--import {
  background: var(--amber-wash);
  color: var(--amber-ink);
}
main[data-controller~="startups"][data-action~="show"] .si-chip--suggested,
main[data-controller~="startups"][data-action~="show"] .si-chip--manual {
  background: var(--pill-track);
}
main[data-controller~="startups"][data-action~="show"] .si-chip__source,
main[data-controller~="startups"][data-action~="show"] .si-chip__score {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: capitalize;
}
main[data-controller~="startups"][data-action~="show"] .si-similar-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
main[data-controller~="startups"][data-action~="show"] .si-similar-row__score {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}
main[data-controller~="startups"][data-action~="show"] .si-empty {
  color: var(--text-muted);
}
main[data-controller~="startups"][data-action~="show"] .si-similar-row__competitor {
  font-size: 0.75rem;
  white-space: nowrap;
}
main[data-controller~="startups"][data-action~="show"] .si-subhead {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin: 0.75rem 0 0.25rem;
}
.timestamps {
    align-self: start;
    display: flex;
    gap: 0 1.75rem;
    justify-self: end;
}
.timestamp {
    color: var(--gray-light);
    font-size: 0.875rem;
    white-space: nowrap;
}
.startup_profile a {
    justify-self: start;
}

.startup_attributes {
    display: grid;
    gap: 0.625rem 2.5rem;
    grid-template-columns: 1fr 1fr;
    justify-content: start;
    margin: 0 0 1.25rem;
    padding: 0.625rem 0;
}
.startup_attribute--wide {
    grid-column-end: span 2;
}
.startup_attribute dd,
.startup_attribute dt {
    margin: 0;
}
.startup_attribute dd {
    font-size: 0.875rem;
    font-weight: 300;
    letter-spacing: calc(-0.15 / 14 * 1em);
    line-height: calc(8 / 7);
}
.startup_attribute dt {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: calc(-0.13 / 12 * 1em);
    line-height: 1.25;
}


.more-options-container {
    display: none;
}

.more-options-container.show {
    display: block;
}

.startup_funding_event {
    display: flex;
    flex-direction: row;
}

.startup_funding_event_details {
    flex: 1
}

.main__liner {
    align-items: start;
    /*display: grid;*/
    /*grid-auto-flow: row dense;*/
    grid-column: 2;
    grid-gap: 2.5rem;
}
.main__liner--wide {
    grid-column: 1;
    grid-template-columns: 1fr 1fr;
}


#startup_summary,
#tasks {
    grid-column-end: span 2;
}
#startup_website_image {
    grid-column: 1;
    grid-column-end: span 2;
}
#startup_website_image img {
    /*max-height: 500px;*/
    max-width: 100%;
}
#startup_profile_projects {
    grid-column: 2;
}


.right-side {
    grid-area: actions;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-end;
}

.request_deck_form {
    text-align: right;
}

.request_deck_form .form-group {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.request_deck_form label {
    font-size: 0.875rem;
    color: var(--gray-light);
    display: block;
    margin-bottom: 0.5rem;
    font-weight: normal;
    text-align: right;
}

.request_deck_form .form-control {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    width: auto;  /* This allows the select to size to its content */
    display: inline-block;  /* This helps with the right alignment */
    margin-left: auto;  /* Pushes the select to the right */
}

.request_deck_form .btn {
    display: block;
    margin-left: auto;  /* Pushes the button to the right */
}

.request_deck_container {
    display: flex;
    gap: 0 1.75rem;
    justify-self: end;
}

/* Pipeline History Section */
.pipeline-history {
    grid-column: 1 / -1;
    margin-top: 2rem;
}

/* Pipeline Tabs */
.pipeline-tabs__nav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--gray-lighter, #e5e5e5);
    padding-bottom: 0.5rem;
}

.pipeline-tabs__tab {
    padding: 0.5rem 1rem;
    border: 1px solid var(--gray-lighter, #e5e5e5);
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--gray, #666);
    transition: all 0.15s ease;
}

.pipeline-tabs__tab:hover {
    background: var(--gray-lightest, #f5f5f5);
}

.pipeline-tabs__tab--active {
    background: var(--primary, #007bff);
    color: white;
    border-color: var(--primary, #007bff);
}

.pipeline-tabs__panel {
    display: block;
}

.pipeline-tabs__panel[hidden] {
    display: none;
}

/* Pipeline Timeline */
.pipeline-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}

.pipeline-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gray-lighter, #e5e5e5);
}

.pipeline-event {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    position: relative;
}

.pipeline-event__marker {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary, #007bff);
    border: 3px solid white;
    box-shadow: 0 0 0 2px var(--gray-lighter, #e5e5e5);
    flex-shrink: 0;
    z-index: 1;
}

.pipeline-event__content {
    flex: 1;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gray-lightest, #f0f0f0);
}

.pipeline-event:last-child .pipeline-event__content {
    border-bottom: none;
}

.pipeline-event__header {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.pipeline-event__badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pipeline-event__badge--added {
    background: #d4edda;
    color: #155724;
}

.pipeline-event__badge--status_changed {
    background: #fff3cd;
    color: #856404;
}

.pipeline-event__badge--stagegate_entered {
    background: #cce5ff;
    color: #004085;
}

.pipeline-event__badge--stagegate_exited {
    background: #e2e3e5;
    color: #383d41;
}

.pipeline-event__badge--removed {
    background: #f8d7da;
    color: #721c24;
}

.pipeline-event__time {
    font-size: 0.75rem;
    color: var(--gray-light, #999);
}

.pipeline-event__description {
    margin: 0 0 0.5rem;
    font-size: 0.9375rem;
    color: var(--text, #333);
}

.pipeline-event__comment {
    margin: 0.5rem 0;
    padding: 0.5rem;
    background: var(--gray-lightest, #f8f9fa);
    border-radius: 4px;
    font-size: 0.875rem;
    color: var(--gray, #666);
}

.pipeline-event__meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.75rem;
    color: var(--gray-light, #999);
}

.pipeline-event__meta span::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    margin-right: 0.25rem;
    vertical-align: middle;
}

.pipeline-event__meta span:first-child::before {
    display: none;
}

.pipeline-empty {
    padding: 2rem;
    text-align: center;
    color: var(--gray-light, #999);
    font-style: italic;
}

.pipeline-event__delete {
    margin-left: auto;
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.15s ease;
}

.pipeline-event__delete:hover {
    opacity: 1;
    background: #c82333;
}

.pipeline-event__delete::before {
    display: none;
}

/* Deadpooled / absorbed banner (placeholder, 2026-10-13). */
.startup-status-banner {
    border: 1px solid var(--line);
    border-left-width: 4px;
    border-radius: var(--radius-item);
    color: var(--ink);
    font-size: 0.9375rem;
    margin: 0 0 1.25rem;
    padding: 0.625rem 0.875rem;
}
.startup-status-banner--deadpooled {
    background: var(--red-wash);
    border-color: var(--red-line);
    border-left-color: var(--red-ink);
}
.startup-status-banner--absorbed {
    background: var(--amber-wash);
    border-color: var(--amber-line);
    border-left-color: var(--amber-accent);
}
.startup-status-banner a {
    color: var(--teal-ink);
}
.startup-status-banner__why {
    color: var(--text-muted);
    display: block;
    font-size: 0.8125rem;
    margin-top: 0.25rem;
}
main[data-controller~="startups"][data-action~="new"],
main[data-controller~="startups"][data-action~="edit"] {
    display: grid;
    grid-auto-flow: row dense;
    grid-gap: 2.5rem;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: masonry;
}
main[data-controller~="startups"][data-action~="show"] {
    align-items: start;
    display: grid;
    grid-auto-flow: row dense;
    grid-gap: 2.5rem;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: masonry;
}


/* ===== Page header & toolbar ===== */

.startups-page .section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.startups-page .section__header h1 {
    margin: 0;
}
.startups-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}


/* ===== Search bar ===== */

.startups-search {
    margin-bottom: 1rem;
}
.startups-search__bar {
    display: flex;
}
.startups-search__input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: solid 2px var(--accent-base);
    border-radius: 4px;
    font-size: 0.9375rem;
    line-height: 1.4;
    outline: none;
    transition: border-color 0.15s;
}
.startups-search__input:focus {
    border-color: var(--accent-darker);
}
.startups-search__input::placeholder {
    color: var(--gray-lighter);
}
.startups-search__actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}


/* ===== Advanced filters panel ===== */

.startups-filters {
    margin-bottom: 1rem;
}
.startups-filters__toggle {
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--accent-darker);
    letter-spacing: 0.02em;
    padding: 0.375rem 0;
    user-select: none;
    list-style: none;
}
.startups-filters__toggle::-webkit-details-marker {
    display: none;
}
.startups-filters__toggle::before {
    content: "\25B6";
    display: inline-block;
    margin-right: 0.375rem;
    font-size: 0.625rem;
    transition: transform 0.15s;
}
.startups-filters[open] > .startups-filters__toggle::before {
    transform: rotate(90deg);
}
.startups-filters__panel {
    padding: 1rem 0 0.25rem;
}
.startups-filters__row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-bottom: 0.75rem;
}
.startups-filters__row > .field {
    flex: 1 1 10rem;
    min-width: 0;
    margin-top: 0;
    margin-bottom: 0;
}
.startups-filters__row > .field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-light);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.startups-filters__row > .field input[type="text"],
.startups-filters__row > .field input[type="number"],
.startups-filters__row > .field select {
    width: 100%;
}


/* ===== Results header & count ===== */

.startups-results__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    margin-bottom: 0.75rem;
}
.startups-results__count {
    font-size: 0.8125rem;
    color: var(--gray-light);
}


/* ===== Active filter chips ===== */

.startups-results__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--accent-lighter);
    color: var(--gray-dark);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    white-space: nowrap;
}
.filter-chip__remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    font-size: 0.875rem;
    line-height: 1;
    color: var(--gray-light);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.filter-chip__remove:hover {
    background: var(--accent-base);
    color: var(--gray-dark);
}


/* ===== Empty state ===== */

.startups-results__empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gray-light);
}
.startups-results__empty strong {
    display: block;
    font-size: 1rem;
    color: var(--gray-dark);
    margin-bottom: 0.5rem;
}


/* ===== CSV upload collapsible ===== */

.startups-upload {
    position: relative;
}
.startups-upload__form {
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 10;
    background: #fff;
    border: solid 1px var(--gray-lighter);
    border-radius: 4px;
    padding: 1rem;
    margin-top: 0.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-width: 16rem;
}
.startups-upload__form .field {
    margin-bottom: 0.5rem;
}


/* ===== Button helpers ===== */

.button--outline {
    background: transparent;
    border: solid 1px var(--gray-lighter);
    color: var(--gray-dark);
}
.button--outline:hover {
    background: var(--gray-lightest);
}


/* ===== Startups table (preserved) ===== */

.startups-list {
    margin-top: 0;
}
.startups-list__table {
    --icon-size: 3.75rem;
    border-collapse: collapse;
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: calc(-0.13 / 12 * 1em);
    line-height: calc(5 / 4);
    width: 100%;
}
.startups-list col.icon {
    width: var(--icon-size);
}
.startups-list .numeric {
    text-align: right;
}
.startups-list a,
.startups-list img {
    display: block;
}
.startups-list a {
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: calc(-0.15 / 14 * 1em);
    line-height: calc(8 / 7);
    text-decoration: none;
    text-transform: uppercase;
}
.startups-list td {
    border-top: solid 1px var(--accent-lighter);
    color: var(--gray-light);
    padding: 0 0 0.625rem;
    vertical-align: middle;
}
.startups-list th + th,
.startups-list td + td {
    padding-left: 0.625rem;
}
.startups-list th {
    text-align: left;
}

.startups-list .p-name {
    color: var(--gray-dark);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: calc(-0.17 / 16 * 1em);
    line-height: calc(19 / 16);
    text-transform: none;
}

.form--inline {
    align-items: end;
    display: flex;
    gap: 0.5rem 2rem;
}

.startup_form {
    display: grid;
    grid-column: 1;
    grid-gap: 0.5rem 1rem;
    grid-template-columns: 1fr 1fr;
}
.startup_form input[type=email],
.startup_form input[type=file],
.startup_form input[type=url],
.startup_form input[type=text],
.startup_form select {
    width: 100%;
}
.startup_form input[size] {
    width: unset;
}
.startup_form textarea {
    resize: vertical;
    width: 100%;
}

.startup_form .field--reset {
    grid-column: 1;
}
.startup_form .field--wide,
.startup_form .actions {
    grid-column: 1 / span 2;
}

.startup-attachments__upload {
    --popover-padding: 1rem 1.25rem 0.5rem;
    min-width: 16rem;
}

.request_deck_form {
    width: 100%;
}
/* Enrichment suggestions review screen (spec §9 / Task 8) — the seamless-only
   apply/dismiss screen for EnrichmentSuggestion. Token-only from birth, like
   enrichment.css: every colour comes from design_tokens.css, and every class
   is namespaced under .suggestions-* so require_tree can't leak these rules
   into another page. */

.suggestions-filters { margin-bottom: 1rem; }

.suggestions-buckets { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.5rem 0; }
.suggestions-pill { background: var(--pill-track); color: var(--text-muted); border-radius: 999px; font-size: 0.8rem; font-weight: 600; padding: 0.2rem 0.7rem; text-decoration: none; }
.suggestions-pill--active { background: var(--teal-rule); color: var(--ink); }
.suggestions-pill--agrees { background: var(--green-wash); color: var(--green-ink); }
.suggestions-pill--partial { background: var(--amber-wash); color: var(--amber-ink); }
.suggestions-pill--conflicts { background: var(--red-wash); color: var(--red-ink); }
.suggestions-pill--no_summary { background: var(--pill-track); color: var(--text-muted); }

.suggestions-filter-form { display: flex; flex-wrap: wrap; align-items: end; gap: 1rem; font-size: 0.9rem; color: var(--text); margin: 0.75rem 0; }

.suggestions-hint { color: var(--text-faint); font-size: 0.85rem; }

.suggestions-list { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.suggestions-list thead th { text-align: left; color: var(--text-muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid var(--teal-rule); padding: 0.4rem 0.5rem; }
.suggestions-row td { padding: 0.5rem; border-bottom: 1px solid var(--line-soft); }
.suggestions-meta { color: var(--text-faint); font-size: 0.8rem; }
.suggestions-topics { color: var(--text-muted); font-size: 0.85rem; }

.suggestions-bucket-pill { background: var(--pill-track); color: var(--text-muted); border-radius: 999px; font-size: 0.7rem; font-weight: 650; text-transform: uppercase; letter-spacing: 0.03em; padding: 0.1rem 0.55rem; }
.suggestions-bucket-pill--agrees { background: var(--green-wash); color: var(--green-ink); }
.suggestions-bucket-pill--partial { background: var(--amber-wash); color: var(--amber-ink); }
.suggestions-bucket-pill--conflicts { background: var(--red-wash); color: var(--red-ink); }
.suggestions-bucket-pill--no_summary, .suggestions-bucket-pill--none { background: var(--pill-track); color: var(--text-muted); }

.suggestions-detail-row td { border-bottom: 1px solid var(--line-soft); padding: 0 0.5rem 0.75rem; }
.suggestions-detail-row summary { cursor: pointer; color: var(--teal-ink); font-weight: 600; font-size: 0.85rem; padding: 0.25rem 0; }

.suggestions-table { width: 100%; border-collapse: collapse; margin: 0.5rem 0; font-size: 0.85rem; }
.suggestions-table th { text-align: left; color: var(--text-muted); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.03em; border-bottom: 1px solid var(--teal-rule); padding: 0.35rem 0.5rem; }
.suggestions-table td { border-bottom: 1px solid var(--line-soft); padding: 0.4rem 0.5rem; vertical-align: top; }
.suggestions-method { color: var(--text-faint); font-size: 0.75rem; }
.suggestions-facts { color: var(--text-muted); font-size: 0.8rem; margin-top: 0.35rem; }
.suggestions-current { color: var(--text-muted); }
.suggestions-thumb { width: 32px; height: 32px; object-fit: contain; border-radius: var(--radius-ctl); background: var(--wash); }

.suggestions-apply { margin-bottom: 0.4rem; }
.suggestions-dismiss { display: inline-block; }

/* The staff "Applied" check (Task 6d / owner ruling OD-5): one card per apply!
   call, one row per attribute it wrote. Same token-only rule as the rest of
   this file — no colour literal has ever been minted here. */
.suggestions-applied { border: 1px solid var(--line-soft); border-radius: var(--radius-item); padding: 0.75rem; margin-bottom: 0.75rem; }
.suggestions-applied__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; }
.suggestions-applied__head strong { min-width: 0; }
.suggestions-applied__controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.suggestions-applied__control { display: inline-block; margin: 0; }
.suggestions-applied__input { font-size: 0.85rem; padding: 0.2rem 0.4rem; border: 1px solid var(--line); border-radius: var(--radius-ctl); max-width: 14rem; }
/* summary / extra_details / linkedin_profiles: the Change box has to hold the
   value it is correcting, and for the array column one URL per line — so it
   takes the whole control row rather than a 14rem slot beside two buttons. */
.suggestions-applied__control--long { flex-basis: 100%; }
.suggestions-applied__input--long { display: block; width: 100%; max-width: 100%; margin-bottom: 0.35rem; font-family: inherit; }
.suggestions-applied__long summary { cursor: pointer; color: var(--teal-ink); }
main[data-controller~="topics"] .topic-member,
main[data-controller~="topics"] .topic-suggestion {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
main[data-controller~="topics"] .topic-member__source {
  font-size: 0.75rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--blue-wash);
  color: var(--blue-ink);
  text-transform: capitalize;
}
main[data-controller~="topics"] .topic-suggestion__score {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}
main[data-controller~="topics"] .topic-description {
  max-width: 60ch;
  color: var(--text-muted);
}

main[data-controller~="topics"] .topic-timeline,
main[data-controller~="startups"] .topic-timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}
main[data-controller~="topics"] .topic-timeline__entry,
main[data-controller~="startups"] .topic-timeline__entry {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.9rem;
}
main[data-controller~="topics"] .topic-timeline__date,
main[data-controller~="startups"] .topic-timeline__date {
  color: var(--text-muted);
  font-size: 0.8rem;
  white-space: nowrap;
}
main[data-controller~="topics"] .topic-timeline__kind,
main[data-controller~="startups"] .topic-timeline__kind {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: var(--pill-track);
  white-space: nowrap;
}
main[data-controller~="topics"] .topic-timeline__entry--acquisition .topic-timeline__kind { background: var(--amber-wash); color: var(--amber-ink); }
main[data-controller~="topics"] .topic-timeline__entry--shutdown .topic-timeline__kind { background: var(--red-wash); color: var(--red-ink); }
main[data-controller~="topics"] .topic-timeline__entry--funding .topic-timeline__kind { background: var(--green-wash); color: var(--green-ink); }
main[data-controller~="topics"] .topic-timeline__entry--joined .topic-timeline__kind { background: var(--blue-wash); color: var(--blue-ink); }
main[data-controller~="topics"] .topic-timeline__source,
main[data-controller~="topics"] .topic-timeline__empty {
  color: var(--text-muted);
  font-size: 0.8rem;
}

main[data-controller~="topics"] .topic-report-row__meta,
main[data-controller~="topics"] .topic-reports__empty,
main[data-controller~="topic-reports"] .topic-report__meta {
  color: var(--text-muted);
  font-size: 0.85rem;
}
main[data-controller~="topic-reports"] .topic-report__body {
  max-width: 78ch;
}
main[data-controller~="topic-reports"] .topic-report__body h2 {
  margin-top: 1.5rem;
}
/* ============================================================================
   UI kit — the shared component layer for staff pages outside the Innovation
   Workspace. Documented in docs/design/ui-kit.md (read that first).

   OPT-IN. Nothing here applies until a page calls `ui_kit_page!` (UiKitHelper),
   which stamps `class="ui-kit"` on the layout's <main>. Every rule below is
   scoped under `.ui-kit` (or `body:has(> main.ui-kit)` for the flash, which
   renders outside <main>), so FLITE layouts, partner dashboards, cached
   fragments on other surfaces, and every page that has not opted in render
   exactly as before.

   Vocabulary: the same recipe as the Innovation Workspace (.iw-btn, .iw-field,
   .iw-sec__head, .iw-chip, .iw-passes). The kit shares its values through
   design_tokens.css rather than aliasing iw-* classes. Never mint hex values
   here; add a token to design_tokens.css if one is truly missing.

   Specificity contract: every component is `.ui-kit .ui-<thing>` (0,2,0), which
   beats the legacy base rules in base.css (`button`, `input[type=submit]`,
   `.button`, `select`, `h2`...). Scope-wide control styling uses :where() so
   component classes still win over it.
   ========================================================================= */

/* ---------------------------------------------------------------------------
   Scope: the page itself
   ------------------------------------------------------------------------ */

/* (0,1,2) beats the (0,1,1) `main[data-controller~="platforms|contracts|..."]`
   2fr/1fr grids, so a kit page owns the full width and nothing is pinned to
   column 1. !important because focus_areas.css forces
   `main[data-controller~="focus-areas"] { display: flex !important }`; with
   both important, the higher specificity here still wins. */
html main.ui-kit {
    display: block !important;
    font-family: var(--font-ui);
    color: var(--text);
}

.ui-kit a {
    color: var(--teal-ink);
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
}
.ui-kit a:hover {
    color: var(--teal-ink-hover);
}
.ui-kit ::selection {
    background: var(--teal-ring);
    color: var(--ink);
}
.ui-kit :focus-visible {
    outline: 2px solid var(--teal-ink);
    outline-offset: 2px;
}

/* Base.css `button { display: inline-block }` defeats [hidden]. */
.ui-kit [hidden] {
    display: none !important;
}

.ui-kit .ui-muted { color: var(--text-muted); }
.ui-kit .ui-faint { color: var(--text-faint); }
.ui-kit .ui-num { font-variant-numeric: tabular-nums; }
.ui-kit .ui-nowrap { white-space: nowrap; }

/* ---------------------------------------------------------------------------
   Page header: title (+ optional kicker / meta line), actions on one baseline
   ------------------------------------------------------------------------ */

.ui-kit .ui-page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px 24px;
    margin: 0 0 20px;
    padding: 0 0 14px;
    border-bottom: 1px solid var(--line);
}
.ui-kit .ui-page-head__titles {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 auto;
    min-width: 0;
}
.ui-kit .ui-page-head__kicker {
    margin: 0;
    font: 700 0.6875rem / 1.2 var(--font-ui);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.ui-kit .ui-page-head__title {
    margin: 0;
    font: 400 1.75rem / 1.15 var(--font-ui);
    letter-spacing: -0.003em;
    text-transform: uppercase;
    color: var(--ink);
}
.ui-kit .ui-page-head__meta {
    margin: 0;
    font: 400 var(--fs-body-sm) / 1.35 var(--font-ui);
    letter-spacing: 0;
    color: var(--text-muted);
}
.ui-kit .ui-page-head__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

/* ---------------------------------------------------------------------------
   Section header: the brand thread (uppercase eyebrow over the teal hairline)
   ------------------------------------------------------------------------ */

.ui-kit .ui-section {
    margin: 0 0 32px;
}
.ui-kit .ui-section__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    margin: 0 0 12px;
    padding: 0 0 8px;
    border-bottom: 2px solid var(--teal-rule);
}
.ui-kit .ui-section__title {
    margin: 0;
    font: 650 0.9375rem / 1.2 var(--font-ui);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink);
}
.ui-kit .ui-section__meta {
    font-size: var(--fs-meta);
    color: var(--text-muted);
}
.ui-kit .ui-section__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

/* ---------------------------------------------------------------------------
   Buttons: one height, one radius, sentence case.
   Default = secondary (outlined, teal label). One --primary per form.
   ------------------------------------------------------------------------ */

.ui-kit .ui-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-sizing: border-box;
    height: 32px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-ctl);
    background: white;
    color: var(--teal-ink);
    font: 600 var(--fs-ui) / 1 var(--font-ui);
    letter-spacing: 0;
    text-transform: none;
    text-decoration: none;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    list-style: none;
    transition: background-color 0.15s ease-out, border-color 0.15s ease-out, color 0.15s ease-out;
}
.ui-kit .ui-btn::-webkit-details-marker { display: none; }
.ui-kit .ui-btn:hover {
    border-color: var(--teal-ink);
    color: var(--teal-ink-hover);
}
.ui-kit .ui-btn:focus-visible {
    outline: 2px solid var(--teal-ink);
    outline-offset: 2px;
}

.ui-kit .ui-btn--primary {
    background: var(--teal-ink);
    border-color: var(--teal-ink);
    color: white;
}
.ui-kit .ui-btn--primary:hover {
    background: var(--teal-ink-hover);
    border-color: var(--teal-ink-hover);
    color: white;
}

.ui-kit .ui-btn--quiet {
    color: var(--text-muted);
}
.ui-kit .ui-btn--quiet:hover {
    border-color: var(--text-faint);
    color: var(--ink);
}

.ui-kit .ui-btn--danger {
    border-color: var(--red-line);
    color: var(--red-ink);
}
.ui-kit .ui-btn--danger:hover {
    background: var(--red-wash);
    border-color: var(--red-ink);
    color: var(--red-ink);
}

/* Destructive action that stays quiet until it is pointed at: grey text,
   red on hover or keyboard focus. The default for row-level deletes. */
.ui-kit .ui-btn--danger-quiet {
    border-color: transparent;
    background: transparent;
    color: var(--text-muted);
}
.ui-kit .ui-btn--danger-quiet:is(:hover, :focus-visible) {
    border-color: transparent;
    background: var(--red-wash);
    color: var(--red-ink);
}

/* Bare text action (a link that is really a button, or a quiet row action). */
.ui-kit .ui-btn--text {
    height: auto;
    padding: 2px 2px;
    border-color: transparent;
    background: transparent;
}
.ui-kit .ui-btn--text:hover {
    border-color: transparent;
    text-decoration: underline;
}
.ui-kit .ui-btn--text.ui-btn--danger:hover {
    background: transparent;
}

.ui-kit .ui-btn--sm {
    height: 26px;
    padding: 0 9px;
    font-size: var(--fs-meta);
}

.ui-kit .ui-btn:disabled,
.ui-kit .ui-btn[aria-disabled="true"] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* button_to wraps its button in a form; keep it inline in rows and toolbars. */
.ui-kit form.button_to {
    display: inline-flex;
    margin: 0;
}

/* ---------------------------------------------------------------------------
   Pills, chips, counts
   ------------------------------------------------------------------------ */

.ui-kit .ui-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-sizing: border-box;
    height: 20px;
    max-width: 100%;
    padding: 0 8px;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    background: var(--pill-track);
    color: var(--text-muted);
    font: 600 0.6875rem / 1 var(--font-ui);
    letter-spacing: 0.02em;
    text-transform: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}
.ui-kit .ui-pill--outline { background: white; border-color: var(--line); }
.ui-kit .ui-pill--teal  { background: var(--teal-wash);  border-color: var(--teal-rule);  color: var(--teal-ink); }
.ui-kit .ui-pill--green { background: var(--green-wash); border-color: var(--green-line); color: var(--green-ink); }
.ui-kit .ui-pill--amber { background: var(--amber-wash); border-color: var(--amber-line); color: var(--amber-ink); }
.ui-kit .ui-pill--red   { background: var(--red-wash);   border-color: var(--red-line);   color: var(--red-ink); }
.ui-kit .ui-pill--blue  { background: var(--blue-wash);  border-color: var(--blue-line);  color: var(--blue-ink); }

/* The × inside a removable filter pill. */
.ui-kit .ui-pill__remove {
    margin-right: -3px;
    color: var(--text-faint);
    font-size: 0.875rem;
    line-height: 1;
    text-decoration: none;
}
.ui-kit .ui-pill__remove:hover {
    color: var(--ink);
}

.ui-kit .ui-count {
    display: inline-grid;
    place-items: center;
    box-sizing: border-box;
    min-width: 20px;
    height: 18px;
    padding: 0 6px;
    border-radius: var(--radius-pill);
    background: var(--pill-track);
    color: var(--text-muted);
    font: 700 0.6875rem / 1 'Overpass Badge', var(--font-ui);
    font-variant-numeric: tabular-nums;
    vertical-align: middle;
}
/* White on amber: only for "someone owes a decision" counts. */
.ui-kit .ui-count--attn {
    background: var(--amber-accent);
    color: white;
}

/* ---------------------------------------------------------------------------
   Card / panel
   ------------------------------------------------------------------------ */

.ui-kit .ui-card {
    box-sizing: border-box;
    padding: 16px 18px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-card);
    background: white;
}
.ui-kit .ui-card--wash {
    background: var(--wash);
}
.ui-kit .ui-card--flush {
    padding: 0;
    overflow: hidden;
}
.ui-kit .ui-card + .ui-card {
    margin-top: 12px;
}

/* ---------------------------------------------------------------------------
   Toolbar / filter row, results line
   ------------------------------------------------------------------------ */

.ui-kit .ui-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px 12px;
    margin: 0 0 16px;
}
.ui-kit .ui-toolbar__grow {
    flex: 1 1 18rem;
    min-width: 0;
}
.ui-kit .ui-toolbar__grow > :where(input, select) {
    width: 100%;
}
.ui-kit .ui-toolbar__end {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.ui-kit .ui-results {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    margin: 0 0 8px;
    font-size: var(--fs-meta);
    color: var(--text-muted);
}
.ui-kit .ui-results b {
    color: var(--ink);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* Collapsible filter panel: <details class="ui-disclosure">. */
.ui-kit .ui-disclosure > summary {
    list-style: none;
    cursor: pointer;
}
.ui-kit .ui-disclosure > summary::-webkit-details-marker { display: none; }
.ui-kit .ui-disclosure[open] > summary.ui-btn {
    border-color: var(--teal-ink);
    background: var(--teal-wash);
}
.ui-kit .ui-disclosure__panel {
    margin-top: 8px;
}

/* A disclosure whose panel floats over the content below the toolbar (the
   Innovation map filter pattern). The toolbar is the positioning box, so the
   panel spans the toolbar's full width. */
.ui-kit .ui-toolbar {
    position: relative;
}
.ui-kit .ui-disclosure--float > .ui-disclosure__panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    z-index: 20;
    margin: 0;
    box-shadow: var(--shadow-pop);
}

/* Menu: a <details class="ui-menu"> whose summary is a .ui-btn and whose panel
   drops down from it, right-aligned (small forms, overflow actions). */
.ui-kit .ui-menu {
    position: relative;
    display: inline-block;
}
.ui-kit .ui-menu > summary {
    list-style: none;
}
.ui-kit .ui-menu > summary::-webkit-details-marker { display: none; }
.ui-kit .ui-menu[open] > summary.ui-btn {
    border-color: var(--teal-ink);
}
.ui-kit .ui-menu__panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 30;
    box-sizing: border-box;
    min-width: 18rem;
    padding: 14px 16px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-card);
    background: white;
    box-shadow: var(--shadow-pop);
    text-align: left;
    white-space: normal;
}
.ui-kit .ui-menu--start .ui-menu__panel {
    right: auto;
    left: 0;
}
/* Set by ui_disclosure_controller while open: escapes the overflow clipping
   of .ui-table-wrap and .ui-card--flush. */
.ui-kit .ui-menu__panel.is-fixed {
    position: fixed;
    overflow-y: auto;
}
.ui-kit .ui-menu__panel--compact {
    min-width: 10rem;
    padding: 6px;
}
/* One action per line inside a menu panel (overflow menus). */
.ui-kit .ui-menu__item,
.ui-kit .ui-menu__panel form.button_to > button,
.ui-kit .ui-menu__panel form > .ui-menu__item {
    display: flex;
    align-items: center;
    width: 100%;
    height: 30px;
    padding: 0 10px;
    border: 0;
    border-radius: var(--radius-ctl);
    background: transparent;
    color: var(--text);
    font: 600 var(--fs-ui) / 1 var(--font-ui);
    text-align: left;
    text-decoration: none;
    text-transform: none;
    white-space: nowrap;
    cursor: pointer;
}
.ui-kit .ui-menu__item:is(:hover, :focus-visible) {
    background: var(--wash);
    color: var(--ink);
}
.ui-kit .ui-menu__item--danger:is(:hover, :focus-visible) {
    background: var(--red-wash);
    color: var(--red-ink);
}
.ui-kit .ui-menu__panel form {
    margin: 0;
}
/* The overflow (kebab) trigger: a small square quiet button. */
.ui-kit .ui-btn--icon {
    width: 28px;
    height: 28px;
    padding: 0;
    color: var(--text-muted);
}

/* ---------------------------------------------------------------------------
   Form controls. Scope-wide: every text-like input, select and textarea on a
   kit page takes this look. :where() keeps it at (0,1,0) so .ui-* classes
   override it.
   ------------------------------------------------------------------------ */

.ui-kit :where(
    input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="file"]):not([type="hidden"]):not([type="range"]):not([type="color"]),
    select,
    textarea
) {
    box-sizing: border-box;
    min-height: 32px;
    max-width: 100%;
    margin: 0;
    padding: 5px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-ctl);
    background-color: white;
    box-shadow: none;
    color: var(--text);
    font: 400 var(--fs-body-sm) / 1.35 var(--font-ui);
    letter-spacing: 0;
    transition: border-color 0.15s ease-out, box-shadow 0.15s ease-out;
}
.ui-kit :where(select:not([multiple])) {
    appearance: none;
    padding-right: 28px;
    background: white var(--select-arrow) no-repeat right 10px center / 10px 6px;
}
.ui-kit :where(select[multiple]) {
    background-image: none;
}
.ui-kit :where(textarea) {
    width: 100%;
    padding: 8px 10px;
    line-height: 1.45;
    resize: vertical;
}
.ui-kit :where(input, select, textarea)::placeholder {
    color: var(--text-faint);
    opacity: 1;
}
.ui-kit :where(input, select, textarea):focus {
    border-color: var(--teal-ink);
    box-shadow: 0 0 0 3px var(--teal-ring);
    outline: none;
}
.ui-kit :where(input, select, textarea):disabled {
    background-color: var(--wash);
    color: var(--text-faint);
    opacity: 1;
    cursor: not-allowed;
}
/* (0,2,1): base.css `select:disabled` / `textarea:disabled` (0,1,1) repaint
   disabled controls grey-on-grey; the :where() rule above is too weak. */
.ui-kit select:disabled,
.ui-kit textarea:disabled,
.ui-kit input:disabled:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]) {
    border: 1px solid var(--line);
    background-color: var(--wash);
    color: var(--text-muted);
    opacity: 1;
    cursor: not-allowed;
}

/* (0,2,1): must beat base.css `input[type="checkbox"] { transform: scale(1.5) }`. */
.ui-kit input[type="checkbox"],
.ui-kit input[type="radio"] {
    width: 15px;
    height: 15px;
    margin: 0;
    padding: 0;
    transform: none;
    accent-color: var(--teal-ink);
    vertical-align: middle;
    cursor: pointer;
}
.ui-kit input[type="file"] {
    font: 400 var(--fs-body-sm) / 1.35 var(--font-ui);
    color: var(--text-muted);
}
.ui-kit input[type="file"]::file-selector-button {
    height: 26px;
    margin-right: 10px;
    padding: 0 9px;
    border: 1px solid var(--line);
    border-radius: var(--radius-ctl);
    background: white;
    color: var(--teal-ink);
    font: 600 var(--fs-meta) / 1 var(--font-ui);
    cursor: pointer;
}

/* select2 (still jQuery-initialised on some filters). */
.ui-kit .ui-field .select2-container {
    width: 100% !important; /* select2 writes an inline width */
}
.ui-kit .select2-container .select2-selection--single,
.ui-kit .select2-container .select2-selection--multiple {
    min-height: 32px;
    border: 1px solid var(--line);
    border-radius: var(--radius-ctl);
    background: white;
    color: var(--text);
    font: 400 var(--fs-body-sm) / 1.35 var(--font-ui);
}
.ui-kit .select2-container .select2-selection--single {
    height: 32px;
    padding: 0 28px 0 10px;
}
.ui-kit .select2-container .select2-selection--single .select2-selection__rendered {
    padding: 0;
    line-height: 30px;
    color: var(--text);
}
.ui-kit .select2-container .select2-selection--single .select2-selection__arrow {
    top: 0;
    right: 0;
    width: 28px;
    height: 30px;
}
/* Same arrow as a native kit select. */
.ui-kit .select2-container .select2-selection--single .select2-selection__arrow b {
    position: absolute;
    inset: 0;
    width: auto;
    height: auto;
    margin: 0;
    border: 0;
    background: var(--select-arrow) no-repeat center / 10px 6px;
}
.ui-kit .select2-container .select2-selection__placeholder {
    color: var(--text-faint);
}
.ui-kit .select2-container--focus .select2-selection,
.ui-kit .select2-container--open .select2-selection {
    border-color: var(--teal-ink);
}
.ui-kit .select2-container .select2-selection--multiple .select2-selection__choice {
    border: 0;
    border-radius: var(--radius-pill);
    background: var(--pill-track);
    color: var(--text-muted);
    font-size: var(--fs-meta);
}

/* Field: label above, control, then hint or error. */
.ui-kit .ui-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    margin: 0;
}
.ui-kit .ui-field__label,
.ui-kit .ui-field > label {
    margin: 0;
    font: 650 0.6875rem / 1.2 var(--font-ui);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.ui-kit .ui-field__hint {
    margin: 0;
    font-size: var(--fs-meta);
    line-height: 1.35;
    color: var(--text-muted);
}
.ui-kit .ui-field__error {
    margin: 0;
    font-size: var(--fs-meta);
    line-height: 1.35;
    color: var(--red-ink);
}
.ui-kit .ui-field.is-invalid :where(input, select, textarea),
.ui-kit .field_with_errors :where(input, select, textarea) {
    border-color: var(--red-ink);
}
/* Checkbox / radio with its label on the right, sentence case. */
.ui-kit .ui-field--check {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}
.ui-kit .ui-field--check > label {
    font: 400 var(--fs-body-sm) / 1.35 var(--font-ui);
    letter-spacing: 0;
    text-transform: none;
    color: var(--text);
    cursor: pointer;
}

/* Legacy bridge: shared form partials still emit `<div class="field"><label>`.
   On a kit page their labels take the kit label recipe so a legacy partial
   rendered inside a kit page does not shout at 1.125rem. */
.ui-kit .field > label {
    display: block;
    margin: 0 0 5px;
    font: 650 0.6875rem / 1.2 var(--font-ui);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.ui-kit .field {
    margin: 0 0 12px;
}
.ui-kit .field + .field {
    margin-top: 0;
}
/* ...and their scaffold `.actions` submit reads as the form's primary button. */
.ui-kit .actions > input[type="submit"]:not([class*="ui-btn"]) {
    height: 32px;
    padding: 0 12px;
    border: 1px solid var(--teal-ink);
    border-radius: var(--radius-ctl);
    background: var(--teal-ink);
    color: white;
    font: 600 var(--fs-ui) / 1 var(--font-ui);
    letter-spacing: 0;
    text-transform: none;
    cursor: pointer;
}
.ui-kit .actions > input[type="submit"]:not([class*="ui-btn"]):hover {
    background: var(--teal-ink-hover);
}

/* Layouts for groups of fields. */
.ui-kit .ui-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
    gap: 12px 16px;
}
.ui-kit .ui-form-grid > .ui-field--wide {
    grid-column: 1 / -1;
}
/* Actions as the grid's last cell (a filter row): bottom-aligned with the
   controls beside them. */
.ui-kit .ui-form-grid > .ui-form-actions {
    align-self: end;
    margin: 0;
}
.ui-kit .ui-form-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 40rem;
}
/* Settings-style row: intro (title + description) left, fields right. */
.ui-kit .ui-form-row {
    display: grid;
    grid-template-columns: minmax(12rem, 18rem) minmax(0, 1fr);
    gap: 12px 32px;
    padding: 18px 0;
    border-top: 1px solid var(--line-soft);
}
.ui-kit .ui-form-row:first-child {
    border-top: 0;
    padding-top: 0;
}
.ui-kit .ui-form-row__title {
    margin: 0 0 4px;
    font: 700 var(--fs-body-sm) / 1.3 var(--font-ui);
    color: var(--ink);
    text-transform: none;
    letter-spacing: 0;
}
.ui-kit .ui-form-row__desc {
    margin: 0;
    font-size: var(--fs-meta);
    line-height: 1.45;
    color: var(--text-muted);
}
.ui-kit .ui-form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 16px 0 0;
}

/* ---------------------------------------------------------------------------
   Data table
   ------------------------------------------------------------------------ */

.ui-kit .ui-table-wrap {
    overflow-x: auto;
}
.ui-kit .ui-table {
    width: 100%;
    border-collapse: collapse;
    font: 400 var(--fs-body-sm) / 1.35 var(--font-ui);
    font-variant-numeric: tabular-nums;
    color: var(--text);
}
.ui-kit .ui-table th {
    padding: 8px 12px;
    border-bottom: 1px solid var(--line);
    background: white;
    color: var(--text-muted);
    font: 700 0.6875rem / 1.2 var(--font-ui);
    letter-spacing: 0.06em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
    vertical-align: bottom;
}
.ui-kit .ui-table td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--line-soft);
    vertical-align: middle;
}
.ui-kit .ui-table > tbody > tr:hover > td {
    background: var(--wash);
}
.ui-kit .ui-table :is(th, td).is-num {
    text-align: right;
    white-space: nowrap;
}
.ui-kit .ui-table :is(th, td).is-nowrap { white-space: nowrap; }
.ui-kit .ui-table :is(th, td).is-shrink { width: 1%; white-space: nowrap; }
.ui-kit .ui-table :is(th, td).is-actions {
    width: 1%;
    text-align: right;
    white-space: nowrap;
}
.ui-kit .ui-table td.is-muted { color: var(--text-muted); }
.ui-kit .ui-table td.is-faint { color: var(--text-faint); }
.ui-kit .ui-table td.is-top { vertical-align: top; }
.ui-kit .ui-table--dense :is(th, td) { padding: 6px 10px; }
.ui-kit .ui-table--sticky thead th {
    position: sticky;
    top: 0;
    z-index: 1;
}
/* .ui-table-wrap scrolls sideways, which makes it the sticky container, so a
   --sticky header only sticks when the wrap also scrolls vertically: give the
   wrap --scroll (a bounded, self-scrolling box). An unwrapped --sticky table
   sticks to the page instead. */
.ui-kit .ui-table-wrap--scroll {
    max-height: min(70vh, 48rem);
    overflow: auto;
}
/* A table's own group row (e.g. one org's contracts under the org). */
.ui-kit .ui-table tr.ui-table__group > td {
    padding-top: 18px;
    background: white;
    border-bottom-color: var(--line);
}
.ui-kit .ui-table tr.ui-table__group:hover > td { background: white; }

/* Row actions: a right-aligned group of row buttons. */
.ui-kit .ui-row-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

/* ---------------------------------------------------------------------------
   Entity cell: logo tile + name + one sub-line
   ------------------------------------------------------------------------ */

.ui-kit .ui-entity {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.ui-kit .ui-entity__body {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}
.ui-kit .ui-entity__name {
    overflow: hidden;
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ui-kit a.ui-entity__name:hover {
    color: var(--teal-ink);
    text-decoration: underline;
}
.ui-kit .ui-entity__sub {
    overflow: hidden;
    color: var(--text-muted);
    font-size: var(--fs-meta);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ui-kit .ui-logo {
    flex: none;
    display: inline-grid;
    place-items: center;
    box-sizing: border-box;
    width: 32px;
    height: 32px;
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-ctl);
    background: var(--wash);
    color: var(--text-muted);
    font: 700 0.75rem / 1 var(--font-ui);
    object-fit: contain;
    text-decoration: none;
}
.ui-kit .ui-logo > img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.ui-kit .ui-logo--sm { width: 24px; height: 24px; font-size: 0.625rem; }
.ui-kit .ui-logo--lg { width: 40px; height: 40px; }
.ui-kit .ui-logo--round { border-radius: var(--radius-pill); }

/* ---------------------------------------------------------------------------
   Property list (label / value pairs) for show and detail pages
   ------------------------------------------------------------------------ */

.ui-kit .ui-props {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 6px 20px;
    margin: 0;
    font-size: var(--fs-body-sm);
}
.ui-kit .ui-props > dt {
    padding-top: 2px;
    color: var(--text-muted);
    font: 700 0.6875rem / 1.4 var(--font-ui);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.ui-kit .ui-props > dd {
    margin: 0;
    color: var(--text);
}

/* ---------------------------------------------------------------------------
   Underline tabs (links). Deliberately NOT .tab-nav: that class wakes
   tabs_controller.
   ------------------------------------------------------------------------ */

.ui-kit .ui-tabs {
    display: flex;
    gap: 2px;
    margin: 0 0 16px;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
}
.ui-kit .ui-tab {
    margin-bottom: -1px;
    padding: 8px 12px;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font: 600 var(--fs-ui) / 1.2 var(--font-ui);
    text-decoration: none;
    white-space: nowrap;
}
.ui-kit .ui-tab:hover {
    background: var(--wash);
    color: var(--ink);
}
.ui-kit .ui-tab:is([aria-current="page"], [aria-selected="true"], .is-active) {
    border-bottom-color: var(--teal-ink);
    color: var(--ink);
}

/* ---------------------------------------------------------------------------
   Empty state
   ------------------------------------------------------------------------ */

.ui-kit .ui-empty {
    padding: 28px 20px;
    border-radius: var(--radius-card);
    background: var(--wash);
    color: var(--text-muted);
    font-size: var(--fs-body-sm);
    line-height: 1.45;
    text-align: center;
}
.ui-kit .ui-empty__title {
    margin: 0 0 4px;
    color: var(--ink);
    font: 700 var(--fs-body-sm) / 1.3 var(--font-ui);
    letter-spacing: 0;
    text-transform: none;
}
.ui-kit .ui-empty p {
    margin: 0;
    font-weight: 400;
}
.ui-kit .ui-empty__actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}
/* Inside a table: <td colspan="…" class="ui-empty-cell">. */
.ui-kit .ui-table td.ui-empty-cell {
    padding: 24px 12px;
    color: var(--text-muted);
    text-align: center;
}
.ui-kit .ui-table tr:hover > td.ui-empty-cell { background: transparent; }

/* ---------------------------------------------------------------------------
   Pagination (pagy_nav and pagy_bootstrap_nav, pagy 8)
   ------------------------------------------------------------------------ */

.ui-kit .ui-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    margin: 16px 0 0;
    color: var(--text-muted);
    font-size: var(--fs-meta);
}
.ui-kit .ui-pagination nav.pagy,
.ui-kit .ui-pagination .pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.ui-kit .ui-pagination :is(nav.pagy > a, .page-link) {
    display: inline-grid;
    place-items: center;
    box-sizing: border-box;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius-ctl);
    background: white;
    color: var(--teal-ink);
    font: 600 var(--fs-meta) / 1 var(--font-ui);
    font-variant-numeric: tabular-nums;
    text-decoration: none;
}
.ui-kit .ui-pagination :is(nav.pagy > a, .page-link):hover {
    border-color: var(--teal-ink);
}
.ui-kit .ui-pagination :is(nav.pagy > a.current, .page-item.active .page-link) {
    border-color: var(--teal-ink);
    background: var(--teal-ink);
    color: white;
}
.ui-kit .ui-pagination :is(nav.pagy > a[aria-disabled="true"]:not(.current), .page-item.disabled .page-link) {
    color: var(--text-faint);
    cursor: default;
}
.ui-kit .ui-pagination :is(nav.pagy > a.gap, .page-item.gap .page-link) {
    border-color: transparent;
    background: transparent;
}

/* ---------------------------------------------------------------------------
   Dialog (native <dialog class="ui-dialog">)
   ------------------------------------------------------------------------ */

.ui-kit dialog.ui-dialog,
.ui-kit dialog.ui-dialog[open] {
    width: min(560px, calc(100vw - 32px));
    height: auto;
    max-height: calc(100vh - 64px);
    padding: 0;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-pop);
    color: var(--text);
    font-family: var(--font-ui);
}
.ui-kit .ui-dialog__head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px 10px;
    border-bottom: 2px solid var(--teal-rule);
}
.ui-kit .ui-dialog__title {
    margin: 0;
    font: 650 0.9375rem / 1.2 var(--font-ui);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink);
}
.ui-kit .ui-dialog__body {
    padding: 16px 18px;
}
.ui-kit .ui-dialog__foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 18px;
    border-top: 1px solid var(--line-soft);
    background: var(--wash);
}

/* ---------------------------------------------------------------------------
   Flash. It renders in the layout, outside <main>, so it keys off the page's
   opt-in with :has().
   ------------------------------------------------------------------------ */

body:has(> main.ui-kit) .flash {
    min-width: 16rem;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: white;
    box-shadow: var(--shadow-pop);
    color: var(--ink);
    font: 400 var(--fs-body-sm) / 1.35 var(--font-ui);
}
body:has(> main.ui-kit) .flash--notice {
    border-color: var(--teal-rule);
}
body:has(> main.ui-kit) .flash--notice svg {
    flex: none;
    width: 20px;
    height: 20px;
    color: var(--teal-ink);
}
body:has(> main.ui-kit) .flash--alert {
    border-color: var(--red-line);
    color: var(--red-ink);
}
/* ==========================================================================
   Claude calls page (claude_calls/index + show) and the long-text disclosure
   the enrichment pilot reuses. Scoped under `.ui-kit`; tokens only.
   ========================================================================== */

.ui-kit .claude-calls .claude-calls__note { margin: 0 0 4px; }

.ui-kit .claude-calls .claude-calls__filters { align-items: flex-end; }
.ui-kit .claude-calls .claude-calls__filters .ui-field { margin: 0; }
.ui-kit .claude-calls .claude-calls__filters select { min-width: 11rem; }
.ui-kit .claude-calls .claude-calls__filters .ui-form-actions { display: flex; gap: 8px; margin: 0; }

.ui-kit .claude-calls .claude-calls__totals { margin: 0 0 18px; border-bottom: 1px solid var(--line-soft); }

.ui-kit .claude-calls .claude-calls__breakdowns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr));
    gap: 18px 36px;
}
.ui-kit .claude-calls .claude-calls__subhead {
    margin: 0 0 6px;
    font: 650 0.6875rem / 1.2 var(--font-ui);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.ui-kit .claude-calls .claude-calls__table td { vertical-align: top; }
.ui-kit .claude-calls .claude-calls__sub {
    display: block;
    font-size: var(--fs-meta);
    color: var(--text-muted);
}
.ui-kit .claude-calls .claude-calls__setting-choice { flex-wrap: nowrap; }

/* --- One call --------------------------------------------------------------- */

.ui-kit .claude-call .claude-call__props { max-width: 48rem; }
.ui-kit .claude-call .claude-call__error { color: var(--red-ink); }
.ui-kit .claude-call .claude-call__part { margin: 0 0 16px; max-width: 72rem; }
.ui-kit .claude-call .claude-call__label {
    margin: 0 0 6px;
    font: 650 0.6875rem / 1.2 var(--font-ui);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.ui-kit .claude-call .claude-block { margin: 8px 0; padding-left: 12px; border-left: 2px solid var(--line-soft); }
.ui-kit .claude-call .claude-block__type { margin: 0 0 4px; font-size: var(--fs-meta); font-weight: 600; color: var(--text-muted); }

/* --- Long text: the first part, the rest on request ------------------------ */

.ui-kit .claude-text {
    font: 400 var(--fs-body-sm) / 1.5 var(--font-ui);
    color: var(--text);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.ui-kit .claude-text--long > summary { display: block; list-style: none; cursor: pointer; }
.ui-kit .claude-text--long > summary::-webkit-details-marker { display: none; }
.ui-kit .claude-text__toggle { display: flex; width: max-content; margin-top: 6px; white-space: nowrap; }
.ui-kit .claude-text--long .claude-text__toggle--less,
.ui-kit .claude-text--long[open] .claude-text__preview,
.ui-kit .claude-text--long[open] .claude-text__toggle:not(.claude-text__toggle--less) { display: none; }
.ui-kit .claude-text--long[open] .claude-text__toggle--less { display: flex; }
/* ==========================================================================
   Enrichment lab pages (enrichment_labs/index + show, spec 2026-10-07 §9):
   the start form, the totals and agreement tally, and one card per company
   with the two paths side by side (stacked under 900px). Builds on the
   pilot page's banner / subhead / label styles. Scoped under
   `.ui-kit .lab-page`; tokens only.
   ========================================================================== */

.ui-kit .lab-page .lab-start__choices {
    margin: 0 0 12px;
    padding: 0;
    border: 0;
}
.ui-kit .lab-page .lab-start__choices legend {
    margin-bottom: 4px;
    font: 650 var(--fs-meta) / 1.2 var(--font-ui);
    color: var(--text-muted);
}
.ui-kit .lab-page .lab-start__count { width: 6rem; margin-left: 8px; }
.ui-kit .lab-page .lab-start textarea { width: 100%; max-width: 32rem; }

.ui-kit .lab-page .lab-totals th[scope="row"] { font-weight: 600; white-space: nowrap; }

.ui-kit .lab-page .lab-agree {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
    gap: 8px;
    margin: 8px 0 0;
}
.ui-kit .lab-page .lab-agree__item {
    padding: 8px 10px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-item);
    background: var(--wash);
}
.ui-kit .lab-page .lab-agree__item.is-split { border-color: var(--amber-line); background: var(--amber-wash); }
.ui-kit .lab-page .lab-agree dt { font-size: var(--fs-meta); color: var(--text-muted); }
.ui-kit .lab-page .lab-agree dd { margin: 2px 0 0; font-weight: 650; color: var(--ink); }

.ui-kit .lab-page .lab-company { margin-bottom: 12px; }
.ui-kit .lab-page .lab-company__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
    margin-bottom: 8px;
}
.ui-kit .lab-page .lab-company__name { margin: 0; font-size: var(--fs-ui); }

.ui-kit .lab-page .lab-company__paths {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 900px) {
    .ui-kit .lab-page .lab-company__paths { grid-template-columns: 1fr; }
}

.ui-kit .lab-path {
    min-width: 0;
    padding: 0 0 0 12px;
    border-left: 2px solid var(--line-soft);
}
.ui-kit .lab-path[data-path="web"] { border-left-color: var(--teal-rule); }
.ui-kit .lab-path__facts { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 6px; }
.ui-kit .lab-path__facts dt { display: inline; color: var(--text-muted); font-size: var(--fs-meta); }
.ui-kit .lab-path__facts dd { display: inline; margin: 0 0 0 4px; color: var(--text); }
.ui-kit .lab-path__summary { margin: 0 0 8px; font-size: var(--fs-body-sm); color: var(--text); }
.ui-kit .lab-path__chips { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-bottom: 6px; }
.ui-kit .lab-path__chips .pilot-cell__label { margin: 0 4px 0 0; }
.ui-kit .lab-path__chips .ui-pill[title] { cursor: help; }
.ui-kit .lab-path__traits {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
    gap: 2px 12px;
    margin: 0 0 6px;
    padding: 0;
    list-style: none;
    font-size: var(--fs-meta);
    color: var(--text-muted);
}
.ui-kit .lab-path__traits strong { color: var(--text); font-weight: 600; }
.ui-kit .lab-path__candidates { margin: 0 0 6px; font-size: var(--fs-body-sm); color: var(--text); }
.ui-kit .lab-path__candidates .pilot-cell__label { margin: 0 4px 0 0; }
.ui-kit .lab-path__candidates ul { margin: 4px 0 0; padding-left: 18px; }
.ui-kit .lab-path__candidates li { margin-bottom: 2px; overflow-wrap: anywhere; }
.ui-kit .lab-path__quote { display: block; font-size: var(--fs-meta); color: var(--text-muted); font-style: italic; }
.ui-kit .lab-path__problems { margin: 0 0 6px; font-size: var(--fs-meta); color: var(--text-muted); }
.ui-kit .lab-path__problems ul { margin: 4px 0 0; padding-left: 18px; }
.ui-kit .lab-path__problems li { overflow-wrap: anywhere; }
.ui-kit .lab-path__identity,
.ui-kit .lab-path__line,
.ui-kit .lab-path__more { margin: 0 0 6px; font-size: var(--fs-body-sm); color: var(--text); overflow-wrap: anywhere; }
.ui-kit .lab-path__judged { margin: 0 0 6px; font-size: var(--fs-meta); }
.ui-kit .lab-path__line .ui-pill { margin-left: 4px; }
.ui-kit .lab-path__passages { margin: 0 0 6px; padding: 0; list-style: none; font-size: var(--fs-body-sm); }
.ui-kit .lab-path__passages li { margin-bottom: 2px; overflow-wrap: anywhere; }
.ui-kit .lab-path__fields { display: flex; flex-wrap: wrap; gap: 2px 12px; margin: 0 0 4px; font-size: var(--fs-body-sm); color: var(--text); }
.ui-kit .lab-path__field[title] { cursor: help; }
.ui-kit .lab-path__text {
    max-height: 24rem;
    margin: 4px 0 0;
    padding: 8px;
    overflow: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: var(--fs-meta);
    color: var(--text);
    background: var(--wash);
    border: 1px solid var(--line-soft);
}
.ui-kit .lab-path__why { margin: 4px 0 0; font-size: var(--fs-body-sm); color: var(--text); overflow-wrap: anywhere; }
.ui-kit .lab-path__pages { margin: 0 0 6px; padding-left: 18px; font-size: var(--fs-meta); overflow-wrap: anywhere; }
.ui-kit .lab-path__footer {
    margin: 8px 0 0;
    padding-top: 6px;
    border-top: 1px solid var(--line-soft);
    font-size: var(--fs-meta);
}
/* ==========================================================================
   Enrichment pilot pages (enrichment_pilots/index + show). Built to be read:
   one bordered block per company, the options side by side, labels in the
   kit's small uppercase eyebrow. Scoped under `.ui-kit .pilot-page`; tokens only.
   ========================================================================== */

.ui-kit .pilot-page .pilot-start .ui-form-grid { align-items: end; }
.ui-kit .pilot-page .pilot-start__note { margin-top: 12px; }

.ui-kit .pilot-page .pilot-banner {
    margin: 0 0 12px;
    padding: 10px 14px;
    border: 1px solid var(--line-soft);
    border-left: 3px solid var(--teal-ink);
    border-radius: var(--radius-card);
    background: var(--wash);
    font-size: var(--fs-body-sm);
    color: var(--text);
}
.ui-kit .pilot-page .pilot-banner--amber { border-left-color: var(--amber-accent); background: var(--amber-wash); }

.ui-kit .pilot-page .pilot-figures { border-bottom: 1px solid var(--line-soft); }
.ui-kit .pilot-page .pilot-subhead,
.ui-kit .pilot-page .pilot-cell__label,
.ui-kit .pilot-page .pilot-verdict legend {
    margin: 12px 0 4px;
    padding: 0;
    font: 650 0.6875rem / 1.2 var(--font-ui);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.ui-kit .pilot-page .pilot-list { margin: 0; padding-left: 18px; font-size: var(--fs-body-sm); line-height: 1.5; }
.ui-kit .pilot-page .pilot-claims__key { display: block; font-weight: 400; text-transform: none; letter-spacing: 0; }
.ui-kit .pilot-page .pilot-tally { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; font-size: var(--fs-body-sm); }
.ui-kit .pilot-page .pilot-tally__item { display: inline-flex; align-items: center; gap: 6px; }
.ui-kit .pilot-page .pilot-filters { margin: 0 0 16px; flex-wrap: wrap; }

/* --- One company ----------------------------------------------------------- */

.ui-kit .pilot-page .pilot-company {
    margin: 0 0 22px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-card);
    background: white;
    scroll-margin-top: 16px;
}
.ui-kit .pilot-page .pilot-company__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 16px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line-soft);
    background: var(--wash);
}
.ui-kit .pilot-page .pilot-company__title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; min-width: 0; }
.ui-kit .pilot-page .pilot-company__name { font: 650 1.0625rem / 1.3 var(--font-ui); color: var(--ink); }
.ui-kit .pilot-page .pilot-company__title a:not(.pilot-company__name) { font-size: var(--fs-meta); overflow-wrap: anywhere; }
.ui-kit .pilot-page .pilot-company__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: var(--fs-meta); }
.ui-kit .pilot-page .pilot-company__scrape { padding: 8px 16px 0; font-size: var(--fs-meta); color: var(--text-muted); }
.ui-kit .pilot-page .pilot-company__error { margin: 0; color: var(--red-ink); font-size: var(--fs-body-sm); }
.ui-kit .pilot-page .pilot-company > .pilot-company__error { padding: 8px 16px 0; }
.ui-kit .pilot-page .pilot-pages > summary { cursor: pointer; color: var(--text); }
.ui-kit .pilot-page .pilot-pages .pilot-list { margin-top: 6px; font-size: var(--fs-meta); }

.ui-kit .pilot-page .pilot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
}
.ui-kit .pilot-page .pilot-cell {
    min-width: 0;
    padding: 4px 16px 14px;
    border-right: 1px solid var(--line-soft);
}
.ui-kit .pilot-page .pilot-cell:last-child { border-right: 0; }
.ui-kit .pilot-page .pilot-cell__title {
    margin: 12px 0 8px;
    font: 650 var(--fs-body-sm) / 1.3 var(--font-ui);
    color: var(--ink);
}
.ui-kit .pilot-page .pilot-cell--claude .pilot-cell__title { color: var(--teal-ink); }
.ui-kit .pilot-page .pilot-cell .ui-muted { margin: 0; font-size: var(--fs-body-sm); }
.ui-kit .pilot-page .pilot-cell__verdicts { display: flex; flex-wrap: wrap; gap: 6px; }
.ui-kit .pilot-page .pilot-cell__source { margin-top: 4px; font-size: var(--fs-meta); line-height: 1.4; color: var(--text-muted); }
.ui-kit .pilot-page .pilot-cell__text { margin: 0; font-size: var(--fs-body-sm); line-height: 1.5; }
.ui-kit .pilot-page .pilot-cell__problems { margin-top: 10px; font-size: var(--fs-meta); color: var(--amber-ink); }
.ui-kit .pilot-page .pilot-cell__foot {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid var(--line-soft);
    font-size: var(--fs-meta);
    color: var(--text-muted);
}
.ui-kit .pilot-page .pilot-cell__foot:empty { display: none; }

.ui-kit .pilot-page .pilot-claims-list { margin: 0; padding: 0; list-style: none; font-size: var(--fs-body-sm); line-height: 1.6; }
.ui-kit .pilot-page .pilot-claim summary { cursor: pointer; color: var(--text); }
.ui-kit .pilot-page .pilot-claim--unknown { color: var(--text-muted); }
.ui-kit .pilot-page .pilot-evidence { margin-top: 10px; font-size: var(--fs-body-sm); }
.ui-kit .pilot-page .pilot-evidence > summary { cursor: pointer; color: var(--teal-ink); }
.ui-kit .pilot-page .pilot-evidence__item { margin-top: 8px; }
.ui-kit .pilot-page .pilot-evidence__claim { font-weight: 600; }
.ui-kit .pilot-page .pilot-quote {
    margin: 4px 0 6px;
    padding: 2px 0 2px 10px;
    border-left: 2px solid var(--line);
    font-size: var(--fs-body-sm);
    line-height: 1.45;
    color: var(--text);
}
.ui-kit .pilot-page .pilot-quote__url { display: block; margin-top: 2px; font-size: var(--fs-meta); overflow-wrap: anywhere; }
.ui-kit .pilot-page .pilot-facts { margin-top: 8px; font-size: var(--fs-body-sm); }

/* --- Verdict ----------------------------------------------------------------- */

.ui-kit .pilot-page .pilot-verdict {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px 24px;
    padding: 10px 16px 12px;
    border-top: 1px solid var(--line-soft);
    background: var(--wash);
}
.ui-kit .pilot-page .pilot-verdict__choices { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; border: 0; }
.ui-kit .pilot-page .pilot-verdict legend { float: left; width: 100%; margin-top: 0; }
.ui-kit .pilot-page .pilot-verdict__note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex: 1 1 18rem; }
.ui-kit .pilot-page .pilot-verdict__note input[type="text"] { flex: 1 1 14rem; min-width: 0; }
.ui-kit .pilot-page .pilot-verdict__status { font-size: var(--fs-meta); color: var(--green-ink); }
.ui-kit .pilot-page .pilot-verdict__status--bad { color: var(--red-ink); }
/* ==========================================================================
   UI kit adapters for the startup-intelligence staff pages (wave 2, ui-intel):
   enrichment console, enrichment suggestions + Applied, Data health, import
   batch review, topic record pages, noise phrases.

   Every rule is scoped under `.ui-kit .intel-page`, so it only reaches pages
   that opted into the kit AND wrap their content in `.intel-page`. Nothing here
   touches the startup profile, FLITE, or any page that did not opt in.
   Tokens only (design_tokens.css); no new hex values.
   ========================================================================== */

/* --- Shared bits ---------------------------------------------------------- */

/* A CSS-drawn separator dot: Overpass draws U+00B7 with almost no width. */
.ui-kit .intel-page .intel-sep {
    display: inline-block;
    width: 3px;
    height: 3px;
    margin: 0 7px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.55;
    vertical-align: middle;
}

/* Grade marks: a small dot + the word. Rich = committed (green); thin = a
   muted grey; dark = red (the site gave nothing back). */
.ui-kit .intel-page .intel-dot {
    display: inline-block;
    flex: none;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--line);
}
.ui-kit .intel-page .intel-dot--rich { background: var(--green-accent); }
.ui-kit .intel-page .intel-dot--thin { background: var(--text-faint); }
.ui-kit .intel-page .intel-dot--dark { background: var(--red-ink); }

.ui-kit .intel-page .intel-grades {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px 14px;
}
.ui-kit .intel-page .intel-grade {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--fs-meta);
    color: var(--text-muted);
    white-space: nowrap;
}

/* Radio / checkbox + text on one line. */
.ui-kit .intel-page .intel-choice {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    font: 400 var(--fs-body-sm) / 1.3 var(--font-ui);
    color: var(--text);
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
    cursor: pointer;
}

/* Hand-built section head count sits where ui_section_head puts its own. */
.ui-kit .intel-page .ui-section__head .ui-btn .ui-count { margin-left: 2px; }
.ui-kit .intel-page .ui-page-head__actions .ui-btn .ui-count { margin-left: 6px; }

/* button_to wraps its button in a form; keep those forms inline in rows. */
.ui-kit .intel-page .ui-row-actions form,
.ui-kit .intel-page .ui-section__actions form,
.ui-kit .intel-page .ui-page-head__actions form,
.ui-kit .intel-page td.is-actions form { display: inline-block; margin: 0; }

/* --- Enrichment: at-a-glance ledger -------------------------------------- */

.ui-kit .intel-page .intel-glance {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    border-top: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
}
.ui-kit .intel-page .intel-figures {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
}
.ui-kit .intel-page .intel-figure {
    min-width: 8.5rem;
    padding: 14px 28px 14px 0;
    margin-right: 28px;
    border-right: 1px solid var(--line-soft);
}
.ui-kit .intel-page .intel-figure dt,
.ui-kit .intel-page .intel-latest__label {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 6px;
    font: 650 0.6875rem / 1.2 var(--font-ui);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.ui-kit .intel-page .intel-figure dd {
    margin: 0;
    font: 400 1.5rem / 1.1 var(--font-ui);
    color: var(--ink);
}
.ui-kit .intel-page .intel-latest {
    flex: 1 1 18rem;
    padding: 14px 0;
}
.ui-kit .intel-page .intel-latest__line {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 4px;
}
.ui-kit .intel-page .intel-latest__scope {
    font: 600 var(--fs-body-sm) / 1.3 var(--font-ui);
    color: var(--ink);
}
.ui-kit .intel-page .intel-latest__meta {
    margin: 0;
    font-size: var(--fs-meta);
    color: var(--text-faint);
}

/* --- Enrichment: start-a-run form ---------------------------------------- */

.ui-kit .intel-enrich .intel-run-form {
    display: flex;
    flex-wrap: wrap;
    gap: 18px 44px;
    align-items: flex-start;
}
.ui-kit .intel-enrich .intel-run-form fieldset {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}
.ui-kit .intel-enrich .intel-run-form legend {
    float: left;
    width: 100%;
    margin: 0 0 3px;
    padding: 0;
    font: 650 0.6875rem / 1.2 var(--font-ui);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.ui-kit .intel-enrich .intel-run-form legend + * { clear: left; }
.ui-kit .intel-enrich .intel-choice--with-control { gap: 10px; }
.ui-kit .intel-enrich .intel-run-form select[name="topic_id"] {
    width: 15rem;
    height: 28px;
    font-size: var(--fs-meta);
}

/* The shared method fieldsets (shared/_curation_method_fields) laid out as
   columns. Their markup is shared with the startup profile, so they are
   styled here, by position, rather than edited. */
.ui-kit .intel-enrich .intel-run-form__methods {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 18px 36px;
    padding-left: 44px;
    border-left: 1px solid var(--line-soft);
}
.ui-kit .intel-enrich .intel-run-form__methods .curation-eyebrow {
    display: block;
    font: 650 0.6875rem / 1.2 var(--font-ui);
    letter-spacing: 0.06em;
    color: var(--text-muted);
}
.ui-kit .intel-enrich .intel-run-form__methods label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font: 400 var(--fs-body-sm) / 1.3 var(--font-ui);
    color: var(--text);
    white-space: nowrap;
    cursor: pointer;
}
.ui-kit .intel-enrich .intel-run-form__methods label[title]:not([title=""]) {
    color: var(--text-faint);
    cursor: not-allowed;
}
/* The partial's last child is a bare Logo checkbox label: align it with the
   first option row of the fieldsets beside it. */
.ui-kit .intel-enrich .intel-run-form__methods > label {
    margin-top: 20px;
}
.ui-kit .intel-enrich .intel-run-form__foot {
    display: flex;
    flex: 1 0 100%;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line-soft);
}
.ui-kit .intel-enrich .intel-run-form__cost {
    margin: 0;
    font: 400 var(--fs-body-sm) / 1.35 var(--font-ui);
    color: var(--text-muted);
}
.ui-kit .intel-enrich .intel-run-form__cost.is-cost {
    font-weight: 650;
    color: var(--ink);
}

/* --- Enrichment: settings row -------------------------------------------- */

.ui-kit .intel-enrich .intel-setting {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 20px;
}

/* --- Shared: filter toolbar + lede --------------------------------------- */

.ui-kit .intel-page .intel-toolbar { margin-top: 14px; }
.ui-kit .intel-page .intel-filter-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 12px;
}
.ui-kit .intel-page .intel-filter-form .ui-field--check { align-self: center; padding-top: 16px; }
.ui-kit .intel-page .intel-filter-form select { min-width: 12rem; }
.ui-kit .intel-page .ui-toolbar__end form { margin: 0; }
.ui-kit .intel-page .intel-lede {
    max-width: 70ch;
    margin: 0;
    font: 400 var(--fs-body-sm) / 1.45 var(--font-ui);
    color: var(--text-muted);
}
.ui-kit .intel-page .ui-tab .ui-count { margin-left: 4px; }

/* --- Suggestions review queue -------------------------------------------- */

/* One <tbody> per suggestion: the evidence row, then the action row. The
   pair reads as one record, so the rule sits under the action row only. */
.ui-kit .intel-suggest .intel-suggest__row > td { border-bottom: 0; padding-bottom: 6px; }
.ui-kit .intel-suggest .intel-suggest__detail > td { padding-top: 0; padding-bottom: 12px; }
.ui-kit .intel-suggest .intel-suggest__item:hover > tr > td { background: var(--wash); }
.ui-kit .intel-suggest .intel-suggest__who { width: 16rem; }
.ui-kit .intel-suggest .intel-suggest__who .ui-entity__sub { display: block; margin-top: 2px; }
.ui-kit .intel-suggest .intel-suggest__text {
    max-width: 30rem;
    font-size: var(--fs-body-sm);
    line-height: 1.4;
}
.ui-kit .intel-suggest .intel-suggest__method {
    display: block;
    margin-top: 3px;
    font-size: var(--fs-meta);
    color: var(--text-faint);
}
.ui-kit .intel-suggest .intel-suggest__actions {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.ui-kit .intel-suggest .intel-suggest__review { flex: 0 1 auto; min-width: 0; }
.ui-kit .intel-suggest .intel-suggest__review[open] { flex: 1 1 auto; }
.ui-kit .intel-suggest .intel-suggest__review > summary { list-style: none; }
.ui-kit .intel-suggest .intel-suggest__review > summary::-webkit-details-marker { display: none; }
.ui-kit .intel-suggest .intel-suggest__review[open] > summary {
    border-color: var(--teal-ink);
    background: var(--teal-wash);
}
.ui-kit .intel-suggest .intel-suggest__dismiss { margin: 0; }
.ui-kit .intel-suggest .intel-suggest__panel {
    margin-top: 10px;
    padding: 4px 14px 12px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-card);
    background: white;
}

/* The shared candidate table (enrichment_suggestions/_suggestion_table),
   restyled here only: the profile renders the same partial un-kitted. */
.ui-kit .intel-suggest .suggestions-table {
    width: 100%;
    margin: 0 0 12px;
    border-collapse: collapse;
    font-size: var(--fs-body-sm);
}
.ui-kit .intel-suggest .suggestions-table th {
    padding: 10px 10px 6px;
    border-bottom: 1px solid var(--line);
    font: 650 0.6875rem / 1.2 var(--font-ui);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-faint);
    text-align: left;
}
.ui-kit .intel-suggest .suggestions-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--line-soft);
    background: transparent;
    vertical-align: top;
    line-height: 1.4;
}
.ui-kit .intel-suggest .suggestions-table td label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 10px 4px 0;
    font: 400 var(--fs-body-sm) / 1.3 var(--font-ui);
    color: var(--text);
    text-transform: none;
    letter-spacing: 0;
}
.ui-kit .intel-suggest .suggestions-method,
.ui-kit .intel-suggest .suggestions-facts { font-size: var(--fs-meta); color: var(--text-faint); }
.ui-kit .intel-suggest .suggestions-current { color: var(--text-muted); }
.ui-kit .intel-suggest .suggestions-apply { margin: 0; }

/* --- Applied check --------------------------------------------------------- */

.ui-kit .intel-applied .intel-applied__block {
    margin: 0 0 14px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-card);
    overflow: hidden;
}
.ui-kit .intel-applied .intel-applied__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line-soft);
    background: var(--wash);
}
.ui-kit .intel-applied .intel-applied__method {
    font: 600 var(--fs-meta) / 1.3 var(--font-ui);
    color: var(--text-muted);
}
.ui-kit .intel-applied .intel-applied__when { margin-left: auto; font-size: var(--fs-meta); color: var(--text-faint); }
.ui-kit .intel-applied .intel-applied__table { margin: 0; }
.ui-kit .intel-applied .intel-applied__table tr:last-child > td { border-bottom: 0; }
.ui-kit .intel-applied .intel-applied__table th:first-child,
.ui-kit .intel-applied .intel-applied__table td:first-child { padding-left: 14px; }
.ui-kit .intel-applied .intel-applied__attr { width: 22%; }
.ui-kit .intel-applied .intel-applied__val { width: 22%; }
.ui-kit .intel-applied .intel-applied__label { font-weight: 600; color: var(--ink); }
.ui-kit .intel-applied .intel-applied__evidence,
.ui-kit .intel-applied .intel-applied__drift {
    margin-top: 3px;
    font-size: var(--fs-meta);
    line-height: 1.4;
    color: var(--text-faint);
}
.ui-kit .intel-applied .intel-applied__drift { color: var(--amber-ink); }
.ui-kit .intel-applied .intel-applied__resolved {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: var(--fs-meta);
    color: var(--text-muted);
}
.ui-kit .intel-applied .suggestions-applied__controls { gap: 6px; }
.ui-kit .intel-applied .suggestions-applied__control { display: inline-flex; gap: 6px; align-items: center; }
.ui-kit .intel-applied .suggestions-applied__control--long { flex-wrap: wrap; align-items: flex-start; }
.ui-kit .intel-applied .suggestions-applied__input { max-width: 14rem; height: 26px; font-size: var(--fs-meta); }
.ui-kit .intel-applied .suggestions-applied__input--long { max-width: 100%; height: auto; margin: 0; }
.ui-kit .intel-applied .suggestions-applied__long summary { color: var(--teal-ink); cursor: pointer; }

/* --- Data health ----------------------------------------------------------- */

.ui-kit .intel-health .intel-flag-row .intel-grade { margin-left: 8px; }
.ui-kit .intel-page .ui-section__meta .ui-count { margin-right: 2px; }

/* --- Import batch review --------------------------------------------------- */

.ui-kit .intel-import .intel-import__row.is-decided > td { color: var(--text-faint); }
.ui-kit .intel-import .intel-import__row.is-decided .intel-import__name,
.ui-kit .intel-import .intel-import__row.is-decided .intel-import__title strong { color: var(--text-muted); font-weight: 600; }
.ui-kit .intel-import .intel-import__who { width: 18rem; }
.ui-kit .intel-import .intel-import__who > * { display: block; }
.ui-kit .intel-import .intel-import__name { font-weight: 650; color: var(--ink); }
.ui-kit .intel-import .intel-import__link { font-size: var(--fs-meta); }
.ui-kit .intel-import .intel-import__title { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ui-kit .intel-import .intel-import__title strong { font-weight: 650; color: var(--ink); }
.ui-kit .intel-import .intel-import__summary {
    max-width: 70ch;
    margin: 0;
    font-size: var(--fs-body-sm);
    line-height: 1.4;
    color: var(--text-muted);
}
.ui-kit .intel-import .intel-import__title + .intel-import__summary { margin-top: 4px; }
.ui-kit .intel-import .intel-import__note,
.ui-kit .intel-import .intel-import__dup {
    margin: 4px 0 0;
    font-size: var(--fs-meta);
    line-height: 1.4;
    color: var(--text-faint);
}
/* A possible duplicate is the one thing on the row that changes what Approve
   does: say it in the decision ink. */
.ui-kit .intel-import .intel-import__dup { color: var(--amber-ink); }
/* Evidence text on a queue row: four lines, the full text is one click away
   in the Review panel. */
.ui-kit .intel-page .intel-clamp {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
}

/* Row-level destructive actions: quiet at rest, red only on hover/focus. */
.ui-kit .intel-page .intel-destructive:is(:hover, :focus-visible) { color: var(--red-ink); }

/* --- Topic record pages --------------------------------------------------- */

.ui-kit .intel-topic .intel-topic__about { display: grid; gap: 12px; }
.ui-kit .intel-topic .intel-topic__about .ui-props { margin: 0; }
.ui-kit .intel-topic popover-toggle .details__liner { min-width: 22rem; }
.ui-kit .intel-page .intel-form-errors { border-color: var(--red-line); color: var(--red-ink); }
.ui-kit .intel-page .intel-form-errors ul { margin: 0; padding-left: 18px; }

/* Topic report: a reading page. */
.ui-kit .intel-report .intel-report__meta {
    margin: -8px 0 20px;
    font-size: var(--fs-meta);
    color: var(--text-faint);
}
.ui-kit .intel-report .intel-report__body {
    max-width: 72ch;
    font: 400 1rem / 1.55 var(--font-ui);
    color: var(--text);
}
.ui-kit .intel-report .intel-report__body :is(h1, h2, h3) {
    margin: 28px 0 8px;
    font: 650 0.9375rem / 1.2 var(--font-ui);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink);
}
.ui-kit .intel-report .intel-report__body :is(p, ul, ol) { margin: 0 0 12px; }

/* --- Noise phrases --------------------------------------------------------- */

.ui-kit .intel-noise .intel-noise__hint { margin: 0 0 12px; }
.ui-kit .intel-noise .intel-noise__add {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 12px;
    margin: 0 0 12px;
}
.ui-kit .intel-noise .intel-noise__add .ui-toolbar__grow { flex: 1 1 18rem; }
.ui-kit .intel-noise .intel-noise__examples { max-width: 28rem; font-size: var(--fs-meta); }
.ui-kit .intel-topic popover-toggle .select2-container { width: 100% !important; }

/* Residue: the first 15 rows, then the rest behind "Show all N". Both tables
   share fixed column widths so the hidden rows line up with the visible ones. */
.ui-kit .intel-enrich .intel-residue-table { table-layout: fixed; width: 100%; }
.ui-kit .intel-enrich .intel-residue-table td:nth-child(1),
.ui-kit .intel-enrich .intel-residue-table th:nth-child(1) { width: 44px; }
.ui-kit .intel-enrich .intel-residue-table td:nth-child(3),
.ui-kit .intel-enrich .intel-residue-table th:nth-child(3) { width: 30%; }
.ui-kit .intel-enrich .intel-residue-table td:nth-child(4),
.ui-kit .intel-enrich .intel-residue-table th:nth-child(4) { width: 10rem; }
.ui-kit .intel-enrich .intel-residue-table td:nth-child(5),
.ui-kit .intel-enrich .intel-residue-table th:nth-child(5) { width: 10rem; }
.ui-kit .intel-enrich .intel-more > summary { margin: 10px 0 0; list-style: none; }
.ui-kit .intel-enrich .intel-more > summary::-webkit-details-marker { display: none; }
.ui-kit .intel-enrich .intel-more[open] > summary { margin-bottom: 0; }
.ui-kit .intel-enrich .intel-more[open] .intel-residue-table tr:first-child > td { border-top: 1px solid var(--line-soft); }
/* ============================================================================
   Page adapters for pages converted to the UI kit (ui_kit.css). Only rules a
   single page needs and the kit should not own. Everything is scoped under
   `.ui-kit` so the legacy page (and any page that has not opted in) is
   untouched. Wave-2 pages: add your own `ui_kit_<page>.css` rather than
   growing this file, to keep branches from colliding.
   ========================================================================= */

/* Filter card above a table (audit logs). */
.ui-kit .ui-filter-card {
    margin: 0 0 20px;
}

/* Audit logs: the context cell stacks platform / focus area / org. */
.ui-kit .audit-log-table .audit-context span {
    display: block;
    line-height: 1.35;
}
.ui-kit .audit-log-table .context-platform {
    color: var(--text);
    font-weight: 400;
}
.ui-kit .audit-log-table :is(.context-focus-area, .context-partner-org) {
    color: var(--text-faint);
    font-size: var(--fs-meta);
    font-style: normal;
}
.ui-kit .audit-log-table .audit-record {
    max-width: 12rem;
    overflow: hidden;
    color: var(--ink);
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Contracts: invoice rows are hidden until their row's toggle opens them
   (inline script sets style.display = 'table-row'). */
.ui-kit .contracts-table tr.dropdown-content {
    display: none;
}
.ui-kit .contracts-table tr.dropdown-content > td {
    padding: 10px 12px 14px 44px;
    background: var(--wash);
}
.ui-kit .contracts-table .dropdown-btn {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-ctl);
    background: white;
    color: var(--teal-ink);
    font: 700 0.75rem / 1 var(--font-ui);
    text-transform: none;
    cursor: pointer;
    transition: transform 0.15s ease-out;
}
.ui-kit .contracts-table .dropdown-btn.open {
    transform: rotate(90deg);
}
.ui-kit .contracts-table .contract-notes {
    max-width: 14rem;
    color: var(--text-muted);
    font-size: var(--fs-meta);
    line-height: 1.4;
}
.ui-kit .contracts-invoices {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.ui-kit .contracts-invoice {
    min-width: 12rem;
    padding: 10px 12px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-item);
    background: white;
}
.ui-kit .contracts-invoice__title {
    margin: 0 0 6px;
    color: var(--ink);
    font: 700 var(--fs-ui) / 1.2 var(--font-ui);
}
.ui-kit .contracts-invoice .ui-props {
    font-size: var(--fs-meta);
}
.ui-kit .contracts-new-form .form__liner,
.ui-kit .contracts-new-form form {
    margin: 0;
}

/* Fit at 1100px without sideways scrolling: let the long text columns wrap
   (change summaries, context, emails) instead of widening the table. */
.ui-kit .audit-log-table .ui-entity__sub {
    white-space: normal;
}
.ui-kit .audit-log-table td,
.ui-kit .contracts-table td {
    overflow-wrap: anywhere;
}
.ui-kit .audit-log-table td.is-nowrap,
.ui-kit .contracts-table td:is(.is-num, .is-actions, .is-shrink) {
    overflow-wrap: normal;
}
@media (max-width: 1280px) {
    .ui-kit .contracts-table :is(th, td) {
        padding-right: 8px;
        padding-left: 8px;
    }
    .ui-kit .contracts-table .contract-notes {
        max-width: 10rem;
    }
}
/* Page adapters for the wave-2 record pages (tasks, projects, meetings,
   contracts, invoices, focus-area forms). Every rule is scoped under .ui-kit
   plus a page class, so pages that do not opt into the kit are untouched.
   Contract: docs/design/ui-kit.md. */

/* ---------------------------------------------------------------------------
   Task queues (seamless tasks, partner tasks)
   ------------------------------------------------------------------------ */

.ui-kit .records-tasks .ui-tab .ui-count {
    margin-left: 4px;
}
.ui-kit .records-tasks .ui-toolbar .ui-field select {
    min-width: 12rem;
}

.ui-kit .records-task-table td {
    vertical-align: top;
}
.ui-kit .records-task-table .ui-entity__name {
    white-space: normal;
}
.ui-kit .records-task-table__revisit {
    margin-left: 6px;
    font-variant-numeric: tabular-nums;
}
.ui-kit .records-task-table__revisit.is-overdue {
    color: var(--red-ink);
    font-weight: 600;
}

/* Responses: a disclosure in the Responses cell. The panel opens in the flow
   (not floating): .ui-table-wrap's overflow would clip a floating panel. */
.ui-kit .records-responses {
    display: inline-block;
}
.ui-kit .records-responses > summary {
    list-style: none;
}
.ui-kit .records-responses > summary::-webkit-details-marker { display: none; }
.ui-kit .records-responses__panel {
    width: 22rem;
    max-height: 20rem;
    margin-top: 6px;
    overflow-y: auto;
    padding: 10px 14px;
    text-align: left;
    white-space: normal;
}
.ui-kit .records-responses[open] > summary {
    text-decoration: underline;
}
.ui-kit .records-responses__item + .records-responses__item {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--line-soft);
}
.ui-kit .records-responses__meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: var(--fs-meta);
    color: var(--text-faint);
}
.ui-kit .records-responses__who {
    color: var(--ink);
    font-weight: 600;
}
.ui-kit .records-responses__type {
    margin-top: 2px;
    font-size: var(--fs-meta);
    color: var(--text-muted);
}
.ui-kit .records-responses__body {
    margin: 4px 0 0;
    font: 400 var(--fs-body-sm) / 1.45 var(--font-ui);
    color: var(--text);
}

/* Destructive actions stay quiet until hovered or focused (row deletes, the
   bulk-delete entry point, the record-page danger group). */
.ui-kit .records-row-delete:is(:hover, :focus-visible) {
    border-color: var(--red-line);
    color: var(--red-ink);
}
.ui-kit .ui-btn--text.records-row-delete:is(:hover, :focus-visible) {
    border-color: transparent;
}
.ui-kit .records-danger {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 40px;
    padding-top: 14px;
    border-top: 1px solid var(--line-soft);
}

/* ---------------------------------------------------------------------------
   Record pages: show layout, thread, confirm pages, forms
   ------------------------------------------------------------------------ */

.ui-kit .records-page .ui-section {
    margin-top: 28px;
}
.ui-kit .records-page .ui-props {
    max-width: 52rem;
}

/* Two columns: the record's main content left, facts right. */
.ui-kit .records-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 22rem);
    gap: 32px;
    align-items: start;
}
@media (max-width: 1100px) {
    .ui-kit .records-split {
        grid-template-columns: minmax(0, 1fr);
    }
}
.ui-kit .records-split > * > .ui-section:first-child {
    margin-top: 0;
}

/* A readable thread of responses or comments. */
.ui-kit .records-thread {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    list-style: none;
}
.ui-kit .records-thread__item {
    padding: 12px 0;
    border-bottom: 1px solid var(--line-soft);
}
.ui-kit .records-thread__item:first-child {
    padding-top: 4px;
}
.ui-kit .records-thread__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
    font-size: var(--fs-meta);
    color: var(--text-faint);
}
.ui-kit .records-thread__who {
    color: var(--ink);
    font: 600 var(--fs-body-sm) / 1.3 var(--font-ui);
}
.ui-kit .records-thread__when {
    margin-left: auto;
    font-variant-numeric: tabular-nums;
}
.ui-kit .records-thread__body {
    margin: 6px 0 0;
    font: 400 var(--fs-body-sm) / 1.5 var(--font-ui);
    color: var(--text);
    max-width: 70ch;
}
.ui-kit .records-thread__body p {
    margin: 0 0 6px;
}

/* A plain list of linked items (attachments, related records). */
.ui-kit .records-list {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: var(--fs-body-sm);
}
.ui-kit .records-list > li {
    padding: 6px 0;
    border-bottom: 1px solid var(--line-soft);
}
.ui-kit .records-list > li:last-child {
    border-bottom: 0;
}

/* Confirmation pages (confirm_delete, confirm_bulk_delete). */
.ui-kit .records-confirm {
    max-width: 52rem;
}
.ui-kit .records-confirm__lead {
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid var(--red-line);
    border-radius: var(--radius-card);
    background: var(--red-wash);
    color: var(--red-ink);
    font: 600 var(--fs-body-sm) / 1.45 var(--font-ui);
}
.ui-kit .records-confirm h3 {
    margin: 22px 0 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--line);
    font: 650 0.8125rem / 1.2 var(--font-ui);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink);
}
.ui-kit .records-confirm ul {
    margin: 0;
    padding-left: 1.1rem;
    font: 400 var(--fs-body-sm) / 1.55 var(--font-ui);
    color: var(--text);
}
.ui-kit .records-confirm .records-note {
    margin: 6px 0 0;
    font-size: var(--fs-meta);
    color: var(--text-muted);
}
.ui-kit .records-confirm__form {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}
.ui-kit .records-confirm__form input[name="confirmation"] {
    width: 12rem;
    letter-spacing: 0.06em;
}
.ui-kit .records-btn--danger-solid {
    background: var(--red-ink);
    border-color: var(--red-ink);
    color: white;
}
.ui-kit .records-btn--danger-solid:hover {
    background: var(--red-ink);
    border-color: var(--red-ink);
    color: white;
    filter: brightness(0.92);
}

/* Forms: one column of grouped fields, the primary action at the bottom left,
   Cancel as a quiet button beside it. */
.ui-kit .records-form {
    max-width: 52rem;
}
.ui-kit .records-form .ui-form-grid + .ui-form-grid,
.ui-kit .records-form .ui-field + .ui-form-grid,
.ui-kit .records-form .ui-form-grid + .ui-field {
    margin-top: 14px;
}
.ui-kit .records-form textarea:not(.select2-search__field) {
    min-height: 7rem;
}
.ui-kit .records-form select[multiple] {
    height: auto;
    min-height: 8rem;
}
.ui-kit .records-form .ui-form-actions {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--line-soft);
}
.ui-kit .records-errors {
    margin: 0 0 16px;
    padding: 10px 14px;
    border: 1px solid var(--red-line);
    border-radius: var(--radius-card);
    background: var(--red-wash);
    color: var(--red-ink);
    font-size: var(--fs-body-sm);
}
.ui-kit .records-errors ul {
    margin: 4px 0 0;
    padding-left: 1.1rem;
}

.ui-kit .records-split:not(:has(> aside)) {
    grid-template-columns: minmax(0, 1fr);
}

/* A list of linked entities (a project's startups): entity left, action right. */
.ui-kit .records-entities > li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* A small form inside a .ui-menu panel (Add startup, Add partner organization). */
.ui-kit .records-menu-form {
    width: 22rem;
}
.ui-kit .records-menu-form .ui-form-actions {
    margin-top: 12px;
}

/* ---------------------------------------------------------------------------
   Contract page: property checkboxes, invoice rows
   ------------------------------------------------------------------------ */

.ui-kit .records-contract .ui-props label {
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    color: inherit;
}
.ui-kit .records-contract #contract-form .ui-section__head {
    margin-top: 0;
}
.ui-kit .records-invoices > li.records-invoice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
}
.ui-kit .records-invoice__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 32px;
    margin: 0;
    font-size: var(--fs-body-sm);
}
.ui-kit .records-invoice__facts > div {
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.ui-kit .records-invoice__facts dt,
.ui-kit .records-invoice__facts dt label {
    color: var(--text-faint);
    font: 700 0.6875rem / 1.4 var(--font-ui);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.ui-kit .records-invoice__facts dd {
    margin: 0;
}
.ui-kit .records-invoice__form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px 16px;
}
.ui-kit .records-invoice .action-link {
    display: inline;
    margin: 0;
}

/* "Assigned to" is capped so both task tables fit a 1100px window; the full
   list is in the cell's title. */
.ui-kit .records-task-table td.records-task-table__assignee {
    max-width: 9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* ============================================================================
   UI kit adapters for the settings and account pages (wave 2, mb/ui-settings):
   platform settings / new / edit, partner organization new / edit, stagegate,
   subtopic and scouting priority forms, and the Devise pages (sign in,
   passwords, invitations, account). Every rule is scoped under `.ui-kit`, so
   only pages that call `ui_kit_page!` see any of it. FLITE's settings page
   never opts in. Tokens only (design_tokens.css).
   ========================================================================= */

/* ---------------------------------------------------------------------------
   Settings pages: .ui-settings wraps the page. Rows are the kit's
   .ui-form-row (intro left, controls right); the control column is capped
   so inputs do not stretch across a 1440px screen.
   ------------------------------------------------------------------------ */

.ui-kit .ui-settings {
    max-width: 72rem;
}
.ui-kit .ui-settings .ui-section {
    margin-bottom: 40px;
}
.ui-kit .ui-settings .ui-form-row {
    grid-template-columns: minmax(14rem, 20rem) minmax(0, 1fr);
    gap: 12px 48px;
}
/* The first row sits straight on the section's teal hairline. */
.ui-kit .ui-settings .ui-section__head + .ui-form-row {
    border-top: 0;
    padding-top: 6px;
}
.ui-kit .ui-settings__control {
    max-width: 34rem;
    min-width: 0;
}
.ui-kit .ui-settings .ui-form-stack {
    max-width: none;
}
.ui-kit .ui-settings .ui-form-row .ui-form-actions {
    margin-top: 14px;
}
/* Two fields side by side inside a stack (name + level). */
.ui-kit .ui-settings__pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
}
/* A group of checkbox rows. */
.ui-kit .ui-settings__checks {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ui-kit .ui-settings__checks .ui-field__hint {
    margin-left: 23px; /* under the label text, past the 15px box + 8px gap */
}

/* Simple record list inside a settings section (linked organizations). */
.ui-kit .ui-settings__list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.ui-kit .ui-settings__list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 0;
    border-bottom: 1px solid var(--line-soft);
}
.ui-kit .ui-settings__list-item form {
    margin: 0;
}

/* Page footer row: secondary way out of a form page (Delete / Cancel). */
.ui-kit .ui-settings__footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding-top: 14px;
    border-top: 1px solid var(--line-soft);
}

/* Danger zone: the eyebrow keeps its recipe but the hairline and title take
   the red signal, so the destructive group reads as separate at a glance. */
.ui-kit .ui-settings__danger .ui-section__head {
    border-bottom-color: var(--red-line);
}
.ui-kit .ui-settings__danger .ui-section__title {
    color: var(--red-ink);
}

/* Menu panel holding a legacy form partial (Add organization). */
.ui-kit .ui-settings .ui-menu__panel {
    min-width: 20rem;
}
.ui-kit .ui-settings .ui-menu__panel .actions {
    margin: 12px 0 0;
}

/* Form fields inside a fieldset (the innovation workspace block). */
.ui-kit .ui-settings fieldset {
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
}

/* ---------------------------------------------------------------------------
   Validation. Rails wraps an invalid field's label and control in
   <div class="field_with_errors">, which would break the kit's
   `.ui-field > label` recipe; the wrapper steps out of the layout and the
   label keeps the recipe.
   ------------------------------------------------------------------------ */

.ui-kit .ui-field > .field_with_errors {
    display: contents;
}
.ui-kit .ui-field > .field_with_errors > label {
    margin: 0;
    font: 650 0.6875rem / 1.2 var(--font-ui);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--red-ink);
}
.ui-kit .ui-field--check > .field_with_errors > label {
    font: 400 var(--fs-body-sm) / 1.35 var(--font-ui);
    letter-spacing: 0;
    text-transform: none;
}
.ui-kit .ui-field.is-invalid > label {
    color: var(--red-ink);
}

/* Form-level error summary (base errors, or errors with no field on the
   page). Field errors sit under their own field. */
.ui-kit .ui-form-errors {
    margin: 0 0 16px;
    padding: 10px 14px;
    border: 1px solid var(--red-line);
    border-radius: var(--radius-card);
    background: var(--red-wash);
    color: var(--red-ink);
    font: 400 var(--fs-body-sm) / 1.4 var(--font-ui);
}
.ui-kit .ui-form-errors__title {
    margin: 0;
    font: 650 var(--fs-body-sm) / 1.3 var(--font-ui);
    letter-spacing: 0;
    text-transform: none;
    color: var(--red-ink);
}
.ui-kit .ui-form-errors ul {
    margin: 4px 0 0;
    padding-left: 18px;
}

/* ---------------------------------------------------------------------------
   Signed-out pages (sign in, forgot / reset password, accept invitation,
   resend confirmation / unlock): one calm card under the masthead's logo
   plate. The first thing every client sees.
   ------------------------------------------------------------------------ */

.ui-kit .ui-auth {
    box-sizing: border-box;
    width: 100%;
    max-width: 24.5rem;
    margin: 96px auto 48px;
}
.ui-kit .ui-auth__card {
    padding: 28px 28px 24px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-card);
    background: white;
}
.ui-kit .ui-auth__title {
    margin: 0;
    padding: 0 0 10px;
    border-bottom: 2px solid var(--teal-rule);
    font: 400 1.5rem / 1.15 var(--font-ui);
    letter-spacing: -0.003em;
    text-transform: uppercase;
    color: var(--ink);
}
.ui-kit .ui-auth__intro {
    margin: 12px 0 0;
    font: 400 var(--fs-body-sm) / 1.45 var(--font-ui);
    color: var(--text-muted);
}
.ui-kit .ui-auth form {
    margin: 20px 0 0;
}
.ui-kit .ui-auth .ui-form-stack {
    max-width: none;
}
.ui-kit .ui-auth :where(input:not([type="checkbox"]):not([type="radio"]):not([type="submit"])) {
    height: 38px;
    font-size: 0.9375rem;
}
.ui-kit .ui-auth .ui-form-actions {
    margin-top: 20px;
}
.ui-kit .ui-auth .ui-form-actions .ui-btn {
    width: 100%;
    height: 38px;
    font-size: var(--fs-body-sm);
}
.ui-kit .ui-auth__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 20px;
    margin: 16px 0 0;
    font-size: var(--fs-ui);
}
.ui-kit .ui-auth__links p {
    margin: 0;
}
.ui-kit .ui-auth__links form {
    margin: 0;
}
/* A sign-in failure: Devise sets flash[:alert], which the layout floats for
   3 seconds; the card keeps the message in place while the user retypes. */
.ui-kit .ui-auth__alert {
    margin: 16px 0 0;
    padding: 8px 12px;
    border: 1px solid var(--red-line);
    border-radius: var(--radius-ctl);
    background: var(--red-wash);
    color: var(--red-ink);
    font: 400 var(--fs-body-sm) / 1.4 var(--font-ui);
}
.ui-kit .ui-auth .ui-form-errors {
    margin: 16px 0 0;
}

/* Instant-save status next to a preference toggle (partner org settings). */
.ui-kit .ui-settings .org-edit-save-status {
    margin-left: 4px;
    font: 600 var(--fs-meta) / 1.3 var(--font-ui);
    color: var(--text-faint);
}
.ui-kit .ui-settings .org-edit-save-status--success {
    color: var(--green-ink);
}
.ui-kit .ui-settings .org-edit-save-status--error {
    color: var(--red-ink);
}

/* One-form settings pages (several sections, one submit): the Save bar sits
   under the last section, lined up with the control column, and sticks to the
   bottom of the window while the form is in view. */
.ui-kit .ui-settings__savebar {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: grid;
    grid-template-columns: minmax(14rem, 20rem) minmax(0, 1fr);
    gap: 12px 48px;
    margin: -16px 0 48px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
    background: white;
}
.ui-kit .ui-settings__savebar .ui-form-actions {
    grid-column: 2;
    margin: 0;
}

/* Row-level destructive action (Remove an organization from the platform):
   quiet at rest, red on hover or keyboard focus only. */
.ui-kit .ui-settings__remove:hover,
.ui-kit .ui-settings__remove:focus-visible {
    color: var(--red-ink);
}
/* ============================================================================
   Startup profile (startups/show) and the startup form (new / edit) on the UI
   kit. Page-only adapters, all scoped under `.ui-kit` plus a page class
   (.sp-profile, .sp-form-page), so no other page changes. Classes are .sp-*.
   The kit itself (ui_kit.css) owns buttons, pills, fields, props, tables.
   ========================================================================= */

/* ---------------------------------------------------------------------------
   Identity header: logo tile, name + status pill, descriptor line, actions
   ------------------------------------------------------------------------ */

.ui-kit .sp-profile .sp-head {
    align-items: center;
    flex-wrap: nowrap;
    gap: 16px;
}
.ui-kit .sp-profile .sp-head__logo {
    flex: none;
    display: grid;
    place-items: center;
    box-sizing: border-box;
    width: 56px;
    height: 56px;
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-ctl);
    background: var(--wash);
}
.ui-kit .sp-profile .sp-head__logo .u-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.ui-kit .sp-profile .sp-head__initials {
    color: var(--text-muted);
    font: 700 1.125rem / 1 var(--font-ui);
}
.ui-kit .sp-profile .sp-head__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    min-width: 0;
}
.ui-kit .sp-profile .sp-head__title-row .ui-page-head__title {
    overflow-wrap: anywhere;
}
/* Descriptor: domain, location, stage, founded. Items separated by space and
   a CSS-drawn dot (the Overpass middle dot glyph has almost no width). */
.ui-kit .sp-profile .sp-head__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 0;
}
.ui-kit .sp-profile .sp-head__meta > * + *::before {
    content: "";
    display: inline-block;
    width: 3px;
    height: 3px;
    margin: 0 10px;
    border-radius: 50%;
    background: var(--text-faint);
    vertical-align: middle;
}
.ui-kit .sp-profile .sp-head .ui-page-head__actions {
    flex: none;
    align-self: center;
}

/* Scrape website menu: the curate panel's fieldsets, flattened into the menu. */
.ui-kit .sp-profile .sp-curate-menu__panel {
    width: 26rem;
}
.ui-kit .sp-profile .sp-menu-note {
    margin: 0 0 10px;
    color: var(--text-faint);
    font-size: var(--fs-meta);
    line-height: 1.4;
}
.ui-kit .sp-profile .sp-curate-menu .curation-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px 24px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
}
.ui-kit .sp-profile .sp-curate-menu .curation-panel .curation-eyebrow {
    margin-bottom: 4px;
    color: var(--text-faint);
    font: 700 0.6875rem / 1.2 var(--font-ui);
    letter-spacing: 0.06em;
}
.ui-kit .sp-profile .sp-curate-menu .curation-panel label {
    font-size: var(--fs-body-sm);
    gap: 6px;
}
.ui-kit .sp-profile .sp-curate-menu .curation-panel > label {
    align-self: flex-end;
}
.ui-kit .sp-profile .sp-curate-menu #startup-scrape-grade {
    flex-basis: 100%;
    color: var(--text-muted);
    font-size: var(--fs-meta);
}
.ui-kit .sp-profile .sp-curate-menu .startup-enriched__date {
    margin-left: 6px;
    color: var(--text-faint);
}
.ui-kit .sp-profile .sp-curate-menu input[type="submit"] {
    flex-basis: 100%;
    height: 32px;
    padding: 0 12px;
    border: 1px solid var(--teal-ink);
    border-radius: var(--radius-ctl);
    background: var(--teal-ink);
    color: white;
    font: 600 var(--fs-ui) / 1 var(--font-ui);
    letter-spacing: 0;
    text-transform: none;
    cursor: pointer;
}
.ui-kit .sp-profile .sp-curate-menu input[type="submit"]:hover {
    background: var(--teal-ink-hover);
}

/* ---------------------------------------------------------------------------
   Two columns: main + facts rail (stacks on narrow windows)
   ------------------------------------------------------------------------ */

.ui-kit .sp-profile .sp-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 20rem;
    gap: 0 48px;
    align-items: start;
}
.ui-kit .sp-profile .sp-rail .ui-section {
    margin-bottom: 26px;
}
@media (max-width: 1000px) {
    .ui-kit .sp-profile .sp-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Quiet one-line empty state (the kit's .ui-empty is a panel). */
.ui-kit .sp-profile .sp-empty {
    margin: 0;
    color: var(--text-faint);
    font-size: var(--fs-body-sm);
    line-height: 1.45;
}

.ui-kit .sp-profile .sp-prose {
    max-width: 72ch;
    color: var(--text);
    font-size: 0.9375rem;
    line-height: 1.55;
}
.ui-kit .sp-profile .sp-prose p {
    margin: 0 0 0.6em;
}
.ui-kit .sp-profile .sp-prose p:last-child {
    margin-bottom: 0;
}
.ui-kit .sp-profile .sp-note {
    margin: 0;
    color: var(--text);
    font-size: var(--fs-body-sm);
    line-height: 1.5;
    white-space: pre-line;
}
.ui-kit .sp-profile .sp-note--spaced {
    margin-top: 8px;
}

/* Sub-heading inside a section (group label recipe). */
.ui-kit .sp-profile .sp-sub {
    margin-top: 16px;
}
.ui-kit .sp-profile .sp-sub__title {
    display: block;
    margin: 16px 0 8px;
    color: var(--text-faint);
    font: 700 0.6875rem / 1.2 var(--font-ui);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.ui-kit .sp-profile .sp-sub > .sp-sub__title {
    margin-top: 0;
}
.ui-kit .sp-profile .sp-sub__meta {
    margin-left: 6px;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
}
.ui-kit .sp-profile .sp-inline-meta {
    margin-left: 6px;
    font-size: var(--fs-meta);
}

/* Props in the rail: narrower label column, values wrap. */
.ui-kit .sp-profile .sp-props {
    grid-template-columns: 7.75rem minmax(0, 1fr);
    gap: 7px 12px;
}
.ui-kit .sp-profile .sp-props > dd {
    overflow-wrap: anywhere;
}
.ui-kit .sp-profile .sp-break {
    overflow-wrap: anywhere;
}

.ui-kit .sp-profile .sp-link-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: var(--fs-body-sm);
}

/* ---------------------------------------------------------------------------
   Staff-only material: an outline "Staff only" pill in the section head, and
   inside the summary a hairline-topped block.
   ------------------------------------------------------------------------ */

.ui-kit .sp-profile .sp-staff-block {
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px dashed var(--line);
}
.ui-kit .sp-profile .sp-staff-block__label {
    margin: 0 0 4px;
}
.ui-kit .sp-profile .sp-staff-block .sp-sub {
    margin-top: 12px;
}
.ui-kit .sp-profile .sp-internal__toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 12px 0 0;
}

/* The enrichment suggestion table (shared partial) inside the profile. */
.ui-kit .sp-profile .suggestions-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fs-body-sm);
}
.ui-kit .sp-profile .suggestions-table th {
    padding: 6px 8px;
    border-bottom: 1px solid var(--line);
    color: var(--text-faint);
    font: 700 0.6875rem / 1.2 var(--font-ui);
    letter-spacing: 0.06em;
    text-align: left;
    text-transform: uppercase;
}
.ui-kit .sp-profile .suggestions-table td {
    padding: 8px;
    border-bottom: 1px solid var(--line-soft);
    vertical-align: top;
}

/* ---------------------------------------------------------------------------
   Pipelines: where it stands per organisation, then the history tabs
   ------------------------------------------------------------------------ */

.ui-kit .sp-profile .sp-pipelines {
    margin-top: 0;
}
.ui-kit .sp-profile .sp-standing {
    margin: 0 0 4px;
    padding: 0;
    list-style: none;
}
.ui-kit .sp-profile .sp-standing__row {
    display: grid;
    grid-template-columns: minmax(8rem, 14rem) minmax(10rem, 16rem) minmax(0, 1fr);
    align-items: center;
    gap: 6px 16px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line-soft);
    font-size: var(--fs-body-sm);
}
.ui-kit .sp-profile .sp-standing__org {
    color: var(--ink);
    font-weight: 600;
}
.ui-kit .sp-profile .sp-standing__stage {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    min-width: 0;
}
.ui-kit .sp-profile .sp-standing__latest {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2px 12px;
    color: var(--text-muted);
}
.ui-kit .sp-profile .sp-standing__meta {
    color: var(--text-faint);
    font-size: var(--fs-meta);
    font-variant-numeric: tabular-nums;
}
.ui-kit .sp-profile .sp-pipelines__history-title {
    margin-top: 20px;
}

/* History tabs: tabs_controller's .enhanced-tab-nav buttons, drawn as the
   kit's underline tabs (the kit's .ui-tabs are links; these are buttons). */
.ui-kit .sp-profile .sp-tabs {
    display: flex;
    gap: 2px;
    margin: 0 0 4px;
    padding: 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: none;
    overflow-x: auto;
}
.ui-kit .sp-profile .sp-tabs .pipeline-tabs__tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 -1px;
    padding: 8px 12px;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: none;
    box-shadow: none;
    color: var(--text-muted);
    font: 600 var(--fs-ui) / 1.2 var(--font-ui);
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
    cursor: pointer;
}
.ui-kit .sp-profile .sp-tabs .pipeline-tabs__tab:hover {
    background: var(--wash);
    color: var(--ink);
}
.ui-kit .sp-profile .sp-tabs .pipeline-tabs__tab.active {
    border-bottom-color: var(--teal-ink);
    color: var(--ink);
}
.ui-kit .sp-profile .pipeline-tabs .enhanced-tab-pane {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
}
.ui-kit .sp-profile .pipeline-tabs .enhanced-tab-pane.hidden {
    display: none;
}

/* Event list */
.ui-kit .sp-profile .sp-timeline {
    margin: 0;
    padding: 0;
    list-style: none;
}
.ui-kit .sp-profile .sp-event {
    padding: 10px 0;
    border-bottom: 1px solid var(--line-soft);
}
.ui-kit .sp-profile .sp-event__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
}
.ui-kit .sp-profile .sp-event__desc {
    color: var(--ink);
    font-size: var(--fs-body-sm);
}
.ui-kit .sp-profile .sp-event__time {
    margin-left: auto;
    color: var(--text-faint);
    font-size: var(--fs-meta);
    font-variant-numeric: tabular-nums;
}
.ui-kit .sp-profile .sp-event__comment {
    margin: 6px 0 0;
    color: var(--text);
    font-size: var(--fs-body-sm);
    line-height: 1.45;
}
.ui-kit .sp-profile .sp-event__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 0;
    margin-top: 4px;
    color: var(--text-faint);
    font-size: var(--fs-meta);
}
.ui-kit .sp-profile .sp-event__meta > span + span::before {
    content: "";
    display: inline-block;
    width: 3px;
    height: 3px;
    margin: 0 8px;
    border-radius: 50%;
    background: currentColor;
    vertical-align: middle;
}
.ui-kit .sp-profile .sp-event__delete {
    margin-left: auto;
}

/* ---------------------------------------------------------------------------
   Comments
   ------------------------------------------------------------------------ */

.ui-kit .sp-profile .sp-comment-list {
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}
.ui-kit .sp-profile .sp-comment {
    padding: 10px 0;
    border-bottom: 1px solid var(--line-soft);
}
.ui-kit .sp-profile .sp-comment:first-child {
    padding-top: 0;
}
.ui-kit .sp-profile .sp-comment__head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.ui-kit .sp-profile .sp-comment__author {
    color: var(--ink);
    font-size: var(--fs-body-sm);
    font-weight: 600;
}
.ui-kit .sp-profile .sp-comment__body {
    max-width: 72ch;
    color: var(--text);
    font-size: var(--fs-body-sm);
    line-height: 1.5;
}
.ui-kit .sp-profile .sp-comment__body p {
    margin: 0 0 0.4em;
}
.ui-kit .sp-profile .sp-comment__body p:last-child {
    margin: 0;
}
.ui-kit .sp-profile .sp-comment-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 44rem;
    margin-top: 16px;
}
.ui-kit .sp-profile .sp-comments .sp-empty + .sp-comment-form {
    margin-top: 12px;
}
.ui-kit .sp-profile .sp-comment-form__row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 20px;
}
.ui-kit .sp-profile .sp-comment-form__row > .ui-field--check {
    height: 32px;
}
.ui-kit .sp-profile .sp-comment-form__org {
    flex: 0 1 16rem;
}
.ui-kit .sp-profile .sp-comment-form__row > .ui-form-actions {
    margin: 0 0 0 auto;
}

/* ---------------------------------------------------------------------------
   Staff intelligence: topic / competitor chips, similar table, events
   ------------------------------------------------------------------------ */

.ui-kit .sp-profile .sp-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.ui-kit .sp-profile .sp-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    box-sizing: border-box;
    padding: 0 4px 0 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: white;
    font-size: var(--fs-body-sm);
}
.ui-kit .sp-profile .sp-chip--suggestion {
    border-style: dashed;
}
.ui-kit .sp-profile .sp-chip__name {
    color: var(--ink);
    font-weight: 600;
}
.ui-kit .sp-profile a.sp-chip__name {
    color: var(--teal-ink);
}
.ui-kit .sp-profile .sp-chip__note,
.ui-kit .sp-profile .sp-chip__source,
.ui-kit .sp-profile .sp-chip__score {
    color: var(--text-faint);
    font-size: var(--fs-meta);
    font-weight: 400;
}
.ui-kit .sp-profile .sp-chip__source {
    text-transform: capitalize;
}
.ui-kit .sp-profile .sp-chip:not(:has(.sp-chip__remove)):not(:has(form)) {
    padding-right: 10px;
}
.ui-kit .sp-profile .sp-chip__remove {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--text-faint);
    font: 400 1rem / 1 var(--font-ui);
    text-transform: none;
    cursor: pointer;
}
.ui-kit .sp-profile .sp-chip__remove:hover {
    background: var(--red-wash);
    color: var(--red-ink);
}
.ui-kit .sp-profile .sp-quiet-text {
    color: var(--text-muted);
}
.ui-kit .sp-profile .sp-quiet-text:hover {
    color: var(--ink);
}
/* Row-level deletes: quiet until hovered or focused, then red. */
.ui-kit .sp-profile .sp-quiet-delete {
    color: var(--text-muted);
}
.ui-kit .sp-profile .sp-quiet-delete:is(:hover, :focus-visible) {
    color: var(--red-ink);
}

.ui-kit .sp-profile .sp-similar td {
    vertical-align: middle;
}

.ui-kit .sp-profile .sp-events {
    margin: 0;
    padding: 0;
    list-style: none;
}
.ui-kit .sp-profile .sp-events__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    padding: 7px 0;
    border-bottom: 1px solid var(--line-soft);
    font-size: var(--fs-body-sm);
}
.ui-kit .sp-profile .sp-events__date {
    min-width: 6rem;
    color: var(--text-faint);
    font-size: var(--fs-meta);
}
.ui-kit .sp-profile .sp-events__title {
    color: var(--ink);
}
.ui-kit .sp-profile .sp-events__topic {
    margin-left: auto;
    color: var(--text-faint);
    font-size: var(--fs-meta);
}

.ui-kit .sp-profile .sp-image {
    display: block;
    max-width: 100%;
    margin: 0 0 12px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-card);
}

/* Admin internals (?view=admin): legacy grey panel off, kit tables on. */
.ui-kit .sp-profile .sp-admin {
    margin-top: 16px;
    background: none;
    color: var(--text);
    font-size: var(--fs-body-sm);
}
.ui-kit .sp-profile .sp-admin .admin-internals__pre {
    max-height: 18rem;
    overflow: auto;
    padding: 10px 12px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-ctl);
    background: var(--wash);
    font-size: var(--fs-meta);
    white-space: pre-wrap;
}
.ui-kit .sp-profile .sp-admin .ui-table-wrap {
    margin-bottom: 8px;
}

/* ---------------------------------------------------------------------------
   Files and popovers (popover-toggle keeps its behaviour; the panel keeps
   .details__liner for select2's dropdownParent, drawn as a kit menu panel)
   ------------------------------------------------------------------------ */

.ui-kit .sp-profile .sp-files {
    margin: 0;
    padding: 0;
    list-style: none;
}
.ui-kit .sp-profile .sp-file {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    border-bottom: 1px solid var(--line-soft);
    font-size: var(--fs-body-sm);
}
.ui-kit .sp-profile .sp-file__icon {
    flex: none;
    width: 18px;
    height: 18px;
}
.ui-kit .sp-profile .sp-file__name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    color: var(--ink);
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ui-kit .sp-profile popover-toggle {
    position: relative;
    display: inline-flex;
}
.ui-kit .sp-profile .sp-pop > summary {
    list-style: none;
}
.ui-kit .sp-profile .sp-pop > summary::-webkit-details-marker {
    display: none;
}
.ui-kit .sp-profile .sp-pop__kebab {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: var(--radius-ctl);
    color: var(--text-muted);
    cursor: pointer;
}
.ui-kit .sp-profile .sp-pop__kebab:hover,
.ui-kit .sp-profile .sp-pop[open] > .sp-pop__kebab {
    background: var(--wash);
    color: var(--ink);
}
.ui-kit .sp-profile .sp-pop__kebab svg {
    margin: 0;
}
.ui-kit .sp-profile popover-toggle .sp-pop__panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 30;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 16rem;
    padding: 14px 16px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-card);
    background: white;
    box-shadow: var(--shadow-pop);
    text-align: left;
    white-space: normal;
}
.ui-kit .sp-profile popover-toggle .sp-pop__panel--search {
    width: 20rem;
}
.ui-kit .sp-profile popover-toggle .sp-pop__panel form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ui-kit .sp-profile popover-toggle .sp-pop__panel .ui-form-actions {
    margin: 0;
}
.ui-kit .sp-profile .sp-pop__row {
    margin: 0;
}
.ui-kit .sp-profile popover-toggle .sp-pop__panel fieldset {
    margin: 0;
    padding: 0;
    border: 0;
}
.ui-kit .sp-profile popover-toggle .sp-pop__panel legend,
.ui-kit .sp-profile popover-toggle .sp-pop__panel .form-group label {
    display: block;
    margin: 0 0 5px;
    color: var(--text-muted);
    font: 650 0.6875rem / 1.2 var(--font-ui);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.ui-kit .sp-profile popover-toggle .sp-pop__panel .radio-group {
    border-color: var(--line);
    border-radius: var(--radius-ctl);
}
.ui-kit .sp-profile popover-toggle .sp-pop__panel .radio-group label {
    border-right-color: var(--line);
    color: var(--text-muted);
    font: 600 var(--fs-ui) / 1.2 var(--font-ui);
    text-transform: none;
}
.ui-kit .sp-profile popover-toggle .sp-pop__panel .radio-group label:has(input:checked) {
    background: var(--teal-ink);
    color: white;
}
.ui-kit .sp-profile popover-toggle .sp-pop__panel .popover-divider {
    width: 100%;
    margin: 2px 0;
    border: 0;
    border-top: 1px solid var(--line-soft);
}
.ui-kit .sp-profile popover-toggle .sp-pop__panel .popover-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.ui-kit .sp-profile popover-toggle .sp-pop__panel .popover-actions form {
    display: inline-flex;
}
/* Section-head popovers (Upload, Add competitor) open under their button. */
.ui-kit .sp-profile .ui-section__actions popover-toggle {
    align-self: center;
}

/* ---------------------------------------------------------------------------
   Startup form (new / edit)
   ------------------------------------------------------------------------ */

.ui-kit .sp-form-page {
    max-width: 64rem;
}
.ui-kit .sp-form-page .sp-form.startup_form {
    display: block;
}
/* The form's first children are hidden inputs, so the kit's
   .ui-form-row:first-child reset never matches here. */
.ui-kit .sp-form-page .sp-form > .ui-form-row:first-of-type {
    padding-top: 4px;
    border-top: 0;
}
.ui-kit .sp-form-page .sp-form-grid {
    grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
}
.ui-kit .sp-form-page .sp-form-grid :where(input, select, textarea):not([type="checkbox"]):not([type="radio"]):not([type="file"]) {
    width: 100%;
}
.ui-kit .sp-form-page .sp-form-grid .sp-input-year {
    width: 7rem;
}
.ui-kit .sp-form-page .ui-form-row__title {
    font-size: var(--fs-body-sm);
    text-transform: none;
}
.ui-kit .sp-form-page .sp-checks__row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    min-height: 32px;
    align-items: center;
}
.ui-kit .sp-form-page .sp-checks > .ui-field__label {
    margin: 0;
    color: var(--text-muted);
    font: 650 0.6875rem / 1.2 var(--font-ui);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
/* The primary action lives in one place: a bar pinned to the bottom of the
   window while the form scrolls. */
.ui-kit .sp-form-page .sp-form-actions {
    position: sticky;
    bottom: 0;
    z-index: 5;
    justify-content: flex-end;
    margin: 8px 0 0;
    padding: 12px 0;
    border-top: 1px solid var(--line);
    background: white;
}
.ui-kit .sp-form-page .sp-danger {
    margin-top: 40px;
    border-top: 1px solid var(--line);
    padding-top: 18px;
}
main[data-controller~="users"] {
    display: grid;
    grid-auto-flow: row dense;
    grid-gap: 2.5rem;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: masonry;
}
main[data-controller~="users"] section {
    grid-column: 1;
}
.hidden {
    display: none !important;
}
.note {
    color: var(--gray-light);
    font-style: italic;
    letter-spacing: calc(-0.17 / 16 * 1em);
}
.sr-only {
    border: none;
    clip: rect(0,0,0,0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

.view-link {
    align-self: center;
    font-size: 0.875rem;
    font-weight: 700;
    justify-self: end;
    text-decoration: none;
    text-transform: uppercase;
}

/* ============================================================================
   Default platform page redesign — every rule scoped to
   .platform-workspace-page (the wrapper around platforms#show's default
   branch). FLITE/community render outside the wrapper and keep the old look;
   shared partials (board, pipelines) get this skin ONLY on the platform page
   until the focus area page adopts the scope in the next phase.

   File name deliberately sorts after utility.css in require_tree so these
   overrides sit late in the bundle; all rules also win on specificity.
   Consumes design_tokens.css. Never edits shared source rules (dashboards.css
   .under-review-*, application.css .pipeline-* are FLITE- and cache-shared).
   ========================================================================= */

/* --- page frame ------------------------------------------------------- */

/* platforms.css lays the page into a 2fr/1fr grid with sections pinned to
   column 1; the workspace owns the whole width. */
main[data-controller~="platforms"] .platform-workspace-page {
    grid-column: 1 / -1;
}

.platform-workspace-page {
    font-family: var(--font-ui);
    color: var(--text);
}

/* Header action (Settings) sits outside the wrapper — class-gated to default
   platforms only in the view. */
.page-header-action {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    font-family: var(--font-ui);
    font-size: var(--fs-ui);
    font-weight: 600;
    color: var(--teal-ink);
    text-decoration: none;
    border: 1px solid var(--line);
    border-radius: var(--radius-ctl);
    background: #fff;
}

.page-header-action:hover {
    color: var(--teal-ink-hover);
    border-color: var(--teal-ink);
}

/* --- casing: hybrid policy -------------------------------------------- */
/* Headings keep the brand uppercase (base.css); controls go sentence case. */

.platform-workspace-page :is(button, .button,
    input[type="submit"], input[type="button"], input[type="reset"]) {
    text-transform: none;
    font-family: var(--font-ui);
}

.platform-workspace-page popover-toggle summary {
    text-transform: none;
}

.platform-workspace-page .section__header a {
    text-transform: none;
}

/* --- section headers: small, strong, uppercase eyebrows ---------------- */

.platform-workspace-page .section__header {
    align-items: center;
    border-bottom: 2px solid var(--teal-rule); /* the signature hairline */
    padding-bottom: 0.5rem;
}

.platform-workspace-page .section__header h2 {
    font-size: 0.9375rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    color: var(--ink);
}

/* --- control skins (4 replace 21) -------------------------------------- */

/* Primary: solid teal — every form submit on this surface. */
.platform-workspace-page input[type="submit"] {
    background: var(--teal-ink);
    border: 1px solid var(--teal-ink);
    border-radius: var(--radius-ctl);
    color: #fff;
    font-size: var(--fs-ui);
    font-weight: 600;
    padding: 0.4375rem 1rem;
    cursor: pointer;
}

.platform-workspace-page input[type="submit"]:hover {
    background: var(--teal-ink-hover);
    border-color: var(--teal-ink-hover);
}

/* Quiet text action: popover summaries (Files / Add topic / card kebabs
   keep their icon look), links in headers. */
.platform-workspace-page popover-toggle summary {
    color: var(--teal-ink);
    font-size: var(--fs-ui);
    font-weight: 600;
    cursor: pointer;
}

.platform-workspace-page popover-toggle summary:hover {
    color: var(--teal-ink-hover);
}

.platform-workspace-page .file__link {
    color: var(--teal-ink);
    font-size: var(--fs-ui);
    font-weight: 600;
}

/* --- workspace header strip ------------------------------------------- */

.workspace-actions {
    display: flex;
    align-items: center;
    gap: 1.125rem;
}

/* --- Files popover ----------------------------------------------------- */

.workspace-files summary {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.workspace-files__count {
    background: var(--pill-track);
    border-radius: var(--radius-pill);
    color: var(--text-muted);
    font-size: var(--fs-meta);
    font-weight: 700;
    line-height: 1.4;
    padding: 0 0.5rem;
}

.platform-workspace-page .workspace-files__panel {
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-pop);
    max-height: 26rem;
    overflow-y: auto;
    padding: 1rem 1.125rem;
    width: 26rem;
}

.workspace-files__group {
    color: var(--text-faint);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    margin: 0.875rem 0 0.25rem;
}

.workspace-files__panel > .workspace-files__group:first-child {
    margin-top: 0;
}

.workspace-files__empty {
    color: var(--text-faint);
    font-size: var(--fs-body-sm);
    margin: 0.25rem 0;
}

/* Compact file rows: flex, small icon, name truncates, actions right. */
.workspace-files__panel .construct-list {
    --icon-size: 1.875rem;
    margin: 0;
}

.workspace-files__panel .construct-list .file {
    align-items: center;
    border-top: 1px solid var(--line-soft);
    display: flex;
    gap: 0.5rem;
    margin: 0;
    padding: 0.4375rem 0;
}

.workspace-files__panel .construct-list .file:first-child {
    border-top: none;
}

.workspace-files__panel .file__filename {
    flex: 1;
    font-size: var(--fs-body-sm);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-files__panel .file form {
    margin: 0;
}

.workspace-files__delete {
    background: none;
    border: none;
    color: var(--red-ink);
    cursor: pointer;
    font-size: var(--fs-meta);
    font-weight: 600;
    padding: 0.125rem 0.25rem;
}

.workspace-files__delete:hover {
    text-decoration: underline;
}

/* Override the primary-submit skin inside the panel's Upload form? No —
   Upload IS a primary action; it keeps the solid teal. */
.workspace-files__upload {
    border-top: 1px solid var(--line-soft);
    margin-top: 0.875rem;
    padding-top: 0.125rem;
}

.workspace-files__upload .field {
    margin: 0.5rem 0;
}

.workspace-files__upload label {
    color: var(--text-muted);
    font-size: var(--fs-ui);
}

/* --- under-review chrome: calm, amber as the signal -------------------- */
/* Overrides dashboards.css values; source rules untouched (FLITE + cached
   dashboards share them). */

.platform-workspace-page .under-review-collapsible {
    background: #fff;
    border: 1px solid var(--line);
    border-left: 3px solid var(--amber-accent); /* the "needs decision" stripe */
    border-radius: var(--radius-card);
}

.platform-workspace-page .under-review-toggle {
    background: #fff;
    border-bottom: 1px solid var(--line-soft);
    border-radius: var(--radius-card) var(--radius-card) 0 0;
}

.platform-workspace-page .under-review-toggle.collapsed {
    border-bottom-color: transparent;
    border-radius: var(--radius-card);
}

.platform-workspace-page .under-review-toggle:hover {
    background: var(--wash);
}

.platform-workspace-page .under-review-left h4 {
    color: var(--ink);
    font-size: 0.875rem;
    font-weight: 650;
    letter-spacing: 0.04em;
}

.platform-workspace-page .under-review-count {
    background: var(--amber-accent);
    border-radius: var(--radius-pill);
    color: #fff;
    font-size: var(--fs-meta);
    font-weight: 700;
    line-height: 1.5;
    padding: 0.0625rem 0.5rem;
}

.platform-workspace-page .under-review-right .toggle-icon {
    color: var(--text-faint);
}

.platform-workspace-page .under-review-content {
    border-top: none;
}

.platform-workspace-page .view-rejected-link {
    border: 1px solid var(--line);
    border-radius: var(--radius-ctl);
    color: var(--text-muted);
    font-size: var(--fs-ui);
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    text-decoration: none;
}

.platform-workspace-page .view-rejected-link:hover {
    border-color: var(--text-faint);
    color: var(--ink);
}

/* ========================================================================
   .pipeline-skin — the shared pipeline scope hook
   ------------------------------------------------------------------------
   Everything below is keyed on `.pipeline-skin` rather than the platform
   page's own wrapper, because the same skin now dresses every non-FLITE
   pipeline: the platform workspace, focus area pages, both dashboards and
   the partner org page. Each surface emits the class on an ancestor that
   sits OUTSIDE its live-reload turbo-frame, so frame reloads inherit the
   scope without the reload endpoints knowing anything about it.

   FLITE is excluded by omission: its pages never emit the class, so the
   base rules in application.css / flite_platform.css keep rendering them
   exactly as before.
   ======================================================================== */

/* --- org pipeline tabs -------------------------------------------------- */

/* The workspace owns the full width; lift the component cap. Both forms: the
   partner dashboard puts the hook ON the .tabs--wide element itself, so a
   descendant-only selector would silently miss it. */
.pipeline-skin.tabs--wide,
.pipeline-skin .tabs--wide {
    max-width: none;
}

.pipeline-skin .tab-header {
    border-bottom-color: var(--line);
    margin-bottom: 1rem;
}

.pipeline-skin .tab-nav a {
    background: var(--wash);
    border: 1px solid var(--line);
    border-radius: var(--radius-item) var(--radius-item) 0 0;
    color: var(--text-muted);
    font-size: var(--fs-ui);
    font-weight: 600;
    padding: 0.375rem 0.875rem;
}

.pipeline-skin .tab-nav a:hover {
    color: var(--ink);
}

.pipeline-skin .tab-nav .active {
    background: #fff;
    border-color: var(--line);
    border-bottom-color: #fff;
    box-shadow: inset 0 2px 0 var(--teal-ink); /* signature: teal top rule */
    color: var(--ink);
}

/* --- pipeline board ----------------------------------------------------- */
/* Bootstrap-grey headers → token washes; source rules untouched. */

.pipeline-skin .pipeline-header {
    background: var(--wash);
    border-bottom: 2px solid var(--line);
    border-right: 1px solid var(--line-soft);
    color: var(--text-muted);
    font-size: var(--fs-ui);
    font-weight: 650;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

/* Wider slots that also GROW to share leftover page width — few columns get
   luxuriously wide cards, many columns floor at 320px and scroll. Headers and
   columns carry identical flex so they stay aligned; the category band
   re-measures real header widths in JS. */
.pipeline-skin .pipeline-header,
.pipeline-skin .pipeline-column-content {
    flex: 1 0 320px;
    min-width: 320px;
}

/* As many equal-width cards per row as fit at >=280px each — wide columns
   get 2-3 across, the 320px floor gets one. (The shared auto-fit grid packed
   shrunken max-content cards, which truncated even short names.) Pre-JS
   default; the scroll-sync script stamps the same value inline. */
.pipeline-skin .pipeline-column-content {
    border-right: 1px solid var(--line-soft);
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    justify-content: stretch;
}

/* --- pipeline cards: horizontal, review-card idiom ---------------------- */
/* Same anatomy as the under-review cards: logo left, content right. Height is
   content-sized (no filler) but the recipe is fixed — name, meta, chips row,
   note — so cards read uniformly. */

.pipeline-skin .pipeline-column-content .startup {
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-item);
    box-shadow: var(--shadow-card);
    padding: 0.625rem 0.75rem;
    /* The shared rule is a centering flex tile with min-height: 120px —
       that's the mystery white space. Content-sized block instead. */
    display: block;
    min-height: 0;
}

.pipeline-skin .pipeline-column-content .startup:hover {
    box-shadow: var(--shadow-pop);
}

.pipeline-skin .pipeline-column-content .startup-card-link {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 0.625rem;
    align-items: start;
    text-align: left;
}

.pipeline-skin .pipeline-column-content .startup .u-logo {
    width: 40px;
    height: 40px;
    margin: 0;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-ctl);
    background: var(--wash);
    object-fit: cover;
}

.pipeline-skin .pipeline-column-content .startup .startup__body {
    text-align: left;
    min-width: 0;
}

.pipeline-skin .pipeline-column-content .startup .startup__name {
    color: var(--ink);
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0;
    text-align: left;
    /* Room for the top-right kebab. */
    padding: 0 1.25rem 0 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pipeline-skin .pipeline-column-content .startup .startup__meta {
    color: var(--text-faint);
    font-size: var(--fs-meta);
    line-height: 1.35;
    margin-top: 0.0625rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Subtopic + tags share one clipped row. */
.pipeline-skin .pipeline-column-content .startup .startup__chips {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.25rem;
    margin-top: 0.3125rem;
    overflow: hidden;
}

/* Let the tag pills flow in the chips row alongside the subtopic. */
.pipeline-skin .pipeline-column-content .startup .startup__chips .startup__tags {
    display: contents;
}

.pipeline-skin .pipeline-column-content .startup .startup__subtopic {
    flex: 0 1 auto;
    display: inline-block;
    padding: 0 0.4375rem;
    background: var(--pill-track);
    border-radius: var(--radius-pill);
    color: var(--text-muted);
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.6;
    text-align: left;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pipeline-skin .pipeline-column-content .startup .startup__approval-comment {
    margin-top: 0.25rem;
}

.pipeline-skin .pipeline-column-content .startup .startup__approval-comment small {
    color: var(--text-faint);
    font-size: var(--fs-meta);
    font-style: normal;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* One row of tags, clipped — variable tag counts must not change the card
   height. Full tag management lives in the kebab. */
.pipeline-skin .pipeline-column-content .startup .startup__tags {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.25rem;
    margin-top: 0.3125rem;
    overflow: hidden;
}

.pipeline-skin .pipeline-column-content .startup .startup__tags .tag-pill {
    flex: 0 0 auto;
    border-radius: var(--radius-pill);
    font-size: 0.625rem;
    font-weight: 600;
    line-height: 1.6;
    padding: 0 0.4375rem;
}

.pipeline-skin .pipeline-column-content .startup .startup__controls {
    top: 0.375rem;
    right: 0.375rem;
}

/* --- dashboard tab strips ----------------------------------------------- */
/* The seamless dashboard's org tabs and its nested Pipeline|Table bar use a
   different component from the `.tab-nav` strips above (underline rather than
   folder tabs). Keep their structure — just move them onto the tokens and the
   teal rule, so the chrome hosting a reskinned pipeline doesn't read as a
   different era. Scoped, so any other `.enhanced-tabs` on the page is
   untouched. */

.pipeline-skin .enhanced-tab-link {
    color: var(--text-muted);
    font-family: var(--font-ui);
    font-size: var(--fs-ui);
    font-weight: 600;
}

.pipeline-skin .enhanced-tab-link:hover {
    background: var(--wash);
    color: var(--ink);
}

.pipeline-skin .enhanced-tab-link.active {
    background: #fff;
    border-bottom-color: var(--teal-ink);
    color: var(--ink);
}

.pipeline-skin .nested-tab-btn {
    color: var(--text-muted);
    font-family: var(--font-ui);
    font-size: var(--fs-ui);
    font-weight: 600;
}

.pipeline-skin .nested-tab-btn:hover {
    background: var(--wash);
    color: var(--ink);
}

.pipeline-skin .nested-tab-btn.active {
    background: #fff;
    border-bottom-color: var(--teal-ink);
    color: var(--ink);
}

.pipeline-skin .nested-tab-btn:first-child {
    border-right-color: var(--line);
}

/* --- read-only FLITE round entries ------------------------------------- */
/* These ride inside the dashboard / org-page columns (never on a FLITE page),
   so they take the same horizontal anatomy as their neighbours — a column
   mixing two card shapes reads as a bug. The badge becomes a chip in the
   card's chips row; flite_platform.css keeps owning its colours, and the
   table-row variant of the badge is untouched. */

.pipeline-skin .pipeline-column-content .flite-entry-card .flite-round-badge {
    margin-top: 0;
    padding: 0 0.4375rem;
    border-radius: var(--radius-pill);
    font-size: 0.625rem;
    line-height: 1.6;
}

/* No reader here: say so with the cursor rather than implying a card action. */
.pipeline-skin .pipeline-column-content .flite-entry-card {
    cursor: default;
}

/* dashboards.css sizes the pre-JS "loading" state to the legacy 200px floor;
   under the skin that renders a visible snap from narrow to wide columns once
   the scroll-sync script stamps its widths. Match the skin's floor instead.
   (Three classes + later load order beat the source rule.) */
.pipeline-skin .pipeline-container.pipeline-loading .pipeline-header,
.pipeline-skin .pipeline-container.pipeline-loading .pipeline-column-content {
    flex: 1 0 320px;
    min-width: 320px;
}

/* --- select2 inside the scope ------------------------------------------ */

.platform-workspace-page .select2-container .select2-selection {
    border-color: var(--line);
    border-radius: var(--radius-ctl);
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *



 */

.form--inline {
    align-items: end;
    display: flex;
    gap: 0.5rem 2rem;
}

.top-left-tiny {
    display: grid;
    grid-column: 1 / -1;
    grid-gap: 1rem 0.5rem;
}

.pagy-nav {
    text-align: center;
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.pagy-nav a, .pagy-nav span {
    margin: 0 5px;
    padding: 5px 10px;
    border: 1px solid #ccc;
    text-decoration: none;
    color: #333;
}

.pagy-nav .page.current {
    background-color: #007bff;
    color: white;
}

.pagy-nav a[aria-disabled="true"], .pagy-nav a[aria-disabled="true"]:hover {
    cursor: not-allowed;
    background-color: #f5f5f5;
    color: #ccc;
    border: 1px solid #ccc;
}

.main__liner .construct-list li {
    border-top: solid 1px var(--accent-base);
    margin: 0 0 0.625rem;
    min-height: var(--icon-size);
    padding: 0;
    padding-top: 0.625rem;
}

/* Remove top border for the first item within .main_liner .construct-list */
.main__liner .construct-list li:first-child {
    border-top: none;
    padding-top: 10px;
}

.embedded-scouting-priority {
    align-items: center;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

/* Pipeline Filter Toggle */
.pipeline-filters {
    display: flex;
    justify-content: flex-end;
    gap: 1.5rem;
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
}

.pipeline-filter-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.pipeline-filter-toggle input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    width: 36px;
    height: 20px;
    background: #d1d5db;
    border-radius: 10px;
    position: relative;
    transition: background 0.2s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.pipeline-filter-toggle input[type="checkbox"]:checked + .toggle-slider {
    background: var(--accent-base, #3b82f6);
}

.pipeline-filter-toggle input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(16px);
}

.toggle-label {
    font-size: 0.875rem;
    color: #4b5563;
    font-weight: 500;
}

/* Full Width Pipeline Styles */
.pipeline-full-width {
    width: 100%;
    margin: 1rem 0;
}

.pipeline-container {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    background: white;
    position: relative;
    overflow: hidden;
}

/* Top scrollbar — native browser scrollbar for maximum visibility */
.pipeline-scroll-top {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-color: #888 #f1f1f1;
}

.pipeline-scroll-dummy {
    height: 12px;
    /* Width will be set via JavaScript to match content width */
}

/* Main pipeline content — scrolls both axes.
   The horizontal scrollbar is hidden by pushing it below
   the container's overflow:hidden boundary via negative margin. */
.pipeline-content {
    width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    max-height: calc(100vh - 14rem);
    padding: 0 0 20px 0;
    margin: 0 0 -20px 0;
    scrollbar-color: #c0c0c0 #f0f0f0;
}

/* WebKit (Chrome, Edge, Safari, Opera): thin vertical, hidden horizontal */
.pipeline-content::-webkit-scrollbar {
    width: 6px;
    height: 0;
}
.pipeline-content::-webkit-scrollbar-track {
    background: transparent;
}
.pipeline-content::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}
.pipeline-content::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.pipeline-headers {
    display: flex;
    width: 100%;
    min-width: 100%;
    position: sticky;
    top: 0;
    z-index: 10;
    background: #f8f9fa;
}

.pipeline-header {
    background: #f8f9fa;
    border-right: 1px solid #dee2e6;
    border-bottom: 2px solid #6c757d;
    padding: 0.75rem 1rem;
    text-align: center;
    font-weight: 600;
    color: #495057;
    min-width: 200px;
    flex: 0 0 200px;
}

.pipeline-header:last-child {
    border-right: none;
}

/* ---- Stagegate category band (sits above the column headers) ----
   Each cell width = (visible columns it spans) * 200px, matching the fixed
   200px .pipeline-header / .pipeline-column-content slots (global border-box),
   so the band lines up exactly with the columns below. Borders are inside the
   border-box, so separators never shift the alignment. */
.pipeline-category-band {
    display: flex;
    width: 100%;
    min-width: 100%;
    background: #f8f9fa;
    padding-top: 0.45rem;
}

.pipeline-category-cell {
    flex: 0 0 200px;
    min-width: 0;
    padding: 0.4rem 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.2;
    border-right: 3px solid #f8f9fa;       /* separates adjacent colored bands */
    border-radius: 6px 6px 0 0;
}

.pipeline-category-cell:last-child {
    border-right: none;
}

/* Spacer above the "New" column and any uncategorized run — keeps alignment
   without painting a band. */
.pipeline-category-cell--empty {
    background: transparent !important;
    border-right-color: transparent;
    border-radius: 0;
}

.pipeline-category-cell__label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.pipeline-columns {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-height: 400px;
    margin: 0;
    padding: 0;
    gap: 0;
}

.pipeline-column-content {
    border-right: 1px solid #dee2e6;
    padding: 0.25rem 0.75rem 1rem 0.75rem;
    min-height: 400px;
    min-width: 200px;
    flex: 0 0 200px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, max-content));
    gap: 0.75rem;
    align-content: start;
    justify-content: center;
}

.pipeline-column-content:last-child {
    border-right: none;
}

/* Compact startup cards for pipeline */
.pipeline-column-content .startup {
    max-width: none;
    width: 100%;
    min-width: 140px;
    padding: 0.75rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    background: white;
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.pipeline-column-content .startup:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

/* Prevent hover effects when popover is open */
.pipeline-column-content .startup:has(popover-toggle details[open]) {
    transform: none !important;
}

.pipeline-column-content .startup:has(popover-toggle details[open]):hover {
    transform: none !important;
}

/* Restructure startup card layout */
.pipeline-column-content .startup .u-logo {
    display: block;
    margin: 0 auto 0.75rem auto;
    width: 80px;
    height: 80px;
}

.pipeline-column-content .startup .startup__body {
    text-align: center;
    justify-self: center;
    width: 100%;
}

.pipeline-column-content .startup .startup__name {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: none;
    margin: 0 auto 0.5rem auto;
    padding: 0 0.25rem;
    white-space: normal;
    display: block;
    text-align: center;
}

.pipeline-column-content .startup .response-indicator {
    margin-top: 0.5rem;
    text-align: center;
}

.pipeline-column-content .startup .response-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
}

/* Position popover toggle for compact cards */
.pipeline-column-content .startup popover-toggle {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}

.pipeline-column-content .startup {
    position: relative;
}

/* Startup Card Link Styles */
.startup-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
}

/* Specifically for pipeline cards */
.pipeline-column-content .startup-card-link {
    display: block;
    width: 100%;
    text-align: center;
}

.startup-card-link:hover {
    text-decoration: none;
    color: inherit;
    transform: translateY(-1px);
}

.startup-card-link:hover .startup {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.startup-card-link--clickable {
    cursor: pointer;
}

/* Startup Card Name (no longer a link) */
.startup__name {
    font-weight: 500;
    color: #2c3e50;
    display: block;
    margin-bottom: 0.25rem;
}

/* Response Indicator */
.response-indicator {
    margin-top: 0.5rem;
}

.response-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: #e9ecef;
    color: #495057;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid #dee2e6;
}

.response-badge:hover {
    background: #dee2e6;
    cursor: help;
}

/* Focus Area Startup Pipeline Cards */
.pipeline-column-content .focus-area-startup .startup__subtopic {
    font-size: 0.7rem;
    color: #6b7280;
    font-weight: 400;
    margin-top: 0.25rem;
    text-align: center;
}

/* Focus area startup controls positioning */
.pipeline-column-content .focus-area-startup .startup__controls {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}

.pipeline-column-content .focus-area-startup {
    position: relative;
}

/* Under Review Section */
.under-review-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem;
    align-content: start;
    justify-content: center;
    padding: 1rem;
    margin: 0;
}

.under-review-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.under-review-card {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    background: white;
    border: 2px solid #f59e0b;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    text-decoration: none;
    color: inherit;
    position: relative;
    aspect-ratio: 1;
}

.under-review-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    border-color: #d97706;
    text-decoration: none;
    color: inherit;
}

.under-review-card .u-logo {
    display: block;
    margin: 0 auto 0.75rem auto;
    width: 80px;
    height: 80px;
}

.under-review-card .startup__body {
    text-align: center;
}

.under-review-card .startup__name {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: none;
    margin: 0 auto 0.25rem auto;
    padding: 0 0.25rem;
    white-space: normal;
}

.under-review-card .startup__subtopic {
    font-size: 0.7rem;
    color: #6b7280;
    font-weight: 400;
    margin-top: 0.25rem;
    text-align: center;
}

.under-review-action-btn {
    background: #f59e0b;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.under-review-action-btn:hover {
    background: #d97706;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Subtopic and Stagegate Management */
.subtopic-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
}

.subtopic-name {
    flex: 1;
}

.subtopic-menu-toggle,
.tag-menu-toggle,
.stagegate-header-menu {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--accent-darker);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    line-height: 1;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.subtopic-menu-toggle:hover,
.tag-menu-toggle:hover,
.stagegate-header-menu:hover {
    background: rgba(0,0,0,0.1);
}

.stagegate-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stagegate-header-menu {
    margin-left: 0.5rem;
}

/* Context Menu */
.context-menu {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 120px;
}

.menu-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-size: 0.875rem;
    border-bottom: 1px solid #f3f4f6;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:hover {
    background: #f9fafb;
}

.menu-item--danger:hover {
    background: #fef2f2;
    color: #dc2626;
}

/* Modal Styling */
.subtopic-modal,
.stagegate-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    min-width: 400px;
    max-width: 500px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1.5rem 0;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #374151;
}

.modal-body {
    padding: 0 1.5rem 1.5rem;
}

.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .pipeline-header,
    .pipeline-column-content {
        min-width: 180px;
    }
    
    .under-review-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 1000px) {
    .under-review-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 800px) {
    .under-review-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .under-review-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 400px) {
    .under-review-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading placeholder and spinner for lazy loading */
.loading-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    min-height: 200px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Infinite scroll loading indicator */
.infinite-scroll-loading {
    text-align: center;
    padding: 1rem;
    color: #6b7280;
}

